Анкета и игровая шапка.

This commit is contained in:
lopar
2018-03-01 22:26:45 +02:00
parent 61b0ca565b
commit a97a29f87d
4 changed files with 48 additions and 220 deletions

9
ch.php
View File

@@ -8,8 +8,7 @@ if (!isset($_SESSION['uid'])) {
include_once 'config.php';
include_once 'functions.php';
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']);
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']);
//function tolink($buf) /*Штука, убивающая чужие ссылки*/
//{
@@ -29,7 +28,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
if ($_GET['room'] && (int)$_GET['room'] < 500) {
$user['room'] = (int)$_GET['room'];
}
if ($user['caveleader'] > 0) {
if ($u->i()['caveleader'] > 0) {
$data = mysql_query('
SELECT
`align`,
@@ -49,8 +48,8 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
WHERE
`o`.`id` = `u`.`id` AND
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
`o`.`room` = "' . $user['room'] . '" AND
`u`.`caveleader` = "' . $user['caveleader'] . '"
`o`.`room` = "' . $u->i()['room'] . '" AND
`u`.`caveleader` = "' . $u->i()['caveleader'] . '"
ORDER BY
`u`.`login`
');