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

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

615
ch.php

File diff suppressed because one or more lines are too long

View File

@ -1,41 +1,33 @@
<?php
ob_start("ob_gzhandler");
session_start();
include "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 ;");
if ($_SESSION['uid'] == null) header("Location: index.php");
?>
<HTML><HEAD>
<link rel=stylesheet type="text/css" href="css/main.css">
<meta charset="utf-8">
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store">
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
</HEAD>
session_start();
include_once "config.php";
<body leftmargin=5 topmargin=5 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
<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>
<?
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>';
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>';
nick2($row['id']);
echo ' - ',$row['status'],' - <i><small><font color=gray>персонаж не в клубе</font></small></i><BR>';
echo $data['align'].$data['login']."".$data['status']." — <small><em>персонаж не в клубе</em></small><br>";
}
}
}
?>
<!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="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>