2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
session_start();
|
|
|
|
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
2018-02-16 14:13:14 +00:00
|
|
|
|
|
2018-01-28 16:40:49 +00:00
|
|
|
|
include "config.php";
|
2018-02-16 14:13:14 +00:00
|
|
|
|
$user = db::c()->query('SELECT `room`,`battle` FROM `users` WHERE `id` = ?i',$_SESSION['uid'])->fetch_assoc();
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
|
|
if ($user['room'] != 650) {
|
|
|
|
|
header("Location: main.php");
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($user['battle'] != 0) {
|
|
|
|
|
header('location: fbattle.php');
|
|
|
|
|
die();
|
|
|
|
|
}
|
2018-02-16 14:13:14 +00:00
|
|
|
|
|
2018-01-28 16:40:49 +00:00
|
|
|
|
if ($_GET['id']) {
|
|
|
|
|
echo "Пробуем перейти на выбранную замковую улицу...";
|
|
|
|
|
$_SESSION["klan"] = $_GET['klan'];
|
|
|
|
|
$a = $_GET['klan'];
|
2018-02-16 14:13:14 +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");
|
|
|
|
|
} else {
|
|
|
|
|
?>
|
2018-02-16 14:13:14 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<link rel=stylesheet href="css/main.css">
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
</head>
|
|
|
|
|
<body marginwidth=5 marginheight=5 bgcolor=#d4d4d4>
|
|
|
|
|
<a href="/city.php?strah=1">← назад</a>
|
|
|
|
|
<h1>Переход к клановым улицам</h1>
|
|
|
|
|
На данный момент свои замки имеют такие кланы:
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-02-16 14:13:14 +00:00
|
|
|
|
<?php
|
|
|
|
|
$query = db::c()->query('SELECT `id`,`short`,`align`,`name` FROM `clans` WHERE `zamok` = 2');
|
|
|
|
|
while ($row = $query->fetch_assoc()) {
|
|
|
|
|
// $id = $row['id'];
|
|
|
|
|
// $s = $row['short'];
|
|
|
|
|
// echo "<img src='i/klan/",$s,".gif'> $s";
|
|
|
|
|
// echo ' <form action="ul_clans.php" method="GET">';
|
|
|
|
|
// echo "<input name='klan' type='hidden' value='$id'>";
|
|
|
|
|
// echo '<input type="submit" name="id" value=Перейти к замку1></form><hr>';
|
|
|
|
|
$frm = "<img src='i/align_%s.gif'> <img src='i/klan/%s.gif'> %s<br><form action='ul_clans.php' method='GET'></form><input name='klan' type='hidden' value='%s'><input type='submit' value='Вход'>";
|
|
|
|
|
echo sprintf($frm,$row['align'],$row['short'],$row['name'],$row['id']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</body>
|
2018-02-16 14:13:14 +00:00
|
|
|
|
</html>
|