X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fsession-functions.php;h=a2d1e8c22bc8b2f623b35ee4b26cd1f485c47c2d;hp=26e432c9c18741180b108d3b646b2941226b73ba;hb=1dd584090ba559372adb525fba74f46262c7308c;hpb=d8148e3f1f3a6762b2e786dbe99ada269dcf2ea0 diff --git a/inc/session-functions.php b/inc/session-functions.php index 26e432c9c1..a2d1e8c22b 100644 --- a/inc/session-functions.php +++ b/inc/session-functions.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Sitzungsrelevante Funktionen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,12 +38,12 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Unset/set session variables -function set_session ($var, $value) { +function setSession ($var, $value) { // Abort in CSS mode here if ($GLOBALS['output_mode'] == 1) return true; @@ -46,25 +51,25 @@ function set_session ($var, $value) { $var = trim(SQL_ESCAPE($var)); $value = trim($value); // Is the session variable set? - if (("".$value."" == "") && (isSessionVariableSet($var))) { + if (("".$value."" == '') && (isSessionVariableSet($var))) { // Remove the session - //* DEBUG: */ echo "UNSET:".$var."=".get_session($var)."
\n"; + //* DEBUG: */ echo "UNSET:".$var.'='.getSession($var)."
\n"; unset($_SESSION[$var]); return session_unregister($var); } elseif (("".$value."" != '') && (!isSessionVariableSet($var))) { // Set session - //* DEBUG: */ echo "SET:".$var."=".$value."
\n"; + //* DEBUG: */ echo "SET:".$var.'='.$value."
\n"; $_SESSION[$var] = $value; return session_register($var); } elseif (!empty($value)) { // Update session - //* DEBUG: */ echo "UPDATE:".$var."=".$value."
\n"; + //* DEBUG: */ echo "UPDATE:".$var.'='.$value."
\n"; $_SESSION[$var] = $value; return true; } // Ignored (but valid) - //* DEBUG: */ echo "IGNORED:".$var."=".$value."
\n"; + //* DEBUG: */ echo "IGNORED:".$var.'='.$value."
\n"; return true; } @@ -75,7 +80,7 @@ function isSessionVariableSet ($var) { } // Returns wether the value of the session variable or NULL if not set -function get_session ($var) { +function getSession ($var) { // Default is not found! ;-) $value = null; @@ -98,21 +103,21 @@ function get_session ($var) { } // Destroy user session -function destroy_user_session () { +function destroyUserSession () { // Reset userid - $GLOBALS['userid'] = 0; + setUserId(0); // Remove all user data from session - return ((set_session('userid', "")) && (set_session('u_hash', ""))); + return ((setSession('userid', '')) && (setSession('u_hash', ''))); } // Destroys the admin session function destroyAdminSession ($destroy = true) { // Kill maybe existing session variables including array elements - set_session('admin_login', ""); - set_session('admin_md5' , ""); - set_session('admin_last' , ""); - set_session('admin_to' , ""); + setSession('admin_login', ''); + setSession('admin_md5' , ''); + setSession('admin_last' , ''); + setSession('admin_to' , ''); // Destroy session and return status if ($destroy) {