| 136 |
} |
} |
| 137 |
fclose($f); |
fclose($f); |
| 138 |
eval($code); |
eval($code); |
| 139 |
if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) $docroot = $_SERVER['DOCUMENT_ROOT']; |
if (isset($_SERVER['DOCUMENT_ROOT']) AND strlen($_SERVER['DOCUMENT_ROOT'])) $docroot = str_replace('\\', '/', str_replace('\\\\', '\\', $_SERVER['DOCUMENT_ROOT'])); |
| 140 |
else { |
else { |
| 141 |
// Find information about where execution started |
// Find information about where execution started |
| 142 |
$origin = array_pop(debug_backtrace()); |
$origin = array_pop(debug_backtrace()); |
| 234 |
while(list($key,$value)=each($_GET)) { |
while(list($key,$value)=each($_GET)) { |
| 235 |
if (!isset($GLOBALS[$key])) $GLOBALS[$key]=$value; |
if (!isset($GLOBALS[$key])) $GLOBALS[$key]=$value; |
| 236 |
} |
} |
| 237 |
|
while(list($key,$value)=each($_POST)) { |
| 238 |
|
if (!isset($GLOBALS[$key])) $GLOBALS[$key]=$value; |
| 239 |
|
} |
| 240 |
} |
} |
| 241 |
// Emulate register_globals off |
// Emulate register_globals off |
| 242 |
elseif (ini_get('register_globals') && !$this->mosConfig_register_globals) { |
elseif (ini_get('register_globals') && !$this->mosConfig_register_globals) { |
| 448 |
function handler ($errno, $errstr, $errfile, $errline, $errcontext) { |
function handler ($errno, $errstr, $errfile, $errline, $errcontext) { |
| 449 |
if ($errno = E_STRICT) return; |
if ($errno = E_STRICT) return; |
| 450 |
$string = $this->types[$errno].': '.$errstr.' in '.$errfile.' at '.$errline; |
$string = $this->types[$errno].': '.$errstr.' in '.$errfile.' at '.$errline; |
| 451 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 452 |
if (eregi('^(sql)$', $errstr)) { |
if (eregi('^(sql)$', $errstr)) { |
| 453 |
$extra = $database->getErrorMsg(); |
$extra = $database->getErrorMsg(); |
| 454 |
} |
} |
| 1177 |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
function menuCheck( $Itemid, $menu_option, $task, $gid ) { |
| 1178 |
// Construct a link to this component - if no menu for it, assume it is OK |
// Construct a link to this component - if no menu for it, assume it is OK |
| 1179 |
$dblink="index.php?option=$menu_option"; |
$dblink="index.php?option=$menu_option"; |
|
if ($menu_option == 'com_content' AND $Itemid == 1) return true; |
|
| 1180 |
if ($this->getIDLikeLink($dblink) == 0) return true; |
if ($this->getIDLikeLink($dblink) == 0) return true; |
| 1181 |
if ($Itemid) { |
if ($Itemid) { |
| 1182 |
$menu =& $this->getMenuByID($Itemid); |
$menu =& $this->getMenuByID($Itemid); |
| 1183 |
if (strpos($menu->link,$dblink) ===0) $access = $menu->access; |
if (strpos($menu->link,$dblink) ===0) { |
| 1184 |
|
$access = $menu->access; |
| 1185 |
|
} elseif ($menu_option == 'com_content' AND $Itemid == 1) { |
| 1186 |
|
return true; |
| 1187 |
|
} |
| 1188 |
} |
} |
| 1189 |
if (!isset($access)) { |
if (!isset($access)) { |
| 1190 |
if ($task!='') $dblink .= "&task=$task"; |
if ($task!='') $dblink .= "&task=$task"; |
| 2241 |
$logintime = mosGetParam( $_SESSION, 'session_logintime', '' ); |
$logintime = mosGetParam( $_SESSION, 'session_logintime', '' ); |
| 2242 |
if ($session_id == md5( $user->id.$user->username.$user->usertype.$logintime )) { |
if ($session_id == md5( $user->id.$user->username.$user->usertype.$logintime )) { |
| 2243 |
$current_time = time(); |
$current_time = time(); |
| 2244 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2245 |
$database->setQuery ("UPDATE #__session" |
$database->setQuery ("UPDATE #__session" |
| 2246 |
. "\nSET time='$current_time', guest=-3-guest" |
. "\nSET time='$current_time', guest=-3-guest" |
| 2247 |
. "\nWHERE session_id='$session_id'" |
. "\nWHERE session_id='$session_id'" |
| 2334 |
function purge() { |
function purge() { |
| 2335 |
$past = time() - intval(mamboCore::get('mosConfig_lifetime')); |
$past = time() - intval(mamboCore::get('mosConfig_lifetime')); |
| 2336 |
$adminpast = time() - 3600; |
$adminpast = time() - 3600; |
| 2337 |
$database = mamboDatabase::getInstance(); |
$database =& mamboDatabase::getInstance(); |
| 2338 |
$database->setQuery("DELETE FROM #__session WHERE (time<$past AND guest>=0) OR (time<$adminpast AND guest<0)"); |
$database->setQuery("DELETE FROM #__session WHERE (time<$past AND guest>=0) OR (time<$adminpast AND guest<0)"); |
| 2339 |
return $database->query(); |
return $database->query(); |
| 2340 |
} |
} |