|
|
|
@ -29,12 +29,15 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$uid'"));
|
|
|
|
|
$_SESSION['profile']['loggedin'] = 1;
|
|
|
|
|
if($_SESSION['profile']['locked'] == 0)
|
|
|
|
|
$_SESSION['profile']['loggedin'] = 1;
|
|
|
|
|
else
|
|
|
|
|
unset($_SESSION['profile']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && ($_SESSION['profile']['id'] == 0 || $_SESSION['profile']['loggedin'] == 0))
|
|
|
|
|
{
|
|
|
|
|
$query = "select * from `emailcerts` where `serial`='$_SERVER[SSL_CLIENT_M_SERIAL]' and `revoked`=0 and
|
|
|
|
|
$query = "select * from `emailcerts` where `serial`='${_SERVER['SSL_CLIENT_M_SERIAL']}' and `revoked`=0 and
|
|
|
|
|
UNIX_TIMESTAMP(`expire`) - UNIX_TIMESTAMP() > 0";
|
|
|
|
|
$res = mysql_query($query);
|
|
|
|
|
if(mysql_num_rows($res) > 0)
|
|
|
|
@ -54,7 +57,10 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$row['memid']."'"));
|
|
|
|
|
$_SESSION['profile']['loggedin'] = 1;
|
|
|
|
|
if($_SESSION['profile']['locked'] == 0)
|
|
|
|
|
$_SESSION['profile']['loggedin'] = 1;
|
|
|
|
|
else
|
|
|
|
|
unset($_SESSION['profile']);
|
|
|
|
|
} else {
|
|
|
|
|
$_SESSION['profile']['loggedin'] = 0;
|
|
|
|
|
$_SESSION['profile'] = "";
|
|
|
|
|