login}'"); /* ------------------------- */ ?>
signup/3600-time()/3600) + 12 <= 0) { $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`cash` FROM `[users]` WHERE `login`='{$_GET['x']}' AND `activated`=1"); if(($to = mysql_fetch_object($dbres)) && $to->login != $data->login) { if(round($to->signup/3600-time()/3600) + 12 <= 0) { print "
Doneren
\n"; if(isset($_POST['amount']) && preg_match("/^[0-9]+\$/",$_POST['amount']) && $_POST['amount'] > 0) { $amount = $_POST['amount']; if($amount <= $data->cash) { mysql_query("SELECT GET_LOCK('donate_{$to->login}',5)"); $data->cash -= $amount; $to->cash += $amount; mysql_query("UPDATE `[users]` SET `cash`={$data->cash} WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `cash`={$to->cash} WHERE `login`='{$to->login}'"); $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP']; $forwardedFor = preg_replace('/, .+/','',$forwardedFor); mysql_query("INSERT INTO `[logs]`(`time`,`IP`,`forwardedFor`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$data->login}','{$to->login}',$amount,'donate')"); print "
Het bedrag is overgemaakt
\n"; mysql_query("SELECT RELEASE_LOCK('donate_{$to->login}')"); } else print "
Zoveel geld heb je niet
\n"; } } else print "
{$to->login} staat nog onder bescherming
\n"; } print <<
Contant:
\${$data->cash}
Aan:
Bedrag:
ENDHTML; } else print "
Je kan niet doneren wanneer je onder bescherming staat
\n"; /* ------------------------- */ ?>