[size=14px]go to footer.php in theme folder and add before <?php add Bellow[/size]
<?php
$date_time = get_date_time(gmtime()-(3600*24)); // the 24hrs is the hours you want listed
$registered = number_format(get_row_count("users"));
$ncomments = number_format(get_row_count("comments"));
$nmessages = number_format(get_row_count("messages"));
$ntor = number_format(get_row_count("torrents"));
$totaltoday = number_format(get_row_count("users", "WHERE users.last_access>='$date_time'"));
$regtoday = number_format(get_row_count("users", "WHERE users.added>='$date_time'"));
$todaytor = number_format(get_row_count("torrents", "WHERE torrents.added>='$date_time'"));
$guests = number_format(getguests());
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'");
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
$totalonline = $members + $guests;
$result = SQL_Query_exec("SELECT SUM(downloaded) AS totaldl FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaldownloaded = $row["totaldl"];
}
$result = SQL_Query_exec("SELECT SUM(uploaded) AS totalul FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaluploaded = $row["totalul"];
}
$localpeers = $leechers+$seeders;
// Members OnLine - Mod by L3oncoder
begin_frame("Stats");
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 10; // time in seconds
$guests = number_format(getguests());
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
echo "<B> " . $guests . "</b> Guests - <B> " . $members . "</b> Members<br>";
$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>";
echo "Welcome to our newest members: $latestuser<br>OnLine:<br>";
if (file_exists($file) &&
filemtime($file) > (time() - $expire)) {
$usersonlinerecords = unserialize(file_get_contents($file));
}else{
$usersonlinequery = mysql_query("SELECT id, username, class FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());
while ($usersonlinerecord = mysql_fetch_array($usersonlinequery) ) {
$usersonlinerecords[] = $usersonlinerecord;
}
$OUTPUT = serialize($usersonlinerecords);
$fp = fopen($file,"w");
fputs($fp, $OUTPUT);
fclose($fp);
} // end else
if ($usersonlinerecords == ""){
echo "No members OnLine";
}else{
foreach ($usersonlinerecords as $user) {
switch($user["class"]){
case 1:
$color = "#00FFFF";// user
break;
case 2:
$color = "#FF7519";// power user
break;
case 3:
$color = "#990099";// VIP
break;
case 4:
$color = "#0000FF";// uploader
break;
case 5:
$color = "#009900";//moderator
break;
case 6:
$color = "#00FF00";//super moderator
break;
case 7:
$color = "#FF0000";// you and most trusted
break;
}
print("<a href="account-details.php?id=".$user["id"].""><font style=" color: ".$color."">".class_user($user["username"])."</font></a>, ");
}
echo "<br /><b>".T_("TORRENTS")."</b>";
echo "<br /><small>".T_("TRACKING").":<small><b> $ntor ".P_("TORRENT", $ntor)."</b></small>";
echo "<br /><small>".T_("NEW_TODAY").":<small><b> " . $todaytor . "</b></small>";
echo "<br />".T_("SEEDERS").":<b> " . number_format($seeders) . "</b><br />".T_("LEECHERS").":<b> " . number_format($leechers) . "</b>";
echo "<br /><small>".T_("PEERS").":<b> " . number_format($localpeers) . "</b></small>";
echo "<br /><small>".T_("DOWNLOADED").":<b> " . mksize($totaldownloaded) . "</b></small>";
echo "<br /><small>".T_("UPLOADED").":<b> " . mksize($totaluploaded) . "</b></small>";
echo "<br /><b>Total Members</b>";
echo "<b> $registered ".P_("MEMBER", $registered)."</b>";
print("<center><font color='red' size='2'><b>Administrator</b></font> | <font color='#00FF00' size='2'><b>Super Moderator</b></font> | <font color='#009900' size='2'><b>Moderator</b></font> | <font color='#0000FF' size='2'><b>Uploader</b></font> | <font color='#990099' size='2'><b>V.I.P</b></font> | <font color='#FF7519' size='2'><b>Power User</b></font> | <font color='#00FFFF' size='2'><b>User</b></font></center>, ");
end_frame();
begin_frame("$members2 Users Online Last 24 Hours");
$resew = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400 ORDER BY username");
while ($arr = mysql_fetch_assoc($resew))
{
if ($todayactive)
$todayactive .= ", ";
switch ($arr["class"])
{
case 7:
$arr["username"] = "<font color=#FF0000>" . class_user($arr['username']) . "</font>";
break;
case 6:
$arr["username"] = "<font color=#00FF00>" . class_user($arr['username']) . "</font>";
break;
case 5:
$arr["username"] = "<font color=#009900>" . class_user($arr['username']) . "</font>";
break;
case 4:
$arr["username"] = "<font color=#0000FF>" . class_user($arr['username']) . "</font>";
break;
case 3:
$arr["username"] = "<font color=#990099>" . class_user($arr['username']) . "</font>";
break;
case 2:
$arr["username"] = "<font color=#FF7519>" . class_user($arr['username']) . "</font>";
break;
case 1:
$arr["username"] = "<font color=#00FFFF>" . class_user($arr['username']) . "</font>";
break;
}
$donator = $arr["donated"] > 0;
if ($CURUSER) {
$todayactive .= "<b><a href=account-details.php?id=" . $arr["id"] . ">" . class_user($arr['username']) . "</b></a></a>";
} else {
$todayactive .= "<b><a href=account-details.php?id=" . $arr["id"] . ">" . class_user($arr['username']) . "</b></a></a>";
}
if ($donator) {
$todayactive .= "<img src="images/star.gif" title="You have contributed to the success of the site!">";
}
$warned = $arr["warned"] == "yes";
if ($warned) {
$todayactive .= "<img src="images/warn.gif" title="You had a warning from staff!!">";
}
$usersactivetoday++;
}
echo "<div align='left'>" . $todayactive . "</div>";
echo "<BR>";
end_frame();
}
?>
[size=24px]Uses Auto Medal and new class_user function[/size]
[size=24px]Dont matter if You Dont Have Auto Medal Mod
aslong as you got class_user function[/size]
<?php
$date_time = get_date_time(gmtime()-(3600*24)); // the 24hrs is the hours you want listed
$registered = number_format(get_row_count("users"));
$ncomments = number_format(get_row_count("comments"));
$nmessages = number_format(get_row_count("messages"));
$ntor = number_format(get_row_count("torrents"));
$totaltoday = number_format(get_row_count("users", "WHERE users.last_access>='$date_time'"));
$regtoday = number_format(get_row_count("users", "WHERE users.added>='$date_time'"));
$todaytor = number_format(get_row_count("torrents", "WHERE torrents.added>='$date_time'"));
$guests = number_format(getguests());
$seeders = get_row_count("peers", "WHERE seeder='yes'");
$leechers = get_row_count("peers", "WHERE seeder='no'");
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
$totalonline = $members + $guests;
$result = SQL_Query_exec("SELECT SUM(downloaded) AS totaldl FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaldownloaded = $row["totaldl"];
}
$result = SQL_Query_exec("SELECT SUM(uploaded) AS totalul FROM users");
while ($row = mysql_fetch_array ($result)) {
$totaluploaded = $row["totalul"];
}
$localpeers = $leechers+$seeders;
// Members OnLine - Mod by L3oncoder
begin_frame("Stats");
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 10; // time in seconds
$guests = number_format(getguests());
$members = number_format(get_row_count("users", "WHERE UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900"));
echo "<B> " . $guests . "</b> Guests - <B> " . $members . "</b> Members<br>";
$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>";
echo "Welcome to our newest members: $latestuser<br>OnLine:<br>";
if (file_exists($file) &&
filemtime($file) > (time() - $expire)) {
$usersonlinerecords = unserialize(file_get_contents($file));
}else{
$usersonlinequery = mysql_query("SELECT id, username, class FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 900") or die(mysql_error());
while ($usersonlinerecord = mysql_fetch_array($usersonlinequery) ) {
$usersonlinerecords[] = $usersonlinerecord;
}
$OUTPUT = serialize($usersonlinerecords);
$fp = fopen($file,"w");
fputs($fp, $OUTPUT);
fclose($fp);
} // end else
if ($usersonlinerecords == ""){
echo "No members OnLine";
}else{
foreach ($usersonlinerecords as $user) {
switch($user["class"]){
case 1:
$color = "#00FFFF";// user
break;
case 2:
$color = "#FF7519";// power user
break;
case 3:
$color = "#990099";// VIP
break;
case 4:
$color = "#0000FF";// uploader
break;
case 5:
$color = "#009900";//moderator
break;
case 6:
$color = "#00FF00";//super moderator
break;
case 7:
$color = "#FF0000";// you and most trusted
break;
}
print("<a href="account-details.php?id=".$user["id"].""><font style=" color: ".$color."">".class_user($user["username"])."</font></a>, ");
}
echo "<br /><b>".T_("TORRENTS")."</b>";
echo "<br /><small>".T_("TRACKING").":<small><b> $ntor ".P_("TORRENT", $ntor)."</b></small>";
echo "<br /><small>".T_("NEW_TODAY").":<small><b> " . $todaytor . "</b></small>";
echo "<br />".T_("SEEDERS").":<b> " . number_format($seeders) . "</b><br />".T_("LEECHERS").":<b> " . number_format($leechers) . "</b>";
echo "<br /><small>".T_("PEERS").":<b> " . number_format($localpeers) . "</b></small>";
echo "<br /><small>".T_("DOWNLOADED").":<b> " . mksize($totaldownloaded) . "</b></small>";
echo "<br /><small>".T_("UPLOADED").":<b> " . mksize($totaluploaded) . "</b></small>";
echo "<br /><b>Total Members</b>";
echo "<b> $registered ".P_("MEMBER", $registered)."</b>";
print("<center><font color='red' size='2'><b>Administrator</b></font> | <font color='#00FF00' size='2'><b>Super Moderator</b></font> | <font color='#009900' size='2'><b>Moderator</b></font> | <font color='#0000FF' size='2'><b>Uploader</b></font> | <font color='#990099' size='2'><b>V.I.P</b></font> | <font color='#FF7519' size='2'><b>Power User</b></font> | <font color='#00FFFF' size='2'><b>User</b></font></center>, ");
end_frame();
begin_frame("$members2 Users Online Last 24 Hours");
$resew = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400 ORDER BY username");
while ($arr = mysql_fetch_assoc($resew))
{
if ($todayactive)
$todayactive .= ", ";
switch ($arr["class"])
{
case 7:
$arr["username"] = "<font color=#FF0000>" . class_user($arr['username']) . "</font>";
break;
case 6:
$arr["username"] = "<font color=#00FF00>" . class_user($arr['username']) . "</font>";
break;
case 5:
$arr["username"] = "<font color=#009900>" . class_user($arr['username']) . "</font>";
break;
case 4:
$arr["username"] = "<font color=#0000FF>" . class_user($arr['username']) . "</font>";
break;
case 3:
$arr["username"] = "<font color=#990099>" . class_user($arr['username']) . "</font>";
break;
case 2:
$arr["username"] = "<font color=#FF7519>" . class_user($arr['username']) . "</font>";
break;
case 1:
$arr["username"] = "<font color=#00FFFF>" . class_user($arr['username']) . "</font>";
break;
}
$donator = $arr["donated"] > 0;
if ($CURUSER) {
$todayactive .= "<b><a href=account-details.php?id=" . $arr["id"] . ">" . class_user($arr['username']) . "</b></a></a>";
} else {
$todayactive .= "<b><a href=account-details.php?id=" . $arr["id"] . ">" . class_user($arr['username']) . "</b></a></a>";
}
if ($donator) {
$todayactive .= "<img src="images/star.gif" title="You have contributed to the success of the site!">";
}
$warned = $arr["warned"] == "yes";
if ($warned) {
$todayactive .= "<img src="images/warn.gif" title="You had a warning from staff!!">";
}
$usersactivetoday++;
}
echo "<div align='left'>" . $todayactive . "</div>";
echo "<BR>";
end_frame();
}
?>
[size=24px]Uses Auto Medal and new class_user function[/size]
[size=24px]Dont matter if You Dont Have Auto Medal Mod
aslong as you got class_user function[/size]