Bank Script

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

9 replies · 1,151 views · started 17 years ago · 1 min read

8 participants
riderz Lead · 975 posts #1

Here are the bank script dnt know if this one will work but anyway enjoy Sql

  `bank` int(11) default '0',

add this in core

$sql = "UPDATE ibwf_users SET bank = (bank * 1.05)";

on index at the top

///////////////////bank count
$now = time();
$start=date("Y-m-d")." 23:50:00";
$end=date("Y-m-d")." 23:50:10";
$tstamp1=strtotime($start);
$tstamp2=strtotime($end);if($now>$tstamp1 && $now<$tstamp2) { $sql = 'UPDATE `ibwf_users` SET `bank` = `bank` * 1.05 WHERE `bank` > 100';

mysql_query($sql);}

usage

echo "<img class=\"menu\" alt=\"Home\" src=\"bank.gif\" align=\"absbottom\"></a>";
echo "<a href=\"bank.php?action=bankpage&sid=$sid\"> $stitle-Bank</a><br/>";

in genproc

////////////////////////////////////////////////////////////
else if($action=="diposit")
{
      echo "<head>\n";
	  echo "<title>$stitle</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";
	  	  echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
      echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
      echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
	  echo "</head>";
      echo "<body>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"12\" width=\"159\">";
echo "<tr>";
echo "<td id=\"body\" width=\"159\">";
echo "</td>";
echo "</tr>";
echo "</table>";

 echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">dipist credits</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";

addonline(getuid_sid($sid),"Diposit credits","");
$who = $_GET["who"];
$ptg = $_POST["ptg"];
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$gpsf = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$uid."'"));
if(($gpsf[0]>=$ptg)AND ($ptg>0)){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$res = mysql_query("UPDATE ibwf_users SET bank='".$gpst."' WHERE id='".$uid."'");
if($res)
{
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpsf."' WHERE id='".$uid."'");
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Amount diposited Successfully<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have enough Plusses to diposit<br/>";
}

echo "<br/>";

echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
/////////////////////////////////////withdraw mny
else if($action=="wdraw")
{
      echo "<head>\n";
	  echo "<title>$stilte</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";
	  	  echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
      echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
      echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
	  echo "</head>";
      echo "<body>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"12\" width=\"159\">";
echo "<tr>";
echo "<td id=\"body\" width=\"159\">";
echo "</td>";
echo "</tr>";
echo "</table>";

 echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">withdraw credits</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";

addonline(getuid_sid($sid),"Withdraw credits","");
$who = $_GET["who"];
$ptg = $_POST["ptg"];
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$gpsf = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$uid."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
if(($gpsf[0]>=$ptg)AND ($ptg>0)){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$res = mysql_query("UPDATE ibwf_users SET plusses='".$gpst."' WHERE id='".$uid."'");
if($res)
{
$res = mysql_query("UPDATE ibwf_users SET bank='".$gpsf."' WHERE id='".$uid."'");
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Amount withdrawed Successfully<br/>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have enough Credits 2 withdraw<br/>";
}

echo "<br/>";

echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}

Its out of blingywap edit so if it dnt work get it from there


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

Attachments: bank.txt bank.gif
riderz Lead · 975 posts #3

Ok kwl rko1 i dnt know if i have everything thats needed u would know is it everything or did i miss anything


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

capofret Developer · 225 posts #4

yes its working, i included this in mobilezonez script:)

LDSWAPWORLD site closed. im busy with other things in life like facebook , send me PM so i can add you 🙂 www.pinoySG.com

don't ask for help if you're not even helping yourself! i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.

External image (may be gone)

bijaybd Developer · 178 posts #5

can thanks for the script can you make it wml version

kiLLeR-eyEd_14 Senior · 382 posts #6

I think there are still something wrong with this script..The deposited plusses must be separated with the total plusses earned from the bank..So, 2 same rows should be created inside the table ibwf_users..The totalbank plusses and the deposited plusses..This is what i've done with the arabank script that is also similar with the codes posted by riderz..For example, to get an interest of 1%, the deposited plusses will be multiplied to 0.01 and then the product will be added to the total bank plusses..Don't forget that if you deposit plusses..Not only the deposited plusses row in the table ibwf_users should be set with the amount deposited..Also, it should be added into the total bank plusses..And take note again that the deposited plusses row shouldn't be added with new deposited one..Instead, set the new deposited one..Everybody got it?Lol..So many deposited and deposited and deposited and blah blah blah..[pinoy ako!!!] UnderGroundWAP Admin Rulez!!!

djlee Developer · 224 posts #7

So what your saying is only add interest to whats been deposited not the account balance???? To work like a real bank riderz script is true. I dunno about everywhere but i kno every bank ive been too the ineterest is calculated based on the accounts balance in full (not just the balance that has actually been earned and deposited by the account holder) ???


also just so you know, single statment conditions dont need braces, i.e.

else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have enough Plusses to diposit<br/>";
}

COULD be

else
 echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have enough Plusses to diposit<br/>";

it doesnt change anything but what the code looks like (there is a minor possible security advantage but nothing i have hard evidence to prove but its possible its there). Just a bit of info, simply because if you use indenting on your code, removing the braces can make scripts a lot easier to read when u come back to them as you aint got braces everywhere, most conditional statements you can do like that but ONLY if you want to execute one statement, if you want to execute two or more then you DO need the braces.

i.e.

if($a == $b)
   echo "a equals b";

for($a=0; $a <= $b; $a++)
   echo "a not equal to b";

while($a = mysql_fetch_row($b))
 echo $a['field'];

just a little info, could come in handy for some

capofret Developer · 225 posts #8

kiLLeR-eyEd_14 wrote: I think there are still something wrong with this script..The deposited plusses must be separated with the total plusses earned from the bank..So, 2 same rows should be created inside the table ibwf_users..The totalbank plusses and the deposited plusses..This is what i've done with the arabank script that is also similar with the codes posted by riderz..For example, to get an interest of 1%, the deposited plusses will be multiplied to 0.01 and then the product will be added to the total bank plusses..Don't forget that if you deposit plusses..Not only the deposited plusses row in the table ibwf_users should be set with the amount deposited..Also, it should be added into the total bank plusses..And take not again that the deposited plusses row shouldn't be added with new deposited one..Instead, set the new deposited one..Everybody got it?Lol..So many deposited and deposited and deposited and blah blah blah..[pinoy ako!!!] UnderGroundWAP Admin Rulez!!!

lol just post the whole code so we can better understand.:D and yes i also used arabank script

LDSWAPWORLD site closed. im busy with other things in life like facebook , send me PM so i can add you 🙂 www.pinoySG.com

don't ask for help if you're not even helping yourself! i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.

External image (may be gone)

ashuwap Junior · 19 posts #9

///////////////////bank count $now = time(); $start=date("Y-m-d")." 23:50:00"; $end=date("Y-m-d")." 23:50:10"; $tstamp1=strtotime($start); $tstamp2=strtotime($end);if($now>$tstamp1 && $now<$tstamp2) { $sql = 'UPDATE ibwf_users SET bank = bank * 1.05 WHERE bank > 100';

mysql_query($sql);}
////////////////////// THIS CODE MUST BE ON CORE...COZ CORE INCLUDE..IN EVERYPAGE........

newbie14 Junior · 22 posts #10

Here are the bank script dnt know if this one will work but anyway enjoy Sql

  `bank` int(11) default '0',

is not working say's database error when I diposit? can u post the complete working sql for bank script?thanks.....

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close