Bank Error

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

10 replies · 921 views · started 17 years ago · 3 min read

5 participants
riderz Lead · 975 posts #1

copy n paste it in index.php

/////////////

else if($action=="bankpage")
{
    addonline(getuid_sid($sid),"In the bank","");

      echo "<head>\n";
      echo "<title>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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 "<p align=\"center\">";
    echo "<b>Welcome to the SpiderWap BANK</b><br/>";
    echo "----<br/>";
    echo "<b>You can deposit your earned plusses here</b><br/>";
    echo "You will get a <b>interest of 10%</b> each day<br/>";
    echo "You can withdraw your plusses at any time from the <b>SpiderWap Bank or ATM machine</b> situated in the Funmenu<br/>";
    echo "<a href=\"index.php?action=diposit&sid=$sid\">Diposit credits</a><br/>";
    echo "<a href=\"index.php?action=wdraw&sid=$sid\">Withdraw credits</a><br/>";
    echo "</p>";
    echo "<p align=\"center\">";
    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();
}
///////////////////////////mwap bank diposit
else if($action=="diposit")
{
      echo "<head>\n";
      echo "<title>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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>";

  addonline(getuid_sid($sid),"Diposit credits 2 BANK","");
  echo "<p align=\"center\">";
  echo "<b>Welcome to the bank ".getnick_uid($uid)."</b><br/><br/>"; 
echo "<form action=\"genproc.php?action=diposit&sid=$sid&who=$who\" method=\"post\">";
  echo "Amount dipositing<br/>";
  echo "<input name=\"ptg\" maxlength=\"8\"/>";
  echo "<br/>";
  echo "<input type=\"submit\" value=\"Diposit\"/>";
  echo "</form>";
  echo "<br/><br/><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
else if($action=="wdraw")
{
      echo "<head>\n";
      echo "<title>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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>";

  addonline(getuid_sid($sid),"Withdraw credits from BANK","");
  echo "<p align=\"center\">";
  echo "<b>Welcome to the bank ".getnick_uid($uid)."</b><br/><br/>";
  $gps = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
  echo "You have $gps[0] Credits in your hand<br/>";
  $gpb = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".getuid_sid($sid)."'"));
  echo "and $gpb[0] Credits in the bank<br/><br/>";
echo "<form action=\"genproc.php?action=wdraw&sid=$sid&who=$who\" method=\"post\">";
  echo "Amount withdrawing<br/>";

  echo "<input name=\"ptg\" maxlength=\"8\"/>";
  echo "<br/>";
  echo "<input type=\"submit\" value=\"withdraw\"/>";
  echo "</form>";
  echo "<br/><br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo "</body>";
  echo "</html>";
  exit();
}

In user profile index.php?action=users

$bank = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'"));
  echo "<b>Plusses In Bank:</b> $bank[0]<br/>";

copy n paste in genproc.php

////////////////////////////////////////////////////////////
else if($action=="diposit")
{
      echo "<head>\n";
      echo "<title>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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>";

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){
$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>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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>";

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){
$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();
}

add it on main page

echo "<a href=\"index.php?action=bankpage&sid=$sid\">»Bank</a><br/>";

add it also edit upper part of site

$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);}
  echo "<div align=\"center\">\n";
  //echo "<small>".date("D d M y-H:i:s")."</small><br/>";

  echo "<small>".date("D d M y - ")."</small>\n";

echo "<small><a href=\"time.php?sid=$sid\">".date("H:i")."</a></small><br/>";

  echo "<img src=\"images/logo.gif\" alt=\"*\"/>";

add this line in ibwf_user table

 `bank` int(100) NOT NULL default '0',

hey guys ive gotten this bank script when i try ading it on methos the credit rnt going up whats the error there supose to get credits from the bank everyday and it just stay the same not getting more intrest on the credits


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

riderz Lead · 975 posts #3

tanx rko1 it will be in gr8 work many need that one


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

Leviathan73 Senior · 260 posts #4

but did not deposit anything, I tried it myself. Why? Where is the error?

LadyEnigma Developer · 71 posts #5

thanks for this useful code, but there's only one problem, as written by Riderz the credit does not increase as a percentage, is there anyone who wants to kindly solve this problem or tell me where I can find a solution? Please friends 🙂 thanks to those who help 🙂

....silence please....

wapmetal Lead · 609 posts #6

try this 🙂 untested:

////////////////////////////////////////////////////////////
else if($action=="diposit")
{
      echo "<head>\n";
      echo "<title>SpiderWap</title>\n";
      echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$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>";

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){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$res = mysql_query("UPDATE ibwf_users SET bank='".$gpst."' WHERE id='".$uid."'");
if($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();
}
LadyEnigma Developer · 71 posts #7

Thanks for your response wapmetal but it seems not work: (Riderz code looks good but maybe I'm wrong something, or I made the wrong table, can someone please post the correct table, i ve create this for table

CREATE TABLE `ibwf_bank` (
`id` int(10) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`pass` varchar(100) NOT NULL default '',
`hint` varchar(100) NOT NULL default '',
`done` int(100) NOT NULL default '0',
`actime` int(100) NOT NULL default '0',
`plusses` int(100) NOT NULL,
`plusses2` int(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

it wrong?

....silence please....

wapmetal Lead · 609 posts #8

LadyEnigma wrote: Thanks for your response wapmetal but it seems not work: (Riderz code looks good but maybe I'm wrong something, or I made the wrong table, can someone please post the correct table, i ve create this for table

CREATE TABLE `ibwf_bank` (
`id` int(10) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`pass` varchar(100) NOT NULL default '',
`hint` varchar(100) NOT NULL default '',
`done` int(100) NOT NULL default '0',
`actime` int(100) NOT NULL default '0',
`plusses` int(100) NOT NULL,
`plusses2` int(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

it wrong?

No this is no need, The sql/table he posted is correct

What problem you are getting?

LadyEnigma Developer · 71 posts #9

well, the code works correctly (plus deposit them and withdraw them without errors) but nn increase, the script says dovrebbereo increase by 10% every day but no associated increase plus: (

....silence please....

Leviathan73 Senior · 260 posts #11

wapmetal said ladyenigma when the plusses are deposited in the bank, do not increase, should function to increase the plusses deposited in the bank.

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