rendered paste bodybegin_block("Stats");//main stats here$a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1"));if ($CURUSER) $latestuser = "<a href=account-details.php?id=" . $a["id"] . ">" . $a["username"] . "</a>";else $latestuser = "<b>$a[username]</b>";$registered = number_format(get_row_count("users"));$torrents = number_format(get_row_count("torrents"));$result = mysql_query("SELECT SUM(downloaded) AS totaldl FROM users") or sqlerr(__FILE__, __LINE__);while ($row = mysql_fetch_array ($result)){$totaldownloaded = $row["totaldl"];}$result = mysql_query("SELECT SUM(uploaded) AS totalul FROM users") or sqlerr(__FILE__, __LINE__);while ($row = mysql_fetch_array ($result)){$totaluploaded = $row["totalul"];}$seeders = get_row_count("peers", "WHERE seeder='yes'");$leechers = get_row_count("peers", "WHERE seeder='no'");$usersactive = 0;if ($leechers == 0) $ratio = "100";else $ratio = round($seeders / $leechers * 100);if ($ratio < 20) $ratio = "<font class=red>" . $ratio . "%</font>";else $ratio .= "%";$peers = number_format($seeders + $leechers);$seeders = number_format($seeders);$leechers = number_format($leechers);//start count visited today$res = mysql_query("SELECT COUNT(*) FROM users WHERE UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(last_access) < 86400");$arr3 = mysql_fetch_row($res);$totaltoday = $arr3[0];// start count registered today$res = mysql_query("SELECT COUNT(*) FROM users WHERE UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(added) < 86400");$arr44 = mysql_fetch_row($res);$regtoday = $arr44[0];//start count online now$res = mysql_query("SELECT COUNT(*) FROM users WHERE UNIX_TIMESTAMP(" . get_dt_num() . ") - UNIX_TIMESTAMP(last_access) < 900");$arr4 = mysql_fetch_row($res);$totalnow = $arr4[0];if ($CURUSER) guestadd();if (!$activepeople) $activepeople = "" . NO_USERS . ""; if (!$todayactive) $todayactive = "" . NO_USERS . "";$guests = getguests();if (!$guests) $guests = "0";$time_start = getmicrotime();//end here stdhead(); begin_frame("" . STATS . "", center);echo "<div align=left><font class=stats>" . WELCOME_NEW . ": " . $latestuser . "</font><br>";if (!$activepeople) echo "<br><font class=stats>" . ONLINE_USERS . ": (" . $totalnow . ")<b>0 Members</b></font>";else echo "<br><font class=stats>" . ONLINE_USERS . ": (" . $totalnow . ")</font>";$totalusers = $totalnow + $guests;echo "<br><font class=stats>" . GUESTS_ONLINE . ": (" . $guests . ")</font>";echo "<br><font class=stats>" . TOTAL_ONLINE . ": (" . $totalusers . ")</font>";if (!$todayactive) echo "<br><font class=stats>" . VISITORS_TODAY . ": (<!--<a href='visitorstoday.php'>-->" . $totaltoday . "<!--</a>-->)<br>0 Members</font>";else echo "<br><font class=stats>" . VISITORS_TODAY . ": (<!--<a href='visitorstoday.php'>-->" . $totaltoday . "<!--</a>-->)<!--<br>" . $todayactive . "--></font>";echo "<br><font class=stats>" . TOTAL_USERS . ": " . $registered . "</font>";echo "<br><font class=stats>" . NEWUSERS_TODAY . ": " . $regtoday . "</font>";echo "<br><font class=stats>" . ACTIVE_TRANSFERS . ": " . $peers . "</font>";ECHO "<br><font class=stats>" . DOWNLOADED . ": " . mksize($totaldownloaded) . "</FONT>";ECHO "<br><font class=stats>" . UPLOADED . ": " . mksize($totaluploaded) . "</FONT>";echo "<br><font class=stats>" . TRACKING . " " . $torrents . " Torrents</font>";echo "<br><font class=stats>" . SEEDS . ": " . $seeders . "</font>";echo "<br><font class=stats>" . LEECH . ": " . $leechers . "</font>";echo "<br><font class=stats>" . SEED_RATIO . ": " . $ratio . "</font>";echo "<br><br></div>";end_frame();end_block();