Модераторы

This commit is contained in:
lopar 2018-02-16 00:08:42 +02:00
parent bdbbaf0245
commit d6a067c288
3 changed files with 33 additions and 39 deletions

View File

@ -640,7 +640,7 @@ end sub
if ($user['deal'] == 1) {
echo "<a class=\"buttons\" href=\"javascript:void(0)\" onclick=\"top.cht('orden.php')\" title=\"Дилерская панель\"><IMG SRC=\"i/chatalign_7.gif\" WIDTH=30 HEIGHT=30 BORDER=0 /></a>";
} elseif ((($user['align'] > 1) && ($user['align'] < 2)) || (($user['align'] > 2) && ($user['align'] < 3))) {
echo "<a class=\"buttons\" href=\"javascript:void(0)\" onclick=\"top.cht('palklan.php?'+Math.random())\" title=\"Клан\"><img src=\"i/clan.gif\" width=30 height=30 border=0 /></a>";
echo "<a class=\"buttons\" href=\"javascript:void(0)\" onclick=\"top.cht('moderators.php?'+Math.random())\" title=\"Клан\"><img src=\"i/clan.gif\" width=30 height=30 border=0 /></a>";
echo "<a class=\"buttons\" href=\"javascript:void(0)\" onclick=\"top.cht('orden.php')\" title=\"Склонность\"><img src=\"i/a___pal.gif\" width=30 height=30 border=0 /></a>";
} elseif ($user['align'] == 2) {
echo "<a class=\"buttons\" href=\"javascript:void(0)\" onclick=\"top.cht('orden.php')\" title=\"Склонность\"><img src=\"i/chatalign_2.gif\" width=30 height=30 border=0 /></a>";

32
moderators.php Normal file
View File

@ -0,0 +1,32 @@
<?php
session_start();
if (!isset($_SESSION['uid'])) header("Location: index.php");
include_once "config.php";
$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();
?>
<!doctype html>
<html>
<head>
<link rel=stylesheet href="css/main.css">
<meta charset="utf-8">
</head>
<body>
<a href="/main.php"> на главную</a>
<h1>
<A HREF="javascript:top.AddToPrivate('pal', top.CtrlPress)" target=refreshed><img src="i/lock.gif"></A> Модераторы онлайн
</h1>
<?php
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">';
echo $data['align'] . $data['login'] . "" . $data['status'] . " — <small><em>персонаж не в клубе</em></small><br>";
}
}
?>
</body>
</html>

View File

@ -1,38 +0,0 @@
<?php
session_start();
if (!isset($_SESSION['uid'])) header("Location: index.php");
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>
<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>