engelsystem/includes/header_start.php

51 lines
1.0 KiB
PHP
Raw Normal View History

<?PHP
ini_set( "session.gc_maxlifetime", "65535");
include ("config.php");
include ("error_handler.php");
include ("config_db.php");
include ("funktion_lang.php");
include ("funktion_faq.php"); //f<>r noAnswer() im menu
include ("funktion_menu.php");
include ("funktion_user.php");
2010-08-31 21:16:16 +02:00
if( isset($SystemDisableMessage) && ( strlen($SystemDisableMessage)>0) )
{
echo "<HTML>\n".
"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
"</HTML>";
die();
}
if( !isset($_SESSION))
2010-08-31 21:16:16 +02:00
{
session_start();
2010-08-31 21:16:16 +02:00
}
include ("secure.php");
if( !isset($_SESSION['IP']))
2010-08-31 21:16:16 +02:00
{
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
2010-08-31 21:16:16 +02:00
}
if (IsSet($_SESSION['UID']) and ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR']))
{
session_destroy ();
2010-08-31 21:16:16 +02:00
header("Location: $url". $ENGEL_ROOT );
}
include ("UserCVS.php");
//UPdate LASTlogin
if( isset($_SESSION['UID']))
{
$SQLlastLogIn = "UPDATE `User` SET ".
"`lastLogIn` = '". gmdate("Y-m-j H:i:s", time()). "'".
" WHERE `UID` = '". $_SESSION['UID']. "' LIMIT 1;";
mysql_query ($SQLlastLogIn, $con);
}
?>