* 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:
slawkens
2017-08-28 10:02:49 +02:00
parent 603c2175e3
commit 15961f0c17
418 changed files with 15624 additions and 4322 deletions

View File

@@ -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>