2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
session_start();
|
2020-09-30 12:30:00 +00:00
|
|
|
|
if (empty($_SESSION['uid'])) {
|
2020-09-29 22:39:06 +00:00
|
|
|
|
header("Location: index.php");
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2018-02-16 14:13:14 +00:00
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
|
require_once "config.php";
|
|
|
|
|
$user = new User($_SESSION['uid']);
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
|
if ($user->room != 650) {
|
2018-01-28 16:40:49 +00:00
|
|
|
|
header("Location: main.php");
|
2020-09-29 22:39:06 +00:00
|
|
|
|
exit;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
|
if ($user->battle) {
|
2018-01-28 16:40:49 +00:00
|
|
|
|
header('location: fbattle.php');
|
2020-09-29 22:39:06 +00:00
|
|
|
|
exit;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
2018-02-16 14:13:14 +00:00
|
|
|
|
|
2020-09-30 19:12:34 +00:00
|
|
|
|
if ($_GET['id'] && $user->admin) {
|
2018-01-28 16:40:49 +00:00
|
|
|
|
echo "Пробуем перейти на выбранную замковую улицу...";
|
|
|
|
|
$_SESSION["klan"] = $_GET['klan'];
|
|
|
|
|
$a = $_GET['klan'];
|
2020-09-30 19:12:34 +00:00
|
|
|
|
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 651, `online`.`room` = 651 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
2018-01-28 16:40:49 +00:00
|
|
|
|
header("location: city.php");
|
2020-09-30 19:12:34 +00:00
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
Template::header('Клановый перекрёсток');
|
2018-01-28 16:40:49 +00:00
|
|
|
|
?>
|
2020-09-30 19:12:34 +00:00
|
|
|
|
<a href="/city.php?strah=1">← назад</a>
|
|
|
|
|
<h1>Переход к клановым улицам</h1>
|
|
|
|
|
На данный момент свои замки имеют такие кланы:
|
2018-02-16 14:13:14 +00:00
|
|
|
|
<?php
|
2020-09-30 19:12:34 +00:00
|
|
|
|
$query = db::c()->query('SELECT `id`,`short`,`align`,`name` FROM `clans` WHERE `zamok` = 2');
|
|
|
|
|
while ($row = $query->fetch_assoc()) {
|
|
|
|
|
$frm = "<img src='i/align_%s.gif'> <img src='i/clan/%s.gif'> %s<br><form><input name='klan' type='hidden' value='%s'><input type='submit' value='Вход'></form>";
|
|
|
|
|
echo sprintf($frm, $row['align'], $row['short'], $row['name'], $row['id']);
|
2018-02-16 14:13:14 +00:00
|
|
|
|
}
|