if ($row["external"] != "yes" && $row["times_completed"] > 0) {
echo("[<a href='torrents-completed.php?id=$id'>" .T_("WHOS_COMPLETED"). "</a>] ");
if ($row["seeders"] <= 1) {
echo("[<a href='torrents-reseed.php?id=$id'>" .T_("REQUEST_A_RE_SEED"). "</a>]");
}
} foreach ($infovariable["files"] as $file) {
if(is_numeric($filecount))
$filecount += "1";
$multiname = $file['path'];//Not needed here really
$multitorrentsize = $file['length'];
$torrentsize += $file['length'];
} foreach ($infovariable["files"] as $file) {
if(is_countable($filecount))
$filecount += "1";
$multiname = $file['path'];//Not needed here really
$multitorrentsize = $file['length'];
$torrentsize += $file['length'];
} $announce = $TorrentInfo[0];
$infohash = $TorrentInfo[1];
$creationdate = $TorrentInfo[2];
$internalname = $TorrentInfo[3];
$torrentsize = $TorrentInfo[4];
$filecount = $TorrentInfo[5];
//filecount fix
if (false === \is_countable($filecount)) {
$filecount = 1;
}
//end filecount fix
$annlist = $TorrentInfo[6];
$comment = $TorrentInfo[7];
$filelist = $TorrentInfo[8];function getip() {
return $_SERVER["REMOTE_ADDR"];
}
// cloudflare Server use addon 10-8-2014
// Updated getip with validation
function getip()
{if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];return $ip;}
foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'HTTP_CF_CONNECTING_IP', 'REMOTE_ADDR') as $key) {if (array_key_exists($key, $_SERVER) === true) {foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip) {if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {return $ip;}}}}} function read () {
$ret = "";
if (count($this->params)) {
reset($this->params);
for ($i = 0; $i < strlen($this->query); $i++) {
if ($this->query[$i] == "?") {
list(, $val) = thisEach($this->params);
$ret .= $val;
} else {
$ret .= $this->query[$i];
}
}
reset($this->params);
} else {
$ret = $this->query;
}
return $ret;
} function smile() {
print "<div align='center'><table cellpadding='1' cellspacing='1'><tr><br />";
global $smilies, $count;
reset($smilies);
while ((list($code, $url) = thisEach($smilies)) && $count<16) {
print("\n<td><a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
<img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a></td>");
$count++;
} //Sort by
if ($addparam != "") {
if ($pagerlink != "") {
if ($addparam[strlen($addparam)-1] != ";") { // & = &
$addparam = $addparam . "&" . $pagerlink;
} else {
$addparam = $addparam . $pagerlink;
}
}
} else {
$addparam = $pagerlink;
}