now it has a master!
This commit is contained in:
parent
58c26299dd
commit
2672b97ae9
15
gotzamok.php
15
gotzamok.php
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php /** @noinspection SqlResolve */
|
||||
/* Разрушенный замок на замковой улице.
|
||||
* */
|
||||
session_start();
|
||||
@ -11,8 +11,9 @@ if (!($user['room'] >= 37 AND $user['room'] <= 41)) {
|
||||
die();
|
||||
}
|
||||
|
||||
$zam = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzamok')->fetch_assoc();
|
||||
if ($zam['value'] == $user['klan']) {
|
||||
$castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok');
|
||||
|
||||
if ($castleOwners['id'] == $user['klan']) {
|
||||
// если мой клан
|
||||
if ($_GET['goto'] == 'arsenal') $user['room'] = 38;
|
||||
if ($_GET['goto'] == 'home') $user['room'] = 37;
|
||||
@ -50,7 +51,7 @@ if ($user['room'] == 38) {
|
||||
if ($_GET['add']) {
|
||||
$item = db::c()->query('SELECT * FROM `inventory` WHERE `dressed`=0 AND `setsale` = 0 AND `owner` =?i AND `id` = ?i', $_SESSION['uid'], $_GET['add'])->fetch_assoc();
|
||||
|
||||
if ($_SESSION['uid'] == $it['owner']) {
|
||||
if ($_SESSION['uid'] == $item['owner']) {
|
||||
$status = 'Вы оставили вещь в арсенале.';
|
||||
db::c()->query('UPDATE `inventory` SET `owner` = ?i WHERE `id` = ?i', -5, $item['id']);
|
||||
db::c()->query('INSERT INTO `gotzam_arsenal` (`id_it`, `owner`) VALUES (?i, ?i)', $item['id'], $_SESSION['uid']);
|
||||
@ -84,7 +85,7 @@ if ($user['room'] == 40) {
|
||||
<head>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<script src="js/main.js"></script>
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
body {
|
||||
background: url('i/<?= $backgroundImage ?>.jpg') no-repeat top right;
|
||||
@ -92,14 +93,14 @@ if ($user['room'] == 40) {
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Приветствую тебя в замке <img src='i/klan/<?= $zam['value'] ?>.gif'> <?= $zam['value'] ?>, воин!</h3>
|
||||
<h3>Приветствую тебя в замке <img src='i/klan/<?= $castleOwners['short'] ?>.gif'> <?= $castleOwners['name'] ?>, воин!</h3>
|
||||
<div style="text-align: right;">
|
||||
<button onClick="hrefToFrame('city.php?bps')">Вернуться</button>
|
||||
</div>
|
||||
<div><?php if (!empty($status)) err($status); ?></div>
|
||||
|
||||
<?php
|
||||
if ($zam['value'] == $user['klan']) { ?>
|
||||
if ($castleOwners['id'] == $user['klan']) { ?>
|
||||
<h4>Приветствую в родной обители, собрат <b><?= $user['login'] ?>!</b></h4>
|
||||
<table width=100%>
|
||||
<TR>
|
||||
|
Loading…
Reference in New Issue
Block a user