summaryrefslogtreecommitdiff
path: root/includes/header_start.php
blob: 997fa94ed6db929d8f10cd604c78929968dbdb21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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");


if( isset($SystemDisableMessage) && ( strlen($SystemDisableMessage)>0) )
{
	echo "<HTML>\n".
		"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
		"</HTML>";
	die();
}

if( !isset($_SESSION)) 
{
	session_start(); 
}
include ("secure.php");

if( !isset($_SESSION['IP'])) 
{
	$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
}

if (IsSet($_SESSION['UID']) and ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR']))
{
	session_destroy ();
	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);
}								  

?>