"; $errmsg.=""; $errmsg.= $l_missingemail.""; $errors=1; } if(!isset($id) || !$id) { $errmsg.=""; $errmsg.=""; $errmsg.= $l_missingid.""; $errors=1; } if($errors==0) { $actdate = date("Y-m-d H:i:s"); $confirmtime=($maxconfirmtime*24)+1; $sql = "select * from ".$tableprefix."_subscriptions where email='$email' and subscribeid=$id and enterdate>=DATE_SUB('$actdate', INTERVAL $confirmtime HOUR)"; if(!$result = mysql_query($sql, $db)) die("Could not connect to the database."); if(!$myrow=mysql_fetch_array($result)) { $errmsg.=""; $errmsg.=""; $errmsg.= $l_noconfirmentry.""; $errors=1; } } if($errors==1) { echo $errmsg; echo ""; include_once("./includes/bottom.inc"); exit; } do{ $maximum=9999999999; if($maximum>mt_getrandmax()) $maximum=mt_getrandmax(); mt_srand((double)microtime()*1000000); $unsubscribeid=mt_rand(10000,$maximum); $sql = "select * from ".$tableprefix."_subscriptions where unsubscribeid=$unsubscribeid"; if(!$result = mysql_query($sql, $db)) die("Could not connect to the database."); }while($myrow=mysql_fetch_array($result)); $sql = "update ".$tableprefix."_subscriptions set subscribeid=0, confirmed=1, unsubscribeid=$unsubscribeid where email='$email' and subscribeid=$id"; if(!$result = mysql_query($sql, $db)) die("Could not connect to the database."); echo ""; echo ""; echo ""; echo str_replace("{progname}",$progname,$l_subscriptionconfirmed).""; echo ""; echo ""; echo ""; echo "$l_back2faq"; echo ""; include_once("./includes/bottom.inc"); exit; ?>