This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class PostController extends Controller | |
{ | |
public function delete() | |
{ | |
if ($this->request->input->has('post_id')) | |
{ | |
$post=Model::Instance("blog.post",$this->request->input->post_id); | |
if ($post) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class PostController extends Controller | |
{ | |
public function index($post_id) | |
{ | |
if (is_numeric($post_id)) | |
{ | |
$post=Model::Instance("blog.post",$post_id); | |
if ($post) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if ($session->profile) | |
echo $session->profile->name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Provides a 'profile' property that returns the current user's profile: | |
* | |
* <code> | |
* if ($session->profile) | |
* echo $session->profile->name; | |
* </code> | |
*/ | |
class MassifySession extends Session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
name: auth_ticket | |
duration: 6000 | |
domain: ".yoursite.com" | |
salt: "saltycheese" | |
class: "app.lib.session.massify" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.app.session'); | |
$session=Session::Get(); | |
$session->delete(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.app.session'); | |
$session=Session::Get(); | |
echo $session->id; | |
echo $session->name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.app.session'); | |
$session=Session::Get(); | |
$session->id=12345; | |
$session->name="Bob McBob"; | |
$session->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
uses('system.app.session'); | |
$session=Session::Get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
name: auth_ticket | |
duration: 6000 | |
domain: ".yoursite.com" | |
salt: "saltycheese" |