login}'");
include("_include-gevangenis.php");
/* ------------------------- */ ?>
sitetitle; ?>
signup/3600-time()/3600) + 12 <= 0) {
$dbres = mysql_query("SELECT `cash` FROM `[clans]` WHERE `name`='{$data->clan}'");
if($to = mysql_fetch_object($dbres)) {
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) {
$data->cash -= $amount;
$to->cash += $amount;
mysql_query("UPDATE `[users]` SET `cash`={$data->cash} WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[clans]` SET `cash`={$to->cash} WHERE `name`='{$data->clan}'");
$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}','{$data->clan}',$amount,'donate')");
mysql_query("UPDATE `[users]` SET `cdonatie`= `cdonatie` + $amount WHERE `login`='{$data->login}'");
print " Het bedrag is overgemaakt |
\n";
}
else
print " Zoveel geld heb je niet |
\n";
}
}
else
print " {$to->login} staat nog onder bescherming |
\n";
}
if($data->clan == ""){
print " Je zit nog niet in een clan |
\n";
$disable = 1;
}
if($disable != 1){
print <<
|
ENDHTML;
}
}
else
print " Je kan niet doneren wanneer je onder bescherming staat |
\n";
/* ------------------------- */ ?>