|
|
@ -13,7 +13,7 @@
|
|
|
|
PARTICULAR PURPOSE. See the License for more details.
|
|
|
|
PARTICULAR PURPOSE. See the License for more details.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
if($_SERVER[HTTP_HOST] == "secure.cacert.org")
|
|
|
|
if($_SERVER['HTTP_HOST'] == "secure.cacert.org")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$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";
|
|
|
|
UNIX_TIMESTAMP(`expire`) - UNIX_TIMESTAMP() > 0";
|
|
|
@ -38,23 +38,31 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
|
|
|
|
$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
|
|
|
|
|
|
|
|
|
|
|
|
header("location: https://$_SERVER[HTTP_HOST]/index.php?id=4");
|
|
|
|
header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=4");
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if($_SERVER[HTTP_HOST] == "secure.cacert.org" && $_SESSION['profile']['id'] > 0) {
|
|
|
|
} else if($_SERVER['HTTP_HOST'] == "secure.cacert.org" && $_SESSION['profile']['id'] > 0) {
|
|
|
|
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_SESSION['profile']['id']."'"));
|
|
|
|
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_SESSION['profile']['id']."'"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if($_SERVER[HTTP_HOST] == "secure.cacert.org" && ($_SESSION['profile']['id'] <= 0 || $_SESSION['profile']['loggedin'] == 0))
|
|
|
|
if($_SERVER['HTTP_HOST'] == "secure.cacert.org" && ($_SESSION['profile']['id'] <= 0 || $_SESSION['profile']['loggedin'] == 0))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
header("location: https://www.cacert.org");
|
|
|
|
header("location: https://www.cacert.org");
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($_SERVER['HTTP_HOST'] == "secure.cacert.org" && $_SESSION['profile']['id'] > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
|
|
|
|
|
|
|
$res = mysql_query($query);
|
|
|
|
|
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
|
|
|
|
$_SESSION['profile']['points'] = $row['total'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if($id == "logout")
|
|
|
|
if($id == "logout")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$_SESSION['profile']['loggedin'] = 0;
|
|
|
|
$_SESSION['profile']['loggedin'] = 0;
|
|
|
|
header("location: https://$_SERVER[HTTP_HOST]/index.php");
|
|
|
|
header("location: https://".$_SERVER['HTTP_HOST']."/index.php");
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -71,7 +79,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
|
|
|
|
$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
|
|
|
|
|
|
|
|
|
|
|
|
header("location: https://$_SERVER[HTTP_HOST]/index.php?id=4");
|
|
|
|
header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=4");
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|