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

This commit is contained in:
lopar 2018-02-15 22:58:37 +02:00
parent c374797862
commit 667fd98d4e
2 changed files with 701 additions and 576 deletions

1221
ch.php

File diff suppressed because one or more lines are too long

View File

@ -1,41 +1,33 @@
<?php <?php
ob_start("ob_gzhandler"); if ($_SESSION['uid'] == null) header("Location: index.php");
session_start(); session_start();
include "config.php"; include_once "config.php";
include "functions.php";
$data = mysql_query("SELECT `id`, `login`, `status`, `level`, `room`, `align`, (select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `align` > 1 and `align` < 2 order by align desc, login asc ;"); function showpals(){
$timer = time() - 60;
if ($_SESSION['uid'] == null) header("Location: index.php"); $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) {
<HTML><HEAD> if (!empty($data['online'])) {
<link rel=stylesheet type="text/css" href="css/main.css"> echo '<A HREF="javascript:top.AddToPrivate(\'',$data['login'],'\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
<meta charset="utf-8"> echo $data['align'].$data['login']."".$data['status']." — <em>".$data['room']."</em><br>";
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"> } else {
<meta http-equiv=PRAGMA content=NO-CACHE> echo '<img src="i/lock1.gif" width=20 height=15>';
<META Http-Equiv=Expires Content=0> echo $data['align'].$data['login']."".$data['status']." — <small><em>персонаж не в клубе</em></small><br>";
</HEAD> }
}
<body leftmargin=5 topmargin=5 marginwidth=0 marginheight=0 bgcolor=#d4d4d4> }
?>
<!doctype html>
<html>
<head>
<link rel=stylesheet href="css/main.css">
<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;"> <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> <h3><A HREF="javascript:top.AddToPrivate('pal', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A> Паладины</h3>
<? <?php showpals()?>
while ($row = mysql_fetch_array($data)) {
if (!empty($row['online'])) {
echo '<A HREF="javascript:top.AddToPrivate(\'',$row['login'],'\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
nick2($row['id']);
$rrm = $rooms[$row['room']];
echo ' - ',$row['status'],' - <i>',$rrm,'</i><BR>';
} else {
echo '<img src="i/lock1.gif" width=20 height=15>';
nick2($row['id']);
echo ' - ',$row['status'],' - <i><small><font color=gray>персонаж не в клубе</font></small></i><BR>';
}
}
?>
</div> </div>
</body> </body>
</html> </html>