mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* some changes
* moved some admin html code from php to twig templates (.html files) * minimum PHP version required by installer is now 5.1.2, cause of spl_autoload_register functon. * depracated Twig to version 1.20.0 cause of Autoloader * removed unused admin stylish template
This commit is contained in:
@@ -21,15 +21,6 @@ endif;
|
||||
|
||||
require(SYSTEM . 'libs/visitors.php');
|
||||
$visitors = new Visitors($config['visitors_counter_ttl']);
|
||||
?>
|
||||
Users being active within last <?php echo $config['visitors_counter_ttl']; ?> minutes.<br/><br/>
|
||||
<table class="table" width="100%" border="0">
|
||||
<tr>
|
||||
<th><b>IP</b></th>
|
||||
<th><b>Last visit</b></th>
|
||||
<th><b>Page</b></th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
function compare($a, $b) {
|
||||
return $a['lastvisit'] > $b['lastvisit'] ? -1 : 1;
|
||||
@@ -38,16 +29,8 @@ function compare($a, $b) {
|
||||
$tmp = $visitors->getVisitors();
|
||||
usort($tmp, 'compare');
|
||||
|
||||
$i = 0;
|
||||
foreach($tmp as $visitor)
|
||||
{
|
||||
echo $twig->render('admin.visitors.html', array(
|
||||
'config_visitors_counter_ttl' => $config['visitors_counter_ttl'],
|
||||
'visitors' => $tmp
|
||||
));
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $visitor['ip']; ?></td>
|
||||
<td><?php echo date("H:i:s", $visitor['lastvisit']); ?></td>
|
||||
<td><a href="<?php echo $visitor['page']; ?>"><?php echo substr($visitor['page'], 0, 50); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user