2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
2021-08-25 15:24:12 +00:00
|
|
|
|
|
|
|
|
|
use Battles\Database\DBPDO;
|
|
|
|
|
use Battles\Template;
|
|
|
|
|
use Battles\User;
|
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
|
require_once "config.php";
|
2021-08-25 15:24:12 +00:00
|
|
|
|
if (!empty($_GET['id']) && User::$current->getAdmin()) {
|
2018-01-28 16:40:49 +00:00
|
|
|
|
echo "Пробуем перейти на выбранную замковую улицу...";
|
|
|
|
|
$_SESSION["klan"] = $_GET['klan'];
|
|
|
|
|
$a = $_GET['klan'];
|
2021-08-25 15:24:12 +00:00
|
|
|
|
DBPDO::$db->execute('update users, online set users.room = 651, online.room = 651 where user_id = id and user_id = ?', User::$current->getId());
|
2018-01-28 16:40:49 +00:00
|
|
|
|
header("location: city.php");
|
2020-09-30 19:12:34 +00:00
|
|
|
|
exit;
|
|
|
|
|
}
|
2021-08-25 15:24:12 +00:00
|
|
|
|
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
|
2021-08-25 15:24:12 +00:00
|
|
|
|
$rows = DBPDO::$db->fetchAll('select short_name, full_name, owner_id from clans where zamok = 2');
|
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
|
$frm = "<img src='i/clan/%s.png'> %s<br><form><input name='klan' type='hidden' value='%s'><input type='submit' value='Вход'></form>";
|
|
|
|
|
echo sprintf($frm, $row['short_name'], $row['full_name'], $row['owner_id']);
|
|
|
|
|
}
|