Update toponline.php site_title and type (#347)

* Update toponline.php site_title and type

Parse error: syntax error, unexpected 'site_title' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\znote\toponline.php on line 40
Notice: Undefined index: type in C:\xampp\htdocs\znote\toponline.php on line 10
This commit is contained in:
gregorecruzeiro 2019-03-14 05:18:50 -03:00 committed by Stefan A. Brannfjell
parent bbd0455463
commit e8a57cbac3

View File

@ -1,14 +1,13 @@
<?php
require_once 'engine/init.php';
include 'layout/overall/header.php';
if (!$config['toponline']['enabled']) {
echo 'This page has been disabled at config.php.';
include 'layout/overall/footer.php';
exit();
}
$limit = $config['toponline']['limit'];
$type = $_GET['type'];
$type = (isset($_GET['type'])) ? getValue($_GET['type']) : false;
function onlineTimeTotal($value)
{
@ -17,7 +16,6 @@ function onlineTimeTotal($value)
$minutes = floor($value / 60);
return '<font color="black">'.$hours.'h '.$minutes.'m</font>';
}
function hours_and_minutes($value, $color = 1)
{
$hours = floor($value / 3600);
@ -33,7 +31,6 @@ function hours_and_minutes($value, $color = 1)
else
return '<font color="green">'.$hours.'h '.$minutes.'m</font>';
}
if(empty($type))
$znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` AS `z` JOIN `players` AS `p` WHERE `p`.`id`=`z`.`player_id` and `p`.`group_id` < 3 ORDER BY `onlinetimetoday` DESC LIMIT '.$limit);
elseif($type == "sum")
@ -41,12 +38,11 @@ elseif($type == "sum")
elseif($type >= 1 && $type <= 4)
$znotePlayers = mysql_select_multi('SELECT * FROM `znote_players` AS `z` JOIN `players` AS `p` WHERE `p`.`id`=`z`.`player_id` and `p`.`group_id` < 3 ORDER BY `onlinetime' . (int) $type . '` DESC LIMIT '.$limit);
echo '<CENTER><H2>Most online on <?php echo $config['site_title'] ?></H2></CENTER>
echo '<CENTER><H2>Most online on' .$config['site_title'] . '</H2></CENTER>
<BR>
<table class="table table-striped">
<td><center><b>#</b></center></td>
<td width="10%"><b>Name</b></td>';
if($type == "sum")
echo '<td ><center><b><center><a href="?subtopic=onlinetime&type=sum">Total</a></center></B></TD>';
else
@ -67,8 +63,6 @@ if(empty($type))
else
echo '<TD ><b><center><a href="?subtopic=onlinetime">Today</a></center></B></TD>';
echo '</TR>';
$number_of_rows = 1;
if($znotePlayers)
foreach($znotePlayers as $player)