]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/online.tmpl
Remove rcs_id
[SourceForge/phpwiki.git] / themes / default / templates / online.tmpl
1 <?php // -*-php-*-
2 // $Id$
3 ?>
4 <?php
5 // Formatting and idea borrowed from postnuke.
6
7 // We have two modes: 1. a simple "summary" block, and
8 // 2. "detail" with a table of online users, date and current actions
9 $header = _("Who Is Online");
10 if ($MAX_ONLINE_TIME and $MAX_ONLINE_NUM)
11   $MAX_ONLINE_TIME = $WikiTheme->formatDateTime($MAX_ONLINE_TIME);
12 ?>
13
14 <?php if ($mode == 'summary') {
15     if ($allow_detail) {
16       $url = WikiUrl($pagename,array("mode"=>"detail"));
17       $header = HTML::a(array('href'=>$url,'title'=>_("Switch to detailed list")),_("Who Is Online"));
18     }
19 ?>
20 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
21   <tr><td class="cat" colspan="2"><?php echo $header ?></td></tr>
22   <tr><td class="row1" rowspan="3"><?php echo $ONLINE_ICON ?></td>
23       <td class="row1 gensmall"><?php echo fmt("Our users created a total of %d pages.",$NUM_PAGES) ?><br />
24           <?php echo fmt("We have a total of %d registered users.",$NUM_USERS) ?><br />
25           <?php echo $NEWEST_USER ? fmt("The newest registered user is %s.",$NEWEST_USER) : ''?>
26           </td></tr>
27   <?php if ($SESSDATA_BOOL) { ?>
28   <tr><td class="row1 gensmall">
29           <?php echo fmt("In total there are %d user sessions online. :: Unique %d Registered and %d Guests",
30                   $NUM_ONLINE,$NUM_REGISTERED,$NUM_GUESTS) ?><br />
31           <?php echo $MAX_ONLINE_NUM ? fmt("Most users ever online was %d at %s.",$MAX_ONLINE_NUM,$MAX_ONLINE_TIME) : '' ?><br />
32           <?php echo fmt("Registered Users Online: ") ?>
33 <?php 
34     $s='';
35     foreach ($REGISTERED as $user) {
36       $link = WikiLink($user['name']);
37       $s .= $link->asXML() . ", ";
38     }
39     if (!count($REGISTERED)) echo(htmlentities(_("<none>")));
40     else echo(substr($s,0,-2));
41 ?>
42 <?php if (!empty($ADMINS) and $dispose_admin) { ?> 
43     <br />
44     <?php echo fmt("Admin is also online.") ?>
45 <?php } ?>
46   </td></tr>
47   <tr><td class="row1 gensmall">
48     <?php echo fmt("This data is based on users active over the past %s.",$SESSION_TIME) ?><br />
49     </td></tr>
50   <?php } else { ?>
51   <tr><td class="row1 gensmall"><br />
52    <?php echo fmt("Sorry, no dynamic DB Session support.") ?><br />
53     </td></tr>
54   <?php } ?>
55 </table>
56 <?php } ?>
57
58 <?php if ($mode == 'detail') {
59     $url = WikiUrl($pagename,array("mode"=>"summary"));
60     $header = HTML::a(array('href'=>$url,'title'=>_("Switch to summary")),_("Who Is Online"));
61 ?>
62 <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
63   <tr><td class="cat" colspan="3"><?php echo $header ?></td></tr>
64    <tr><td class="cat" colspan="3"><?php echo _("Registered Users") ?></td></tr>
65   <?php if (!empty($ADMINS) and $dispose_admin) { ?> 
66   <?php   foreach ($ADMINS as $user) { ?>
67   <tr><td class="row1 gensmall"><?php echo $user['name'] ?></td>
68       <td class="row1 gensmall"><?php echo $WikiTheme->formatDateTime($user['date']) ?></td>
69       <td class="row1 gensmall"><?php echo $user['action'].' '.$user['page'] ?></td>
70       </tr>
71   <?php   } ?>
72   <?php } ?>
73   <?php foreach ($REGISTERED as $user) { ?>
74   <tr><td class="row1 gensmall"><?php echo $user['name'] ?></td>
75       <td class="row1 gensmall"><?php echo $WikiTheme->formatDateTime($user['date']) ?></td>
76       <td class="row1 gensmall"><?php echo $user['action'].' '.$user['page'] ?></td>
77       </tr>
78   <?php } ?>
79    <tr><td class="cat" colspan="3"><?php echo _("Guests") ?></td></tr>
80   <?php foreach ($GUESTS as $user) { ?>
81   <tr><td class="row1 gensmall"><?php echo $user['name'] ?></td>
82       <td class="row1 gensmall"><?php echo $WikiTheme->formatDateTime($user['date']) ?></td>
83       <td class="row1 gensmall"><?php echo $user['action'].' '.$user['page'] ?></td>
84       </tr>
85   <?php } ?>
86 </table>
87 <?php } ?>
88 <hr class="no-css" />