Did that help any...as i was formatting it.. I still did not see any difference
Waiting on friend to send me index.php file agian..
Code: Select all
<?php
ob_start("ob_gzhandler");
require "include/bittorrent.php";
dbconn(true);
loggedinorreturn();
function mksize2($bytes)
{
if ($bytes < 1000 * 1024)
return number_format($bytes / 1024, 2);
elseif ($bytes < 1000 * 1048576)
return number_format($bytes / 1048576, 2);
elseif ($bytes < 1000 * 1073741824)
return number_format($bytes / 1073741824, 2);
else
return number_format($bytes / 1099511627776, 2);
}
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$choice = $_POST["choice"];
if ($CURUSER && $choice != "" && $choice < 256 && $choice == floor($choice))
{
$res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
$arr = mysql_fetch_assoc($res) or die("No poll");
$pollid = $arr["id"];
$userid = $CURUSER["id"];
$res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid && userid=$userid") or sqlerr();
$arr = mysql_fetch_assoc($res);
if ($arr) die("Dupe vote");
mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid, $choice)") or sqlerr();
if (mysql_affected_rows() != 1)
stderr("Error", "An error occured. Your vote has not been counted.");
header("Location: $BASEURL/");
die;
}
else
stderr("Error", "Please select an option.");
}
$registered = number_format(get_row_count("users"));
$torrents = number_format(get_row_count("torrents"));
$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];
$seeders = number_format(get_row_count("peers", "WHERE seeder='yes'"));
$leechers = number_format(get_row_count("peers", "WHERE seeder='no'"));
$peers = number_format($seeders + $leechers);
$uniqpeer = number_format(get_row_count("peers", "WHERE connectable='yes'"));
if ($leechers == 0)
$ratio = 0;
else
$ratio = round($seeders / $leechers * 100);
$result = mysql_query("SELECT SUM(downloaded) AS totaldl, SUM(uploaded) AS totalul FROM users") or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_assoc($result);
$totaldownloaded = $row[totaldl];
$totaluploaded = $row[totalul];
if ($totaldownloaded == 0)
$totalratio = 0;
else
$totalratio = round($totaluploaded / $totaldownloaded * 1000)/1000;
$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
$result = mysql_query("SELECT SUM(last_access >= $dt) AS totalol FROM users") or sqlerr(__FILE__, __LINE__);
while ($row = mysql_fetch_array ($result))
{
$totalonline = $row["totalol"];
}
$dt = gmtime() - 180;
$dt = sqlesc(get_date_time($dt));
$res = mysql_query("SELECT id, username, class, donor, warned 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:
$arr["username"] = "<font color=#FF0000>" . $arr["username"] . "</font>";
break;
case UC_ADMINISTRATOR:
$arr["username"] = "<font color=#FF0000>" . $arr["username"] . "</font>";
break;
case UC_MODERATOR:
$arr["username"] = "<font color=#0000FF>" . $arr["username"] . "</font>";
break;
case UC_UPLOADER:
$arr["username"] = "<font color=#9900CC>" . $arr["username"] . "</font>";
break;
case UC_VIP:
$arr["username"] = "<font color=#FF6600>" . $arr["username"] . "</font>";
break;
case UC_POWER_USER:
$arr["username"] = "<font color=#009900>" . $arr["username"] . "</font>";
break;
}
$donator = $arr["donor"] === "yes";
if ($donator)
$activeusers .= "<nobr>";
$warned = $arr["warned"] === "yes";
if ($warned)
$activeusers .= "<nobr>";
if ($CURUSER)
$activeusers .= "<a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>";
else
$activeusers .= "<b>{$arr["username"]}</b>";
if ($donator)
$activeusers .= "<img src={$pic_base_url}star.gif alt='" .DONOR. " {$$arr["donor"]}'></nobr>";
if ($warned)
$activeusers .= "<img src={$pic_base_url}warned.gif alt='" .WARNED. " {$$arr["warned"]}'></nobr>";
}
if (!$activeusers)
$activeusers = "There have been no active users in the last 15 minutes.";
function usertable($res) {
global $CURUSER;
?>
<tr><td class="colhead"><span> No. 1 </span></td><td align="center" class="colhead"><img src="pic/smilies/thumbsup.gif" alt=""></td>
<?
$num = 0;
while ($a = mysql_fetch_assoc($res))
{
++$num;
$highlight = $USERID == $a["userid"] ? " bgcolor=#BBAF9B" : "";
if ($a["downloaded"])
{
$ratio = $a["uploaded"] / $a["downloaded"];
$color = get_ratio_color($ratio);
$ratio = number_format($ratio, 2);
if ($color)
$ratio = "<font color=$color>$ratio</font>";
}
else
$ratio = "Inf.";
print("<tr$highlight><td align=left$highlight><a href=userdetails.php?id=" .
$a["userid"] . "><b>" . $a["username"] . "</b></a>" .
"</td><td align=right$highlight>" . $ratio ."</td></tr>");
}
}
// stat - countersink
function usertable2($res) {
global $CURUSER;
?>
<tr><td class="colhead"><span> countersink </span></td><td align="center" class="colhead"><img src="pic/smilies/thumbsdown.gif" alt=""></td>
<?
$num = 0;
while ($a = mysql_fetch_assoc($res)) {
++$num;
$highlight = $USERID == $a["userid"] ? " bgcolor=#BBAF9B" : "";
if ($a["downloaded"]) {
$ratio = $a["uploaded"] / $a["downloaded"];
$color = get_ratio_color($ratio);
$ratio = number_format($ratio, 2);
if ($color)
$ratio = "<font color=$color>$ratio</font>";
}
else
$ratio = "Inf.";
print("<tr$highlight><td align=left$highlight><a href=userdetails.php?id=" .
$a["userid"] . "><b>" . $a["username"] . "</b></a>" .
"</td><td align=right$highlight>" . $ratio ."</td></tr>");
}
}
if (!$CURUSER) {
$ip = getip();
}
// stat - Full traffic mod
$resSpeed = mysql_query("SELECT seeders,leechers,id FROM torrents WHERE visible='yes' ORDER BY added DESC") or sqlerr(__FILE__, __LINE__);
while ($rowTmp = mysql_fetch_array ($resSpeed)) {
$seedersTmp = $rowTmp['seeders'];
$leechersTmp = $rowTmp['leechers'];
$torrentId = $rowTmp['id'];
}
$registered = number_format(get_row_count("users"));
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$torrents = number_format(get_row_count("torrents"));
$disabled = number_format(get_row_count("users", "WHERE enabled='no'"));
$totaldownloaded = mksize($row["totaldl"]);
$totaluploaded = mksize($row["totalul"]);
$USER = number_format(get_row_count("users", "WHERE class='".UC_USER."'"));
$PU = number_format(get_row_count("users", "WHERE class='".UC_POWER_USER."'"));
$registered = number_format(get_row_count("users"));
$torrents = number_format(get_row_count("torrents"));
$null = 0;
// peer - seed - leech
$r = mysql_query("SELECT SUM(seeders) FROM torrents") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$seeders = 0 + $a[0];
$r = mysql_query("SELECT SUM(leechers) FROM torrents") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$leechers = 0 + $a[0];
$peersss = round($seeders + $leechers);
if ($leechers == 0)
$ratio = 0;
else
$ratio = round($seeders / $leechers * 100);
// totally download data
$result = mysql_query("SELECT SUM(downloaded) AS totaldl, SUM(uploaded) AS totalul FROM users") or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_assoc($result);
$totaldownloaded = $row["totaldl"];
$totaluploaded = $row["totalul"];
$totaldata = $totaldownloaded+$totaluploaded;
// warned users
$warnedu = number_format(get_row_count("users", "WHERE warned='yes'"));
// full speed data
//$result = mysql_query("SELECT SUM(downspeed) AS totalds, SUM(upspeed) AS totalus FROM xbt_files_users") or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_assoc($result);
$totaldownloadspeed = $row["totalds"];
$totaluploadspeed = $row["totalus"];
$totalspeed = $totaluploadspeed+$totaldownloadspeed;
// latest users mod
$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error());
if ($CURUSER)
$latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
else
$latestuser = $a['username'];
// all the size of torrent
$qQ = mysql_query("SELECT size FROM torrents");
while($rts = mysql_fetch_assoc($qQ)) {
$alltsize = $alltsize + $rts[size];
}
$alltsize = mksize($alltsize);
// stat end!!!
loggedinorreturn();
/*
$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error());
if ($CURUSER)
$latestuser = "<a href=userdetails.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";
else
$latestuser = $a['username'];
*/
$registered = number_format(get_row_count("users" , "WHERE enabled='yes'"));
$unverified = number_format(get_row_count("users", "WHERE status='pending'"));
$torrents = number_format(get_row_count("torrents"));
$disabled = number_format(get_row_count("users", "WHERE enabled='no'"));
$totaldownloaded = mksize($row["totaldl"]);
$totaluploaded = mksize($row["totalul"]);
$USER = number_format(get_row_count("users", "WHERE class='".UC_USER."'"));
$PU = number_format(get_row_count("users", "WHERE class='".UC_POWER_USER."'"));
$datet = "".date('Y-m-d')." 00:00:00";
$torrentstoday = number_format(get_row_count("torrents", "WHERE added>='$datet'"));
$registered = number_format(get_row_count("users"));
$torrents = number_format(get_row_count("torrents"));
$topic_res = mysql_query("SELECT SUM(topiccount) AS topics, SUM(postcount) AS posts FROM forums");
$topic_arr = mysql_fetch_assoc($topic_res);
$topics = number_format($topic_arr['topics']);
$postsc = number_format($topic_arr['posts']);
stdhead("Home");
print("<p><table align=center class=main width=900 cellspacing=0 cellpadding=5 border=0 valign=top><tr><td class=clear align=center style='padding-bottom: 20px' valign=top><center><table width=100% class=main cellpadding=5 valign=top>");
?> <?
$res = mysql_query("SELECT id,seeders, leechers, name from torrents ORDER BY seeders + leechers DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0) {
$rank = 0;
print("<tr><td width=80% valign=top class=embedded><p><table cellpadding=5 width=100%>");
print("<tr><td valign=top class=colhead>Rank</td><td width=100% valign=top class=colhead>Top 10 Torrents</td><td align=center class=\"colhead\">Seeders</a></td><td align=center class=\"colhead\">Lechers</td><td align=center class=\"colhead\">Snatched</td>\n");
while ($arr = mysql_fetch_assoc($res)) {
$rank = $rank + 1;
$torrname = htmlspecialchars($arr['name']);
$snc = number_format(get_row_count("snatched" , "WHERE torrentid=$arr[id]"));
print("<tr><td class=main><center>$rank</center></td><td class=main><a href=\"details.php?id=".$arr['id']."&hit=1\" alt=\"".$arr['name']."\" title=\"".$arr['name']."\">".$torrname."</td><td class=bordr align=center >".$arr['seeders']."</a></td><td class=bordr align=center >".number_format($arr['leechers'])."</td><td class=bordr align=center >".$snc."</a></td></tr>\n");
}
print("</td></tr></table></table>\n");
} else {
print("no torrents here :(");
}
?><br><br><?
$res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 45 DAY) > NOW() ORDER BY added DESC LIMIT 4") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
$counter = 1;
while($array = mysql_fetch_array($res))
{
$user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr();
if($counter == "1"){
if (get_user_class() < UC_ADMINISTRATOR){
print("<tr><td width=600 valign=top class=embedded><p><table cellpadding=5 width=100%><tr><td class=colhead><font color=#DC143C> Recent News </font></td></tr><tr><td class=dark><font color=#DC143C> " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b><b>:: <b><a href=userdetails.php?id=" . $array['userid'] . ">$user[username]</a></b></b></font></td></tr>
<tr><td style='padding-left: 10px; padding-bottom: 10px; padding-top: 10px; padding-right: 10px;'><div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0). "</div>");
}
if (get_user_class() >= UC_ADMINISTRATOR){
print("<tr><td width=600 valign=top class=embedded><p><table cellpadding=5 width=100%><tr><td class=colhead> Recent News <font class=small>[<a class=altlink href=news.php>News page</a>]</font></td></tr><tr><td class=dark><font color=#DC143C> " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b><b>:: <b><a href=userdetails.php?id=" . $array['userid'] . ">$user[username]</a></b></b></font></td></tr>
<tr><td style='padding-left: 10px; padding-bottom: 10px; padding-top: 10px; padding-right: 10px;'><div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0). "</div>");
}
}
if($counter > "1"){
if (get_user_class() < UC_ADMINISTRATOR){
print("<tr><td width=600 valign=top class=embedded><p><table cellpadding=5 width=100%><tr><td class=dark><font color=#DC143C> " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b><b>:: <b><a href=userdetails.php?id=" . $array['userid'] . ">$user[username]</a></b></b></font></td></tr>
<tr><td style='padding-left: 10px; padding-bottom: 10px; padding-top: 10px; padding-right: 10px;'><div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0). "</div><br>
<b><p align=left>:: <b><a href=userdetails.php?id=" . $array['userid'] . ">$user[username]</a></b>");
}
if (get_user_class() >= UC_ADMINISTRATOR){
print("<tr><td width=600 valign=top class=embedded><p><table cellpadding=5 width=100%><tr><td class=dark><font color=#DC143C> " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."<b><b>:: <b><a href=userdetails.php?id=" . $array['userid'] . ">$user[username]</a></b></b></font></td></tr>
<tr><td style='padding-left: 10px; padding-bottom: 10px; padding-top: 10px; padding-right: 10px;'><div id=\"ka".$array['id']."\" style=\"display: block;\"> ".format_comment($array["body"],0). "</div>");
}
}
$counter = $counter + 1;
print("</td></tr></table></p><p>");
}
print("</table>");
}
?> <?
print("<table width=100% cellspacing=0 cellpadding=8> ");
print("<tr><td width=40 align=center class=colhead>Status</td><td class=colhead>Topic Title</td><td width=50 align=center class=colhead>Replies</td><td width=100 align=center class=colhead>Author</td><td width=100 align=center class=colhead>Last Poster</td><td width=100 align=center class=colhead>Date</td></tr>");
$for = mysql_query("SELECT topics.* FROM topics INNER JOIN forums ON topics.forumid = forums.id WHERE forums.minclassread <=" . $CURUSER["class"] . " ORDER BY topics.lastpost DESC LIMIT 10");
while ($topicarr = mysql_fetch_assoc($for)) {
$topicid = $topicarr["id"];
$topic_title = $topicarr["subject"];
$topic_userid = $topicarr["userid"];
$topic_views = $topicarr["views"];
$views = number_format($topic_views);
$locked = $topicarr["locked"];
/// GET TOTAL NUMBER OF POSTS ///
$res = mysql_query("SELECT COUNT(*) FROM posts WHERE topicid=$topicid") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_row($res);
$posts = $arr[0];
$replies = max(0, $posts - 1);
/// GET USERID AND DATE OF LAST POST ///
$res = mysql_query("SELECT * FROM posts WHERE topicid=$topicid ORDER BY id DESC LIMIT 1") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
$postid = 0 + $arr["id"];
$userid = 0 + $arr["userid"];
$added = "<nobr>" . $arr["added"] . "</nobr>";
/// GET NAME OF LAST POSTER ///
$res = mysql_query("SELECT id, username FROM users WHERE id=$userid") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 1) {
$arr = mysql_fetch_assoc($res);
$username = "<a href=userdetails.php?id=$userid><b>$arr[username]</b></a>";
} else {
$username = "Unknown[$topic_userid]";
}
/// GET NAME OF THE AUTHOR ///
$res = mysql_query("SELECT username FROM users WHERE id=$topic_userid") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) == 1) {
$arr = mysql_fetch_assoc($res);
$author = "<a href=userdetails.php?id=$topic_userid><b>$arr[username]</b></a>";
} else {
$author = "Unknown[$topic_userid]";
}
/// GETTING THE LAST INFO AND MAKE THE TABLE ROWS ///
$r = mysql_query("SELECT lastpostread FROM readposts WHERE userid=$userid AND topicid=$topicid") or sqlerr(__FILE__, __LINE__);
$a = mysql_fetch_row($r);
$new = !$a || $postid > $a[0];
$subject = "<a href=forums.php?action=viewtopic&topicid=$topicid&page=plast#last><b>" . encodehtml($topicarr["subject"]) . "</b></a>";
$resser = mysql_query("SELECT lastpostread FROM readposts WHERE userid=$CURUSER[id] AND topicid=$topicid") or sqlerr(__FILE__, __LINE__);
$asser = mysql_fetch_row($resser);
$new = !$asser || $topicarr[lastpost] > $asser[0];
$topicpic = ($locked=='yes' ? ($new ? "s_lockednew" : "s_locked") : ($new ? "s_unlockednew" : "s_unlocked"));
print("<tr><td align=center><img src=pic/$topicpic.png></td><td>$subject</td><td align=center>$replies</td><td align=center>$author</td><td align=center>$username</td><td align=center>$added</td></tr>");
}
print("</table>");
?> <?
if ($CURUSER)
{
// Get current poll
$res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr();
if($pollok=(mysql_num_rows($res)))
{
$arr = mysql_fetch_assoc($res);
$pollid = $arr["id"];
$userid = $CURUSER["id"];
$question = $arr["question"];
$o = array( $arr["option1"], $arr["option2"], $arr["option3"], $arr["option4"],
$arr["option5"], $arr["option6"], $arr["option7"], $arr["option8"], $arr["option9"],
$arr["option10"], $arr["option11"], $arr["option12"], $arr["option13"], $arr["option14"],
$arr["option15"], $arr["option16"], $arr["option17"], $arr["option18"], $arr["option19"]);
// Check if user has already voted
$res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid AND userid=$userid") or sqlerr();
$arr2 = mysql_fetch_assoc($res);
}
print("<td width=200 valign=top class=embedded style='padding-left: 15px;'><table width=100% cellpadding=5>");
if (get_user_class() < UC_MODERATOR)
print("<tr><td class=colhead><font size=1>Poll</font></td></tr>");
if (get_user_class() >= UC_MODERATOR) {
print("<tr><td class=colhead><font size=1>Poll <font class=small>[<a class=altlink href=makepoll.php?returnto=main><b>New</b></a>]");
if($pollok) {
print(" [<a class=altlink href=makepoll.php?action=edit&pollid=$arr[id]&returnto=main><b>Edit</b></a>]\n");
print(" [<a class=altlink href=polls.php?action=delete&pollid=$arr[id]&returnto=main><b>Delete</b></a>]");
}
print("</font></td></tr><tr>");
}
//print("</td></tr></table>\n");
if($pollok) {
print("<tr><td align=left><div><font color=black><b>» $question</b></font></div>");
$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("<br><table width=100% border=0 cellspacing=0 cellpadding=0>\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("<tr><td style='margin-bottom: 5px;' width=1% class=embedded><font size=1>" . $a[1] . "<div style='background:transparent; margin-bottom: 5px; padding: 4px;'><img style='vertical-align: -10%;' src='/pic/bar_left.gif'><img src=\"{$pic_base_url}bar.gif\" height=9 width=" . ($p * 1.5) . "><img style='vertical-align: -10%;' src='/pic/bar_right.gif'> $p%</font></div></td></tr>");
++$i;
}
print("</table>\n");
$tvotes = number_format($tvotes);
if ($voted)
print("<font size=1><center>Votes: $tvotes</center></font><br><div align=center ><small><a href=polls.php>Previous Polls</a> </small></div></td></tr></table></form><br>");
}
else
{
print("<form method=post action=index.php>\n");
$i = 0;
while ($a = $o[$i])
{
print("<input type=radio name=choice value=$i>$a<br>\n");
++$i;
}
print("<br>");
print("<input type=radio name=choice value=255>Blank vote (a.k.a. \"I just want to see the results!\")<br>\n");
print("<p align=center><input type=submit value='Vote!' class=btn></p></td></table><br />");
}
} else {
echo "<td width=300 valign=top class=embedded style='padding-left: 15px;'><table width=100% cellpadding=5>";
echo "<br><table width=100% border=0 cellspacing=0 cellpadding=0>\n";
echo"<p align=center><H3>No Active Polls</h3></p>\n";
echo "</table></table>";
}
}
$total_funds1 = mysql_query("SELECT sum(cash) as total_funds FROM funds");
$arr_funds = mysql_fetch_array($total_funds1);
$funds_so_far = $arr_funds["total_funds"];
$totalneeded = "999"; //=== set this to your monthly wanted amount
$funds_difference = $totalneeded - $funds_so_far;
$Progress_so_far = $funds_so_far / $totalneeded * 100;
if($Progress_so_far >= 100)
$Progress_so_far = "100";
$Progress_so_far2 = $Progress_so_far;
if($Progress_so_far >= 100)
$Progress_so_far = "100";
$Progress_so_far2 = $Progress_so_far;
if ($funds_so_far <= 49){
$pic = "pic/loadbarred.gif";
$Progress_so_far2 = 20;
}
elseif ($funds_so_far <= 90)
$pic = "pic/loadbaryellow.gif";
else $pic = "pic/loadbargreen.gif";
?>
<table width=100% cellpadding=5><tr><td class=colhead><font size=1>Site Statistics</font></td></tr>
<tr>
<td><font size=1>Online Since: 2009-08-03<br>
User Limit: <?= $maxusers; ?><br>Registered: <?= $registered; ?>
<br>Users Online: <?=$totalonline?>
<br />
Torrents:
<?=$torrents?><br>New Torrents Today: <?=$torrentstoday?><br>Peers: <?=$peersss?><br>Total Traffic: <?=mksize($totaldownloaded + $totaluploaded)?></font><br><font size=1>Total Ratio: <?=$totalratio?><br>
Forum Topics: <?=$topics?><br>Forum Posts: <?=$postsc?></font></font></td></tr></table><br />
<table width=100% cellpadding=5><tr>
<td class=colhead><font size=1>Donate</font></td></tr>
<tr>
<td><font size=1><center>
<b>Donation Progress:</b>
<table width=100 hight=14 border=2><tr><td width=<?=$Progress_so_far2?>% hight=15 background=<?=$pic?> align=center valign=middle>
<font color=black><?=round($Progress_so_far) ?>%</font></td><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'></td></tr></table>
<br><center><form action=donate.php method=post><input class=button type=submit value="Make A Donation"></form></center>
</center></td></tr></table><br /></tr><tr><td colspan=2 class=embedded>
<p><font class=small><center>None of the files shown here are hosted on the RTN server's.The tracker only manages connections, it does not have any knowledge of the contents of the files being distributed. The links are provided solely by this site's users. The Owner of this site (http://www.racethe.net) holds NO RESPONSIBILITY if these files are misused in any way and cannot be held responsible for what users post, or any other actions of the users. You may not use this site to distribute or download any material which you do not have the legal rights to.</center></font></p></td></tr></table>
<?
stdfoot();
?>