" . $a["username"] . ""; else $latestuser = $a['username']; */ $registered = number_format(get_row_count("users")); //$unverified = number_format(get_row_count("users", "WHERE status='pending'")); $torrents = number_format(get_row_count("torrents")); //$dead = number_format(get_row_count("torrents", "WHERE visible='no'")); $r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $seeders = 0 + $a[0]; $r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $leechers = 0 + $a[0]; if ($leechers == 0) $ratio = 0; else $ratio = round($seeders / $leechers * 100); $peers = number_format($seeders + $leechers); $seeders = number_format($seeders); $leechers = number_format($leechers); /* $dt = gmtime() - 180; $dt = sqlesc(get_date_time($dt)); $res = mysql_query("SELECT id, username, class, donated FROM users WHERE last_access >= $dt ORDER BY username") or print(mysql_error()); while ($arr = mysql_fetch_assoc($res)) { if ($activeusers) $activeusers .= ",\n"; switch ($arr["class"]) { case UC_SYSOP: case UC_ADMINISTRATOR: case UC_MODERATOR: $arr["username"] = "" . $arr["username"] . ""; break; case UC_UPLOADER: $arr["username"] = "" . $arr["username"] . ""; break; } $donator = $arr["donated"] > 0; if ($donator) $activeusers .= ""; if ($CURUSER) $activeusers .= "" . $arr["username"] . ""; else $activeusers .= "$arr[username]"; if ($donator) $activeusers .= "Donated $$arr[donated]"; } if (!$activeusers) $activeusers = "There have been no active users in the last 15 minutes."; */ stdhead(); //echo "Welcome to our newest member, $latestuser!\n"; print("
"); print("

Recent news"); if (get_user_class() >= UC_ADMINISTRATOR) print(" - [News page]"); print("

\n"); $res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) > NOW() ORDER BY added DESC LIMIT 10") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) > 0) { print("
\n
    "); while($array = mysql_fetch_array($res)) { print("
  • " . gmdate("Y-m-d",strtotime($array['added'])) . " - " . $array['body']); if (get_user_class() >= UC_ADMINISTRATOR) { print(" [E]"); print(" [D]"); } print("
  • "); } print("
\n"); } /*

Active users

*/ ?> Poll"); if (get_user_class() >= UC_MODERATOR) { print(""); print(" - [New]\n"); print(" - [Edit]\n"); print(" - [Delete]"); print(""); } print("\n"); print("
\n"); print("
"); print("

$question

\n"); $voted = $arr2; if ($voted) { // display results if ($arr["selection"]) $uservote = $arr["selection"]; else $uservote = -1; // we reserve 255 for blank vote. $res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr(); $tvotes = mysql_num_rows($res); $vs = array(); // array of $os = array(); // Count votes while ($arr2 = mysql_fetch_row($res)) $vs[$arr2[0]] += 1; reset($o); for ($i = 0; $i < count($o); ++$i) if ($o[$i]) $os[$i] = array($vs[$i], $o[$i]); function srt($a,$b) { if ($a[0] > $b[0]) return -1; if ($a[0] < $b[0]) return 1; return 0; } // now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2")) if ($arr["sort"] == "yes") usort($os, srt); print("\n"); $i = 0; while ($a = $os[$i]) { if ($i == $uservote) $a[1] .= " *"; if ($tvotes == 0) $p = 0; else $p = round($a[0] / $tvotes * 100); if ($i % 2) $c = ""; else $c = " bgcolor=#ECE9D8"; print("\n"); ++$i; } print("
" . $a[1] . "  " . " $p%
\n"); $tvotes = number_format($tvotes); print("

Votes: $tvotes

\n"); } else { print("
\n"); $i = 0; while ($a = $o[$i]) { print("$a
\n"); ++$i; } print("
"); print("Blank vote (a.k.a. \"I just want to see the results!\")
\n"); print("

"); } ?>
Previous polls

\n"); ?>
$score_b) return -1; elseif ($score_a < $score_b) return 1; else return 0; } function getgametype($gametype) { switch ($gametype) { case "bel": $gametype = "Behind Enemy Lines"; break; case "dm": $gametype = "Deathmatch"; break; case "hq": $gametype = "Headquarters"; break; case "re": $gametype = "Retreival"; break; case "sd": $gametype = "Search and Destroy"; break; case "tdm": $gametype = "Team Deathmatch"; break; } return $gametype; } function getmapname($mapname) { switch ($mapname) { case "mp_bocage": $mapname = "Bocage"; break; case "mp_brecourt": $mapname = "Brecourt"; break; case "mp_carentan": $mapname = "Carentan"; break; case "mp_chateau": $mapname = "Chateau"; break; case "mp_dawnville": $mapname = "Dawnville"; break; case "mp_depot": $mapname = "Depot"; break; case "mp_harbor": $mapname = "Harbor"; break; case "mp_hurtgen": $mapname = "Hurtgen"; break; case "mp_neuville": $mapname = "Neuville"; break; case "mp_pavlov": $mapname = "Pavlov"; break; case "mp_powcamp": $mapname = "POW-Camp"; break; case "mp_railyard": $mapname = "Railyard"; break; case "mp_rocket": $mapname = "Rocket"; break; case "mp_ship": $mapname = "Ship"; break; case "mp_stalingrad": $mapname = "Stalingrad"; break; case "evreux": $mapname = "Evreux"; break; case "mittenwald": $mapname = "Mittenwald"; break; case "mp_centerville": $mapname = "Centerville"; break; } return $mapname; } function updateserverinfo($host, $port, $rcon) { $secs = 5; $mtime = @filemtime(".cod-$host.cache"); if (gmtime() - $secs < $mtime) return; $lfd = @fopen(".cod-$host.lock", "w+"); if (!$lfd) return; if (!flock($lfd, LOCK_EX | LOCK_NB)) return; $sd = fsockopen("udp://$host", $port); socket_set_timeout($sd, 1); fwrite($sd, "\xFF\xFF\xFF\xFFgetstatus"); $s = fread($sd, 8192); if ($s == "") $output .= "

----- Server is offline -----

\n"; else { if (preg_match("/\\\\g_gametype\\\\(.+?)\\\\/", $s, $matches) > 0) $gametype = $matches[1]; if (preg_match("/\\\\mapname\\\\(.+?)\\\\/", $s, $matches) > 0) $mapname = $matches[1]; if (preg_match("/\\\\sv_maxclients\\\\([0-9]+)/", $s, $matches) > 0) $maxclients = $matches[1]; $gametype = getgametype($gametype); $mapname = getmapname($mapname); $output .= "IP: $host - Port: $port - \n"; $output .= "Game type: $gametype - Map: $mapname\n"; fwrite($sd, "\xFF\xFF\xFF\xFFrcon $rcon status"); $s .= fread($sd, 1500); if ($s == "") { flock($lfd, LOCK_UN); return; } else $s .= substr(fread($sd, 1500), 10); $orig = $s; $x = fopen(".output", "w+"); fwrite($x,$orig); fclose($x); $n = 0; $s = rtrim(substr($s, strpos($s, "-----\n") + 6)); $players = explode("\n", $s); if ($players[0] != "") { usort($players, "sortusers"); for ($i = 0; $i < count($players); ++$i) { // extract num, score, ping, guid $s = trim($players[$i]); $ns = strpos($s, " "); $num = substr($s, 0, $ns); $s = ltrim(substr($s, $ns)); $ns = strpos($s, " "); $score = substr($s, 0, $ns); $s = ltrim(substr($s, $ns)); $ns = strpos($s, " "); $ping = substr($s, 0, $ns); if ($ping == "999" || $ping == "CNCT") $ping = "---"; $s = ltrim(substr($s, $ns)); $ns = strpos($s, " "); $s = ltrim(substr($s, $ns)); // extract ip $ns = strrpos($s, " "); $s = rtrim(substr($s, 0, $ns)); $ns = strrpos($s, " "); $s = rtrim(substr($s, 0, $ns)); $ns = strrpos($s, " "); $ip = substr($s, $ns + 1); $ip = substr($ip, 0, strpos($ip, ":")); $s = rtrim(substr($s, 0, $ns)); $ns = strrpos($s, " "); $s = rtrim(substr($s, 0, $ns)); // extract player name $player = $s; // strip color codes $player = preg_replace("/(\^[0-9])/", "", $s); if ($player == "") continue; $r = mysql_query("SELECT id,username FROM users WHERE username=" . sqlesc($player) . " AND ip='$ip' AND enabled = 'yes'") or sqlerr(); if (mysql_num_rows($r) != 1) { $tfd = fopen(".cod-$host.log", "a"); fwrite($tfd, "[$num] [$player] [$ip]\n$orig\n\n"); fclose($tfd); usleep(500000); fwrite($sd, "\xFF\xFF\xFF\xFFrcon $rcon clientkick $num"); flock($lfd, LOCK_UN); fclose($lfd); return; } $a = mysql_fetch_assoc($r); $player = htmlspecialchars($a["username"]); if ($n == 0) { $output .= "

\n"; $output .= "\n"; } ++$n; $output .= "\n"; } if ($n > 0) $output .= "
#PlayerScorePing
$n$player$score$ping

"; } if ($n == 0) $output .= "

----- No players -----

\n"; } $fd = @fopen(".cod-$host.cache", "w"); if ($fd) { fwrite($fd, $output); fclose($fd); } flock($lfd, LOCK_UN); fclose($lfd); } function printserverinfo($host, $port, $rcon) { updateserverinfo($host, $port, $rcon); readfile(".cod-$host.cache"); } ?>

Call of Duty

TorrentBits Username to gain access to this server!
\n"); printserverinfo("62.212.84.221", 28960, $rconpassword); print("

Please install this patch and these maps before joing!

"); ?>

Stats

Registered users
Torrents
Peers
Seeders
Leechers
Seeder/leecher ratio (%)
Server load
"); ?>
*/ ?>

Disclaimer: None of the files shown here are actually hosted on this server. The links are provided solely by this site's users. The administrator of this site (www.torrentbits.org) cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms.

P2P Legal Defense Fund