author | Dan |
Tue, 20 Jan 2009 22:08:17 -0500 | |
changeset 52 | a8f0e99883d1 |
parent 46 | 186507f67064 |
permissions | -rw-r--r-- |
8 | 1 |
<?php |
52 | 2 |
require_once('../stats-fe.php'); |
3 |
require_once('../timezone.php'); |
|
8 | 4 |
|
20 | 5 |
$channel_list = stats_channel_list(); |
6 |
$first_channel = $channel_list[0]; |
|
7 |
$channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel; |
|
44
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
8 |
|
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
9 |
$title = "$nick - Statistics"; |
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
10 |
require("./themes/$webtheme/header.php"); |
8 | 11 |
?> |
52 | 12 |
<script type="text/javascript" src="ajax-update.js"></script> |
8 | 13 |
<div style="float: right;"> |
14 |
<p> |
|
15 |
<?php |
|
16 |
$tz_display = str_replace('_', ' ', str_replace('/', ': ', $tz)); |
|
17 |
echo 'Time zone: ' . $tz_display . ' [<a href="changetz.php">change</a>]<br />'; |
|
20 | 18 |
echo '<small>The time now is ' . date('H:i:s') . '.<br />Statistics now updated constantly (see <a href="news.php">news</a>)</small>'; |
8 | 19 |
?> |
20 |
</p> |
|
21 |
<p> |
|
22 |
<big><b>Channels:</b></big><br /> |
|
23 |
<?php |
|
24 |
foreach ( $channels as $i => $c ) |
|
25 |
{ |
|
26 |
$bold = ( $c == $channel ); |
|
27 |
echo $bold ? '<b>' : ''; |
|
28 |
echo $bold ? '' : '<a href="index.php?channel=' . urlencode($c) . '">'; |
|
29 |
echo $c; |
|
30 |
echo $bold ? '' : '</a>'; |
|
31 |
echo $bold ? '</b>' : ''; |
|
32 |
echo $i == count($channels) - 1 ? '' : ' | '; |
|
33 |
} |
|
34 |
?> |
|
35 |
</p> |
|
52 | 36 |
<p>Update every <input id="update_ivl" size="3" value="..." style="text-align: center;" /> seconds<br /> |
37 |
<small>(Javascript required, min. 5 secs, default 30)</small><br /> |
|
38 |
</p> |
|
8 | 39 |
</div> |
52 | 40 |
<div id="active-members"> |
8 | 41 |
<?php |
52 | 42 |
require('ajax-active.php'); |
8 | 43 |
?> |
52 | 44 |
</div> |
45 | 45 |
<h1>Last 60 minutes</h1> |
52 | 46 |
<img class="graph" alt="Graph image" src="graph.php?mode=lasthour&channel=<?php echo urlencode($channel); ?>" /> |
8 | 47 |
<h1>Last 24 hours</h1> |
52 | 48 |
<img class="graph" alt="Graph image" src="graph.php?mode=lastday&channel=<?php echo urlencode($channel); ?>" /> |
34
a8daa2016cf1
Added support for last month and last 2 weeks graphs; adjusted web interface accordingly
Dan
parents:
20
diff
changeset
|
49 |
<h1>Last 2 weeks</h1> |
52 | 50 |
<img class="graph" alt="Graph image" src="graph.php?mode=lastweek&channel=<?php echo urlencode($channel); ?>" /> |
44
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
51 |
<?php |
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
52 |
require("./themes/$webtheme/footer.php"); |
73f74d395f95
Added theme support. Oh yeah, you can customize graphs using graph_{line,bar}.def.
Dan
parents:
34
diff
changeset
|
53 |