pull/1/head
root 18 years ago
parent bd39e96fe4
commit 04d4a022e8

@ -18,8 +18,8 @@
if($type == "email") if($type == "email")
{ {
$id = 1; $id = 1;
$emailid = intval($emailid); $emailid = intval($_REQUEST['emailid']);
$hash = mysql_escape_string(stripslashes($hash)); $hash = mysql_escape_string(stripslashes($_REQUEST['hash']));
$query = "select * from `email` where `id`='$emailid' and hash!='' and deleted=0"; $query = "select * from `email` where `id`='$emailid' and hash!='' and deleted=0";
$res = mysql_query($query); $res = mysql_query($query);
@ -48,12 +48,19 @@
exit; exit;
} }
$row = mysql_fetch_assoc($res); $row = mysql_fetch_assoc($res);
$query = "update `email` set `hash`='',`modified`=NOW() where `id`='$emailid'"; if($_REQUEST['reallyverify'] == 1)
mysql_query($query); {
$query = "update `users` set `verified`='1' where `id`='$row[memid]' and `email`='$row[email]' and `verified`='0'"; $query = "update `email` set `hash`='',`modified`=NOW() where `id`='$emailid'";
mysql_query($query); mysql_query($query);
showheader(_("Updated"), _("Updated")); $query = "update `users` set `verified`='1' where `id`='$row[memid]' and `email`='$row[email]' and `verified`='0'";
echo _("Your account and/or email address has been verified. You can now start issuing certificates for this address."); mysql_query($query);
showheader(_("Updated"), _("Updated"));
echo _("Your account and/or email address has been verified. You can now start issuing certificates for this address.");
} else {
printf(_("Are you sure you want to verify the email %s?"), $row['email']);
echo "<br>\n";
printf(_("%sYes%s %sNo%s"), "<a href='/verify.php?emailid=$emailid&hash=$hash&reallyverify=1'>", "</a>", "<a href='/index.php'>", "</a>");
}
showfooter(); showfooter();
exit; exit;
} }
@ -61,8 +68,8 @@
if($type == "domain") if($type == "domain")
{ {
$id = 7; $id = 7;
$domainid = intval($domainid); $domainid = intval($_REQUEST['domainid']);
$hash = mysql_escape_string(stripslashes($hash)); $hash = mysql_escape_string(stripslashes($_REQUEST['hash']));
$query = "select * from `domains` where `id`='$domainid' and hash!='' and deleted=0"; $query = "select * from `domains` where `id`='$domainid' and hash!='' and deleted=0";
$res = mysql_query($query); $res = mysql_query($query);
@ -92,10 +99,17 @@
exit; exit;
} }
$row = mysql_fetch_assoc($res); $row = mysql_fetch_assoc($res);
$query = "update `domains` set `hash`='',`modified`=NOW() where `id`='$domainid'"; if($_REQUEST['reallyverify'] == 1)
mysql_query($query); {
showheader(_("Updated"), _("Updated")); $query = "update `domains` set `hash`='',`modified`=NOW() where `id`='$domainid'";
echo _("Your domain has been verified. You can now start issuing certificates for this domain."); mysql_query($query);
showheader(_("Updated"), _("Updated"));
echo _("Your domain has been verified. You can now start issuing certificates for this domain.");
} else {
printf(_("Are you sure you want to verify the domain %s?"), $row['name']);
echo "<br>\n";
printf(_("%sYes%s %sNo%s"), "<a href='/verify.php?domainid=$domainid&hash=$hash&reallyverify=1'>", "</a>", "<a href='/index.php'>", "</a>");
}
showfooter(); showfooter();
exit; exit;
} }

Loading…
Cancel
Save