diff --git a/stats-daily.php b/stats-daily.php new file mode 100644 index 0000000..4b37758 --- /dev/null +++ b/stats-daily.php @@ -0,0 +1,59 @@ +$tblstart + $tccellh>Information + $tccellc> +
+ Daily stats for the board. This page might take a while to fully display. +

+ + + $tblend +
+ $tblstart + $tccellh colspan=9>Daily stats + $tccellc>Date + $tccellc>Total users + $tccellc>Total posts + $tccellc>Total threads + $tccellc>Total views + $tccellc>New users + $tccellc>New posts + $tccellc>New threads + $tccellc>New views + "; + $users=0; + $posts=0; + $threads=0; + $views=0; + $stats=$sql->query("SELECT * FROM dailystats"); + $oldyear = ""; + while($day=$sql->fetch($stats)){ + $year = substr($day['date'], 6); + if ($year !== $oldyear) { + print " + $tccellh colspan=9>20$year"; + $oldyear = $year; + } + print " + $tccell1>$day[date] + $tccell2>". number_format($day['users']) ." + $tccell2>". number_format($day['posts']) ." + $tccell2>". number_format($day['threads']) ." + $tccell2>". number_format($day['views']) ." + $tccell2>". number_format($day['users']-$users)." + $tccell2>". number_format($day['posts']-$posts)." + $tccell2>". number_format($day['threads']-$threads)." + $tccell2>". number_format($day['views']-$views)." + "; + $users=$day['users']; + $posts=$day['posts']; + $threads=$day['threads']; + $views=$day['views']; + } + print $tblend.$footer; + printtimedif($startingtime); diff --git a/stats.php b/stats.php index 21d16cc..02b6947 100644 --- a/stats.php +++ b/stats.php @@ -31,7 +31,7 @@
  • Recently active posters
  • Daily poster rankings
  • Post milestones
  • -
  • Biggest posters
  • +
  • Biggest posters
  • Largest post layouts
  • Largest bios
  • Graph of your posting history (change the ID in the URL to see others)
  • @@ -39,6 +39,7 @@
  • Graph of total post count and posts per day
  • Graph of active users per day
  • Mood avatars
  • +
  • Daily board-wide statistics
  • @@ -82,42 +83,9 @@ .tblinfo('dailystats') .tblinfo('rendertimes') ."$tblend -
    - $tblstart - $tccellhs colspan=9>Daily stats - $tccellcs>Date - $tccellcs>Total users - $tccellcs>Total posts - $tccellcs>Total threads - $tccellcs>Total views - $tccellcs>New users - $tccellcs>New posts - $tccellcs>New threads - $tccellcs>New views - "; - $users=0; - $posts=0; - $threads=0; - $views=0; - $stats=$sql->query("SELECT * FROM dailystats"); - while($day=$sql->fetch($stats)){ - print " - $tccell1s>$day[date] - $tccell2s>$day[users] - $tccell2s>$day[posts] - $tccell2s>$day[threads] - $tccell2s>$day[views] - $tccell2s>".($day['users']-$users)." - $tccell2s>".($day['posts']-$posts)." - $tccell2s>".($day['threads']-$threads)." - $tccell2s>".($day['views']-$views)." - "; - $users=$day['users']; - $posts=$day['posts']; - $threads=$day['threads']; - $views=$day['views']; - } - print $tblend.$footer; +"; + + print $footer; printtimedif($startingtime); @@ -147,5 +115,3 @@ $tccell2l>".sp($t['Data_free'])." $tccell2l>".sp($t['Data_length']+$t['Index_length']).""; } - -?>