2 <!-- $Id: online.tmpl,v 1.1 2004-02-26 19:15:37 rurban Exp $ -->
4 // Formatting and idea borrowed from postnuke.
6 // We have two modes: 1. a simple "summary" block, and
7 // 2. "detail" with a table of online users, date and current actions
8 $header = _("Who Is Online");
9 if ($MAX_ONLINE_TIME and $MAX_ONLINE_NUM)
10 $MAX_ONLINE_TIME = $Theme->formatDateTime($MAX_ONLINE_TIME);
13 <?php if ($mode == 'summary') {
15 $url = WikiUrl($pagename,array("mode"=>"detail"));
16 $header = HTML::a(array('href'=>$url),_("Who Is Online"));
19 $registered_names = array();
20 foreach ($REGISTERED as $user) {
21 $registered_names[] = WikiLink($user['name']);
25 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
26 <tr><td class="cat" colspan="2"><?= $header ?></td></tr>
27 <tr><td class="row1" rowspan="3"><?= $ONLINE_ICON ?></td>
28 <td class="row1" class="gensmall"><?= fmt("Our users created a total of %d pages.",$NUM_PAGES) ?><br />
29 <?= fmt("We have a total of %d registered users.",$NUM_USERS) ?><br />
30 <?= $NEWEST_USER ? fmt("The newest registered user is %s",$NEWEST_USER) : ''?>
32 <?php if ($SESSDATA_BOOL) { ?>
33 <tr><td class="row1" class="gensmall">
34 <?= fmt("In total there are %d user sessions online :: Unique %d Registered and %d Guests",
35 $NUM_ONLINE,$NUM_REGISTERED,$NUM_GUESTS) ?><br />
36 <?= $MAX_ONLINE_NUM ? fmt("Most users ever online was %d at %s",$MAX_ONLINE_NUM,$MAX_ONLINE_TIME) : '' ?><br />
37 <?= fmt("Registered Users Online: ") ?>
40 foreach ($REGISTERED as $user) {
41 $link = WikiLink($user['name']);
42 $s .= $link->asXML() . ", ";
46 <?php if (!empty($ADMINS) and $dispose_admin) { ?>
48 <?= fmt("Admin is also online.") ?>
51 <tr><td class="row1" class="gensmall">
52 <?= fmt("This data is based on users active over the past %s",$SESSION_TIME) ?><br />
55 <tr><td class="row1" class="gensmall"><br />
56 <?= fmt("Sorry, no dynamic DB Session support.") ?><br />
62 <?php if ($mode == 'detail') {
63 $url = WikiUrl($pagename,array("mode"=>"summary"));
64 $header = HTML::a(array('href'=>$url),_("Who Is Online"));
66 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
67 <tr><td class="cat" colspan="3"><?= $header ?></td></tr>
68 <tr><td class="cat" colspan="3"><?= _("Registered Users") ?></td></tr>
69 <?php if (!empty($ADMINS) and $dispose_admin) { ?>
70 <?php foreach ($ADMINS as $user) { ?>
71 <tr><td class="row1" class="gensmall"><?= $user['name'] ?></td>
72 <td class="row1" class="gensmall"><?= $Theme->formatDateTime($user['date']) ?></td>
73 <td class="row1" class="gensmall"><?= $user['page'] ?></td>
77 <?php foreach ($REGISTERED as $user) { ?>
78 <tr><td class="row1" class="gensmall"><?= $user['name'] ?></td>
79 <td class="row1" class="gensmall"><?= $Theme->formatDateTime($user['date']) ?></td>
80 <td class="row1" class="gensmall"><?= $user['page'] ?></td>
83 <tr><td class="cat" colspan="3"><?= _("Guests") ?></td></tr>
84 <?php foreach ($GUESTS as $user) { ?>
85 <tr><td class="row1" class="gensmall"><?= $user['name'] ?></td>
86 <td class="row1" class="gensmall"><?= $Theme->formatDateTime($user['date']) ?></td>
87 <td class="row1" class="gensmall"><?= $user['page'] ?></td>