mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
exam support priority + peer suppoert ipv4&ipv6
This commit is contained in:
@@ -16,13 +16,14 @@ function dltable($name, $arr, $torrent)
|
||||
{
|
||||
global $lang_viewpeerlist,$viewanonymous_class,$userprofile_class,$enablelocation_tweak;
|
||||
global $CURUSER;
|
||||
global $lang_functions;
|
||||
$s = "<b>" . count($arr) . " $name</b>\n";
|
||||
if (!count($arr))
|
||||
return $s;
|
||||
$s .= "\n";
|
||||
$s .= "<table width=825 class=main border=1 cellspacing=0 cellpadding=3>\n";
|
||||
$s .= "<table width=100% class=main border=1 cellspacing=0 cellpadding=3>\n";
|
||||
$s .= "<tr><td class=colhead align=center width=1%>".$lang_viewpeerlist['col_user_ip']."</td>" .
|
||||
($enablelocation_tweak == 'yes' || get_user_class() >= $userprofile_class ? "<td class=colhead align=center width=1%>".$lang_viewpeerlist['col_location']."</td>" : "").
|
||||
($enablelocation_tweak == 'yes' || get_user_class() >= $userprofile_class ? "<td class=colhead align=center>".$lang_viewpeerlist['col_location']."</td>" : "").
|
||||
"<td class=colhead align=center width=1%>".$lang_viewpeerlist['col_connectable']."</td>".
|
||||
"<td class=colhead align=center width=1%>".$lang_viewpeerlist['col_uploaded']."</td>".
|
||||
"<td class=colhead align=center width=1%>".$lang_viewpeerlist['col_rate']."</td>" .
|
||||
@@ -53,15 +54,14 @@ function dltable($name, $arr, $torrent)
|
||||
|
||||
$secs = max(1, ($e["la"] - $e["st"]));
|
||||
if ($enablelocation_tweak == 'yes'){
|
||||
list($loc_pub, $loc_mod) = get_ip_location($e["ip"]);
|
||||
list($loc_pub, $loc_mod) = get_ip_location($e["ips"]);
|
||||
$location = get_user_class() >= $userprofile_class ? "<div title='" . $loc_mod . "'>" . $loc_pub . "</div>" : $loc_pub;
|
||||
$s .= "<td class=rowfollow align=center width=1%><nobr>" . $location . "</nobr></td>\n";
|
||||
}
|
||||
elseif (get_user_class() >= $userprofile_class){
|
||||
$location = $e["ip"];
|
||||
$location = $e["ips"];
|
||||
$s .= "<td class=rowfollow align=center width=1%><nobr>" . $location . "</nobr></td>\n";
|
||||
}
|
||||
else $location = "";
|
||||
|
||||
$s .= "<td class=rowfollow align=center width=1%><nobr>" . ($e['connectable'] == "yes" ? $lang_viewpeerlist['text_yes'] : "<font color=red>".$lang_viewpeerlist['text_no']."</font>") . "</nobr></td>\n";
|
||||
$s .= "<td class=rowfollow align=center width=1%><nobr>" . mksize($e["uploaded"]) . "</nobr></td>\n";
|
||||
@@ -91,10 +91,9 @@ function dltable($name, $arr, $torrent)
|
||||
$s .= "</table>\n";
|
||||
return $s;
|
||||
}
|
||||
|
||||
$downloaders = array();
|
||||
$seeders = array();
|
||||
$subres = sql_query("SELECT seeder, finishedat, downloadoffset, uploadoffset, ip, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, connectable, agent, peer_id, UNIX_TIMESTAMP(last_action) AS la, userid FROM peers WHERE torrent = $id") or sqlerr();
|
||||
$subres = sql_query("SELECT seeder, finishedat, downloadoffset, uploadoffset, group_concat(ip) as ips, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, connectable, agent, peer_id, UNIX_TIMESTAMP(last_action) AS la, userid FROM peers WHERE torrent = $id group by peer_id ") or sqlerr();
|
||||
while ($subrow = mysql_fetch_array($subres)) {
|
||||
if ($subrow["seeder"] == "yes")
|
||||
$seeders[] = $subrow;
|
||||
|
||||
Reference in New Issue
Block a user