Slightly improved

This commit is contained in:
root 2007-12-26 22:27:45 +00:00
parent adc88034d5
commit 49b77257b2

View file

@ -8,7 +8,7 @@
die("403,That username couldn't be found\n"); die("403,That username couldn't be found\n");
$user = mysql_fetch_assoc($res); $user = mysql_fetch_assoc($res);
$memid = $user['id']; $memid = $user['id'];
$emails = ""; $emails = array();
foreach($_REQUEST['email'] as $email) foreach($_REQUEST['email'] as $email)
{ {
$email = mysql_real_escape_string(trim($email)); $email = mysql_real_escape_string(trim($email));
@ -71,11 +71,11 @@
mysql_query("insert into `emaillink` set `emailcertsid`='$certid', `emailid`='$emailid'"); mysql_query("insert into `emaillink` set `emailcertsid`='$certid', `emailid`='$emailid'");
$do = `../../scripts/runclient`; $do = `../../scripts/runclient`;
sleep(5); // THIS IS BROKEN AND SHOULD BE FIXED sleep(10); // THIS IS BROKEN AND SHOULD BE FIXED
$query = "select * from `emailcerts` where `id`='$certid' and `crt_name` != ''"; $query = "select * from `emailcerts` where `id`='$certid' and `crt_name` != ''";
$res = mysql_query($query); $res = mysql_query($query);
if(mysql_num_rows($res) <= 0) if(mysql_num_rows($res) <= 0)
die("404,Your certificate request has failed"); die("404,Your certificate request has failed. ID: $certid");
$cert = mysql_fetch_assoc($res); $cert = mysql_fetch_assoc($res);
echo "200,Authentication Ok\n"; echo "200,Authentication Ok\n";
readfile("../".$cert['crt_name']); readfile("../".$cert['crt_name']);