Bank Script

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

    Bank Script

    Here are the bank script dnt know if this one will work but anyway enjoy
    Sql
    Code:
      `bank` int(11) default '0',
    add this in core
    Code:
    $sql = "UPDATE ibwf_users SET bank = (bank * 1.05)";
    on index at the top
    Code:
    ///////////////////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
    Code:
    echo "<img class=\"menu\" alt=\"Home\" src=\"bank.gif\" align=\"absbottom\"></a>";
    echo "<a href=\"bank.php?action=bankpage&amp;sid=$sid\"> $stitle-Bank</a><br/>";
    in genproc
    Code:
    ////////////////////////////////////////////////////////////
    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&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>$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&amp;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
    Attached Files
    ________________
    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

    #2
    its working fine

    click here to join blingywap.co.za
    http://blingywap.co.za


    IF YOU NEED HELP JUST ASK AND ALWAYS SAY THANK YOU!

    Comment


      #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

      Comment


        #4
        yes its working, i included this in mobilezonez script
        LDSWAPWORLD sigpic
        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.


        Comment


          #5
          can thanks for the script can you make it wml version

          Comment


            #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!!!
            Last edited by kiLLeR-eyEd_14; 26.05.09, 13:02.
            My Blog: http://jhommark.blogspot.com
            My Facebook: http://www.facebook.com/jhommark
            My Official Site: http://www.undergroundweb.tk
            My Community Site: http://undergroundwap.xtreemhost.com

            Comment


              #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.

              Code:
              else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>You don't have enough Plusses to diposit<br/>";
              }
              COULD be
              Code:
              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.
              Code:
              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
              Last edited by djlee; 26.05.09, 04:24.

              Comment


                #8
                Originally posted by kiLLeR-eyEd_14 View Post
                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 sigpic
                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.


                Comment


                  #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........

                  Comment


                    #10
                    [QUOTE=riderz;30191]Here are the bank script dnt know if this one will work but anyway enjoy
                    Sql
                    Code:
                      `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.....

                    Comment

                    Working...
                    X