version 1.1.1.1, 2007/11/02 20:55:00
|
version 1.1.1.1.2.1, 2007/11/13 07:36:19
|
Line 24
|
Line 24
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
# |
# |
|
# $Paefchen$ |
# $MCom: portstools/tinderbox/webui/module/moduleSession.php,v 1.3 2005/07/21 11:28:29 oliver Exp $ |
# $MCom: portstools/tinderbox/webui/module/moduleSession.php,v 1.3 2005/07/21 11:28:29 oliver Exp $ |
# |
# |
|
|
require_once 'module/module.php'; |
|
|
|
class moduleSession extends module { |
class moduleSession extends module { |
|
|
function moduleSession() { | public function setAttribute( $attribute, $value ) { |
$this->module(); | if(! session_id() ) { |
} | if(! $this->start() ) { |
| |
function setAttribute( $attribute, $value ) { | |
if( !session_id() ) { | |
if( !$this->start() ) { | |
return false; |
return false; |
} |
} |
} |
} |
Line 46 class moduleSession extends module {
|
Line 41 class moduleSession extends module {
|
return true; |
return true; |
} |
} |
|
|
function getAttribute( $attribute ) { | public function getAttribute( $attribute ) { |
if( isset( $_SESSION[$attribute] ) ) { |
if( isset( $_SESSION[$attribute] ) ) { |
return $_SESSION[$attribute]; |
return $_SESSION[$attribute]; |
} else { |
} else { |
Line 54 class moduleSession extends module {
|
Line 49 class moduleSession extends module {
|
} |
} |
} |
} |
|
|
function removeAttribute( $attribute ) { | public function removeAttribute( $attribute ) { |
unset( $_SESSION[$attribute] ); |
unset( $_SESSION[$attribute] ); |
} |
} |
|
|
function start() { | public function start() { |
if( !headers_sent() ) { | if(! headers_sent() ) { |
session_start(); |
session_start(); |
return true; |
return true; |
} |
} |
return false; |
return false; |
} |
} |
|
|
function destroy() { | public function __destruct() { |
if( session_id() ) { | if(session_id()) |
session_destroy(); |
session_destroy(); |
} |
|
} |
} |
} |
} |
|
|
?> |
?> |