session_start();
/*
* Copyright (c) 2007, 2008 Contributors, http://opensimulator.org/
* See CONTRIBUTORS for a full list of copyright holders.
*
* See LICENSE for the full licensing terms of this file.
*
*/
include("settings/config.php");
include("settings/mysql.php");
include("check.php");
if($_GET[page] != '')
{
$_SESSION[page]=$_GET[page];
}
else
{
$_SESSION[page]='home';
}
//LOGIN AUTHENTIFICATION
if($_POST[Submit]=="Login")
{
//GET IP ADRESS
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) { $userIP = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif ($_SERVER["REMOTE_ADDR"]) { $userIP = $_SERVER["REMOTE_ADDR"];
} else { $userIP="This user has no ip";}
//GET IP ADRESS END
$passcheck = md5(md5($_POST[logpassword]) . ":" );
$DbLink = new DB;
$DbLink->query("SELECT UUID,agentIP,active FROM ".C_WIUSR_TBL." WHERE username='$_POST[logfirstname]' and lastname='$_POST[loglastname]' and passwordHash='$passcheck'");
list($UUIDC,$agentIP,$active) = $DbLink->next_record();
if($UUIDC){
$_SESSION[USERID]=$UUIDC;
if($userIP != $agentIP){
$DbLink->query("UPDATE ".C_WIUSR_TBL." SET agentIP='$userIP' WHERE UUID='$_SESSION[USERID]'");
}
} else {
echo "";
}
}
//LOGIN END
?>
Welcome to
Warning: Use of undefined constant SYSNAME - assumed 'SYSNAME' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\opensim\index.php on line 62
SYSNAME
|
|
|
|
if($_SESSION[USERID]){
include("loggedinmenu.php");
}else{
include("menu.php");}
?>
|
include("sites.php"); ?> |
|
|
|