2 <!-- $Id: online.tmpl,v 1.8 2008-08-21 18:04:48 vargenau 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 = $WikiTheme->formatDateTime($MAX_ONLINE_TIME);
13 <?php if ($mode == 'summary') {
15 $url = WikiUrl($pagename,array("mode"=>"detail"));
16 $header = HTML::a(array('href'=>$url,'title'=>_("Switch to detailed list")),_("Who Is Online"));
19 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
20 <tr><td class="cat" colspan="2"><?= $header ?></td></tr>
21 <tr><td class="row1" rowspan="3"><?= $ONLINE_ICON ?></td>
22 <td class="row1 gensmall"><?= fmt("Our users created a total of %d pages.",$NUM_PAGES) ?><br />
23 <?= fmt("We have a total of %d registered users.",$NUM_USERS) ?><br />
24 <?= $NEWEST_USER ? fmt("The newest registered user is %s.",$NEWEST_USER) : ''?>
26 <?php if ($SESSDATA_BOOL) { ?>
27 <tr><td class="row1 gensmall">
28 <?= fmt("In total there are %d user sessions online. :: Unique %d Registered and %d Guests",
29 $NUM_ONLINE,$NUM_REGISTERED,$NUM_GUESTS) ?><br />
30 <?= $MAX_ONLINE_NUM ? fmt("Most users ever online was %d at %s.",$MAX_ONLINE_NUM,$MAX_ONLINE_TIME) : '' ?><br />
31 <?= fmt("Registered Users Online: ") ?>
34 foreach ($REGISTERED as $user) {
35 $link = WikiLink($user['name']);
36 $s .= $link->asXML() . ", ";
38 if (!count($REGISTERED)) echo(htmlentities(_("<none>")));
39 else echo(substr($s,0,-2));
41 <?php if (!empty($ADMINS) and $dispose_admin) { ?>
43 <?= fmt("Admin is also online.") ?>
46 <tr><td class="row1 gensmall">
47 <?= fmt("This data is based on users active over the past %s.",$SESSION_TIME) ?><br />
50 <tr><td class="row1 gensmall"><br />
51 <?= fmt("Sorry, no dynamic DB Session support.") ?><br />
57 <?php if ($mode == 'detail') {
58 $url = WikiUrl($pagename,array("mode"=>"summary"));
59 $header = HTML::a(array('href'=>$url,'title'=>_("Switch to summary")),_("Who Is Online"));
61 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
62 <tr><td class="cat" colspan="3"><?= $header ?></td></tr>
63 <tr><td class="cat" colspan="3"><?= _("Registered Users") ?></td></tr>
64 <?php if (!empty($ADMINS) and $dispose_admin) { ?>
65 <?php foreach ($ADMINS as $user) { ?>
66 <tr><td class="row1 gensmall"><?= $user['name'] ?></td>
67 <td class="row1 gensmall"><?= $WikiTheme->formatDateTime($user['date']) ?></td>
68 <td class="row1 gensmall"><?= $user['action'].' '.$user['page'] ?></td>
72 <?php foreach ($REGISTERED as $user) { ?>
73 <tr><td class="row1 gensmall"><?= $user['name'] ?></td>
74 <td class="row1 gensmall"><?= $WikiTheme->formatDateTime($user['date']) ?></td>
75 <td class="row1 gensmall"><?= $user['action'].' '.$user['page'] ?></td>
78 <tr><td class="cat" colspan="3"><?= _("Guests") ?></td></tr>
79 <?php foreach ($GUESTS as $user) { ?>
80 <tr><td class="row1 gensmall"><?= $user['name'] ?></td>
81 <td class="row1 gensmall"><?= $WikiTheme->formatDateTime($user['date']) ?></td>
82 <td class="row1 gensmall"><?= $user['action'].' '.$user['page'] ?></td>