Bank Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Leviathan73
    replied
    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.

    Leave a comment:


  • wapmetal
    replied
    Can't understand what you are saying

    Leave a comment:


  • LadyEnigma
    replied
    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:


  • wapmetal
    replied
    Originally posted by LadyEnigma View Post
    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
    PHP Code:
    CREATE TABLE `ibwf_bank` (
    `
    idint(10NOT NULL auto_increment,
    `
    uidint(100NOT NULL default '0',
    `
    passvarchar(100NOT NULL default '',
    `
    hintvarchar(100NOT NULL default '',
    `
    doneint(100NOT NULL default '0',
    `
    actimeint(100NOT NULL default '0',
    `
    plussesint(100NOT NULL,
    `
    plusses2int(100NOT NULL,
    PRIMARY KEY (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=
    it wrong?

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

    What problem you are getting?

    Leave a comment:


  • LadyEnigma
    replied
    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
    PHP Code:
    CREATE TABLE `ibwf_bank` (
    `
    idint(10NOT NULL auto_increment,
    `
    uidint(100NOT NULL default '0',
    `
    passvarchar(100NOT NULL default '',
    `
    hintvarchar(100NOT NULL default '',
    `
    doneint(100NOT NULL default '0',
    `
    actimeint(100NOT NULL default '0',
    `
    plussesint(100NOT NULL,
    `
    plusses2int(100NOT NULL,
    PRIMARY KEY (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=
    it wrong?

    Leave a comment:


  • wapmetal
    replied
    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&amp;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:


  • LadyEnigma
    replied
    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:


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

    Leave a comment:


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

    Leave a comment:


  • quiksilverX
    replied
    mhmh i have this codes somewhere will add it here asap

    Leave a comment:


  • riderz
    started a topic Bank Error

    Bank Error

    copy n paste it in index.php
    Code:
    /////////////
    
    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&amp;sid=$sid\">Diposit credits</a><br/>";
        echo "<a href=\"index.php?action=wdraw&amp;sid=$sid\">Withdraw credits</a><br/>";
        echo "</p>";
        echo "<p align=\"center\">";
        echo "<a href=\"index.php?action=main&amp;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&amp;sid=$sid&amp;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&amp;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&amp;sid=$sid&amp;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&amp;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
    Code:
    $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
    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)
    {
    $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&amp;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&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</body>";
    echo "</html>";
    exit();
    }
    add it on main page
    Code:
    echo "<a href=\"index.php?action=bankpage&amp;sid=$sid\">»Bank</a><br/>";
    add it also edit upper part of site
    Code:
    $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
    Code:
     `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
Working...
X