Jump to content

I just canna figure out what up... (simple too!)


xoligy

Recommended Posts

Ive been trying to figue out whats up with this for nearly an hr and so far ive got nowhere im really stumped on this. Basically im entering an amount ot add so lets say 1k so i enter "1000" press enter and get "Numbers Only!'" since when wasn't "1000" numbers ???

 

 

if ($putmoney)
{
// pinoywebdev add s
$id = cln($id);
// pinoywebdev add e
$pimp = mysql_fetch_array(mysql_query("SELECT pimp, trn, money FROM $tab[pimp] WHERE id='$id'"));
$bank = mysql_fetch_array(mysql_query("SELECT pimp, money FROM $tab[bank] WHERE id='$id'"));
$md = ($maxdep) ;

if($deposit > $pimp[2]) {
echo "<html><body><script language=javascript1.1>alert('You do not have that much money!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
}
elseif(!preg_match ('/^[0-9][0-9]*$/i', $deposit)) {
echo "<html><body><script language=javascript1.1>alert('Numbers Only!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
} 
elseif($deposit <= 0) {
echo "<html><body><script language=javascript1.1>alert('Please enter a positive ammount!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
}
elseif($deposit > $maxdep) {
echo "<html><body><script language=javascript1.1>alert('You can not deposit more than the maximum amount!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
}
elseif($deposit + $bank[1] > $md) {
echo "<html><body><script language=javascript1.1>alert('You can not deposit more than the maximum amount!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
}

elseif($pimp[1] < $depositturns) {
echo "<html><body><script language=javascript1.1>alert('You do not have enough turns to deposit.');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
}
else {
// pinoywebdev add s  
$depositturns = cln($depositturns);
$deposit = cln($deposit);
// pinoywebdev add e
mysql_query("UPDATE $tab[bank] SET money=money + $deposit WHERE id='$id'");
mysql_query("UPDATE $tab[pimp] SET trn=trn - $depositturns, money=money-$deposit WHERE id='$id'");
echo "<html><body><script language=javascript1.1>alert('Money Deposited');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>";
report("deposited " . commas($deposit) . "$ to the bank");
}
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.