1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
|
}
// CAPTCHA
$stime = intval(wbb_substr(microtime(), 2, 8));
mt_srand($stime);
$new_key_string = '';
$chain = 'ABCDEFGHIJKLMPRSTUVWXYZ';
for ($i = 0; $i < 6; $i++) {
$new_key_string .= $chain[mt_rand(0, wbb_strlen($chain) - 1)];
}
$db->query("INSERT INTO bb".$n."_register_keys (key_string, key_date) VALUES ('".$new_key_string."', ".time().")");
$key_number = $db->insert_id();
|