// Check his IP number
$result = SQL_QUERY_ESC("SELECT joined, last_update FROM "._MYSQL_PREFIX."_user_data WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
- array(getenv('REMOTE_ADDR'), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
+ array(GET_REMOTE_ADDR(), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
if ((SQL_NUMROWS($result) == 1) && (!IS_ADMIN()))
{
// Same IP in timeout range and different email address entered... Eat this, faker! ;-)
$totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
// Hash = MM-DD-YYYY:IP:USER_AGENT:TIMEMARK
- $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".getenv('REMOTE_ADDR').":".getenv('HTTP_USER_AGENT')."-".time())."/".RAND_NUMBER);
+ $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".GET_REMOTE_ADDR().":".GET_USER_AGENT()."-".time())."/".RAND_NUMBER);
// Add design when extension sql_patches is v0.2.7 or greater
$ADD1 = ""; $ADD2 = "";
bigintval($_POST['max_mails']),
bigintval($_POST['refid']),
$hash,
- getenv('REMOTE_ADDR'),
+ GET_REMOTE_ADDR(),
), __FILE__, __LINE__);
// Get his userid
// Rewrite gender
$gender = TRANSLATE_GENDER($_POST['gender']);
- // ... rewrite a zero referral ID to the main title
+ // ... rewrite a zero referal ID to the main title
if ($_POST['refid'] == "0") $_POST['refid'] = MAIN_TITLE;
// Prepare data array for the email template