@ -1,6 +1,6 @@
<?
$continue = 1;;
if($_SERVER["SSL_CLIENT_S_DN_CN"] == "Thawte Freemail Member" )
$continue = 1;
if($_SERVER['SSL_CLIENT_S_DN_CN'] == 'Thawte Freemail Member' )
{
$continue = 0;
echo _("I wasn't able to locate your name on your certificate, as such you can't continue with this process.");
@ -9,16 +9,16 @@
if($continue == 1)
{
$addy = array();
$emails = explode("/", trim($_SERVER["SSL_CLIENT_S_DN" ]));
$emails = explode("/", trim($_SERVER['SSL_CLIENT_S_DN' ]));
foreach($emails as $email)
{
$bits = explode("=", $email);
if($bits["0" ] == "emailAddress")
if($bits['0' ] == "emailAddress")
{
$query = "select * from `email` where `email`='".$bits["1" ]."' and `deleted`=0 and hash=''";
$query = "select * from `email` where `email`='".$bits['1' ]."' and `deleted`=0 and hash=''";
$account = mysql_query($query);
if(mysql_num_rows($account))
$addy[] = $bits["1" ];
$addy[] = $bits['1' ];
}
}
}
@ -34,8 +34,8 @@
$row = mysql_fetch_assoc($account);
$memid = $row['memid'];
$firstname = trim($_SERVER["SSL_CLIENT_S_DN_G" ]);
$lastname = trim($_SERVER["SSL_CLIENT_S_DN_S" ]);
$firstname = trim($_SERVER['SSL_CLIENT_S_DN_G' ]);
$lastname = trim($_SERVER['SSL_CLIENT_S_DN_S' ]);
$query = "select * from `users` where `fname`='$firstname' and `lname`='$lastname' and `id`='$memid'";
if(mysql_num_rows(mysql_query($query)) < = 0)
@ -45,10 +45,10 @@
}
}
if($_SERVER["SSL_CLIENT_VERIFY" ] == "SUCCESS" & & $continue == 1)
if($_SERVER['SSL_CLIENT_VERIFY' ] == "SUCCESS" & & $continue == 1)
{
$_SESSION['_config']['uid'] = $row['memid'];
$_SESSION['_config']['CN'] = trim($_SERVER["SSL_CLIENT_S_DN" ]);
$_SESSION['_config']['CN'] = trim($_SERVER['SSL_CLIENT_S_DN' ]);
?>
< p style = "border:dotted 1px #900;padding:0.3em;background-color:#ffe;" >
<? = _ ( "By just submitting your Thawte certificate you can be issued 50 points automatically to any matching account in the system that you operate." ) ?> < br >