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
Unconnectable Users
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

2020-07-19 20:36:47
Will be converting to v3. Will also add Email & PM notification and config to turn on.
2020-07-22 20:55:05
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();
}

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-07-23 18:38:30
"MicroMonkey, post: 68845, member: 311":

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") {
   $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();
}



a big thank you for the update, question, possible to put page ?¿, the list is very long scrolled


at home it does not work and I had to change this party [color=rgb(251, 160, 38)]if ($ _GET ['action'] ==[/color] For [color=rgb(250, 197, 28)]if ($ action ==[/color]


Thanks ! ;)
2020-07-23 21:57:51
Y
"spiritblue, post: 68848, member: 401":

a big thank you for the update, question, possible to put page ?¿, the list is very long scrolled


at home it does not work and I had to change this party [color=rgb(251, 160, 38)]if ($ _GET ['action'] ==[/color] For [color=rgb(250, 197, 28)]if ($ action ==[/color]


Thanks ! ;)


You'll need a sum of the total count of torrents, and break it apart or iterate it by explode(), because pager in TT or anything is doing:

... LIMIT 1,56

etc
2020-07-26 15:33:06
Just realized that HTTP_SERVER_VARS is removed from php, I guess it is now just $_SERVER
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-07-26 16:48:50
cette partie ne veut pas fonctionner ?

if ($_GET['action'] == "viewlogsunconnectable") {
#if ($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();
}







My...

#======================================================================#
# UNCONNECTABLE
#======================================================================#
if ($action == "listunconnectable") {
#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("Non Connecter");
   print("<br/><center><a class=stylebouton href=admincp.php?action=sendpmunconnectable>Envoyer un MP à tous les utilisateurs non connectables</a>");
   print("<br/>(Vérifiez ceci avant de faire à l'utilisateurs un MP)<br/><a class=stylebouton href=admincp.php?action=viewlogsunconnectable>Afficher le journal de connexion</a><br/>");
   print("<br/><u>Pairs Connectables</u> &#8628;");
   print("<br/>Ce ne sont que les utilisateurs actifs sur les torrents pour le moment.");
   print("<br/><font color=red>*</font> signifie que l'utilisateur est en train de seedé.<hr/>");
   $result = SQL_Query_exec("SELECT DISTINCT userid FROM peers WHERE connectable = 'no'");
   $count = mysqli_num_rows($result);
   print ("$count utilisateurs uniquements qui ne sont pas connectables ");
   $result2 = SQL_Query_exec("SELECT DISTINCT torrent FROM peers WHERE connectable = 'no'");
   $count2 = mysqli_num_rows($result2);
   print ("sur $count2  torrents.");
   @mysqli_free_result($result);

if (mysqli_num_rows($res2) == 0)
   print("</center><div align=center><b>Tous les pairs sont connectables! </b></div><br/><br/>\n");
else {
   print("<br/><table width=50% class=table_table cellspacing=0 cellpadding=5 border=0 align=center>\n");
   print("<tr><td class=table_col1>Pseudonyme</td><td class=table_col1>Torrent</td><td class=table_col1>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]>".class_user($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><br/>\n");
}
end_frame();
navmenu();
stdfoot();
}


if ($action == "sendpmunconnectable") {
#if ($_GET['action'] == "sendpmunconnectable") {

   stdhead("Peers that are unconnectable");
begin_frame("Envoyer MP");
?>

   <table class="main" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
   <td class="embedded"><div align="center"><h1>Message de masse à tous les utilisateurs non connecter</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 = "Le tracker a déterminé que vous êtes protégé par un pare-feu ou NAT et ne pouvez pas accepter les connexions entrantes. Cela signifie que les autres pairs de l'essaim ne pourront pas se connecter à vous, seulement vous à eux. Pire encore, si deux pairs sont tous les deux dans cet état, ils ne pourront pas du tout se connecter. Ceci a évidemment un effet néfaste sur la vitesse globale. La façon de résoudre le problème consiste à ouvrir les ports utilisés pour les connexions entrantes (la même plage que vous avez définie dans votre client) sur le pare-feu et / ou à configurer votre serveur NAT pour utiliser une forme de base de NAT pour cette plage au lieu de NAPT (le Le processus diffère considérablement selon les modèles de routeur. Consultez la documentation de votre routeur et / ou le forum d'assistance. Vous trouverez également de nombreuses informations sur le sujet sur Redirection de port). Aussi, si vous avez besoin d'aide, veuillez poster vos problèmes sur les forums ou shoutbox et nous essaierons de les résoudre. Merci";
?>

<table cellspacing="0" cellpadding="5">
<tr>
<td>Envoyer un message de masse à tous les utilisateurs non connectables<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="Envoyez le MP!" class="btn"></td>
</tr>
</table>
<input type="hidden" name="receiver" value=<?php echo $receiver?>  />
</form>
</div>
</td>
</tr>
</table>
<br>REMARQUE: amusez-vous
<?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("Erreur", "Veuillez taper un texte.", 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("Un MP a été envoyé aux utilisateurs non connectables par ($CURUSER[username])");
   die();
}
end_frame();
navmenu();
stdfoot();
}

if ($_GET['action'] == "viewlogsunconnectable") {
#if ($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();
}
#======================================================================#
# END UNCONNECTABLE
#======================================================================#

2020-07-26 17:34:27
"MicroMonkey, post: 68853, member: 311":

Just realized that HTTP_SERVER_VARS is removed from php, I guess it is now just $_SERVER


_VARS still work for me, relying on it for detecting index page - 7.4.8
2020-07-26 17:44:54
"STorrents2020, post: 68856, member: 20382":

_VARS still work for me, relying on it for detecting index page - 7.4.8

?¿
2020-07-26 17:46:37
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
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-07-26 17:49:33
"MicroMonkey, post: 68858, member: 311":

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

to you my to-cochin! MDR ??
2020-07-27 03:08:18
"spiritblue, post: 68857, member: 401":

?¿


On got cross confused lol post read wrong
2020-07-28 01:18:12
solved on my side thank you for your support;)

my mistake, forgot to add sql table MDR ? ? :alien:
Unknown User
2020-07-28 11:53:57
helle everybody,update whith class_user

[php]
<?php
require_once("backend/functions.php");
dbconn(false);
loggedinonly(true);


if (!$CURUSER || $CURUSER["control_panel"]!="yes") {
   show_error_msg("Error","Sorry you do not have the rights to access this page!", 1);
}
if ($_GET['action'] == "list") {
   $res2 = SQL_Query_exec("SELECT DISTINCT userid, seeder, torrent, client FROM peers WHERE connectable='no' ORDER BY userid DESC");

   stdhead("Peers that are unconnectable");

begin_frame("Unconnectable");

   print("<br /><a href=findnotconnectable.php?action=sendpm>Send All not connectable Users A PM</a>");
   print("<br /><a href=findnotconnectable.php>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 = mysql_num_rows($result);

   print ("$count unique users that are not connectable.");

   $result2 = SQL_Query_exec("select distinct torrent from peers where connectable = 'no'");
   $count2 = mysql_num_rows($result2);

   print ("on $count2  torrents .");
       @mysql_free_result($result);
if (mysql_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 = mysql_fetch_assoc($res2)){
   $r2 = SQL_Query_exec("SELECT username FROM users WHERE id=$arr2[userid]");
   $a2 = mysql_fetch_assoc($r2);
   print("<tr><td><a href=account-details.php?id=$arr2[userid]>".class_user($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();
}

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=mysql_fetch_assoc($query)){
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES (0,$dat[userid] , '" . get_date_time() . "', " . sqlesc($msg) .", '0')");
}
   SQL_Query_exec("INSERT INTO notconnectablepmlog ( user , date ) VALUES ( $CURUSER[id], $dt)");
}
if ($_GET['action'] == "sendpm") {
   stdhead("Peers that are unconnectable");

begin_frame("Send PM");
?>

<table class="main" width="750" 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="findnotconnectable.php">
<?php if ($_GET["returnto"] || $_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 come into our IRC chat room or post in the forums your problems. We are always glad to help out.Thank You";
?>

<table cellspacing="0" cellpadding="5">
<tr>
<td>Send Mass Messege 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" class="btn"></td>
</tr>
</table>
   <input type="hidden" name="receiver" value="<?php echo $receiver;?>">
</form>
</div>
</td>
</tr>
</table>

<br>NOTE: No HTML Code Allowed. (NO HTML)
<?php
end_frame();
}

if ($_GET['action'] == "") {
   stdhead("Unconnectable Peers Mass PM Log");

begin_frame("PM Logs");

   $getlog = SQL_Query_exec("SELECT * FROM notconnectablepmlog LIMIT 10");

   print("Unconnectable Peers Mass PM Log");
   print("<br /><br /><a href='findnotconnectable.php?action=sendpm'>&nbsp;&nbsp;<b>* Send All not connectable Users A PM</b></a>");
   print("<br /><a href='findnotconnectable.php?action=list'>&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 = mysql_fetch_assoc($getlog)) {
   $r2 = SQL_Query_exec("SELECT username FROM users WHERE id=$arr2[user]");
   $a2 = mysql_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]'>".class_user($a2["username"])."</a></td><td class='colhead'>$arr2[date]</td><td>$elapsed ago</td></tr>");
}
   print("</table>");
}

end_frame();
stdfoot();
?>
[/php]
2020-07-28 17:47:12
You can use DISTINCT or GROUP BY. Both provide the same results.
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728