mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -07:00
Used humn_size()
to count average of releases in tr_stats.php (#1313)
This commit is contained in:
parent
b1537359f6
commit
0c15224d87
2 changed files with 5 additions and 4 deletions
|
@ -20,7 +20,7 @@ if (!IS_ADMIN) {
|
|||
|
||||
$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-2592000 AND user_id NOT IN (' . EXCLUDED_USERS . ')';
|
||||
$sql[] = 'SELECT count(*) FROM `' . BB_USERS . '` WHERE `user_lastvisit` < UNIX_TIMESTAMP()-7776000 AND user_id NOT IN (' . EXCLUDED_USERS . ')';
|
||||
$sql[] = 'SELECT round(avg(size)/1048576) FROM `' . BB_BT_TORRENTS . '`';
|
||||
$sql[] = 'SELECT round(avg(size)) FROM `' . BB_BT_TORRENTS . '`';
|
||||
$sql[] = 'SELECT count(*) FROM `' . BB_BT_TORRENTS . '`';
|
||||
$sql[] = 'SELECT count(distinct(topic_id)) FROM `' . BB_BT_TRACKER_SNAP . '` WHERE seeders > 0';
|
||||
$sql[] = 'SELECT count(distinct(topic_id)) FROM `' . BB_BT_TRACKER_SNAP . '` WHERE seeders > 5';
|
||||
|
@ -31,8 +31,9 @@ echo '<html><body><head></head>';
|
|||
echo '<br /><br /><table border="1" cellspacing="0" cellpadding="6" align="center">';
|
||||
|
||||
foreach ($sql as $i => $query) {
|
||||
$row = mysqli_fetch_row(DB()->query($query));
|
||||
echo "<tr><td>{$lang['TR_STATS'][$i]}</td><td><b>{$row[0]}</b></td>";
|
||||
$row = mysqli_fetch_row(DB()->query($query))[0];
|
||||
$row = ($i == 2) ? humn_size($row) : $row;
|
||||
echo "<tr><td>{$lang['TR_STATS'][$i]}</td><td><b>$row</b></td>";
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
@ -2745,7 +2745,7 @@ $lang['TERMS_EXPLAIN'] = 'On this page, you can specify the text of the basic ru
|
|||
$lang['TR_STATS'] = [
|
||||
0 => 'inactive users in 30 days',
|
||||
1 => 'inactive users for 90 days',
|
||||
2 => 'medium size distributions on the tracker (many megabytes)',
|
||||
2 => 'medium size distributions on the tracker',
|
||||
3 => 'how many total hands on the tracker',
|
||||
4 => 'how many live hands (there is at least 1 led)',
|
||||
5 => 'how many hands where that seeding more than 5 seeds',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue