Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[Addon] Chance Ace
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

2020-07-12 10:51:42
the module comes from this url:

[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/addon-chance-ace.2889/[/url]

[ATTACH type="full" alt="1594549984131.png"]5626[/ATTACH]


[ATTACH type="full" alt="1594550004758.png"]5627[/ATTACH]



below,  the code of the chanceace.php file chanceace.php


<?
require_once("backend/functions.php");
dbconn();
if ($CURUSER["class"] < "2"){

   show_error_msg("Sorry...", "You must be a Crazy Seeder or above to play Chance Ace.");
}

              $playprice = 100*1024*1024;
              $minorprize = 50*1024*1024;
              $clubsmb = 200*1024*1024;
              $diamondsmb = 350*1024*1024;
              $heartsmb = 500*1024*1024;
              $spadesmb = 1000*1024*1024;

if ($_POST["bet"]){

 
              if ($CURUSER["uploaded"] < "$playprice")
          show_error_msg("Sorry ".$CURUSER["username"],"You haven't uploaded ".mksize($playprice)." yet.");

              stdhead("Chance Ace");
              begin_frame("Chance Ace");
              print("<center><h1><img src=/images/chanceace/chanceace.gif></h1></center>\n");
              print("<center><h2>Welcome, <a href=userdetails.php?id=$CURUSER[id]>$CURUSER[username]</a>!</h2></center>\n");
             
               $aceofclubs .= "<img src=images/chanceace/aceofclubs.gif> ";
               $aceofdiamonds .= "<img src=images/chanceace/aceofdiamonds.gif> ";
               $aceofhearts .= "<img src=images/chanceace/aceofhearts.gif> ";
               $aceofspades .= "<img src=images/chanceace/aceofspades.gif> ";



       $frstspot = "";
       $scndspot = "";
       $thrdspot = "";

       // Random

       $frstno = rand (1, 50);
       $scndno = rand (1, 50);
       $thrdno = rand (1, 50);

       // Image results

       // FIRST

       if (($frstno >= 1) && ($frstno <= 20)){
           $frstspot = $aceofclubs;
                   $aceofclubscount++;
       }
       if (($frstno >= 21) && ($frstno <= 35)){
           $frstspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($frstno >= 36) && ($frstno <= 45)){
           $frstspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($frstno >= 46) && ($frstno <= 50)){
           $frstspot = $aceofspades;
           $starcount++;
     
               }
       // SECOND

       if (($scndno >= 1) && ($scndno <= 20)){
           $scndspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($scndno >= 21) && ($scndno <= 35)){
           $scndspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($scndno >= 36) && ($scndno <= 45)){
           $scndspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($scndno >= 46) && ($scndno <= 50)){
           $scndspot = $aceofspades;
           $starcount++;
       }

       // THIRD

       if (($thrdno >= 1) && ($thrdno <= 20)){
           $thrdspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($thrdno >= 21) && ($thrdno <= 35)){
           $thrdspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($thrdno >= 36) && ($thrdno <= 45)){
           $thrdspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($thrdno >= 46) && ($thrdno <= 50)){
           $thrdspot = $aceofspades;
           $starcount++;
       }

       // END Image results
     
       // Adds to the pool for every play.


       if ($aceofclubscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of clubs in a row. You won &nbsp;" .mksize($clubsmb);
           mysqli_query("UPDATE users SET uploaded = uploaded + $clubsmb WHERE id=$CURUSER[id]");
                 }else{
             
       if ($aceofdiamondscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of diamonds in a row. You won &nbsp;" .mksize($diamondsmb);
           mysqli_query("UPDATE user SET uploaded = uploaded + $diamondsmb WHERE id=$CURUSER[id]");
                 }else{

       if ($aceofheartscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of hearts in a row. You won &nbsp;" .mksize($heartsmb);
           mysqli_query("UPDATE users SET uploaded = uploaded + $heartsmb WHERE id=$CURUSER[id]");
                   }else{

       if ($aceofspadescount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of spades in a row. You won &nbsp;" .mksize($spadesmb);
           mysqli_query("UPDATE users SET uploaded = uploaded + $spadesmb WHERE id=$CURUSER[id]");
                  }else{

       if ($minorprize != 0){
           if (($aceofclubscount == 2) || ($aceofdiamondscount == 2) || ($aceofheartscount == 2) || ($starcount == 2));
           $rslt = "<br><center><b>Well, you didnt match them all but you got 2 of the same suit, so I will give you &nbsp;" .mksize($minorprize);
           mysqli_query("UPDATE users SET uploaded = uploaded + $minorprize - $playprice WHERE id=$CURUSER[id]");
               
       }else{

       if (($aceofclubscount == 4) || ($aceofdiamondscount == 4) || ($aceofheartscount == 4) || ($starcount == 4));{
               $rslt = "<center><b>Sorry, you didnt win. You missed them all</b></center>";
               mysqli_query("UPDATE users SET uploaded = uploaded - $playprice WHERE id=$CURUSER[id]");
                 }
                    }
                   }
                  }
         }
                }
     
       // Show table

       print("<br><div align=center>\n");
       print("<table class=forumline width=300><tr>\n");
       print("<td width=33%><center>$frstspot&nbsp;&nbsp;$scndspot&nbsp;&nbsp;$thrdspot</center></td></tr>\n");
       print("</table></center></div>\n");


               print("<div align=center><table class=forumline width=300><tr><td class=Catbottom width=100%>$rslt</td>\n");
       print("</tr></table></center></div><br>\n");

               print("<br><div align=center>\n");
           print("<table class=forumline width=300>\n");
           print("<tr><td class=row1 width=100%><br><center><form method=POST><input type=submit value=Play ChanceAce name=bet class=button></form></center><br></td></tr>\n");
           print("</table>\n");

               end_frame();
               stdfoot();

        }else{

               // Start screen - Not currently playing a game
       stdhead("Chance Ace");
       begin_frame("Chance Ace");
       print("<h1><center><img src=/images/chanceace/chanceace.gif></center></h1>\n");
       print("<br>\n");
       print("<center><img src=images/chanceace/aces1.jpg width=114 height=95 border=0></center>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofclubs.gif width=50 height=50 border=0>&nbsp;&nbsp; = 200MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofdiamonds.gif width=50 height=50 border=0>&nbsp;&nbsp; = 350MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofhearts.gif width=50 height=50 border=0>&nbsp;&nbsp; = 500MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3&nbsp;&nbsp; x &nbsp;&nbsp;<img src=images/chanceace/aceofspades.gif width=50 height=50 border=0>&nbsp;&nbsp;&nbsp; = 1GB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>Two of the same suit gives you 50MB</center></font>\n");
       print("<br>\n");
       print("<br>\n");
       print("<center><b>NOTE:</b> By playing Chance Ace, you are betting 100 MB of upload credit!</center>\n");
       print("<br>\n");
       print("<center><form name=form method=post action=$phpself><input type=hidden name=bet value=bet><input type=submit class=btn value='Start!'></a></center>\n");

       end_frame();
       stdfoot();
}



?>





I replaced mysql by mysqli, the game displays well but the update of the account and the counter in credible upload does not update I attach the image folder and the original php file, thank you in advance for the update and your help
1594549984131.png
1594549984131.png
1594550004758.png
1594550004758.png
chance ace.rar
Download
2020-08-07 11:03:39
change all
mysqli_query
to
SQL_Query_exec

and you should use full opening php tags, not just <? but you should use <?php. There was also a typo in it. One of the queries calls for USER instead of USERS, here is the working code
<?php
require_once("backend/functions.php");
dbconn();
if ($CURUSER["class"] < "2"){

   show_error_msg("Sorry...", "You must be a Crazy Seeder or above to play Chance Ace.");
}

              $playprice = 100*1024*1024;
              $minorprize = 50*1024*1024;
              $clubsmb = 200*1024*1024;
              $diamondsmb = 350*1024*1024;
              $heartsmb = 500*1024*1024;
              $spadesmb = 1000*1024*1024;

if ($_POST["bet"]){

 
              if ($CURUSER["uploaded"] < "$playprice")
          show_error_msg("Sorry ".$CURUSER["username"],"You haven't uploaded ".mksize($playprice)." yet.");

              stdhead("Chance Ace");
              begin_frame("Chance Ace");
              print("<center><h1><img src=/images/chanceace/chanceace.gif></h1></center>\n");
              print("<center><h2>Welcome, <a href=userdetails.php?id=$CURUSER[id]>$CURUSER[username]</a>!</h2></center>\n");
             
               $aceofclubs .= "<img src=images/chanceace/aceofclubs.gif> ";
               $aceofdiamonds .= "<img src=images/chanceace/aceofdiamonds.gif> ";
               $aceofhearts .= "<img src=images/chanceace/aceofhearts.gif> ";
               $aceofspades .= "<img src=images/chanceace/aceofspades.gif> ";



       $frstspot = "";
       $scndspot = "";
       $thrdspot = "";

       // Random

       $frstno = rand (1, 50);
       $scndno = rand (1, 50);
       $thrdno = rand (1, 50);

       // Image results

       // FIRST

       if (($frstno >= 1) && ($frstno <= 20)){
           $frstspot = $aceofclubs;
                   $aceofclubscount++;
       }
       if (($frstno >= 21) && ($frstno <= 35)){
           $frstspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($frstno >= 36) && ($frstno <= 45)){
           $frstspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($frstno >= 46) && ($frstno <= 50)){
           $frstspot = $aceofspades;
           $starcount++;
     
               }
       // SECOND

       if (($scndno >= 1) && ($scndno <= 20)){
           $scndspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($scndno >= 21) && ($scndno <= 35)){
           $scndspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($scndno >= 36) && ($scndno <= 45)){
           $scndspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($scndno >= 46) && ($scndno <= 50)){
           $scndspot = $aceofspades;
           $starcount++;
       }

       // THIRD

       if (($thrdno >= 1) && ($thrdno <= 20)){
           $thrdspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($thrdno >= 21) && ($thrdno <= 35)){
           $thrdspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($thrdno >= 36) && ($thrdno <= 45)){
           $thrdspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($thrdno >= 46) && ($thrdno <= 50)){
           $thrdspot = $aceofspades;
           $starcount++;
       }

       // END Image results
     
       // Adds to the pool for every play.


       if ($aceofclubscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of clubs in a row. You won &nbsp;" .mksize($clubsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $clubsmb WHERE id=$CURUSER[id]");
                 }else{
             
       if ($aceofdiamondscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of diamonds in a row. You won &nbsp;" .mksize($diamondsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $diamondsmb WHERE id=$CURUSER[id]");
                 }else{

       if ($aceofheartscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of hearts in a row. You won &nbsp;" .mksize($heartsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $heartsmb WHERE id=$CURUSER[id]");
                   }else{

       if ($aceofspadescount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of spades in a row. You won &nbsp;" .mksize($spadesmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $spadesmb WHERE id=$CURUSER[id]");
                  }else{

       if ($minorprize != 0){
           if (($aceofclubscount == 2) || ($aceofdiamondscount == 2) || ($aceofheartscount == 2) || ($starcount == 2));
           $rslt = "<br><center><b>Well, you didnt match them all but you got 2 of the same suit, so I will give you &nbsp;" .mksize($minorprize);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $minorprize - $playprice WHERE id=$CURUSER[id]");
               
       }else{

       if (($aceofclubscount == 4) || ($aceofdiamondscount == 4) || ($aceofheartscount == 4) || ($starcount == 4));{
               $rslt = "<center><b>Sorry, you didnt win. You missed them all</b></center>";
               SQL_Query_exec("UPDATE users SET uploaded = uploaded - $playprice WHERE id=$CURUSER[id]");
                 }
                    }
                   }
                  }
         }
                }
     
       // Show table

       print("<br><div align=center>\n");
       print("<table class=forumline width=300><tr>\n");
       print("<td width=33%><center>$frstspot&nbsp;&nbsp;$scndspot&nbsp;&nbsp;$thrdspot</center></td></tr>\n");
       print("</table></center></div>\n");


               print("<div align=center><table class=forumline width=300><tr><td class=Catbottom width=100%>$rslt</td>\n");
       print("</tr></table></center></div><br>\n");

               print("<br><div align=center>\n");
           print("<table class=forumline width=300>\n");
           print("<tr><td class=row1 width=100%><br><center><form method=POST><input type=submit value=Play ChanceAce name=bet class=button></form></center><br></td></tr>\n");
           print("</table>\n");

               end_frame();
               stdfoot();

        }else{

               // Start screen - Not currently playing a game
       stdhead("Chance Ace");
       begin_frame("Chance Ace");
       print("<h1><center><img src=/images/chanceace/chanceace.gif></center></h1>\n");
       print("<br>\n");
       print("<center><img src=images/chanceace/aces1.jpg width=114 height=95 border=0></center>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofclubs.gif width=50 height=50 border=0>&nbsp;&nbsp; = 200MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofdiamonds.gif width=50 height=50 border=0>&nbsp;&nbsp; = 350MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofhearts.gif width=50 height=50 border=0>&nbsp;&nbsp; = 500MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3&nbsp;&nbsp; x &nbsp;&nbsp;<img src=images/chanceace/aceofspades.gif width=50 height=50 border=0>&nbsp;&nbsp;&nbsp; = 1GB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>Two of the same suit gives you 50MB</center></font>\n");
       print("<br>\n");
       print("<br>\n");
       print("<center><b>NOTE:</b> By playing Chance Ace, you are betting 100 MB of upload credit!</center>\n");
       print("<br>\n");
       print("<center><form name=form method=post action=$phpself><input type=hidden name=bet value=bet><input type=submit class=btn value='Start!'></a></center>\n");

       end_frame();
       stdfoot();
}



?>

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-08-08 16:15:29
thanks :D
2020-08-15 19:01:37
he gives nothing !?

it does not work for adding upload
2020-08-15 19:16:31
works fine on my test, are you using the code I posted?
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-08-15 22:06:08
I confirm he's counting down the 50 mb but he doesn't add the points when you win.

it just adds the points when you make three cards, it adds 200mb and 500mb, but with two cards of the same value it doesn't add the points.


it doesn't give the 50 mb when you have two cards as announced by the game but it gives well the points when you have three cards.



the game announces this; ..... NOTE: By playing Chance Ace, you are betting 100 MB of upload credit!

but it doesn't count 100 mb per game it counts 50 mb per game played??
2020-08-16 03:31:49
"MicroMonkey, post: 69067, member: 311":

works fine on my test, are you using the code I posted?

yes and mine and it doesn't work


<?php
require_once("backend/functions.php");
dbconn();
if ($CURUSER["class"] < "2"){
   show_error_msg("dÉSOLÉ...", "Vous devez être un Crazy Seeder ou plus pour jouer à Chance Ace.");
}

              $playprice = 100*1024*1024;
              $minorprize = 50*1024*1024;
              $clubsmb = 200*1024*1024;
              $diamondsmb = 350*1024*1024;
              $heartsmb = 500*1024*1024;
              $spadesmb = 1000*1024*1024;

if ($_POST["bet"]){

   
              if ($CURUSER["uploaded"] < "$playprice")
           show_error_msg("Désolé ".class_user($CURUSER['username']),"Tu n'as pas uploaded ".mksize($playprice)." encore.");

   stdhead("Chance Ace");
       begin_frame("Chance Ace");
           print("<center><font size=4><img src=/images/chanceace/chanceace.gif></font></center>\n");
              print("<center><font soze=5>Bienvenue, <a href=account-details.php?id=$row[id]>".class_user($CURUSER['username'])."</a> !</font><hr class=barre/></center>\n");
               
           $aceofclubs .= "<img src=images/chanceace/aceofclubs.gif> ";
           $aceofdiamonds .= "<img src=images/chanceace/aceofdiamonds.gif> ";
           $aceofhearts .= "<img src=images/chanceace/aceofhearts.gif> ";
           $aceofspades .= "<img src=images/chanceace/aceofspades.gif> ";


       $frstspot = "";
       $scndspot = "";
       $thrdspot = "";

       // Random
       $frstno = rand (1, 50);
       $scndno = rand (1, 50);
       $thrdno = rand (1, 50);
       // Image results

       // FIRST
       if (($frstno >= 1) && ($frstno <= 20)){
           $frstspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($frstno >= 21) && ($frstno <= 35)){
           $frstspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($frstno >= 36) && ($frstno <= 45)){
           $frstspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($frstno >= 46) && ($frstno <= 50)){
           $frstspot = $aceofspades;
           $starcount++;
       
       }
           
       // SECOND
       if (($scndno >= 1) && ($scndno <= 20)){
           $scndspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($scndno >= 21) && ($scndno <= 35)){
           $scndspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($scndno >= 36) && ($scndno <= 45)){
           $scndspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($scndno >= 46) && ($scndno <= 50)){
           $scndspot = $aceofspades;
           $starcount++;
       }

       // THIRD
       if (($thrdno >= 1) && ($thrdno <= 20)){
           $thrdspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($thrdno >= 21) && ($thrdno <= 35)){
           $thrdspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($thrdno >= 36) && ($thrdno <= 45)){
           $thrdspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($thrdno >= 46) && ($thrdno <= 50)){
           $thrdspot = $aceofspades;
           $starcount++;
       }
       // END Image results
       
       // Adds to the pool for every play.
       if ($aceofclubscount == 3){
           $rslt = "<br/><center><b>Toutes nos félicitations! Vous frappez 3 as de trèfle d'affilée. Tu as gagné &nbsp;" .mksize($clubsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $clubsmb WHERE id=$CURUSER[id]");
           
           }else{
               
       if ($aceofdiamondscount == 3){
           $rslt = "<br/><center><b>Toutes nos félicitations! Vous touchez 3 as de diamants d'affilée. Tu as gagné &nbsp;" .mksize($diamondsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $diamondsmb WHERE id=$CURUSER[id]");
           
           }else{

       if ($aceofheartscount == 3){
           $rslt = "<br/><center><b>Toutes nos félicitations! Vous touchez 3 As de cœur d'affilée. Tu as gagné &nbsp;" .mksize($heartsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $heartsmb WHERE id=$CURUSER[id]");
           
           }else{

       if ($aceofspadescount == 3){
           $rslt = "<br/><center><b>Toutes nos félicitations! Vous touchez 3 as de pique d'affilée. Tu as gagné &nbsp;" .mksize($spadesmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $spadesmb WHERE id=$CURUSER[id]");
           
           }else{

       if ($minorprize != 0){
           if (($aceofclubscount == 2) || ($aceofdiamondscount == 2) || ($aceofheartscount == 2) || ($starcount == 2));
           $rslt = "<br/><center><b>Eh bien, vous ne les avez pas tous assortis mais vous en avez 2 du même costume, alors je vais vous donner " .mksize($minorprize);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $minorprize - $playprice WHERE id=$CURUSER[id]");
                 
           }else{
           
       if (($aceofclubscount == 4) || ($aceofdiamondscount == 4) || ($aceofheartscount == 4) || ($starcount == 4));{
               $rslt = "<center><b>Désolé, vous n'avez pas gagné. Vous les avez tous manqués</b></center>";
               SQL_Query_exec("UPDATE users SET uploaded = uploaded - $playprice WHERE id=$CURUSER[id]");
                 }
                    }
                   }
                  }
         }
                }
       
       // Show table
       print("<br/><div align=center>\n");
       print("<table width=300><tr>\n");
       print("<td class=barre width=33%><center>$frstspot&nbsp;&nbsp;$scndspot&nbsp;&nbsp;$thrdspot</center></td></tr>\n");
       print("</table></center></div>\n");

       print("<div align=center><table width=300><tr><td class=table_head width=100%>&nbsp;&nbsp; $rslt <br/><br/></td>&nbsp;&nbsp;\n");
       print("</tr></table></center></div><br/>\n");

       print("<div align=center>\n");
       print("<table width=300>\n");
       print("<tr><td width=100%><center><form method=post><input type=submit name=bet value=Jouez></form></center><br/></td></tr>\n");
       print("</table>\n");

   end_frame();
      stdfoot();

       }else{

       // Start screen - Not currently playing a game
       stdhead("Chance Ace");
       begin_frame("Chance Ace");
       print("<font size=3><center><img src=/images/chanceace/chanceace.gif></center></font>\n");
       print("<br/>\n");
       print("<center><img src=images/chanceace/aces1.jpg width=214 height=105 border=0></center>\n");
       print("<br/>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofclubs.gif width=50 height=50 border=0>&nbsp;&nbsp; = 200MB</center></font>\n");
       print("<br/>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofdiamonds.gif width=50 height=50 border=0>&nbsp;&nbsp; = 350MB</center></font>\n");
       print("<br/>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofhearts.gif width=50 height=50 border=0>&nbsp;&nbsp; = 500MB</center></font>\n");
       print("<br/>\n");
       print("<center><font color=red size=4>3 x &nbsp;<img src=images/chanceace/aceofspades.gif width=50 height=50 border=0>&nbsp;&nbsp; = 1GB&nbsp;</center></font>\n");
       print("<br/>\n");
       print("<center><font color=red size=4>Deux même cartes et vous avez 50MB de partage!</center></font>\n");
       print("<br/>\n");
       print("<center><b>NOTE:</b> En jouant à Chance Ace, vous pariez avoir 100Mo de crédit de upload!</center>\n");
       print("<hr/>\n");
       print("<center><form name=form method=post action=$phpself><input type=hidden name=bet value=Vous Pariez ?><input type=submit  value='Début!'></a></center>\n");

       end_frame();
       stdfoot();
}

?>

2020-08-16 10:36:43
voici le mien
chanceace.zip
Download
2020-08-16 14:34:22
Its such small amounts you may not be noticing it when it adds 50. I gave myself 1gb of upload and tested it and its working. Not quite sure beyond that. I'll repost my code in case something else is afoot lol. Also remember, you are always losing 50mb each time you play. You play for 100 and it gives you 50 back each time
<?php
require_once("backend/functions.php");
dbconn();
if ($CURUSER["class"] < "2"){

   show_error_msg("Sorry...", "You must be a Crazy Seeder or above to play Chance Ace.");
}

              $playprice = 100*1024*1024;
              $minorprize = 50*1024*1024;
              $clubsmb = 200*1024*1024;
              $diamondsmb = 350*1024*1024;
              $heartsmb = 500*1024*1024;
              $spadesmb = 1000*1024*1024;

if ($_POST["bet"]){

 
              if ($CURUSER["uploaded"] < "$playprice")
          show_error_msg("Sorry ".$CURUSER["username"],"You haven't uploaded ".mksize($playprice)." yet.");

              stdhead("Chance Ace");
              begin_frame("Chance Ace");
              print("<center><h1><img src=/images/chanceace/chanceace.gif></h1></center>\n");
              print("<center><h2>Welcome, <a href=userdetails.php?id=$CURUSER[id]>$CURUSER[username]</a>!</h2></center>\n");
             
               $aceofclubs .= "<img src=images/chanceace/aceofclubs.gif> ";
               $aceofdiamonds .= "<img src=images/chanceace/aceofdiamonds.gif> ";
               $aceofhearts .= "<img src=images/chanceace/aceofhearts.gif> ";
               $aceofspades .= "<img src=images/chanceace/aceofspades.gif> ";



       $frstspot = "";
       $scndspot = "";
       $thrdspot = "";

       // Random

       $frstno = rand (1, 50);
       $scndno = rand (1, 50);
       $thrdno = rand (1, 50);

       // Image results

       // FIRST

       if (($frstno >= 1) && ($frstno <= 20)){
           $frstspot = $aceofclubs;
                   $aceofclubscount++;
       }
       if (($frstno >= 21) && ($frstno <= 35)){
           $frstspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($frstno >= 36) && ($frstno <= 45)){
           $frstspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($frstno >= 46) && ($frstno <= 50)){
           $frstspot = $aceofspades;
           $starcount++;
     
               }
       // SECOND

       if (($scndno >= 1) && ($scndno <= 20)){
           $scndspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($scndno >= 21) && ($scndno <= 35)){
           $scndspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($scndno >= 36) && ($scndno <= 45)){
           $scndspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($scndno >= 46) && ($scndno <= 50)){
           $scndspot = $aceofspades;
           $starcount++;
       }

       // THIRD

       if (($thrdno >= 1) && ($thrdno <= 20)){
           $thrdspot = $aceofclubs;
           $aceofclubscount++;
       }
       if (($thrdno >= 21) && ($thrdno <= 35)){
           $thrdspot = $aceofdiamonds;
           $aceofdiamondscount++;
       }
       if (($thrdno >= 36) && ($thrdno <= 45)){
           $thrdspot = $aceofhearts;
           $aceofheartscount++;
       }
       if (($thrdno >= 46) && ($thrdno <= 50)){
           $thrdspot = $aceofspades;
           $starcount++;
       }

       // END Image results
     
       // Adds to the pool for every play.


       if ($aceofclubscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of clubs in a row. You won &nbsp;" .mksize($clubsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $clubsmb WHERE id=$CURUSER[id]");
                 }else{
             
       if ($aceofdiamondscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of diamonds in a row. You won &nbsp;" .mksize($diamondsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $diamondsmb WHERE id=$CURUSER[id]");
                 }else{

       if ($aceofheartscount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of hearts in a row. You won &nbsp;" .mksize($heartsmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $heartsmb WHERE id=$CURUSER[id]");
                   }else{

       if ($aceofspadescount == 3){
           $rslt = "<br><center><b>Congratulations! You hit 3 Ace of spades in a row. You won &nbsp;" .mksize($spadesmb);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $spadesmb WHERE id=$CURUSER[id]");
                  }else{

       if ($minorprize != 0){
           if (($aceofclubscount == 2) || ($aceofdiamondscount == 2) || ($aceofheartscount == 2) || ($starcount == 2));
           $rslt = "<br><center><b>Well, you didnt match them all but you got 2 of the same suit, so I will give you &nbsp;" .mksize($minorprize);
           SQL_Query_exec("UPDATE users SET uploaded = uploaded + $minorprize - $playprice WHERE id=$CURUSER[id]");
               
       }else{

       if (($aceofclubscount == 4) || ($aceofdiamondscount == 4) || ($aceofheartscount == 4) || ($starcount == 4));{
               $rslt = "<center><b>Sorry, you didnt win. You missed them all</b></center>";
               SQL_Query_exec("UPDATE users SET uploaded = uploaded - $playprice WHERE id=$CURUSER[id]");
                 }
                    }
                   }
                  }
         }
                }
     
       // Show table

       print("<br><div align=center>\n");
       print("<table class=forumline width=300><tr>\n");
       print("<td width=33%><center>$frstspot&nbsp;&nbsp;$scndspot&nbsp;&nbsp;$thrdspot</center></td></tr>\n");
       print("</table></center></div>\n");


               print("<div align=center><table class=forumline width=300><tr><td class=Catbottom width=100%>$rslt</td>\n");
       print("</tr></table></center></div><br>\n");

               print("<br><div align=center>\n");
           print("<table class=forumline width=300>\n");
           print("<tr><td class=row1 width=100%><br><center><form method=POST><input type=submit value=Play ChanceAce name=bet class=button></form></center><br></td></tr>\n");
           print("</table>\n");

               end_frame();
               stdfoot();

        }else{

               // Start screen - Not currently playing a game
       stdhead("Chance Ace");
       begin_frame("Chance Ace");
       print("<h1><center><img src=/images/chanceace/chanceace.gif></center></h1>\n");
       print("<br>\n");
       print("<center><img src=images/chanceace/aces1.jpg width=114 height=95 border=0></center>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofclubs.gif width=50 height=50 border=0>&nbsp;&nbsp; = 200MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofdiamonds.gif width=50 height=50 border=0>&nbsp;&nbsp; = 350MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3 x &nbsp;&nbsp;<img src=images/chanceace/aceofhearts.gif width=50 height=50 border=0>&nbsp;&nbsp; = 500MB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>3&nbsp;&nbsp; x &nbsp;&nbsp;<img src=images/chanceace/aceofspades.gif width=50 height=50 border=0>&nbsp;&nbsp;&nbsp; = 1GB</center></font>\n");
       print("<br>\n");
       print("<center><font color=red size=4>Two of the same suit gives you 50MB</center></font>\n");
       print("<br>\n");
       print("<br>\n");
       print("<center><b>NOTE:</b> By playing Chance Ace, you are betting 100 MB of upload credit!</center>\n");
       print("<br>\n");
       print("<center><form name=form method=post action=$phpself><input type=hidden name=bet value=bet><input type=submit class=btn value='Start!'></a></center>\n");

       end_frame();
       stdfoot();
}



?>

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-08-16 15:47:52
sorry nothing had and nothing was withdrawn :unsure:

....thank you for what you do, always appreciated ;)
2020-08-16 16:49:57
hmm, I assume your tables in your database are standard?
UPDATE users SET uploaded

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-08-17 19:03:16
"MicroMonkey, post: 69086, member: 311":

hmm, I assume your tables in your database are standard?
UPDATE users SET uploaded


yes from the mysqli V3
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728