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

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

View File

@ -1,22 +1,25 @@
<?php
if ($_SESSION['uid'] == null) header("Location: index.php");
session_start();
include_once "config.php";
session_start();
if (!isset($_SESSION['uid'])) header("Location: index.php");
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();
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>';
echo $data['align'].$data['login']."".$data['status']." — <em>".$data['room']."</em><br>";
} else {
echo '<img src="i/lock1.gif" width=20 height=15>';
echo $data['align'].$data['login']."".$data['status']." — <small><em>персонаж не в клубе</em></small><br>";
}
include_once "config.php";
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();
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>';
echo $data['align'] . $data['login'] . "" . $data['status'] . " — <em>" . $data['room'] . "</em><br>";
} else {
echo '<img src="i/lock1.gif" width=20 height=15>';
echo $data['align'] . $data['login'] . "" . $data['status'] . " — <small><em>персонаж не в клубе</em></small><br>";
}
}
?>
}
?>
<!doctype html>
<html>
<head>
@ -24,10 +27,12 @@
<meta charset="utf-8">
</head>
<body>
<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()?>
</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() ?>
</div>
</body>
</html>