bankleft= 25;
$OMNILOG = 1;
include("_include-config.php");
include("_include-gevangenis.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
$ontvanger1 = mysql_query("SELECT * FROM `[users]` WHERE `login`='{$_POST['to']}'");
$ontvanger = mysql_num_rows($ontvanger1);
/* ------------------------- */ ?>
Bank |
|
cash, 0, '.' , '.');
$bank = number_format($data->bank, 0, '.' , '.');
$amount = number_format($_POST['amount'], 0, '.' , '.');
$rente =round($data->bank*0.05);
$rente = number_format($data->bank*0.05, 0, '.' , '.');
$renteba = number_format($data->bank*0.10, 0, '.' , '.');
if(isset($_POST['out']) && preg_match('/^[0-9]+$/',$_POST['amount'])) {
if($_POST['amount'] <= $data->bank) {
$data->cash += $_POST['amount'];
$data->bank -= $_POST['amount'];
mysql_query("UPDATE `[users]` SET `bank`={$data->bank},`cash`={$data->cash} WHERE `login`='{$data->login}'");
print " Er is €$amount afgeschreven van je bankrekening! |
\n";
}
else
print " Zoveel geld staat er niet op de bank |
\n";
}
else if(isset($_POST['in']) && preg_match('/^[0-9]+$/',$_POST['amount'])) {
if($_POST['amount'] <= $data->cash) {
if($_POST['amount'] <= $data->bankmax) {
if($data->bankleft > 0) {
$data->cash -= $_POST['amount'];
$data->bank += $_POST['amount'];
$data->bankleft= 25;
mysql_query("UPDATE `[users]` SET `bank`={$data->bank},`cash`={$data->cash},`bankleft`={$data->bankleft} WHERE `login`='{$data->login}'");
print " Er is €$amount bijgeschreven bij je bankrekening! |
\n";
}
else
print " Je kan niet meer storten vandaag |
\n";
}
else
print " Je mag maar €{$data->bankmax},- per keer storten |
\n";
}
else
print " Zoveel geld heb je niet |
\n";
}
if($_GET['x'] == "pinstort") {
$cash = number_format($data->cash, 0, '.' , '.');
$bank = number_format($data->bank, 0, '.' , '.');
print <<
Contant: | €{$cash} |
Op de bank: | €{$bank} |
Rente: | €$rente |
|
ENDHTML;
} else if($_GET['x'] == "overschrijven") {
print " Geld Overschrijven |
\n";
if(isset($_POST['to'])) {
if(preg_match('/^[0-9]+$/',$_POST['amount'])) {
if($ontvanger < 1) {
print " De naam die je hebt ingevuld klopt niet! |
\n";
}
else if($_POST['amount'] <= $data->cash) {
$data->cash-= $_POST['amount'];
mysql_query("UPDATE `[users]` SET `cash`={$data->cash},`cash`={$data->cash} WHERE `login`='{$data->login}'");
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `cash`=`cash`+{$_POST['amount']} WHERE `login`='{$member->login}'");
mysql_query("INSERT INTO `[logs]`(`time`,`IP`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$data->login}','{$member->login}',{$_POST['amount']},'donate')");
print " Er is €{$_POST['amount']},- aan {$member->login} overgemaakt |
\n";
}
}
else
print " Je hebt niet genoeg geld contant staan. |
\n";
}
}
print <<
|
ENDHTML;
if ($data->clan != "" ){
print <<Clan Doneren |
|
ENDHTML;
}
}
/* ------------------------- */ ?>