Фиксим список паладинов.

This commit is contained in:
lopar 2018-02-15 23:02:00 +02:00
parent 667fd98d4e
commit bdbbaf0245

View File

@ -1,11 +1,13 @@
<?php
if ($_SESSION['uid'] == null) header("Location: index.php");
session_start();
if (!isset($_SESSION['uid'])) header("Location: index.php");
include_once "config.php";
function showpals(){
function showpals()
{
$timer = time() - 60;
$data = db::c()->query('SELECT `login`,`status`,`align`,`room`,(select `id` from `online` WHERE `date` >= ?i AND `id` = users.`id`) AS `online` FROM `users` WHERE `align` = 1 ORDER BY `login` ASC', $timer)->fetch_assoc();
$data = db::c()->query('SELECT `login`,`status`,`align`,`room`,(SELECT `id` FROM `online` WHERE `date` >= ?i AND `id` = users.`id`) AS `online` FROM `users` WHERE `align` = 1 ORDER BY `login` ASC', $timer)->fetch_assoc();
while ($data) {
if (!empty($data['online'])) {
echo '<A HREF="javascript:top.AddToPrivate(\'', $data['login'], '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
@ -16,6 +18,7 @@
}
}
}
?>
<!doctype html>
<html>
@ -24,7 +27,9 @@
<meta charset="utf-8">
</head>
<body>
<div style="text-align: right; width: 95%;"><button onclick="location.href='main.php';">Вернуться</button></div>
<div style="text-align: right; width: 95%;">
<button onclick="location.href='main.php';">Вернуться</button>
</div>
<div style="width: 600px; margin: 0 auto;">
<h3><A HREF="javascript:top.AddToPrivate('pal', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A> Паладины</h3>
<?php showpals() ?>