1
0
mirror of https://github.com/Xkeeper0/jul.git synced 2025-08-20 23:13:48 -07:00
Files
cruft
css
errors
ext
images
js
lib
numgfx
schemes
tlayouts
.editorconfig
.gitignore
README.md
acs.php
activeusers.php
activity.php
activity2.php
activity3.php
activity3u.php
admin-editforums.php
admin-editmods.php
admin-slammer.php
admin-threads.php
admin-threads2.php
admin.php
adnonsense.php
announcement.php
avatar.php
biggestposters.php
calendar.php
del.php
doomcounter.php
editpost.php
editprofile.php
editthread.php
edituser.php
faq.php
favicon.ico
forum.php
hex.php
index.php
ipsearch.php
irc.php
latestposts.php
login.php
memberlist.php
milestones.php
newreply.php
newthread.php
numgfx.php
numgfxbig.php
online.php
posticons.dat
postradar.php
postsbyforum.php
postsbythread.php
postsbytime.php
postsbyuser.php
private.php
profile.php
ranks.php
register.php
sendprivate.php
shitbugs.php
shop.php
shoped.php
shoph.php
showprivate.php
sigsize.php
smilies.dat
smilies.php
smilies2.dat
smilies2.php
smilieslol.dat
stats-daily.php
stats.php
status.php
thread.php
jul/stats.php
2018-11-04 14:47:54 -08:00

118 lines
3.7 KiB
PHP

<?php
require 'lib/function.php';
require 'lib/layout.php';
$misc = $sql->fetchq('SELECT * FROM misc');
$tstats = $sql->query('SHOW TABLE STATUS');
while ($t = $sql->fetch($tstats)) $tbl[$t['Name']]=$t;
/*
$sch_info = "";
$schemes = $sql->query('
SELECT COUNT(u.id) as schemecount, u.scheme, schemes.name
FROM users AS u
LEFT JOIN schemes ON (u.scheme = schemes.id)
WHERE (schemes.ord >= 0)
GROUP BY u.scheme
ORDER BY schemecount DESC
');
while ($row = $sql->fetch($schemes)) {
$sch_info .= "<tr>$tccell1>$row[name]</td>$tccell1>$row[schemecount]</tr>";
} */
print "
$header
<br>$tblstart
<tr>$tccellh>Interesting statistics</td></tr>
<tr>$tccell1l>
<img src='ext/ppdgauge.php' alt='Posts in last 24 hours' title='Posts in last 24 hours' style='display: block; float: right;'>
<ul>
<li><a href='activeusers.php'>Recently active posters</a></li>
<li><a href='acs.php'>Daily poster rankings</a></li>
<li><a href='milestones.php'>Post milestones</a></li>
<li><a href='biggestposters.php'>Biggest posters</a></li>
<li><a href='sigsize.php'>Largest post layouts</a></li>
<li><a href='sigsize.php?bio=1'>Largest bios</a></li>
<li><a href='activity.php?u=". ($loguserid ? $loguserid : 1) ."'>Graph of your posting history</a> (change the ID in the URL to see others)</li>
<li><a href='activity2.php'>Graph of the top 10 posters</a></li>
<li><a href='activity3.php'>Graph of total post count and posts per day</a></li>
<li><a href='activity3u.php'>Graph of active users per day</a></li>
<li><a href='avatar.php'>Mood avatars</a></li>
<li><a href='stats-daily.php'>Daily board-wide statistics</a></li>
</ul>
</td>
</tr>
$tblend
<br>$tblstart
$tccellh width='200'>Records$tccellh>&nbsp<tr>
$tccell1s><b>Most posts within 24 hours:</td>
$tccell2ls>$misc[maxpostsday], on ".date($dateformat,$misc['maxpostsdaydate'])."<tr>
$tccell1s><b>Most posts within 1 hour:</td>
$tccell2ls>$misc[maxpostshour], on ".date($dateformat,$misc['maxpostshourdate'])."<tr>
$tccell1s><b>Most users online:</td>
$tccell2ls>$misc[maxusers], on ".date($dateformat,$misc['maxusersdate'])."$misc[maxuserstext]
$tblend<br>".
/*
// This is kind of in Edit Profile already.
"$tblstart<tr>$tccellh colspan='2'>Scheme Usage Breakdown</td></tr>
<tr>$tccellh>Scheme Name</td>$tccellh>Users</td></tr>
$sch_info
$tblend<br>".
*/
"$tblstart<tr>
$tccellh>Table name</td>
$tccellh>Rows</td>
$tccellh>Avg. data/row</td>
$tccellh>Data size</td>
$tccellh>Index size</td>
$tccellh>Overhead</td>
$tccellh>Total size</td></tr>"
.tblinfo('posts_text')
.tblinfo('posts')
.tblinfo('pmsgs_text')
.tblinfo('pmsgs')
.tblinfo('postlayouts')
.tblinfo('threads')
.tblinfo('users')
.tblinfo('forumread')
.tblinfo('threadsread')
.tblinfo('postradar')
.tblinfo('ipbans')
.tblinfo('defines')
.tblinfo('dailystats')
.tblinfo('rendertimes')
."$tblend
";
print $footer;
printtimedif($startingtime);
function sp($sz) {
// $b="$sz B";
// if($sz>1023) $b=sprintf('%01.2f',$sz/1024).' kB';
// if($sz>10239) $b=sprintf('%01.1f',$sz/1024).' kB';
// if($sz>102399) $b=sprintf('%01.0f',$sz/1024).' kB';
// if($sz>1048575) $b=sprintf('%01.2f',$sz/1048576).' MB';
// if($sz>10485759) $b=sprintf('%01.1f',$sz/1048576).' MB';
// if($sz>104857599) $b=sprintf('%01.0f',$sz/1048576).' MB';
$b=number_format($sz,0,'.',',');
return $b;
}
function tblinfo($n) {
global $tbl,$tccell2,$tccell2l;
$t=$tbl[$n];
return "
<tr align=right>
$tccell2>$t[Name]</td>
$tccell2l>".sp($t['Rows']) ."</td>
$tccell2l>".sp($t['Avg_row_length'])."</td>
$tccell2l>".sp($t['Data_length'])."</td>
$tccell2l>".sp($t['Index_length'])."</td>
$tccell2l>".sp($t['Data_free'])."</td>
$tccell2l>".sp($t['Data_length']+$t['Index_length'])."</td></tr>";
}