Location: PHPKode > projects > Originator - RPG Rapid Prototyper > originator/includes/origin/session.php
<?php

/*
	Session class stolen from php.net zidaine_38 at yahoo dot com
	http://php.net/manual/en/function.session-start.php
*/

class SESSION { 

	public function __construct () { 
   		self :: commence (); 
	} 

   	public function commence () { 
    	if ( !isset( $_SESSION ['ready'])){ 
			session_start ();
			$_SESSION ['ready'] = TRUE; 
     	} 
   	} 

   	public function set ( $fld , $val ) { 
   		self :: commence (); 
   		$_SESSION [ $fld]  = $val; 
 	} 

	public function un_set ( $fld ) { 
		self :: commence (); 
   		unset( $_SESSION [$fld] ); 
   	} 

	public function destroy () { 
		self :: commence (); 
   		unset ( $_SESSION ); 
   		session_destroy (); 
   	}

	public function get ( $fld ) { 
		self :: commence (); 
   		return $_SESSION [$fld]; 
   	}

	public function is_set ( $fld ) { 
		self :: commence (); 
		return isset( $_SESSION [$fld] ); 
   	}
	
	public function isLoggedIn(){
		if (self::is_set("isLoggedIn")) {
			return self::get("isLoggedIn");
		}
		return false;	
	}

}
?>
Return current item: Originator - RPG Rapid Prototyper