Bank Error
Collapse
X
-
wapmetal said ladyenigma when the plusses are deposited in the bank, do not increase, should function to increase the plusses deposited in the bank.Last edited by Leviathan73; 10.01.11, 09:48.
-
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: (
Leave a comment:
-
Originally posted by LadyEnigma View PostThanks 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 tableit wrong?PHP Code: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 ;
No this is no need, The sql/table he posted is correct
What problem you are getting?
Leave a comment:
-
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 tableit wrong?PHP Code: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 ;
Leave a comment:
-
try this
untested:
PHP Code:////////////////////////////////////////////////////////////
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();
}
Last edited by wapmetal; 09.01.11, 14:38.
Leave a comment:
-
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
Leave a comment:
-
but did not deposit anything, I tried it myself. Why? Where is the error?
Leave a comment:
-
Bank Error
copy n paste it in index.php
In user profile index.php?action=usersCode:///////////// 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(); }
copy n paste in genproc.phpCode:$bank = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'")); echo "<b>Plusses In Bank:</b> $bank[0]<br/>";
add it on main pageCode://////////////////////////////////////////////////////////// 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 also edit upper part of siteCode:echo "<a href=\"index.php?action=bankpage&sid=$sid\">»Bank</a><br/>";
add this line in ibwf_user tableCode:$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=\"*\"/>";
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 creditsCode:`bank` int(100) NOT NULL default '0',
Tags: None
Leave a comment: