mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 17:07:17 +00:00
General fixes
+Fixed a bug that didn't show total and online users in the homepage
This commit is contained in:
@@ -130,7 +130,7 @@ AccessLogger::logRequest();
|
|||||||
<td><?php
|
<td><?php
|
||||||
|
|
||||||
$return = mysqli_query($link, "SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe IN(1, 2, 3)");
|
$return = mysqli_query($link, "SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe IN(1, 2, 3)");
|
||||||
echo !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0;
|
echo ($users = !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0);
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ AccessLogger::logRequest();
|
|||||||
<td><?php
|
<td><?php
|
||||||
|
|
||||||
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe IN(1, 2, 3)");
|
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe IN(1, 2, 3)");
|
||||||
echo !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0;
|
echo ($online = !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0);
|
||||||
|
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user