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
User Posts

Go to Profile

hmm, I assume your tables in your database are standard?
UPDATE users SET uploaded
Sorry but im not quite sure what you are asking me niki
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();
}



?>
works fine on my test, are you using the code I posted?
is this missing from your query?
torrents.size,
feel free to try my torrents.php. Back up your file first.
Nice stuff STorrents. When I made this mod, one thing I dont think I took into consideration was having this same function occur for invited members, this (I think) is only for those who sign up. Imma have to go check that later and see if thats the case. If you or anyone else finds out that this is true and fixes it before me, let me know

*EDIT Nevermind, I appaarently did add this to invite.php
        // If username is somehow taken, keep trying
       while (mysqli_errno($GLOBALS["DBconnector"]) == 1062) {
           $username = "invite_".mksecret(20);
   //        $ret = SQL_Query_exec("INSERT INTO users (username, secret, email, status, invited_by, added, stylesheet, language) VALUES (".
   //        implode(",", array_map("sqlesc", array($username, $secret, $email, 'pending', $CURUSER["id"]))) . ",'" . get_date_time() . "', $site_config[default_theme], $site_config[default_language])");
               $ret = SQL_Query_exec("INSERT INTO users (username, secret, email, status, invited_by, added, stylesheet, uploaded, downloaded, language, invites) VALUES (".
   implode(",", array_map("sqlesc", array($username, $secret, $email, 'pending', $CURUSER["id"]))) . ",'" . get_date_time() . "', $site_config[default_theme], $site_config[new_member_upload_ratio], 0, $site_config[default_language], $site_config[new_member_invites])");
       }
       show_error_msg(T_("ERROR"), T_("DATABASE_ERROR"), 1);
   }
Looks good. I will try it later. I did see 2 instances of mysql which should be mysqli, so if it help anyone and they are using TTv3, those 2 edits will be
find
$id = mysql_insert_id();

replace with
$id = mysqli_insert_id($GLOBALS["DBconnector"]);


find
if (mysql_errno() == 1062)

replace with
if (mysqli_errno($GLOBALS["DBconnector"]) == 1062)

I will have to see about incorporating my heavily modded upload file with yours. Mine looks like this, so It would prolly take me some time to remake it, but thanks alot for this new stuff, its fantastic
You guys dont have to translate to english if you dont want to since this is basically a french mod for french speakers :) Everyone should have a place to talk about things easily.
try for TT v3. I didnt test this. I just edited the code
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();
}



?>
Tracker Timeout — 2020-08-06 20:32:03 in v3 Support
I assume he is trying a UDP external torrent. if this is the case, some headway was made on this  if you go through the whole thread https://www.torrenttrader.xyz/index.php?threads/scrape-udp-trackers.9795/
I believe it still needs work, but it was put on the back burner it seems, but I did get it to work in a small test, but for large sites it may not be the best solution.
perhaps changing  `reason` VARCHAR(255) NOT NULL, would take care of it
TT Torrent Client — 2020-07-30 19:54:16 in v3 Mods Completed
Can you do that? Im not sure what to do since you are using PDO, im still trying to get better at that. I dont know if a REQUIRE would be correct or not
TT Torrent Client — 2020-07-28 22:30:08 in v3 Mods Completed
I guess there are 2 places to add DB info and username etc? Wonder if it can be made to read the backend/mysql.php file instead of adding the info across multiple files? hmm
hmm, I also notice the PM feature is not working. I never really used this mod, but now that im looking at it, its not 100%. Anyone know what to fix? I will play with it later, but feel free to fix my screw up lol
Just realized that HTTP_SERVER_VARS is removed from php, I guess it is now just $_SERVER
Mine for v3 looks like this. Run the same sql query as above.
Add admin cp link
   <td align="center"><a href="admincp.php?action=viewlogsunconnectable"><img src="images/admin/connectable.png" border="0" width="118" height="80" alt="" /><br /><?php echo T_("NOT_CONNECT"); ?><br /></a></td>

place inside admincp.php
////////////////////////////////////UNCONNECTABLE////////////////

if ($_GET['action'] == "listunconnectable") {
   $res2 = SQL_Query_exec("SELECT userid, seeder, torrent, client FROM peers WHERE connectable='no' ORDER BY userid DESC") or sqlerr();

   stdhead("Peers that are unconnectable");

begin_frame("Unconnectable");

   print("<br/><a href=admincp.php?action=sendpmunconnectable>Send all not connectable users a PM</a>");
   print("<br/><a href=admincp.php?action=viewlogsunconnectable>View the Log (Check this before PMing users)</a>");
   print("<br/>Peers that are Not Connectable");
   print("<br/>This is only users that are active on the torrents right now.");
   print("<br/><font color=red>*</font> means the user is seeding.<p>");
   $result = SQL_Query_exec("SELECT DISTINCT userid FROM peers WHERE connectable = 'no'");
   $count = mysqli_num_rows($result);
   print ("$count unique users that are not connectable ");
   $result2 = SQL_Query_exec("SELECT DISTINCT torrent FROM peers WHERE connectable = 'no'");
   $count2 = mysqli_num_rows($result2);
   print ("on $count2  torrents.");
   @mysqli_free_result($result);

if (mysqli_num_rows($res2) == 0)
   print("<p align=center><b>All Peers Are Connectable! </b></p>\n");
else {
   print("<table border=1 cellspacing=0 cellpadding=5>\n");
   print("<tr><td class=colhead>UserName</td><td class=colhead>Torrent</td><td class=colhead>Client</td></tr>\n");

while($arr2 = mysqli_fetch_assoc($res2)){
   $r2 = SQL_Query_exec("SELECT username FROM users WHERE id=$arr2[userid]") or sqlerr();
   $a2 = mysqli_fetch_assoc($r2);
   print("<tr><td><a href=account-details.php?id=$arr2[userid]>$a2[username]</a></td><td align=left><a href=torrents-details.php?id=$arr2[torrent]&dllist=1#seeders>$arr2[torrent]");

if ($arr2['seeder'] == 'yes')
   print("<font color=red>*</font>");
   print("</a></td><td align=left>$arr2[client]</td></tr>\n");
}
   print("</table>\n");
}
end_frame();
navmenu();
stdfoot();
}



if ($_GET['action'] == "sendpmunconnectable") {
   stdhead("Peers that are unconnectable");
begin_frame("Send PM");
?>

   <table class="main" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
   <td class="embedded"><div align="center"><h1>Mass Message to All Non Connectable Users</a></h1>
   <form method="post" action="admincp.php?action=viewlogsunconnectable">

<?php
if (isset($_GET["returnto"]) || isset($_SERVER["HTTP_REFERER"])) {
?>
   <input type="hidden" name="returnto" value=<?php echo $_GET["returnto"] ? $_GET["returnto"] : $_SERVER["HTTP_REFERER"] ?>  />


<?php
}
//default message
   $body = "The tracker has determined that you are firewalled or NATed and cannot accept incoming connections. This means that other peers in the swarm will be unable to connect to you, only you to them. Even worse, if two peers are both in this state they will not be able to connect at all. This has obviously a detrimental effect on the overall speed. The way to solve the problem involves opening the ports used for incoming connections (the same range you defined in your client) on the firewall and/or configuring your NAT server to use a basic form of NAT for that range instead of NAPT (the actual process differs widely between different router models. Check your router documentation and/or support forum. You will also find lots of information on the subject at PortForward). Also if you need help please post in the forums or shoutbox your problems and we will try and figure it out. Thank You";
?>

<table cellspacing="0" cellpadding="5">
<tr>
<td>Send Mass Message To All Non Connectable Users<br>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td border="0">&nbsp;</td>
<td border="0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><textarea name="msg" cols="120" rows="15"><?php echo $body?></textarea></td>
</tr>
<tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Send the PM!" class="btn"></td>
</tr>
</table>
<input type="hidden" name="receiver" value=<?php echo $receiver?>  />
</form>
</div>
</td>
</tr>
</table>
<br>NOTE: Have fun
<?php
// if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST") {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
   $dt = sqlesc(get_date_time());
   $msg = $_POST['msg'];


if (!$msg)
   show_error_msg("Error", "Please Type In Some Text.", 1);
   $query = SQL_Query_exec("SELECT distinct userid FROM peers WHERE connectable='no'");

while($dat=mysqli_fetch_assoc($query)){
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES (0,$dat[userid] , '" . get_date_time() . "', " . sqlesc($msg) .", '0')") or sqlerr(__FILE__,__LINE__); }
   SQL_Query_exec("INSERT INTO notconnectablepmlog ( user , date ) VALUES ( $CURUSER[id], $dt)") or sqlerr(__FILE__,__LINE__);
   write_log("A PM was sent to unconnectable users by ($CURUSER[username])");

   die();
}
end_frame();
navmenu();
stdfoot();
}

if ($_GET['action'] == "viewlogsunconnectable") {
stdhead("Unconnectable Peers Mass PM Log");
begin_frame("Unconnectable PM Logs");
$getlog = SQL_Query_exec("SELECT * FROM notconnectablepmlog LIMIT 10");
print("Unconnectable Peers Mass PM Log");
print("<br/><br/><a href=admincp.php?action=sendpmunconnectable>&nbsp;&nbsp;<b>* Send all not connectable users a PM</b></a>");
print("<br/><a href=admincp.php?action=listunconnectable>&nbsp;&nbsp;<b>* List Unconnectable Users</b></a>");
print("<br/><br/>Please dont use the mass PM too often. We dont want to spam the users, just let them know they are unconnectable.<br/>");
print("Every week would be ok.<br/><br/>");
print("<table border=1 cellspacing=0 cellpadding=5>\n");
print("<br/><tr><td class=colhead>By User</td><td class=colhead>Date</td><td class=colhead>elapsed</td></tr>");
while($arr2 = mysqli_fetch_assoc($getlog)){
$r2 = SQL_Query_exec("SELECT username FROM users WHERE id=$arr2[user]") or sqlerr();
$a2 = mysqli_fetch_assoc($r2);
$elapsed = get_elapsed_time(sql_timestamp_to_unix_timestamp($arr2[date]));
print("<tr><td class=colhead><a href=account-details.php?id=$arr2[user]>$a2[username]</a></td><td class=colhead>$arr2[date]</td><td>$elapsed ago</td></tr>");

print("</table>");
}
end_frame();
navmenu();
stdfoot();
}
TT Torrent Client — 2020-07-11 18:15:18 in v3 Mods Completed
looks really cool. Thanks :) Imma have to try this out, looks like fun
I dont think its necessary at all.
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