
04-23-2003, 10:47 PM
|
|
|
Join Date: Mar 2003
Location: Scotland, UK
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Today at 06:23 PM v0id said this in Post #5
Code:
//check for existing one...if not generate new one
if (!$activate=$DB_site->query_first("SELECT activationid FROM useractivation WHERE userid='$user[userid]' AND type=0")) {
// or generate new one!
// delete old activation id
$DB_site->query("DELETE FROM useractivation WHERE userid='$user[userid]' AND type=0");
// make random number
mt_srand ((double) microtime() * 1000000);
$activate[activationid]=mt_rand(0,100000000);
//save to DB
$DB_site->query("INSERT INTO useractivation VALUES (NULL,'$user[userid]','".time()."','$activate[activationid]',0)");
}
}
$sendmessage=str_replace("\$activateid",$activate[activationid],$sendmessage);
}
$sendmessage=str_replace("\$bburl",$bburl,$sendmessage);
$sendmessage=str_replace("\$bbtitle",$bbtitle,$sendmessage);
if (!$test) {
echo "sending ... \n";
vbmail($user['email'], $subject, $sendmessage, $from);
} else {
echo "testing ... \n";
}
echo "ok<br>\n";
Thats the code that has the INSERT INTO useractivation and yes this is an unhacked email.php from vb2.3.0
|
VB - 2.3.0
Replace This:
PHP Code:
(NULL,'$user[userid]','".time()."','$activate[activationid]',0)");
With this code:
PHP Code:
(NULL, $activate[activationid], ".time().", '$user[activationid]', 0, 2)");
|