Merge pull request 'header.tpl' (#4) from header.tpl into master
Reviewed-on: https://src.liks.pw/lopar/battles/pulls/4
|
@ -7,11 +7,11 @@
|
|||
|
||||
session_start();
|
||||
//require_once '../functions.php';
|
||||
if (empty($user['admin'])) {
|
||||
$user = new User($_SESSION['uid']);
|
||||
if (!$user->admin) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
exit;
|
||||
}
|
||||
header("Cache-Control: no-cache");
|
||||
|
||||
$al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc();
|
||||
|
||||
|
@ -64,35 +64,11 @@ if ($_POST['ali']) { //Что делает эта штука?
|
|||
db::c()->query('INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) VALUES ("?s","?s","?s","?s") ON DUPLICATE KEY UPDATE `img` = "?s", `name` = "?s", `accses` = "?s"', $_POST['ali'], $_POST['im'], $_POST['txt'], imp($accs), $_POST['im'], $_POST['txt'], imp($accs));
|
||||
}
|
||||
|
||||
if ($_POST['sbr_par']) {
|
||||
$sb_pers = db::c()->query('SELECT `id`, `nextup`, `level` FROM `users` WHERE `login` = "?s" LIMIT 1', $_POST['sbr_par'])->fetch_assoc_array();
|
||||
undressall($sb_pers['id']);
|
||||
$levelstats = statsat($sb_pers['nextup']);
|
||||
//Ох боюсь я за этот запрос!
|
||||
db::c()->query('
|
||||
UPDATE `users`
|
||||
SET `stats` = ?i, `sila` = ?i, `lovk` = ?i, `inta` = ?i, `intel` = ?i, `vinos` = ?i,
|
||||
`maxhp` = ?i, `master` = ?i, `noj` = ?i, `mec` = ?i, `topor` = ?i, `dubina` = ?i,
|
||||
`mlight` = ?i, `mgray` = ?i, `mdark` = ?i
|
||||
WHERE `id` = ?i',
|
||||
($levelstats['stats'] - 9), 3, 3, 3, 0, $levelstats['vinos'], ($levelstats['vinos'] * 6), $levelstats['master'], 0, 0, 0, 0, 0, 0, 0, $sb_pers['id']);
|
||||
echo "<span class='success'>Все прошло удачно. Персонаж может перераспределить параметры.</span>";
|
||||
}
|
||||
|
||||
$aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `align`');
|
||||
Template::header('ᐰdminка');
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel=stylesheet href="/css/main.css">
|
||||
<link rel=stylesheet href="/css/admin.css">
|
||||
<title>ᐰdmin</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action='admin.php' method='post'>
|
||||
<form method='post'>
|
||||
<fieldset>
|
||||
<legend><a href='#' onclick='show("sk")'>Склонности</a></legend>
|
||||
<div id=sk style='display:none;'>
|
||||
|
@ -196,7 +172,7 @@ $aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `al
|
|||
</fieldset>
|
||||
</form>
|
||||
|
||||
<form method=post action="admin.php">
|
||||
<form method=post>
|
||||
<fieldset>
|
||||
<legend><a href='#' onclick='show("sk3")'>Кланы</a></legend>
|
||||
<div id=sk3 style='display:none;'>
|
||||
|
@ -248,10 +224,6 @@ $aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `al
|
|||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form method=post>
|
||||
<legend>Сброс параметров персонажа</legend>
|
||||
<input name='sbr_par' placeholder="Логин"> <input type=submit value='Применить'></form>
|
||||
|
||||
<form method=post>
|
||||
<legend><a href='#' onclick='show("sk2")'>Добавить вещь</a></legend>
|
||||
<div id=sk2 style='display:none;'>
|
||||
|
@ -871,8 +843,7 @@ if ($_POST['login'] && $_POST['krest']) {
|
|||
}
|
||||
if ($_POST['krest'] == -1) {
|
||||
db::c()->query('UPDATE `users` SET `align`="?s", `status`="?s" WHERE `login` = "?s" LIMIT 1;', '0', '', $_POST['login']);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
db::c()->query('UPDATE `users` SET `align` = "?s", `status` = "?s" WHERE `login` = "?s"', $_POST['krest'], $rang, $_POST['login']);
|
||||
}
|
||||
}
|
||||
|
@ -1126,6 +1097,3 @@ if ($_POST['login'] && $_POST['krest']) {
|
|||
return xmlHttp1;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -45,15 +45,8 @@ if ($del) {
|
|||
}
|
||||
db::c()->query('DELETE FROM `inventory` WHERE `id` = ?i', $del);
|
||||
}
|
||||
Template::header('ᐰdminка инвентаря');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ᐰdmin</title>
|
||||
</head>
|
||||
<link type="text/css" rel="stylesheet" href="../css/main.css">
|
||||
<body>
|
||||
<h1>Администрирование инвентаря <?php if (isset($_SESSION['player_name'])) echo $_SESSION['player_name']; ?></h1>
|
||||
<table class='adm'>
|
||||
<tr>
|
||||
|
@ -96,5 +89,3 @@ if ($del) {
|
|||
</th>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<?
|
||||
/**
|
||||
* Copyright (c) 2018.
|
||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||
* Project name: Battles-Game
|
||||
*/
|
||||
|
||||
require_once "../functions.php";
|
||||
$id = mysql_query("SELECT * FROM `clans`");
|
||||
$clans = mysql_num_rows($id);
|
||||
$check = 0;
|
||||
while($check++ < $clans) {
|
||||
$shor = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$check}' LIMIT 1"));
|
||||
$short = $shor['short'];
|
||||
$exp = mysql_fetch_row(mysql_query("SELECT `exp`, COUNT(*) FROM `users` WHERE `klan` = '{$short}'"));
|
||||
$id = mysql_query("SELECT `id` FROM `users` WHERE `klan` = '{$short}'");
|
||||
$kolvo_us = mysql_num_rows($id);
|
||||
echo "$exp[0];||$kolvo_us Q";
|
||||
$site_r_clan = 0; // рейтинг клан сайта
|
||||
$fight_r_clan = 0; // боевой рейтинг клана
|
||||
$grash_point = 0; // очки гражданства
|
||||
$Clan_ration = (($exp/$kolvo_us)+($site_r_clan*100000))+$fight_r_clan+$grash_point;
|
||||
$l_p = mysql_query("UPDATE `clans` SET `rating` = 'Clan_ration' WHERE `id` = '{$check}'");
|
||||
if($l_p) {
|
||||
echo "Клановый рейтинг для клана '$short' удачно обновлен";
|
||||
}
|
||||
}
|
||||
|
101
akadem.php
|
@ -1,16 +1,23 @@
|
|||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
require_once 'functions.php';
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['room'] != 61) {
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? null;
|
||||
if ($user->room != 61) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
if ($user['battle'] != 0) {
|
||||
if ($user->battle) {
|
||||
header('location: fight.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
const SMITH = 'оружейник';
|
||||
const MERCENARY = 'наёмник';
|
||||
const MEDIC = 'лекарь';
|
||||
|
||||
$status = 'Внимание! Моментальная оплата без подтверждения!';
|
||||
$get = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
||||
|
@ -19,57 +26,71 @@ function setProfession($name, $type, $needMoney, $needLevel)
|
|||
{
|
||||
global $user;
|
||||
$profId = 0;
|
||||
if (!in_array($name, ['оружейник', 'наёмник', 'лекарь'])) return 'Такой профессии не существует!';
|
||||
if ($user['money'] < $needMoney) return 'Недостаточно денег!';
|
||||
if ($user['level'] < $needLevel) return 'Ваш уровень ещё мал для этой профессии!';
|
||||
if (!empty($user['prof1']) AND $type == 1) return 'Ошибка! У вас уже есть другая мирная профессия!';
|
||||
if (!empty($user['prof2']) AND $type == 2) return 'Ошибка! У вас уже есть другая боевая профессия!';
|
||||
if ($name == 'оружейник') $profId = 1;
|
||||
if ($name == 'наёмник') $profId = 21;
|
||||
if ($name == 'лекарь') $profId = 22;
|
||||
if (!empty($profId)) {
|
||||
try {
|
||||
db::c()->query('UPDATE `users` SET ?f = ?i, `money` = `money` - ?i WHERE `id` = ?i', 'prof' . $type, $profId, $needMoney, $_SESSION['uid']);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
$status = null;
|
||||
if (!in_array($name, [SMITH, MERCENARY, MEDIC])) {
|
||||
$status = 'Такой профессии не существует!';
|
||||
}
|
||||
if ($user['money'] < $needMoney) {
|
||||
$status = 'Недостаточно денег!';
|
||||
}
|
||||
if ($user['level'] < $needLevel) {
|
||||
$status = 'Ваш уровень ещё мал для этой профессии!';
|
||||
}
|
||||
if (!empty($user['prof1']) && $type == 1) {
|
||||
$status = 'Ошибка! У вас уже есть другая мирная профессия!';
|
||||
}
|
||||
if (!empty($user['prof2']) && $type == 2) {
|
||||
$status = 'Ошибка! У вас уже есть другая боевая профессия!';
|
||||
}
|
||||
if ($name == SMITH && !$status) {
|
||||
$profId = 1;
|
||||
}
|
||||
if ($name == MERCENARY && !$status) {
|
||||
$profId = 21;
|
||||
}
|
||||
if ($name == MEDIC && !$status) {
|
||||
$profId = 22;
|
||||
}
|
||||
if (!empty($profId)) {
|
||||
$user->money -= $needMoney;
|
||||
Bank::setWalletMoney($user->money, $user->id);
|
||||
db::c()->query('UPDATE `users` SET ?f = ?i WHERE `id` = ?i', 'prof' . $type, $profId, $user->id);
|
||||
$deloText = "{$user['login']} купил профессию «{$name}» в академии за {$needMoney} кр.";
|
||||
addToDelo($deloText);
|
||||
$user['prof' . $type] = true;
|
||||
$user['money'] -= $needMoney;
|
||||
return 'Вы получили профессию!';
|
||||
} else return 'Что-то пошло не так...';
|
||||
$status = 'Вы получили профессию!';
|
||||
} else {
|
||||
$status = 'Что-то пошло не так...';
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
if ($get == 'smith') $status = setProfession('оружейник', 1, 300, 3);
|
||||
if ($get == 'mercenary') $status = setProfession('наёмник', 2, 700, 5);
|
||||
if ($get == 'medic') $status = setProfession('лекарь', 2, 700, 5);
|
||||
if ($get == 'smith') {
|
||||
$status = setProfession(SMITH, 1, 300, 3);
|
||||
}
|
||||
if ($get == 'mercenary') {
|
||||
$status = setProfession(MERCENARY, 2, 700, 5);
|
||||
}
|
||||
if ($get == 'medic') {
|
||||
$status = setProfession(MEDIC, 2, 700, 5);
|
||||
}
|
||||
|
||||
if ($get == 'exit') {
|
||||
try {
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 2702, `online`.`room` = 2702 WHERE `users`.`id` = ?i AND `online`.`id` = ?i', $_SESSION['uid'], $_SESSION['uid']);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
}
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 2702, `online`.`room` = 2702 WHERE `users`.`id` = ?i AND `online`.`id` = ?i', $user->id, $user->id);
|
||||
header('Location: city.php');
|
||||
}
|
||||
Template::header('Академия');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href="css/main.css" rel="stylesheet">
|
||||
<link href="css/secondary.css" rel="stylesheet"/>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="float: right;">
|
||||
<button onclick="location.href='?exit'">Вернуться</button>
|
||||
</div>
|
||||
<h1>Академия</h1>
|
||||
<div><?php if (!empty($status)) err($status); ?></div>
|
||||
<div><?= $status ?></div>
|
||||
<div class="appblock appblock-main">
|
||||
<span class="legend">Информация</span>
|
||||
<span class="wrap">Кредиты<span class="num"><?= $user['money'] ?></span></span>
|
||||
<span class="wrap">Уровень персонажа<span class="num"><?= $user['level'] ?></span></span>
|
||||
<span class="wrap">Кредиты<span class="num"><?= $user->money ?></span></span>
|
||||
<span class="wrap">Уровень персонажа<span class="num"><?= $user->level ?></span></span>
|
||||
</div>
|
||||
<div class="appblock">
|
||||
<span class="legend">Наёмник</span>
|
||||
|
@ -139,5 +160,3 @@ if ($get == 'exit') {
|
|||
Алхимик может создавать новые зелья используя расходные материалы. Мирная профессия.
|
||||
</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include("config.php");
|
||||
include("functions.php");
|
||||
|
||||
require_once "functions.php";
|
||||
|
||||
$start = db::c()->query('SELECT `value` FROM `variables` WHERE `var` = "arena_of_gods"')->fetch_assoc();
|
||||
$is_now = db::c()->query('SELECT `id` FROM `battle` WHERE `aren_of` = 1 AND `win` = 3 ORDER BY `id` DESC')->fetch_assoc();
|
||||
|
@ -19,8 +20,8 @@ function join_arena($u, $btl, $team, $at)
|
|||
$ak = array_keys($battle[$at]);
|
||||
$battle[$u] = $battle[$ak[0]];
|
||||
foreach ($battle[$u] as $k => $v) {
|
||||
$battle[$u][$k] = array(0, 0, time());
|
||||
$battle[$k][$u] = array(0, 0, time());
|
||||
$battle[$u][$k] = [0, 0, time()];
|
||||
$battle[$k][$u] = [0, 0, time()];
|
||||
}
|
||||
if ($team == 1) {
|
||||
$adtxt = 'За сторону <b>Тьмы</b>.';
|
||||
|
@ -35,9 +36,9 @@ function join_arena($u, $btl, $team, $at)
|
|||
|
||||
function aligntype($a)
|
||||
{
|
||||
$lightaligns = array("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9");
|
||||
$darkaligns = array("2.2", "3", "8.21");
|
||||
$neutralaligns = array("2", "8.31");
|
||||
$lightaligns = ["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9"];
|
||||
$darkaligns = ["2.2", "3", "8.21"];
|
||||
$neutralaligns = ["2", "8.31"];
|
||||
if (in_array($a, $lightaligns)) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -125,15 +126,9 @@ if (isset($_GET['append'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Template::header('Арена Ангелов');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href="css/main.css" rel="stylesheet"/>
|
||||
<link href="css/fight.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<style>
|
||||
.hs {
|
||||
font-weight: bold;
|
||||
|
@ -212,7 +207,6 @@ if (isset($_GET['append'])) {
|
|||
color: Red;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<h1>Арена Ангелов</h1>
|
||||
<div class="contentContainer">
|
||||
<div class="buttonContainer">
|
||||
|
@ -223,12 +217,14 @@ if (isset($_GET['append'])) {
|
|||
<div class="credenzaItem">
|
||||
<? if (!isset($is_now['id'])) { ?>
|
||||
<div class="credenza-stateCaption">
|
||||
<?=$winers?>.<br/>Следующая битва для 7-21 ур. состоится: <?=date("d.m.Y H:i", $start['value'])?>
|
||||
<?= $winers ?>.<br/>Следующая битва для 7-21 ур.
|
||||
состоится: <?= date("d.m.Y H:i", $start['value']) ?>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<div class="credenza-stateCaption">
|
||||
<h2>Идет сражение [7-21 уровни]</h2>
|
||||
<br/><a href="/logs.php?log=<?=$is_now['id']?>" target="_blank" style="text-align: center;">ход боя »»</a>
|
||||
<br/><a href="/logs.php?log=<?= $is_now['id'] ?>" target="_blank" style="text-align: center;">ход
|
||||
боя »»</a>
|
||||
</div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody>
|
||||
|
@ -251,6 +247,4 @@ if (isset($_GET['append'])) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? if (!empty($error)) err($error); ?>
|
||||
</body>
|
||||
</html>
|
||||
<?= $error ?>
|
48
ashop.php
|
@ -1,16 +1,20 @@
|
|||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user['room'] != 50) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user['battle'] != 0) {
|
||||
require_once 'functions.php';
|
||||
|
||||
if ($user->room != 50) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id`=?i', $_SESSION['uid'])->fetch_assoc();
|
||||
|
@ -34,11 +38,12 @@ while ($row = $shopItems->fetch_assoc()) {
|
|||
if (!empty($_GET['buy'])) {
|
||||
$dress = db::c()->query('SELECT * FROM `ashop` WHERE `id`=?i', $_GET['buy'])->fetch_assoc();
|
||||
$itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE `owner` = ?i AND `setsale` = 0', $user['id'])->fetch_assoc();
|
||||
if (($dress['massa'] + $itemWeight['m']) > (get_meshok())) $status = 'Недостаточно места в рюкзаке.';
|
||||
elseif ($bank['ekr'] >= $dress['ecost'] AND ($dress['count'] > 0 OR $dress['count'] == -1)) {
|
||||
|
||||
if (($dress['massa'] + $itemWeight['m']) > (get_meshok())) {
|
||||
$status = 'Недостаточно места в рюкзаке.';
|
||||
} elseif ($bank['ekr'] >= $dress['ecost'] && ($dress['count'] > 0 || $dress['count'] == -1)) {
|
||||
$goden = '';
|
||||
if (isset($dress['goden'])) $goden = $dress['goden'] * 24 * 60 * 60 + time(); // Ну вот нахуя?
|
||||
if (isset($dress['goden'])) {
|
||||
$goden = $dress['goden'] * 24 * 60 * 60 + time(); // Ну вот нахуя?}
|
||||
db::c()->query('
|
||||
INSERT INTO `inventory`
|
||||
(
|
||||
|
@ -59,11 +64,11 @@ if (!empty($_GET['buy'])) {
|
|||
$dress['nlevel'], $dress['nalign'], $goden, $dress['goden'], $dress['razdel'], $dress['artefact'], $dress['koll']);
|
||||
|
||||
$inventoryItemId = db::c()->getLastInsertId();
|
||||
if ($dress['count'] != -1) db::c()->query('UPDATE `ashop` SET `count` = `count`- 1 WHERE `id` = ?i', $_GET['buy']);
|
||||
|
||||
if ($dress['count'] != -1) {
|
||||
db::c()->query('UPDATE `ashop` SET `count` = `count`- 1 WHERE `id` = ?i', $_GET['buy']);
|
||||
}
|
||||
$deloText = "{$user['login']} купил товар «{$dress['name']}» id:({$inventoryItemId}) в магазине «Берёзка» за {$dress['ecost']} екр.";
|
||||
addToDelo($deloText);
|
||||
|
||||
$status = "Вы купили «{$dress['name']}» за {$dress['ecost']} екр.";
|
||||
db::c()->query('UPDATE `bank` SET `ekr` = `ekr` - ?i WHERE `id` = ?i', $dress['ecost'], $_SESSION['uid']);
|
||||
// Для обновления данных о деньгах на странице
|
||||
|
@ -134,18 +139,12 @@ switch ($shopCategoryTypeNumber) {
|
|||
$shopCategory = "Букеты";
|
||||
break;
|
||||
}
|
||||
Template::header('Берёзка');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href="css/main.css" rel="stylesheet"/>
|
||||
<script src="js/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Магазин Берёзка</h1>
|
||||
<a href=# onclick=hrefToFrame('city.php?cp')> ← выйти на Центральную площадь</a>
|
||||
<div><?php if (!empty($status)) err($status); ?></div>
|
||||
<div><?= $status ?></div>
|
||||
<table border=0 width=100% cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td valign=top align=left>
|
||||
|
@ -198,5 +197,4 @@ switch ($shopCategoryTypeNumber) {
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php } ?>
|
15
bank.php
|
@ -23,6 +23,7 @@ if ($get == 'exit') {
|
|||
$_SESSION[BANK_SESSION_NAME] = null;
|
||||
}
|
||||
$bank = new Bank($user->id);
|
||||
$status = '';
|
||||
|
||||
if (isset($_POST['userlogin'])) {
|
||||
$_SESSION[BANK_SESSION_NAME] = $bank->user_id;
|
||||
|
@ -31,7 +32,6 @@ if ($_SESSION[BANK_SESSION_NAME]) {
|
|||
$toid = (int)$_POST['to_id'] ?? 0;
|
||||
$summa = (int)$_POST['summa'] ?? 0;
|
||||
$submit = $_POST['action'] ?? '';
|
||||
$status = '';
|
||||
// Зачисление кредитов на счёт.
|
||||
if ($submit === 'depositMoney' && $summa) {
|
||||
$bank->depositMoney($summa);
|
||||
|
@ -49,17 +49,10 @@ if ($_SESSION[BANK_SESSION_NAME]) {
|
|||
}
|
||||
unset($submit, $summa, $toid);
|
||||
}
|
||||
Template::header('Банк');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link href="css/main.css" rel="stylesheet"/>
|
||||
<link href="css/secondary.css" rel="stylesheet"/>
|
||||
<script src="js/main.js"></script>
|
||||
<title>Банк</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Банк</h1>
|
||||
<?php if (!$_SESSION[BANK_SESSION_NAME]): ?>
|
||||
<a href=# onclick=hrefToFrame('city.php?strah')> ← выйти из банка</a>
|
||||
|
@ -94,8 +87,6 @@ if ($_SESSION[BANK_SESSION_NAME]) {
|
|||
<input type="hidden" name="action" value="sendMoney">
|
||||
<input type="submit" value="Перевести кредиты">
|
||||
</form>
|
||||
<span class="wrap">Комиссия: <?= Bank::BANK_COMISSION * 100 ?>% от переводимой суммы, но не менее 1 кр.</span>
|
||||
<span class="wrap">Комиссия: <?= Config::$bank_comission * 100 ?>% от переводимой суммы, но не менее 1 кр.</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
36
buttons.php
|
@ -1,25 +1,18 @@
|
|||
<?php
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include_once "config.php";
|
||||
include_once "functions.php";
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
|
||||
$header = filter_input(INPUT_GET, 'header');
|
||||
$ch = filter_input(INPUT_GET, 'ch');
|
||||
require_once "functions.php";
|
||||
$header = $_GET['header'] ?? null;
|
||||
$ch = $_GET['ch'] ?? null;
|
||||
|
||||
if ($header) {
|
||||
die();
|
||||
exit;
|
||||
} elseif ($ch != null) {
|
||||
Template::header('buttons');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
<meta charset="utf-8"/>
|
||||
<script type="text/javascript" src="js/ZeroClipboard.js"></script>
|
||||
<script language="JavaScript" src="js/ch.js"></script>
|
||||
<script language="JavaScript" src="js/sl2.js"></script>
|
||||
<script language="JavaScript" src="js/chat.js"></script>
|
||||
|
@ -212,8 +205,6 @@ if ($header) {
|
|||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body marginheight=0 marginwidth=0">
|
||||
<div id="fixednew"
|
||||
style="position: fixed; margin: -3px; padding: 0; z-index: 999; width: 100%; text-align: center; overflow: auto;">
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
|
@ -244,10 +235,7 @@ if ($header) {
|
|||
<div id="oMenu" style="position: absolute; border:1px solid #666; background-color:#CCC; display:none; "></div>
|
||||
<div id="ClearMenu" style="position: absolute; border:1px solid #666; background-color: #e2e0e0; display: none;"></div>
|
||||
|
||||
<? } else { ?>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-type"/>
|
||||
<? } else { Template::header(buttons); ?>
|
||||
<script language="JavaScript" src="js/chat.js"></script>
|
||||
<script language="JavaScript">
|
||||
|
||||
|
@ -313,8 +301,6 @@ if ($header) {
|
|||
document.F1.om.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function subm() {
|
||||
t = top.frames['chat'].currenttab;
|
||||
$('input[name="chtype"]:hidden').val(t);
|
||||
|
@ -440,10 +426,6 @@ if ($header) {
|
|||
|
||||
window.onresize = rslength;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body marginheight=0 marginwidth=0 bgcolor=#E6E6E6 onload="top.strt();"> <!-- rslength(); -->
|
||||
|
||||
<form action="ch.php" target="refreshed" method="GET" name="F1" id="F1" onsubmit="subm(); top.NextRefreshChat();">
|
||||
<input type="hidden" name="color" value="000000"/>
|
||||
<input type="hidden" name="sys" value=""/>
|
||||
|
@ -552,5 +534,3 @@ if ($header) {
|
|||
</script>
|
||||
</FORM>
|
||||
<? } ?>
|
||||
</body>
|
||||
</html>
|
20
buy.php
|
@ -1,29 +1,29 @@
|
|||
<?php
|
||||
//Покупка абилок? Тут?!
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) die();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: Index.php');
|
||||
exit;
|
||||
}
|
||||
include('config.php');
|
||||
#include('functions.php');
|
||||
$is_now = db::c()->query('SELECT `id`, `uid` FROM `abils_user` WHERE `uid` = ?i', $user['id'])->fetch_assoc();
|
||||
|
||||
function add_user_abil($ab, $cost)
|
||||
{
|
||||
global $user, $banks;
|
||||
if (isset($ab)) {
|
||||
if ($banks['ekr'] >= $cost) {
|
||||
if (isset($ab) && $banks['ekr'] >= $cost) {
|
||||
$isset = mysql_fetch_array(mysql_query('SELECT `id`, `' . $ab . '` FROM `abils_user` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||
$isset[$ab] += 1;
|
||||
mysql_query('UPDATE `abils_user` SET `' . $ab . '` = "' . $isset[$ab] . '" WHERE `uid` = "' . $user['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `abils_user` SET `' . $ab . '` = "' . $isset[$ab] . '" WHERE `uid` = "' . $user['id'] . '"');
|
||||
$banks['ekr'] -= $cost;
|
||||
mysql_query('UPDATE `bank` SET `ekr` = "' . $banks['ekr'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `bank` SET `ekr` = "' . $banks['ekr'] . '" WHERE `id` = "' . $user['id'] . '"');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$cost = array(1, 2, 10, 0.50, 0.80, 1, 1, 0.10, 0.20, 4, 0.02, 20, 10, 1, 1);
|
||||
$mag = array('sleep15', 'sleep30', 'closebattle', 'heal20', 'heal35', 'heal50', 'travmoff', 'attack', 'bloodattack', 'death', 'comment', 'openbattle', 'reamdeath', 'clone', 'unclone');
|
||||
$cost = [1, 2, 10, 0.50, 0.80, 1, 1, 0.10, 0.20, 4, 0.02, 20, 10, 1, 1];
|
||||
$mag = ['sleep15', 'sleep30', 'closebattle', 'heal20', 'heal35', 'heal50', 'travmoff', 'attack', 'bloodattack', 'death', 'comment', 'openbattle', 'reamdeath', 'clone', 'unclone'];
|
||||
|
||||
if (isset($_POST['type'], $_POST['user'])) {
|
||||
if (isset($user['id'])) {
|
||||
|
@ -33,7 +33,7 @@ if (isset($_POST['type'], $_POST['user'])) {
|
|||
if ($banks['ekr'] >= $price) {
|
||||
if (isset($is_now['id'])) {
|
||||
if ($user['battle'] == 0) {
|
||||
if (add_user_abil($abil, $price) == true) {
|
||||
if (add_user_abil($abil, $price)) {
|
||||
echo 'success';
|
||||
} else {
|
||||
echo 'Error';
|
||||
|
|
29
buy_klan.php
|
@ -1,33 +1,30 @@
|
|||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
die();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
exit;
|
||||
}
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
require_once "functions.php";
|
||||
|
||||
if ($user['klan'] == '') {
|
||||
die();
|
||||
if (empty($user->clan)) {
|
||||
exit;
|
||||
}
|
||||
$is_now = db::c()->query('SELECT `id` FROM `abils_klan` WHERE `klan` = ?i', $user['klan'])->fetch_assoc();
|
||||
$clan = db::c()->query('SELECT `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc();
|
||||
$cost = array(1, 2, 10, 0.50, 0.80, 1, 1, 0.10, 0.20, 4, 0.02, 20, 10, 1, 1);
|
||||
$mag = array('sleep15', 'sleep30', 'closebattle', 'heal20', 'heal35', 'heal50', 'travmoff', 'attack', 'bloodattack', 'death', 'comment', 'openbattle', 'reamdeath', 'clone', 'unclone');
|
||||
$cost = [1, 2, 10, 0.50, 0.80, 1, 1, 0.10, 0.20, 4, 0.02, 20, 10, 1, 1];
|
||||
$mag = ['sleep15', 'sleep30', 'closebattle', 'heal20', 'heal35', 'heal50', 'travmoff', 'attack', 'bloodattack', 'death', 'comment', 'openbattle', 'reamdeath', 'clone', 'unclone'];
|
||||
|
||||
function add_klan_abil($ab, $cost)
|
||||
{
|
||||
global $user, $banks;
|
||||
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `glava` FROM `clans` WHERE `id` = "' . $user['klan'] . '" LIMIT 1'));
|
||||
if (isset($ab)) {
|
||||
if ($banks['ekr'] >= $cost && $clan['glava'] == $user['id']) {
|
||||
$isset = mysql_fetch_array(mysql_query('SELECT `id`, `' . $ab . '` FROM `abils_klan` WHERE `klan` = "' . $user['klan'] . '" LIMIT 1'));
|
||||
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `glava` FROM `clans` WHERE `id` = "' . $user['klan'] . '"'));
|
||||
if (isset($ab) && $banks['ekr'] >= $cost && $clan['glava'] == $user['id']) {
|
||||
$isset = mysql_fetch_array(mysql_query('SELECT `id`, `' . $ab . '` FROM `abils_klan` WHERE `klan` = "' . $user['klan'] . '"'));
|
||||
$isset[$ab] += 1;
|
||||
mysql_query('UPDATE `abils_klan` SET `' . $ab . '` = "' . $isset[$ab] . '" WHERE `klan` = "' . $user['klan'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `abils_klan` SET `' . $ab . '` = "' . $isset[$ab] . '" WHERE `klan` = "' . $user['klan'] . '"');
|
||||
$banks['ekr'] -= $cost;
|
||||
mysql_query('UPDATE `bank` SET `ekr` = "' . $banks['ekr'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `bank` SET `ekr` = "' . $banks['ekr'] . '" WHERE `id` = "' . $user['id'] . '"');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -39,7 +36,7 @@ if (isset($_POST['type'], $_POST['user'])) {
|
|||
if ($banks['ekr'] >= $price && $user['id'] == $clan['glava']) {
|
||||
if (isset($is_now['id'])) {
|
||||
if ($user['battle'] == 0) {
|
||||
if (add_klan_abil($abil, $price) == true) {
|
||||
if (add_klan_abil($abil, $price)) {
|
||||
echo 'success';
|
||||
} else {
|
||||
echo 'Error';
|
||||
|
|
50
c_forest.php
|
@ -1,28 +1,27 @@
|
|||
<?
|
||||
session_start();
|
||||
require_once('functions.php');
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
if ($user['room'] == 51) {
|
||||
if ($user->room == 51) {
|
||||
header('location: city.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
$forest = db::c()->query('SELECT `id`, `room`, `room_id`, `time`, `user`, `data` FROM `forest` WHERE `user` = ?i', $user['id'])->fetch_assoc();
|
||||
$error = '';
|
||||
$map_page = '';
|
||||
|
||||
if (empty($forest['id'])) {
|
||||
die('Ошибка. Сообщите Администрации. Код ошибки : 00.');
|
||||
exit('Ошибка. Сообщите Администрации. Код ошибки : 00.');
|
||||
}
|
||||
|
||||
function loadmap_cell()
|
||||
{
|
||||
global $forest;
|
||||
$dat = unserialize($forest['data']);
|
||||
$dat = ['Up' => $dat[$forest['room']]['Up'], 'Down' => $dat[$forest['room']]['Down'], 'Left' => $dat[$forest['room']]['Left'], 'Right' => $dat[$forest['room']]['Right']];
|
||||
return $dat;
|
||||
return ['Up' => $dat[$forest['room']]['Up'], 'Down' => $dat[$forest['room']]['Down'], 'Left' => $dat[$forest['room']]['Left'], 'Right' => $dat[$forest['room']]['Right']];
|
||||
}
|
||||
|
||||
$map_user = loadmap_cell();
|
||||
|
@ -73,33 +72,40 @@ if ($_GET['move'] == 'true') {
|
|||
} else {
|
||||
$error = 'Not in this life';
|
||||
}
|
||||
if (empty($error)) db::c()->query('UPDATE `forest` SET `room` = "?s", `room_id` = ?i WHERE `id` = ?i', $forest['room'], $forest['room_id'], $forest['id']);
|
||||
if (empty($error)) {
|
||||
db::c()->query('UPDATE `forest` SET `room` = "?s", `room_id` = ?i WHERE `id` = ?i', $forest['room'], $forest['room_id'], $forest['id']);
|
||||
}
|
||||
if ($map_user['Right'] == 1) $map_page = <<<MAP
|
||||
}
|
||||
if ($map_user['Right'] == 1) {
|
||||
$map_page = <<<MAP
|
||||
<img style="position: absolute; bottom: 30px; left: 740px; cursor: pointer; width: 20px; height: 117px;"
|
||||
class="pngimg" src="i/forest/pointer_2.png" title="{$var_map['cell_' . ($forest['room_id'] + 1)]}"
|
||||
onclick="location.href='?move=true&Dir=Right';"/>
|
||||
onclick="location.href='?move=true&Dir=Right';" alt="Вправо">
|
||||
MAP;
|
||||
if ($map_user['Left'] == 1) $map_page = <<<MAP
|
||||
}
|
||||
if ($map_user['Left'] == 1) {
|
||||
$map_page = <<<MAP
|
||||
<img style="position: absolute; bottom: 30px; left: 20px; cursor: pointer; width: 20px; height: 117px; "
|
||||
class="pngimg" src="i/forest/pointer_6.png" title="{$var_map['cell_' . ($forest['room_id'] - 1)]}"
|
||||
onclick="location.href='?move=true&Dir=Left';"/>
|
||||
onclick="location.href='?move=true&Dir=Left';" alt="Влево">
|
||||
MAP;
|
||||
if ($map_user['Down'] == 1) $map_page = <<<MAP
|
||||
}
|
||||
if ($map_user['Down'] == 1) {
|
||||
$map_page = <<<MAP
|
||||
<img style="position: absolute; bottom: 10px; left: 332px; cursor: pointer; width: 117px; height: 20px;"
|
||||
class="pngimg" src="i/forest/pointer_4.png" title="{$var_map['cell_' . ($forest['room_id'] + 5)]}"
|
||||
onclick="location.href='?move=true&Dir=Down';"/>
|
||||
onclick="location.href='?move=true&Dir=Down';" alt="Вниз">
|
||||
MAP;
|
||||
if ($map_user['Up'] == 1) $map_page = <<<MAP
|
||||
}
|
||||
if ($map_user['Up'] == 1) {
|
||||
$map_page = <<<MAP
|
||||
<img style="position: absolute; bottom: 30px; left: 740px; cursor: pointer; width: 117px; height: 20px;"
|
||||
class="pngimg" src="i/forest/pointer_8.png" title="{$var_map['cell_' . ($forest['room_id'] + 5)]}"
|
||||
onclick="location.href='?move=true&Dir=Up';"/>
|
||||
onclick="location.href='?move=true&Dir=Up';" alt="Вверх">
|
||||
MAP;
|
||||
}
|
||||
Template::header('forest');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<title>forest</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
||||
<style>
|
||||
.bt {
|
||||
|
@ -112,8 +118,6 @@ MAP;
|
|||
margin-right: 18px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ajaxContainer" style="display: none;"></div>
|
||||
<div class="contentContainer">
|
||||
<div class="buttonContainer">
|
||||
|
@ -136,5 +140,3 @@ MAP;
|
|||
<?= $map_page ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
275
c_haos.php
|
@ -1,35 +1,40 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (!($_SESSION['uid'] >0)) header("Location: index.php");
|
||||
include "config.php";
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include "functions.php";
|
||||
if ($user->room != 600) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}';"));
|
||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||
$wait_msg = "Ждем подтверждения от всей группы...";
|
||||
|
||||
function getPass($length = 6)
|
||||
/** Генерация случайного пароля через хэш случайной строки.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getPass():string
|
||||
{
|
||||
$chars = 'abcdefghijklmnopqrstyvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789';
|
||||
$numChars = strlen($chars);
|
||||
$string = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$string .= substr($chars, rand(1, $numChars) - 1, 1);
|
||||
}
|
||||
return $string;
|
||||
return hash('crc32', mt_rand());
|
||||
}
|
||||
|
||||
if(!$in_haos)
|
||||
{
|
||||
if (!$in_haos) {
|
||||
mysql_query("INSERT INTO cit_haos_status(id) values('{$user['id']}');");
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
}
|
||||
include "functions.php";
|
||||
$pass_s=getPass(6);
|
||||
if ($user['room'] != 600) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($_POST['pay'])
|
||||
{
|
||||
|
||||
$pass_s = getPass();
|
||||
|
||||
if ($_POST['pay']) {
|
||||
if (!$_POST['pay_gr']) $_POST['pay_gr'] = 1;
|
||||
$group_num = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$_POST['pay_gr']}';"));
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $_POST['pay_gr'] . "' LIMIT 1;"));
|
||||
|
@ -46,9 +51,7 @@
|
|||
($gps == $cit_haos_pl['password'] && strlen($cit_haos_pl['password']) > 1) ||
|
||||
(strlen($cit_haos_pl['players']) < 3)
|
||||
)
|
||||
)
|
||||
|
||||
{
|
||||
) {
|
||||
|
||||
mysql_query("UPDATE `cit_haos_status` SET `status` = '1',`group` = '{$_POST['pay_gr']}' WHERE `id` ='{$user['id']}'; ");
|
||||
mysql_query("UPDATE `users` set `money` = `money`- '20' WHERE id = '{$user['id']}';");
|
||||
|
@ -57,8 +60,7 @@
|
|||
if ($_POST['pay_gr'] > $cit_haos_gr)
|
||||
mysql_query("INSERT INTO `cit_haos_var`(`group`,`password`) values('" . $_POST['pay_gr'] . "','" . $pass_s . "');");
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $_POST['pay_gr'] . "' LIMIT 1;"));
|
||||
if(!in_array($user['id'],explode(";",$cit_haos_pl['players'])))
|
||||
{
|
||||
if (!in_array($user['id'], explode(";", $cit_haos_pl['players']))) {
|
||||
|
||||
if ($cit_haos_pl['players'] != '')
|
||||
$ch_pl_t = $cit_haos_pl['players'] . ";" . $user['id'];
|
||||
|
@ -66,114 +68,117 @@
|
|||
$ch_pl_t = $user['id'];
|
||||
mysql_query("UPDATE `cit_haos_var` SET `players`='{$ch_pl_t}' WHERE `group`='" . $_POST['pay_gr'] . "';");
|
||||
}
|
||||
}
|
||||
else ($pass_in_err="Неверный пароль!");
|
||||
} else ($pass_in_err = "Неверный пароль!");
|
||||
|
||||
else ($pay_err = "Недостаточно денег для подачи стартового взноса!");
|
||||
else ($pay_err = "Вы слишком ослаблены либо травмированы! ");
|
||||
else ($pay_err = "Группа уже набрана!");
|
||||
}
|
||||
if ($_POST['adm_start_raid'] && $user['id']==1256)
|
||||
{
|
||||
if ($_POST['adm_start_raid'] && $user['id'] == 1256) {
|
||||
mysql_query("DELETE FROM `cit_haos_status`;");
|
||||
mysql_query("DELETE FROM `cit_haos_var`;");
|
||||
AddChatSystem('<font color=red>Начинается прием заявок в рейд на Цитадель Хаоса! Начало рейда через 15 минут.</font>');
|
||||
$ch_time = time();
|
||||
mysql_query("UPDATE variables SET value='{$ch_time}' where var='cit_haos_time';");
|
||||
}
|
||||
if ($_POST['test_start_raid'] && $user['id']==1256)
|
||||
{
|
||||
if ($_POST['test_start_raid'] && $user['id'] == 1256) {
|
||||
mysql_query("DELETE FROM `cit_haos_status`;");
|
||||
mysql_query("DELETE FROM `cit_haos_var`;");
|
||||
// AddChatSystem('<font color=red>Начинается прием заявок в рейд на Цитадель Хаоса! Начало рейда через 15 минут.</font>');
|
||||
$ch_time = time();
|
||||
mysql_query("UPDATE variables SET value='{$ch_time}' where var='cit_haos_time';");
|
||||
}
|
||||
if ($in_haos['room'] != 0 && $in_haos['status'] == 2)
|
||||
{
|
||||
if ($in_haos['room'] != 0 && $in_haos['status'] == 2) {
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '601',`online`.`room` = '601' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
header('location: c_haos_in.php');
|
||||
|
||||
}
|
||||
if ($in_haos['status'] == 2)
|
||||
{
|
||||
if ($in_haos['status'] == 2) {
|
||||
$group_num = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';"));
|
||||
$group_ready = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE (`status` = '2' AND `group` = '{$in_haos['group']}');"));
|
||||
if($group_num==$group_ready && $group_ready>0)
|
||||
{
|
||||
if ($group_num == $group_ready && $group_ready > 0) {
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '601',`online`.`room` = '601' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
mysql_query("UPDATE `cit_haos_status` SET room='1' WHERE id = '{$user['id']}'; ");
|
||||
header('location: c_haos_in.php');
|
||||
};
|
||||
}
|
||||
}
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
Template::header('Цитадель Хаоса');
|
||||
?>
|
||||
<HTML><HEAD>
|
||||
<!-- JS -->
|
||||
<script>
|
||||
function refreshPeriodic()
|
||||
{
|
||||
function refreshPeriodic() {
|
||||
location.href = 'c_haos.php';//reload()
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
</script>
|
||||
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<META Http-Equiv=Cache-Control Content=no-cache>
|
||||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
||||
<META Http-Equiv=Expires Content=0>
|
||||
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#d4d4d4>
|
||||
|
||||
<TABLE border=0 width=600 cellspacing="0" cellpadding="0" align=left>
|
||||
|
||||
<tr><td><h3>Цитадель Хаоса</td></tr>
|
||||
<tr>
|
||||
<td><h3>Цитадель Хаоса</td>
|
||||
</tr>
|
||||
<?php
|
||||
$tm = time();
|
||||
$cit_haos_t = mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var` = 'cit_haos_time' LIMIT 1;"));
|
||||
if ($tm < $cit_haos_t['value'] || $tm > ($cit_haos_t['value'] + 900))//def 900
|
||||
{
|
||||
$tob_all=array();
|
||||
$tob_all = [];
|
||||
mysql_query("DELETE FROM `cit_haos_var` WHERE CHAR_LENGTH(players)<3;");
|
||||
|
||||
if ($in_haos['status']==1)
|
||||
{
|
||||
if ($in_haos['status'] == 1) {
|
||||
$dbb = mysql_query("SELECT * FROM `cit_haos_var`;");
|
||||
while($ch_tob=mysql_fetch_array($dbb))
|
||||
if(!in_array($ch_tob['players'],$tob_all))
|
||||
while ($ch_tob = mysql_fetch_array($dbb)) {
|
||||
if (!in_array($ch_tob['players'], $tob_all)) {
|
||||
$tob_all = $tob_all . ";" . $ch_tob['players'];
|
||||
foreach(explode(";",$tob_all) as $tob)
|
||||
}
|
||||
}
|
||||
foreach (explode(";", $tob_all) as $tob) {
|
||||
mysql_query("UPDATE `cit_haos_status` SET status='2' WHERE id = '{$tob}'; ");
|
||||
//header('location: c_haos.php');
|
||||
}
|
||||
}
|
||||
$tm = time();
|
||||
$test_tm = time() + 900;
|
||||
$show_tm = $cit_haos_t['value'] + 0.5 * 24 * 60 * 60;
|
||||
switch (date("N",$show_tm))
|
||||
{
|
||||
case 1:$d_o="в понедельник";break;
|
||||
case 2:$d_o="во вторник";break;
|
||||
case 3:$d_o="в среду";break;
|
||||
case 4:$d_o="в четверг";break;
|
||||
case 5:$d_o="в пятницу";break;
|
||||
case 6:$d_o="в субботу";break;
|
||||
case 7:$d_o="в воскресение";break;
|
||||
switch (date("N", $show_tm)) {
|
||||
default:
|
||||
case 1:
|
||||
$d_o = "в понедельник";
|
||||
break;
|
||||
case 2:
|
||||
$d_o = "во вторник";
|
||||
break;
|
||||
case 3:
|
||||
$d_o = "в среду";
|
||||
break;
|
||||
case 4:
|
||||
$d_o = "в четверг";
|
||||
break;
|
||||
case 5:
|
||||
$d_o = "в пятницу";
|
||||
break;
|
||||
case 6:
|
||||
$d_o = "в субботу";
|
||||
break;
|
||||
case 7:
|
||||
$d_o = "в воскресение";
|
||||
break;
|
||||
}
|
||||
if ($tm < $cit_haos_t['value']) {
|
||||
echo '<tr><td>Следующий рейд начнется <b>' . date("j.m </b> в <b> H:i</b>", $cit_haos_t['value']) . '</td></tr>';
|
||||
} else {
|
||||
echo '<tr><td>Готовьтесь! Следующий рейд будет <b>' . $d_o . '</td></tr>';
|
||||
}
|
||||
if($tm<$cit_haos_t['value'])echo '<tr><td>Следующий рейд начнется <b>'.date("j.m </b> в <b> H:i</b>",$cit_haos_t['value']).'</td></tr>';
|
||||
else echo '<tr><td>Готовьтесь! Следующий рейд будет <b>'.$d_o.'</td></tr>';
|
||||
echo '<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr>';
|
||||
if($user['id']==1256) echo '<tr><td><FORM action="c_haos.php" method=POST><INPUT TYPE="submit" value="Тест (Начать рейд)" name="test_start_raid"><br></FORM></td></tr>';
|
||||
if($user['id']==1256) echo '<tr><td><FORM action="c_haos.php" method=POST><INPUT TYPE="submit" value="Админ - Начать рейд" name="adm_start_raid"><br></FORM></td></tr>';
|
||||
if ($user['id'] == 1256) {
|
||||
echo '<tr><td><FORM method=POST><INPUT TYPE="submit" value="Тест (Начать рейд)" name="test_start_raid"><br></FORM></td></tr>
|
||||
<tr><td><FORM method=POST><INPUT TYPE="submit" value="Админ - Начать рейд" name="adm_start_raid"><br></FORM></td></tr>';
|
||||
}
|
||||
elseif ($in_haos['status']==0)
|
||||
{
|
||||
} elseif ($in_haos['status'] == 0) {
|
||||
$cit_haos_gr = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_var`;"));
|
||||
if($cit_haos_gr==0)
|
||||
{
|
||||
$pass_s=getPass(6);
|
||||
if ($cit_haos_gr == 0) {
|
||||
$pass_s = getPass();
|
||||
mysql_query("INSERT INTO `cit_haos_var`(`group`,`password`) values('1','{$pass_s}');");
|
||||
$cit_haos_gr = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_var`;"));
|
||||
}
|
||||
|
@ -183,97 +188,81 @@ elseif ($in_haos['status']==0)
|
|||
echo '<tr><td>' . $pass_in_err . '<br />';
|
||||
$check_em = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group`=1 ;"));
|
||||
|
||||
if($check_em<1)
|
||||
{
|
||||
if ($check_em < 1) {
|
||||
$i = 1;
|
||||
echo('<INPUT TYPE="radio" value="'.$i.'" name="pay_gr">Группа '.$i.":");
|
||||
echo '<INPUT TYPE="radio" value="' . $i . '" name="pay_gr">Группа ' . $i . ":";
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $i . "' LIMIT 1;"));
|
||||
if($cit_haos_pl['players']!='')
|
||||
{
|
||||
foreach(explode(";",$cit_haos_pl['players']) as $ch_p)
|
||||
echo(Nick::id($ch_p)->full(1).",");
|
||||
echo('Пароль:<input type="text" size="10" NAME="gr_pass_in'.$i.'">');
|
||||
if ($cit_haos_pl['players'] != '') {
|
||||
foreach (explode(";", $cit_haos_pl['players']) as $ch_p) {
|
||||
echo Nick::id($ch_p)->full(1) . ",";
|
||||
}
|
||||
echo 'Пароль:<input type="text" size="10" NAME="gr_pass_in' . $i . '">';
|
||||
} else {
|
||||
echo ' <em>(Создать новую группу)</em>';
|
||||
}
|
||||
|
||||
else echo(' <em>(Создать новую группу)</em>');
|
||||
echo '<BR>';
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
for($i=1;$i<=$cit_haos_gr+1;$i++)
|
||||
{
|
||||
echo('<INPUT TYPE="radio" value="'.$i.'" name="pay_gr">Группа '.$i.":");
|
||||
} else {
|
||||
for ($i = 1; $i <= $cit_haos_gr + 1; $i++) {
|
||||
echo '<INPUT TYPE="radio" value="' . $i . '" name="pay_gr">Группа ' . $i . ":";
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $i . "' LIMIT 1;"));
|
||||
if(strlen($cit_haos_pl['players'])>1)
|
||||
{
|
||||
foreach(explode(";",$cit_haos_pl['players']) as $ch_p)
|
||||
echo(Nick::id($ch_p)->full(1).",");
|
||||
echo('Пароль:<input type="text" size="10" NAME="gr_pass_in'.$i.'">');
|
||||
if (strlen($cit_haos_pl['players']) > 1) {
|
||||
foreach (explode(";", $cit_haos_pl['players']) as $ch_p) {
|
||||
echo Nick::id($ch_p)->full(1) . ",";
|
||||
}
|
||||
echo 'Пароль:<input type="text" size="10" NAME="gr_pass_in' . $i . '">';
|
||||
} else {
|
||||
echo ' <em>(Создать новую группу)</em>';
|
||||
}
|
||||
else echo(' <em>(Создать новую группу)</em>');
|
||||
echo '<BR />';
|
||||
}
|
||||
|
||||
|
||||
echo '<INPUT TYPE="submit" value="Вступить" name="pay"></FORM>';
|
||||
if($pay_err) echo ($pay_err);
|
||||
echo '<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr>';
|
||||
}
|
||||
elseif ($in_haos['status']==1)
|
||||
{
|
||||
//echo '<tr><td><FORM action="c_haos.php" method=POST>Начать первый рейд: <INPUT TYPE="submit" value="Готов!" name="join_raid"></FORM></td></tr>';
|
||||
echo '<INPUT TYPE="submit" value="Вступить" name="pay"></FORM>';
|
||||
if ($pay_err) {
|
||||
echo $pay_err;
|
||||
}
|
||||
echo '<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr>';
|
||||
} elseif ($in_haos['status'] == 1) {
|
||||
echo '<tr><td><FORM action="c_haos.php" method=POST>Начать первый рейд: <INPUT TYPE="submit" value="Готов!" name="join_raid"></FORM></td></tr>';
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $in_haos['group'] . "' LIMIT 1;"));
|
||||
echo '<tr><td>Рейд начинается <b>' . date("j.m </b> в <b> H:i</b>", $cit_haos_t['value'] + 900) . '</td></tr>';
|
||||
echo("<tr><td>Ждем начала рейда...<br /></td></tr>");
|
||||
echo("<tr><td>Ваша группа ");
|
||||
if($cit_haos_pl['password']!='')
|
||||
echo(":: <strong>Пароль - [".$cit_haos_pl['password']."]</strong> <br />");
|
||||
//else
|
||||
//echo(" - <em>без пароля</em><br />");
|
||||
if($pass_err) echo($pass_err."<br />");
|
||||
echo "<tr><td>Ждем начала рейда...<br /></td></tr>";
|
||||
echo "<tr><td>Ваша группа ";
|
||||
if (!empty($cit_haos_pl['password'])) {
|
||||
echo ":: <strong>Пароль - [" . $cit_haos_pl['password'] . "]</strong> <br />";
|
||||
}
|
||||
if ($pass_err) {
|
||||
echo $pass_err . "<br />";
|
||||
}
|
||||
$num = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group`='" . $in_haos['group'] . "';"));
|
||||
echo("<br /><b>".$num."</b> из <b>4</b>");
|
||||
//if($num==1) echo (" - <strong>Группа не набрана</strong>");
|
||||
/*else*/if($num==4) echo (" - <strong>Группа заполнена</strong>");
|
||||
echo("<br />");
|
||||
echo "<br /><b>" . $num . "</b> из <b>4</b>";
|
||||
if ($num == 4) {
|
||||
echo " - <strong>Группа заполнена</strong>";
|
||||
}
|
||||
echo "<br />";
|
||||
$cit_haos_pl = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $in_haos['group'] . "' LIMIT 1;"));
|
||||
foreach(explode(";",$cit_haos_pl['players']) as $ch_p)
|
||||
echo(Nick::id($ch_p)->full(1)."<br />");
|
||||
|
||||
echo("</td></tr>");
|
||||
foreach (explode(";", $cit_haos_pl['players']) as $ch_p) {
|
||||
echo Nick::id($ch_p)->full(1) . "<br />";
|
||||
}
|
||||
elseif ($in_haos['status']==2)
|
||||
{
|
||||
echo "</td></tr>";
|
||||
} elseif ($in_haos['status'] == 2) {
|
||||
echo '<tr><td>';
|
||||
if($wait_msg) echo ($wait_msg);
|
||||
echo'</td></tr>';
|
||||
|
||||
//echo '<tr><td><FORM action="c_haos.php" method=POST>Еще рейд: <INPUT TYPE="submit" value="Группа 1" name="join_raid"></FORM></td></tr>';
|
||||
header('location: c_haos_in.php');
|
||||
if ($wait_msg) {
|
||||
echo $wait_msg;
|
||||
}
|
||||
elseif ($in_haos['status']==4)
|
||||
{
|
||||
echo '</td></tr>';
|
||||
header('location: c_haos_in.php');
|
||||
} elseif ($in_haos['status'] == 4) {
|
||||
mysql_query("DELETE FROM `cit_haos_status` WHERE `id` ='{$user['id']}'; ");
|
||||
echo '<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr>';
|
||||
}
|
||||
elseif ($in_haos['status']==5)
|
||||
{
|
||||
} elseif ($in_haos['status'] == 5) {
|
||||
mysql_query("UPDATE users SET `doblest`=`doblest`+'1' WHERE `id` = '" . $user['id'] . "';");
|
||||
addchp('За убийство босса ЦХ вы получили 1 доблести', '{[]}' . Nick::id($user['id'])->short() . '{[]}');
|
||||
mysql_query("INSERT INTO `delo` (`id` , `author` ,`pers`, `text`, `type`, `date`)
|
||||
VALUES ('','0','{$cur_user['id']}','\"" . $user['login'] . "\" получил в ЦХ 1 доблести',1,'" . time() . "');");
|
||||
mysql_query("DELETE FROM `cit_haos_status` WHERE `id` ='{$user['id']}'; ");
|
||||
header('location: c_haos.php');
|
||||
/*echo '<tr><td><FORM action="c_haos.php" method=POST>Начать новый рейд: <INPUT TYPE="submit" value="Готов!" name="join_raid"></FORM></td></tr>';*/
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
<div align=right><img width="260" src="i/zitadel/1.jpg"/></div>
|
||||
<?php
|
||||
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
271
c_haos_in.php
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (!($_SESSION['uid'] >0)) header("Location: index.php");
|
||||
include "config.php";
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include "functions.php";
|
||||
$in_haos = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
$wait_msg = "Ждем готовности всей группы...";
|
||||
//rooms
|
||||
$ch_rooms=array
|
||||
(
|
||||
$ch_rooms = [
|
||||
// 0 - empty
|
||||
"1" => "Ворота (1)",
|
||||
"2" => "Двор (2)",
|
||||
|
@ -41,67 +41,60 @@
|
|||
"28" => "Комната прислуги (28)",
|
||||
"29" => "Королевские покои (29)",
|
||||
"30" => "Переход (30)"//босс Грохобот
|
||||
);
|
||||
];
|
||||
//bots
|
||||
|
||||
$ch_bots=array();
|
||||
$ch_bots = [];
|
||||
//1 - упырь
|
||||
//2 - падший
|
||||
//3 - душа
|
||||
$db = mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_var` WHERE `group`='" . $in_haos['group'] . "' limit 1; "));
|
||||
if(!$db['bots'])
|
||||
{
|
||||
$bot_low=array
|
||||
(
|
||||
if (!$db['bots']) {
|
||||
$bot_low = [
|
||||
// 0 - empty
|
||||
"1" => "Упырь",
|
||||
"2" => "Посланник смерти",
|
||||
"3" => "Падший",
|
||||
"4" => "Отморозок",
|
||||
"5" => "Проклятие глубин"
|
||||
);
|
||||
for($i=1;$i<=30;$i++)
|
||||
{
|
||||
];
|
||||
for ($i = 1; $i <= 30; $i++) {
|
||||
$ch_get_bot = rand(1, 5);
|
||||
$ch_bots[$i]=array("0"=>$bot_low[$ch_get_bot]);
|
||||
$ch_bots[$i] = ["0" => $bot_low[$ch_get_bot]];
|
||||
}
|
||||
$ch_bots[5]=array("0"=>"Душа");
|
||||
$ch_bots[10]=array("0"=>"Зомби");
|
||||
$ch_bots[15]=array("0"=>"Повелитель");
|
||||
$ch_bots[20]=array("0"=>"Хромой Билли");
|
||||
$ch_bots[25]=array("0"=>"Мародер");
|
||||
$ch_bots[30]=array("0"=>"Грохобот");
|
||||
$ch_bots[5] = ["0" => "Душа"];
|
||||
$ch_bots[10] = ["0" => "Зомби"];
|
||||
$ch_bots[15] = ["0" => "Повелитель"];
|
||||
$ch_bots[20] = ["0" => "Хромой Билли"];
|
||||
$ch_bots[25] = ["0" => "Мародер"];
|
||||
$ch_bots[30] = ["0" => "Грохобот"];
|
||||
$dbb = serialize($ch_bots);
|
||||
mysql_query("UPDATE `cit_haos_var` SET bots='" . $dbb . "' WHERE `group`='" . $in_haos['group'] . "'; ");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$ch_bots = unserialize($db['bots']);
|
||||
}
|
||||
// комната - опыт == доблесть
|
||||
$ch_priz=array
|
||||
(
|
||||
"5" => array (100,1),
|
||||
"10" => array (200,2),
|
||||
"15" => array (300,3),
|
||||
"20" => array (400,4),
|
||||
"25" => array (500,5),
|
||||
"30" => array (600,10)
|
||||
);
|
||||
$ch_priz = [
|
||||
"5" => [100, 1],
|
||||
"10" => [200, 2],
|
||||
"15" => [300, 3],
|
||||
"20" => [400, 4],
|
||||
"25" => [500, 5],
|
||||
"30" => [600, 10]
|
||||
];
|
||||
// комната - кирка == уник_7 == цветок == уник_8
|
||||
$ch_drop=array
|
||||
(
|
||||
"25" => array (10,60,95,100),
|
||||
"30" => array (3,6,7,8),
|
||||
);
|
||||
$ch_drop = [
|
||||
"25" => [10, 60, 95, 100],
|
||||
"30" => [3, 6, 7, 8],
|
||||
];
|
||||
$priz_low =
|
||||
array("727");
|
||||
["727"];
|
||||
$priz_med =
|
||||
array("775","776","777","778");
|
||||
["775", "776", "777", "778"];
|
||||
$priz_flow =
|
||||
array("14");
|
||||
["14"];
|
||||
$priz_high =
|
||||
array("803","804","805","806");
|
||||
["803", "804", "805", "806"];
|
||||
|
||||
/*$ch_bots[1]=array
|
||||
(
|
||||
|
@ -115,150 +108,126 @@
|
|||
"1"=>"Босс глубин"
|
||||
);*/
|
||||
|
||||
if ($user['room'] != 601) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($in_haos['status'] == 4)
|
||||
{
|
||||
if ($user->room != 601) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
if ($in_haos['status'] == 4) {
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
mysql_query("UPDATE `cit_haos_status` SET room='0',bot='0',group='0' WHERE id = '{$user['id']}'; ");
|
||||
header('location: c_haos.php');
|
||||
}
|
||||
if (!$ch_rooms[$in_haos['room']])
|
||||
{
|
||||
if (!$ch_rooms[$in_haos['room']]) {
|
||||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||||
if ($in_haos['status'] == 2)
|
||||
{
|
||||
if ($in_haos['status'] == 2) {
|
||||
mysql_query("UPDATE `cit_haos_status` SET room='0',status='5',bot='0' WHERE id = '{$user['id']}'; ");
|
||||
addchp('Вы пробились до двери на 2 уровень подземелий Цитадели Хаоса. Только опытный воин и храбрый страж сможет пройти через нее (10 уровень, страж 2 уровня)', '{[]}' . Nick::id($user['id'])->short() . '{[]}');
|
||||
}
|
||||
mysql_query("UPDATE `cit_haos_var` SET bots='',players='' WHERE group='" . $in_haos['group'] . "'; ");
|
||||
header('location: c_haos.php');
|
||||
}
|
||||
|
||||
Template::header('c_haos_in');
|
||||
?>
|
||||
<HTML><HEAD>
|
||||
<!-- JS -->
|
||||
<script>
|
||||
function refreshPeriodic()
|
||||
{
|
||||
function refreshPeriodic() {
|
||||
location.href = 'c_haos_in.php';//reload()
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
</script>
|
||||
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<META Http-Equiv=Cache-Control Content=no-cache>
|
||||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
||||
<META Http-Equiv=Expires Content=0>
|
||||
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#d4d4d4>
|
||||
|
||||
<TABLE border=0 width=340 cellspacing="0" cellpadding="0" align=left>
|
||||
|
||||
<tr><td><h3>Цитадель Хаоса: <?= $ch_rooms[$in_haos['room']]?><br />
|
||||
<br /></td></tr>
|
||||
|
||||
<!--tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr-->
|
||||
<tr>
|
||||
<td><h3>Цитадель Хаоса: <?= $ch_rooms[$in_haos['room']] ?><br/>
|
||||
<br/></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
//attack
|
||||
if($_POST['go_attack'])
|
||||
{
|
||||
if($in_haos['status'] == 2)
|
||||
{
|
||||
if ($_POST['go_attack']) {
|
||||
if ($in_haos['status'] == 2) {
|
||||
$bot_name = $ch_bots[$in_haos['room']][$in_haos['bot']];
|
||||
switch ($bot_name)
|
||||
{
|
||||
switch ($bot_name) {
|
||||
case "Упырь":
|
||||
//$bot_hp=200;
|
||||
$bot_id = 2897;
|
||||
$bot_count = rand(10, 30);
|
||||
break;
|
||||
case "Падший":
|
||||
//$bot_hp=300;
|
||||
$bot_id = 2903;
|
||||
$bot_count = rand(3, 9);
|
||||
break;
|
||||
case "Посланник смерти":
|
||||
//$bot_hp=700;
|
||||
$bot_id = 2896;
|
||||
$bot_count = 2;
|
||||
break;
|
||||
case "Отморозок":
|
||||
//$bot_hp=500;
|
||||
$bot_id = 2893;
|
||||
$bot_count = 3;
|
||||
break;
|
||||
case "Проклятие глубин":
|
||||
//$bot_hp=1000;
|
||||
$bot_id = 2892;
|
||||
$bot_count = rand(1, 5);
|
||||
break;
|
||||
case "Душа":
|
||||
//$bot_hp=1000;
|
||||
$bot_id = 2895;
|
||||
$bot_count = 1;
|
||||
break;
|
||||
case "Зомби":
|
||||
//$bot_hp=1000;
|
||||
$bot_id = 2901;
|
||||
$bot_count = 5;
|
||||
break;
|
||||
case "Повелитель":
|
||||
//$bot_hp=2000;
|
||||
$bot_id = 2902;
|
||||
$bot_count = 1;
|
||||
break;
|
||||
case "Хромой Билли":
|
||||
//$bot_hp=3000;
|
||||
$bot_id = 2898;
|
||||
$bot_count = 1;
|
||||
break;
|
||||
case "Мародер":
|
||||
//$bot_hp=5000;
|
||||
$bot_id = 2899;
|
||||
$bot_count = 1;
|
||||
break;
|
||||
case "Грохобот":
|
||||
//$bot_hp=10000;
|
||||
$bot_id = 2900;
|
||||
$bot_count = 1;
|
||||
break;
|
||||
|
||||
};
|
||||
$b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));;
|
||||
}
|
||||
$b_pers = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));
|
||||
$bot_hp = $b_pers['maxhp'];
|
||||
$bots=array();
|
||||
$bots = [];
|
||||
$group_raw = mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}' AND status='2';");
|
||||
while ($gr = mysql_fetch_array($group_raw))
|
||||
{
|
||||
while ($gr = mysql_fetch_array($group_raw)) {
|
||||
addchp('<font color=red>Внимание!</font> ' . $bot_name . ' напал на Вашу группу!', '{[]}' . Nick::id($gr['id'])->short() . '{[]}');
|
||||
}
|
||||
|
||||
for($bot_c=0;$bot_c<$bot_count;$bot_c++)
|
||||
{
|
||||
for ($bot_c = 0; $bot_c < $bot_count; $bot_c++) {
|
||||
$nb = mysql_fetch_array(mysql_query("SELECT count(`id`) FROM `bots` WHERE `name` LIKE '" . $bot_name . "%';"));
|
||||
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('" . $bot_name . " " . ($nb[0] + 1) . "','" . $bot_id . "','','" . $bot_hp . "');");
|
||||
$bot = mysql_insert_id();
|
||||
$bots[] = $bot;
|
||||
}
|
||||
// командный вход
|
||||
$group_fight=array();
|
||||
$group_fight = [];
|
||||
$group_raw = mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}' AND status='2';");
|
||||
while ($gr = mysql_fetch_array($group_raw))
|
||||
while ($gr = mysql_fetch_array($group_raw)) {
|
||||
$group_fight[] = $gr['id'];
|
||||
{
|
||||
$teams = array();
|
||||
foreach($bots as $b)
|
||||
foreach($group_fight as $gf)
|
||||
{
|
||||
$teams[$gf][$b] = array(0,0,time());
|
||||
$teams[$b][$gf] = array(0,0,time());
|
||||
}
|
||||
|
||||
$teams = [];
|
||||
foreach ($bots as $b) {
|
||||
foreach ($group_fight as $gf) {
|
||||
$teams[$gf][$b] = [0, 0, time()];
|
||||
$teams[$b][$gf] = [0, 0, time()];
|
||||
mysql_query("UPDATE `cit_haos_status` SET `status` = '3' WHERE `id` ='{$gf}'; ");
|
||||
}
|
||||
}
|
||||
|
||||
mysql_query("INSERT INTO `battle`
|
||||
(
|
||||
|
@ -272,92 +241,71 @@ if($_POST['go_attack'])
|
|||
$id = mysql_insert_id();
|
||||
|
||||
// апдейтим бота
|
||||
foreach($bots as $b) mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$b} LIMIT 1;");
|
||||
|
||||
// создаем лог
|
||||
//$rr = "<b>".nick3($user['id'])."</b> и <b>".nick3($bot)."</b>";
|
||||
|
||||
//addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." сошлись в поединке. <BR>");
|
||||
foreach ($bots as $b) {
|
||||
mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$b} LIMIT 1;");
|
||||
}
|
||||
foreach($group_fight as $gf) mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$gf};");
|
||||
|
||||
//}
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
foreach ($group_fight as $gf) {
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$gf};");
|
||||
}
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
}
|
||||
$group_num = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';"));
|
||||
$group_ready = mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE (`room` = '{$in_haos['room']}' AND `group` = '{$in_haos['group']}');"));
|
||||
$cit_haos_t = mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var` = 'cit_haos_time' LIMIT 1;"));
|
||||
$tm = time();
|
||||
if($in_haos['status'] == 2)
|
||||
{if(($tm>($cit_haos_t['value']+960))||($tm<($cit_haos_t['value']-600)))//def 960
|
||||
if ($in_haos['status'] == 2) {
|
||||
if (($tm > ($cit_haos_t['value'] + 960)) || ($tm < ($cit_haos_t['value'] - 600)))//def 960
|
||||
{
|
||||
$flag_ref = 1;
|
||||
foreach ($ch_bots[$in_haos['room']] as $bot_id => $bot_name)
|
||||
if($bot_id>=$in_haos['bot'])
|
||||
{
|
||||
if ($bot_id >= $in_haos['bot']) {
|
||||
echo '<tr><td><FORM action="c_haos_in.php" method=POST>';
|
||||
if ($bot_id == $in_haos['bot']) echo '<strong>' . $bot_name . '</strong>'; else echo($bot_name);
|
||||
if ($bot_id == $in_haos['bot']) echo ' - <INPUT TYPE="submit" value="Напасть" name="go_attack">';
|
||||
echo ' </FORM></td></tr>';
|
||||
$flag_ref = 0;
|
||||
}
|
||||
if (!array_key_exists($in_haos['bot'],$ch_bots[$in_haos['room']]))
|
||||
{
|
||||
if (!array_key_exists($in_haos['bot'], $ch_bots[$in_haos['room']])) {
|
||||
echo($wait_msg);
|
||||
//проверяем есть ли приз
|
||||
if(array_key_exists($in_haos['room'],$ch_priz))
|
||||
{
|
||||
if (array_key_exists($in_haos['room'], $ch_priz)) {
|
||||
$priz_exp = $ch_priz[$in_haos['room']][0];
|
||||
$priz_dobl = $ch_priz[$in_haos['room']][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$priz_exp = 0;
|
||||
$priz_dobl = 0;
|
||||
}
|
||||
if(array_key_exists($in_haos['room'],$ch_drop))
|
||||
{
|
||||
if (array_key_exists($in_haos['room'], $ch_drop)) {
|
||||
$got_drop = rand(0, 400);//100 - norm, 400 - 25%
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$got_drop = -1;
|
||||
}
|
||||
//выбираем приз
|
||||
if($in_haos['room']<30)
|
||||
{
|
||||
if($got_drop>=0 && $got_drop<$ch_drop[$in_haos['room']][0])
|
||||
{
|
||||
if ($in_haos['room'] < 30) {
|
||||
if ($got_drop >= 0 && $got_drop < $ch_drop[$in_haos['room']][0]) {
|
||||
$rand_k = array_rand($priz_low, 1);
|
||||
$p_id = $priz_low[$rand_k];
|
||||
$p_shop = "shop";
|
||||
}
|
||||
elseif($got_drop>=$ch_drop[$in_haos['room']][0] && $got_drop<$ch_drop[$in_haos['room']][1])
|
||||
{
|
||||
} elseif ($got_drop >= $ch_drop[$in_haos['room']][0] && $got_drop < $ch_drop[$in_haos['room']][1]) {
|
||||
$rand_k = array_rand($priz_med, 1);
|
||||
$p_id = $priz_med[$rand_k];
|
||||
$p_shop = "shop";
|
||||
}
|
||||
elseif($got_drop>=$ch_drop[$in_haos['room']][1] && $got_drop<$ch_drop[$in_haos['room']][2])
|
||||
{
|
||||
} elseif ($got_drop >= $ch_drop[$in_haos['room']][1] && $got_drop < $ch_drop[$in_haos['room']][2]) {
|
||||
$rand_k = array_rand($priz_flow, 1);
|
||||
$p_id = $priz_flow[$rand_k];
|
||||
$p_shop = "fshop";
|
||||
}
|
||||
elseif($got_drop>=$ch_drop[$in_haos['room']][2] && $got_drop<=$ch_drop[$in_haos['room']][3])
|
||||
{
|
||||
} elseif ($got_drop >= $ch_drop[$in_haos['room']][2] && $got_drop <= $ch_drop[$in_haos['room']][3]) {
|
||||
$rand_k = array_rand($priz_high, 1);
|
||||
$p_id = $priz_high[$rand_k];
|
||||
$p_shop = "shop";
|
||||
}
|
||||
}
|
||||
elseif($in_haos['room']==30)
|
||||
{
|
||||
} elseif ($in_haos['room'] == 30) {
|
||||
if ($got_drop <= 200)//400max/4=>50%
|
||||
{
|
||||
$priz_low =
|
||||
array("808","809");
|
||||
["808", "809"];
|
||||
|
||||
$rand_k = array_rand($priz_low, 1);
|
||||
$p_id = $priz_low[$rand_k];
|
||||
|
@ -367,17 +315,14 @@ $tm=time();
|
|||
}
|
||||
|
||||
//выбираем получателя
|
||||
$all_get=array();
|
||||
$all_get = [];
|
||||
$gr_raw = mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';");
|
||||
while($g_id=mysql_fetch_array($gr_raw))
|
||||
while ($g_id = mysql_fetch_array($gr_raw)) {
|
||||
$all_get[] = $g_id['id'];
|
||||
|
||||
}
|
||||
$l_id = rand(0, count($all_get) - 1);
|
||||
//$all_get[$l_id];
|
||||
//if($priz_exp>0) addchp ('CH get priz - '.$all_get[$l_id],'{[]}'.nick7 (1258).'{[]}');
|
||||
//даем призы
|
||||
if($p_id>0)
|
||||
{
|
||||
if ($p_id > 0) {
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `{$p_shop}` WHERE `id` = '{$p_id}' LIMIT 1;"));
|
||||
mysql_query("INSERT INTO `inventory`
|
||||
(`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,
|
||||
|
@ -391,28 +336,28 @@ $tm=time();
|
|||
mysql_query("INSERT INTO `delo` (`id` , `author` ,`pers`, `text`, `type`, `date`) VALUES ('','0','$all_get[$l_id]','\"" . $user['login'] . "\" получил в ЦХ предмет: \"" . $dress['name'] . "\" " . $dresscount . "id:(" . $dressid . ") [0/" . $dress['maxdur'] . "]',1,'" . time() . "');");
|
||||
addchp('За убийство босса Цитадели Хаоса вы получили ' . $dress['name'], '{[]}' . Nick::id($all_get[$l_id])->short() . '{[]}');
|
||||
}
|
||||
if($priz_exp>0)
|
||||
{
|
||||
if ($priz_exp > 0) {
|
||||
GiveExp($all_get[$l_id], $priz_exp);
|
||||
addchp('За убийство босса Цитадели Хаоса вы получили ' . $priz_exp . ' опыта', '{[]}' . Nick::id($all_get[$l_id])->short() . '{[]}');
|
||||
mysql_query("INSERT INTO `delo` (`id` , `author` ,`pers`, `text`, `type`, `date`)
|
||||
VALUES ('','0','{$cur_user['id']}','\"" . $all_get[$l_id] . "\" получил в ЦХ \"" . $priz_exp . "\" опыта',1,'" . time() . "');");
|
||||
}
|
||||
if($priz_dobl>0)
|
||||
{
|
||||
if ($priz_dobl > 0) {
|
||||
mysql_query("UPDATE users SET `doblest`=`doblest`+'" . $priz_dobl . "' WHERE `id` = '" . $all_get[$l_id] . "';");
|
||||
addchp('За убийство босса Цитадели Хаоса вы получили ' . $priz_dobl . ' доблести', '{[]}' . Nick::id($all_get[$l_id])->short() . '{[]}');
|
||||
mysql_query("INSERT INTO `delo` (`id` , `author` ,`pers`, `text`, `type`, `date`)
|
||||
VALUES ('','0','{$cur_user['id']}','\"" . $all_get[$l_id] . "\" получил в ЦХ \"" . $priz_dobl . "\" доблести',1,'" . time() . "');");
|
||||
}
|
||||
mysql_query("UPDATE `cit_haos_status` SET `room` = `room`+1,`bot`=0 WHERE `group` = '{$in_haos['group']}'; ");
|
||||
if (!headers_sent()) header('location: c_haos_in.php');
|
||||
if (!headers_sent()) {
|
||||
header('location: c_haos_in.php');
|
||||
}
|
||||
if($flag_ref==0 && !headers_sent()) header('location: c_haos_in.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo("<TR><TD>Ждем готовности группы... Приготовьтесь!</TR></TD>");
|
||||
if ($flag_ref == 0 && !headers_sent()) {
|
||||
header('location: c_haos_in.php');
|
||||
}
|
||||
} else {
|
||||
echo "<TR><TD>Ждем готовности группы... Приготовьтесь!</TR></TD>";
|
||||
echo '<tr><td><FORM action="c_haos_in.php" method=POST><INPUT TYPE="submit" value="Обновить" name="refresh">';
|
||||
echo ' </FORM></td></tr>';
|
||||
}
|
||||
|
@ -421,7 +366,5 @@ $tm=time();
|
|||
|
||||
</table>
|
||||
<?php
|
||||
echo('<div align=right><img width="260" src="i/zitadel/'.($in_haos['room']+1).'.jpg" /></div>');
|
||||
echo '<div align=right><img width="260" src="i/zitadel/' . ($in_haos['room'] + 1) . '.jpg" /></div>';
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
159
c_park.php
|
@ -1,27 +1,31 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (!($_SESSION['uid'] >0)) header("Location: index.php");
|
||||
include "config.php";
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||
|
||||
if(!$in_park)
|
||||
{
|
||||
if (!$in_park) {
|
||||
mysql_query("INSERT INTO cit_park(id) values('{$user['id']}');");
|
||||
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
}
|
||||
|
||||
include "functions.php";
|
||||
|
||||
if ($user['room'] != 602) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 602) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//комнаты парка
|
||||
|
||||
$ch_rooms=array
|
||||
(
|
||||
$ch_rooms = [
|
||||
// 0 - empty
|
||||
"1" => "Площадь (1)",
|
||||
"2" => "Аллея Геры (2)",
|
||||
|
@ -38,57 +42,48 @@
|
|||
"13" => "Терра Нова (13)",
|
||||
"14" => "Гора Райдинг (14)",
|
||||
"15" => "Пасифик-Риф (15)"//босс Повелитель
|
||||
);
|
||||
];
|
||||
|
||||
// выдаем ботов
|
||||
|
||||
$ch_bots=array();
|
||||
$bot_low=array
|
||||
("4150","4152","4153","4154","4155","4156");
|
||||
$bot_high=array
|
||||
("4157","4158","4159");
|
||||
if($in_park['bots']=='')
|
||||
{
|
||||
for($i=1;$i<=15;$i++)
|
||||
{
|
||||
$ch_bots = [];
|
||||
$bot_low = ["4150", "4152", "4153", "4154", "4155", "4156"];
|
||||
$bot_high = ["4157", "4158", "4159"];
|
||||
if ($in_park['bots'] == '') {
|
||||
for ($i = 1; $i <= 15; $i++) {
|
||||
$rand_num = rand(3, 7);
|
||||
$rand_bot = '';
|
||||
for($j=1;$j<=$rand_num;$j++)
|
||||
{
|
||||
for ($j = 1; $j <= $rand_num; $j++) {
|
||||
$rand_bot .= $bot_low[array_rand($bot_low, 1)];
|
||||
$rand_bot .= ';';
|
||||
}
|
||||
if($i%5==0)
|
||||
if ($i % 5 == 0) {
|
||||
$rand_bot .= $bot_high[array_rand($bot_high, 1)];
|
||||
}
|
||||
$rand_bot .= ';';
|
||||
|
||||
$ch_bots[$i] = $rand_bot;
|
||||
}
|
||||
$dbb = serialize($ch_bots);
|
||||
mysql_query("UPDATE `cit_park` SET bots='{$dbb}' WHERE `id`='{$user['id']}'; ");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$ch_bots = unserialize($in_park['bots']);
|
||||
}
|
||||
|
||||
// начинаем расчет действий
|
||||
|
||||
if($_POST['start_raid'])
|
||||
{
|
||||
if ($_POST['start_raid']) {
|
||||
mysql_query("UPDATE `cit_park` SET `counter`=`counter`+1, `room`=`room`+1 WHERE `id`='{$user['id']}';");
|
||||
$in_park = mysql_fetch_array(mysql_query("SELECT * FROM `cit_park` WHERE `id` = '{$user['id']}' LIMIT 1;"));
|
||||
}
|
||||
|
||||
//старт боя - началоа
|
||||
|
||||
if($_POST['attack'])
|
||||
{
|
||||
if ($_POST['attack']) {
|
||||
$bots_raw = explode(";", $ch_bots[$in_park['room']]);
|
||||
$bots=array();
|
||||
foreach($bots_raw as $bot_id)
|
||||
if($bot_id>0)
|
||||
{
|
||||
$bots = [];
|
||||
foreach ($bots_raw as $bot_id) {
|
||||
if ($bot_id > 0) {
|
||||
$b_pers = mysql_fetch_array(mysql_query("SELECT `login`,`maxhp` FROM users WHERE id='{$bot_id}' LIMIT 1;"));
|
||||
$bot_hp = $b_pers['maxhp'];
|
||||
$bot_name = $b_pers['login'];
|
||||
|
@ -96,12 +91,12 @@
|
|||
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('" . $bot_name . " " . ($nb[0] + 1) . "','" . $bot_id . "','','" . $bot_hp . "');");
|
||||
$bots[] = mysql_insert_id();
|
||||
}
|
||||
}
|
||||
|
||||
$teams = array();
|
||||
foreach($bots as $b)
|
||||
{
|
||||
$teams[$user['id']][$b] = array(0,0,time());
|
||||
$teams[$b][$user['id']] = array(0,0,time());
|
||||
$teams = [];
|
||||
foreach ($bots as $b) {
|
||||
$teams[$user['id']][$b] = [0, 0, time()];
|
||||
$teams[$b][$user['id']] = [0, 0, time()];
|
||||
}
|
||||
|
||||
mysql_query("INSERT INTO `battle`
|
||||
|
@ -114,54 +109,43 @@
|
|||
)");
|
||||
|
||||
$id = mysql_insert_id();
|
||||
foreach($bots as $b) mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$b} LIMIT 1;");
|
||||
foreach ($bots as $b) {
|
||||
mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$b} LIMIT 1;");
|
||||
}
|
||||
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']};");
|
||||
|
||||
addchp('<font color=red>Внимание!</font> Вы вступили в бой c бандитами!', '{[]}' . Nick::id($user['id'])->short() . '{[]}');
|
||||
|
||||
die("<script>location.href='fbattle.php';</script>");
|
||||
exit("<script>location.href='fbattle.php';</script>");
|
||||
}
|
||||
|
||||
|
||||
//старт боя - конец
|
||||
|
||||
Template::header('Городской Парк');
|
||||
?>
|
||||
<HTML><HEAD>
|
||||
<!-- JS -->
|
||||
<script>
|
||||
function refreshPeriodic()
|
||||
{
|
||||
function refreshPeriodic() {
|
||||
location.href = 'c_park.php';//reload()
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
</script>
|
||||
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<META Http-Equiv=Cache-Control Content=no-cache>
|
||||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
||||
<META Http-Equiv=Expires Content=0>
|
||||
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#d4d4d4>
|
||||
|
||||
<TABLE border=0 width=600 cellspacing="0" cellpadding="0" align=left>
|
||||
|
||||
<tr><td><h3>Городской Парк</td></tr>
|
||||
<tr>
|
||||
<td><h3>Городской Парк</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($in_park['room']==0 || $in_park['room']>=15)
|
||||
{
|
||||
echo('<tr><td>Вы стоите на парковой площади</strong></td></tr>');
|
||||
echo("<tr><td>За сегодня Вы посетили парк <b>".$in_park['counter']."/3</b> раз.</td></tr>");
|
||||
if($in_park['room']==15)
|
||||
{
|
||||
echo("<tr><td>Вы вышли из парка с чувством глубокого удовлетворения...</td></tr>");
|
||||
if ($in_park['room'] == 0 || $in_park['room'] >= 15) {
|
||||
echo '<tr><td>Вы стоите на парковой площади</strong></td></tr>';
|
||||
echo "<tr><td>За сегодня Вы посетили парк <b>" . $in_park['counter'] . "/3</b> раз.</td></tr>";
|
||||
if ($in_park['room'] == 15) {
|
||||
echo "<tr><td>Вы вышли из парка с чувством глубокого удовлетворения...</td></tr>";
|
||||
//раздача гаек
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '856' LIMIT 1;"));
|
||||
$gadget_num = mt_rand(1, 8);
|
||||
for($i=0;$i<$gadget_num;$i++)
|
||||
{
|
||||
for ($i = 0; $i < $gadget_num; $i++) {
|
||||
mysql_query("INSERT INTO `inventory`
|
||||
(`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,
|
||||
`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,
|
||||
|
@ -175,8 +159,7 @@ if($in_park['room']==0 || $in_park['room']>=15)
|
|||
//раздача страничек
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '867' LIMIT 1;"));
|
||||
$gadget_num = mt_rand(1, 5);
|
||||
for($i=0;$i<$gadget_num;$i++)
|
||||
{
|
||||
for ($i = 0; $i < $gadget_num; $i++) {
|
||||
mysql_query("INSERT INTO `inventory`
|
||||
(`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,
|
||||
`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,
|
||||
|
@ -188,12 +171,11 @@ if($in_park['room']==0 || $in_park['room']>=15)
|
|||
) ;");
|
||||
}
|
||||
//раздача ингридиентов
|
||||
$ing_list=array("859","860","861","862","863","864","865");
|
||||
$ing_list = ["859", "860", "861", "862", "863", "864", "865"];
|
||||
$ing_id = $ing_list[array_rand($ing_list)];
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '{$ing_id}' LIMIT 1;"));
|
||||
$gadget_num = mt_rand(1, 3);
|
||||
for($i=0;$i<$gadget_num;$i++)
|
||||
{
|
||||
for ($i = 0; $i < $gadget_num; $i++) {
|
||||
mysql_query("INSERT INTO `inventory`
|
||||
(`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,
|
||||
`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,
|
||||
|
@ -216,34 +198,23 @@ if($in_park['room']==0 || $in_park['room']>=15)
|
|||
//переход
|
||||
mysql_query("UPDATE `cit_park` SET `room`=0,`bots`='',`time`='" . time() . "' WHERE `id` ='{$user['id']}'; ");
|
||||
}
|
||||
if($in_park['counter']>=3)
|
||||
echo('<tr><td>По какому-то странному совпадению Вам не хочется идти в парк. Может, подождать до завтра? </td></tr>');
|
||||
elseif(($in_park['time']+3600)>time())
|
||||
{/**/
|
||||
if ($in_park['counter'] >= 3) {
|
||||
echo '<tr><td>По какому-то странному совпадению Вам не хочется идти в парк. Может, подождать до завтра? </td></tr>';
|
||||
}
|
||||
elseif (($in_park['time'] + 3600) > time()) {
|
||||
$tm = time();
|
||||
$t_wait = round(((3600 - $tm + $in_park['time']) / 60), 1);
|
||||
echo('<tr><td>Вы совсем недавно вернулись из парка, бесполезно идти туда снова. <br/>(Осталось ждать: <strong>'.$t_wait.'</strong> мин.)</td></tr>');
|
||||
echo '<tr><td>Вы совсем недавно вернулись из парка, бесполезно идти туда снова. <br/>(Осталось ждать: <strong>' . $t_wait . '</strong> мин.)</td></tr>';
|
||||
} else {
|
||||
echo '<tr><td><FORM action="c_park.php" method=POST><INPUT TYPE="submit" value="Прогуляться" name="start_raid"><br></FORM></td></tr>';
|
||||
}
|
||||
else
|
||||
echo('<tr><td><FORM action="c_park.php" method=POST><INPUT TYPE="submit" value="Прогуляться" name="start_raid"><br></FORM></td></tr>');
|
||||
echo '<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="ps"></FORM></td></tr>';
|
||||
} else {
|
||||
echo '<tr><td>Вы видите табличку с названием улицы: <strong>' . $ch_rooms[$in_park['room']] . '</strong></td></tr>';
|
||||
echo '<tr><td>В парке пустынно и темно, только какие-то подозрительные личности шныряют по своим делам.</td></tr>';
|
||||
echo '<tr><td>Вы видите несколько бандитов. Они замышляют зловещие преступления в городе!</td></tr>';
|
||||
echo '<tr><td><FORM action="c_park.php" method=POST><INPUT TYPE="submit" value="Напасть" name="attack"><br></FORM></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo('<tr><td>Вы видите табличку с названием улицы: <strong>'.$ch_rooms[$in_park['room']].'</strong></td></tr>');
|
||||
echo('<tr><td>В парке пустынно и темно, только какие-то подозрительные личности шныряют по своим делам.</td></tr>');
|
||||
echo('<tr><td>Вы видите несколько бандитов. Они замышляют зловещие преступления в городе!</td></tr>');
|
||||
echo('<tr><td><FORM action="c_park.php" method=POST><INPUT TYPE="submit" value="Напасть" name="attack"><br></FORM></td></tr>');
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
<div align=right><img width="260" src="i/park/<?php echo($in_park['room'] + 1); ?>.jpg"/></div>
|
||||
<?php
|
||||
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
770
canalizaciya.php
|
@ -1,5 +1,5 @@
|
|||
<?
|
||||
if ($user['room'] == 403) {
|
||||
<?php
|
||||
if ($user->room == 403) {
|
||||
$s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc();
|
||||
|
||||
$rooms[0] = "";
|
||||
|
@ -320,7 +320,7 @@ if ($user['room'] == 403) {
|
|||
$s .= '<div style="position:absolute; left:165px; top:115px;"><img src="labirint3/zel.gif" width="50" border="0" height="50" alt="Зелье"></div>';
|
||||
}
|
||||
if (($repa["n$mesto"] == '11.1' or $repa["n$mesto"] == '11.0') and $vector == $repa["v$mesto"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:180px; top:165px;"><img src="labirint3/1/kanal.gif" width="40" height="40" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok(' . $mesto . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:180px; top:165px;"><img src="labirint3/1/kanal.gif" width="40" height="40" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok(' . $mesto . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc2"] == '11.1' or $repa["n$loc2"] == '11.0') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div style="position:absolute; left:180px; top:140px;"><img src="labirint3/1/kanal.gif" width="25" height="25" border="0" alt="Водосток"></div>';
|
||||
|
@ -333,7 +333,7 @@ if ($user['room'] == 403) {
|
|||
}
|
||||
/////////////
|
||||
if (($repa["n$loc2"] == '12.1' or $repa["n$loc2"] == '12.0') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:170px;"><img src="labirint3/1/stok.gif" width="60" height="15" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok2(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:170px;"><img src="labirint3/1/stok.gif" width="60" height="15" border="0" alt="Водосток" style="CURSOR:pointer;" onClick="stok2(' . $loc2 . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc3"] == '12.1' or $repa["n$loc3"] == '12.0') and $vector == $repa["v$loc3"]) {
|
||||
$s .= '<div style="position:absolute; left:175px; top:150px;"><img src="labirint3/1/stok.gif" width="40" height="8" border="0" alt="Водосток"></div>';
|
||||
|
@ -373,7 +373,7 @@ if ($user['room'] == 403) {
|
|||
$nomers = '10';
|
||||
}
|
||||
if (($repa["n$mesto"] == 'key1' or $repa["n$mesto"] == 'key2' or $repa["n$mesto"] == 'key3' or $repa["n$mesto"] == 'key4' or $repa["n$mesto"] == 'key5' or $repa["n$mesto"] == 'key6' or $repa["n$mesto"] == 'key7' or $repa["n$mesto"] == 'key8' or $repa["n$mesto"] == 'key9' or $repa["n$mesto"] == 'key10') and $vector == $repa["v$mesto"]) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:165px;"><img src="labirint3/' . $repa["n$mesto"] . '.gif" width="60" height="60" border="0" alt="Ключ №' . $nomers . '" style="CURSOR:pointer;" onClick="key(' . $mesto . ',' . $nomers . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:160px; top:165px;"><img src="labirint3/' . $repa["n$mesto"] . '.gif" width="60" height="60" border="0" alt="Ключ №' . $nomers . '" style="CURSOR:pointer;" onClick="key(' . $mesto . ',' . $nomers . ')"></div>';
|
||||
}
|
||||
if (($repa["n$loc2"] == 'key1' or $repa["n$loc2"] == 'key2' or $repa["n$loc2"] == 'key3' or $repa["n$loc2"] == 'key4' or $repa["n$loc2"] == 'key5' or $repa["n$loc2"] == 'key6' or $repa["n$loc2"] == 'key7' or $repa["n$loc2"] == 'key8' or $repa["n$loc2"] == 'key9' or $repa["n$loc2"] == 'key10') and $vector == $repa["v$loc2"]) {
|
||||
$s .= '<div style="position:absolute; left:175px; top:140px;"><img src="labirint3/' . $repa["n$loc2"] . '.gif" width="40" height="40" border="0" alt="Ключ №' . $nomers . '"></div>';
|
||||
|
@ -539,10 +539,10 @@ if ($user['room'] == 403) {
|
|||
}
|
||||
///////////////////////////////////////////
|
||||
if ($step1['fwd'] and ($repa["n$loc2"] == '13.1' or $repa["n$loc2"] == '13.0')) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/sun.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/sun.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk(' . $loc2 . ')"></div>';
|
||||
}
|
||||
if ($step1['fwd'] and ($repa["n$loc2"] == '14.1' or $repa["n$loc2"] == '14.0')) {
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/2.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk2(' . $loc2 . ');"></div>';
|
||||
$s .= '<div onmouseout="closeMenu();" style="position:absolute; left:155px; top:130px;"><img src="labirint3/2.gif" width="60" height="60" border="0" alt="Сундук" style="CURSOR:pointer;" onClick="sunduk2(' . $loc2 . ')"></div>';
|
||||
}
|
||||
/////////////////////1/////////////////////
|
||||
|
||||
|
@ -550,20 +550,20 @@ if ($user['room'] == 403) {
|
|||
|
||||
if ($k_b2 == '1') {
|
||||
if ($rt["n$loc2"] == '8') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="Opendialog(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="Opendialog(' . $loc2 . ',event)"></div>';
|
||||
} else {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:135px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
|
||||
}
|
||||
if ($k_b2 == '2') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:90px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:180px; top:40px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:90px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:180px; top:40px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
if ($k_b2 == '3') {
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:80px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:195px; top:40px;"><img src="labirint3/' . $ob23 . '.gif" width="100" height="160" title=' . $b_n23 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:140px; top:60px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event);"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:80px; top:40px;"><img src="labirint3/' . $ob2 . '.gif" width="100" height="160" title=' . $b_n2 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:195px; top:40px;"><img src="labirint3/' . $ob23 . '.gif" width="100" height="160" title=' . $b_n23 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
$s .= '<div onmouseover="closeMenu();" style="position:absolute; left:140px; top:60px;"><img src="labirint3/' . $ob22 . '.gif" width="100" height="160" title=' . $b_n22 . ' style="CURSOR:pointer;" onClick="OpenMenu(' . $loc2 . ',event)"></div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
111
cave.php
|
@ -207,11 +207,11 @@ function redirectbyroom($r)
|
|||
{
|
||||
if (in_array($r, Config::$canalenters)) {
|
||||
header("location: enter_cave.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
if ($r == 1) {
|
||||
header("location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ if ($user["login"] == "Rallo Tabs") {
|
|||
|
||||
if ($user['battle'] > 0) {
|
||||
header("location: fbattle.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$objsizes = [0 => [0, 0], 1 => [120, 60], 2 => [120, 60], 3 => [120, 60], 4 => [110, 72], 5 => [120, 120]];
|
||||
|
@ -288,15 +288,15 @@ function makedeath()
|
|||
{
|
||||
global $user, $floor, $loses, $x, $y, $dir;
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
if (!isset($cavedata[$user['room']]['x' . $floor])) {
|
||||
if (!isset($cavedata[$user->room]['x' . $floor])) {
|
||||
$floor = 1;
|
||||
loadmap();
|
||||
}
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
|
||||
mysql_query('UPDATE `users` SET `hp` = 1 WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
$x = $cavedata[$user['room']]['x' . $floor];
|
||||
$y = $cavedata[$user['room']]['y' . $floor];
|
||||
$dir = $cavedata[$user['room']]['dir' . $floor];
|
||||
$x = $cavedata[$user->room]['x' . $floor];
|
||||
$y = $cavedata[$user->room]['y' . $floor];
|
||||
$dir = $cavedata[$user->room]['dir' . $floor];
|
||||
updparties();
|
||||
$loses++;
|
||||
}
|
||||
|
@ -447,9 +447,9 @@ function getcavedata($caveleader, $floor)
|
|||
return unserialize(implode("", file("cavedata/$caveleader-$floor.dat")));
|
||||
}
|
||||
|
||||
if (!in_array($user['room'], Config::$caverooms)) {
|
||||
if (!in_array($user->room, Config::$caverooms)) {
|
||||
header("Location: main.php");
|
||||
die('Not in this life ...');
|
||||
exit('Not in this life ...');
|
||||
}
|
||||
|
||||
if (isset($_GET['direction'])) {
|
||||
|
@ -472,7 +472,7 @@ while ($rec = mysql_fetch_assoc($r)) {
|
|||
$party[] = $rec;
|
||||
}
|
||||
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
$base = "/underdesigns/alchcave";
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ if (@$_GET['useitem'] || @$_GET['usewallitem']) {
|
|||
loadmap();
|
||||
|
||||
|
||||
if (@$_GET['useitem']) {
|
||||
if ($_GET['useitem']) {
|
||||
if ($dir == 0) {
|
||||
$tx = $x - 1;
|
||||
$ty = $y;
|
||||
|
@ -553,8 +553,8 @@ if (@$_GET['useitem']) {
|
|||
$ty = $y + 1;
|
||||
}
|
||||
if (@$_GET['useitem']) {
|
||||
if (file_exists("underground/objects/$user[room].php")) {
|
||||
include "underground/objects/$user[room].php";
|
||||
if (file_exists("underground/objects/$user->room.php")) {
|
||||
include "underground/objects/$user->room.php";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -650,7 +650,7 @@ if ($wander && !isset($_GET['attack'])) {
|
|||
$ty = $v['y'] + 2;
|
||||
}
|
||||
|
||||
if ($user['room'] == 74 || $user['room'] == 76) {
|
||||
if ($user->room == 74 || $user->room == 76) {
|
||||
if (strpos($map[$ty][$tx], 's/') !== false && !@$mapbots[$ty][$tx]) {
|
||||
break;
|
||||
}
|
||||
|
@ -718,8 +718,8 @@ if ($moved && (substr($map[$y * 2][$x * 2], 0, 1) === "e" || substr($map[$y * 2]
|
|||
$tx = $x;
|
||||
$ty = $y;
|
||||
$tmp = explode("/", $map[$y * 2][$x * 2]);
|
||||
if (file_exists("underground/events/$user[room].php")) {
|
||||
include("underground/events/$user[room].php");
|
||||
if (file_exists("underground/events/$user->room.php")) {
|
||||
include("underground/events/$user->room.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ if ($ambushes[$y * 2][$x * 2 - 2] && $map[$y * 2][$x * 2 - 1] == 0) {
|
|||
|
||||
if ($ax && $ay && $user['hp'] > 0) {
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
if (!($cavedata[$user['room']]['x' . $floor] == $x && $cavedata[$user['room']]['y' . $floor] == $y)) {
|
||||
if (!($cavedata[$user->room]['x' . $floor] == $x && $cavedata[$user->room]['y' . $floor] == $y)) {
|
||||
if ($ax < $x) {
|
||||
$dir1 = 0;
|
||||
} elseif ($ax > $x) {
|
||||
|
@ -818,12 +818,12 @@ if (@$_GET['speak']) {
|
|||
$tmp = explode("/", $cell);
|
||||
if ($tmp[0] == "d") {
|
||||
header("location: dialog.php?char=$tmp[2]");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($tmp[0] == "b" && isset($dialogs[CaveBots::$bots[$tmp[1]]])) {
|
||||
header("location: dialog.php?char=" . CaveBots::$bots[$tmp[1]]);
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -908,28 +908,15 @@ if (@$_GET['exit']) {
|
|||
}
|
||||
}
|
||||
mysql_query("DELETE FROM `inventory` WHERE `owner` = '$user[id]' AND `foronetrip` = 1");
|
||||
gotoroom($user['room'] - 1);
|
||||
gotoroom($user->room - 1);
|
||||
}
|
||||
|
||||
$standingon = $map[$y * 2][$x * 2];
|
||||
foreach ($party as $k => $v) {
|
||||
$map[$v['y'] * 2][$v['x'] * 2] = "u/" . $v['user'];
|
||||
}
|
||||
Template::header('cave');
|
||||
?>
|
||||
<head>
|
||||
<script LANGUAGE='JavaScript'>
|
||||
document.ondragstart = test;
|
||||
//запрет на перетаскивание
|
||||
document.onselectstart = test;
|
||||
//запрет на выделение элементов страницы
|
||||
document.oncontextmenu = test;
|
||||
|
||||
//запрет на выведение контекстного меню
|
||||
function test() {
|
||||
return false
|
||||
}
|
||||
</SCRIPT>
|
||||
<link rel=stylesheet type="text/css" href="/i/main.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
|
@ -955,7 +942,7 @@ foreach ($party as $k => $v) {
|
|||
background-color: #484848;
|
||||
color: #000000;
|
||||
display: block;
|
||||
font-family: Verdana, Arial;
|
||||
font-family: Verdana, Arial, serif;
|
||||
font-size: 8pt;
|
||||
font-weight: bold;
|
||||
padding: 2px 12px 2px 8px;
|
||||
|
@ -1332,36 +1319,7 @@ foreach ($party as $k => $v) {
|
|||
el2.style.top = posy + 33 + "px";
|
||||
el2.style.visibility = "visible";
|
||||
}
|
||||
|
||||
var delay = 30, TimerOn = -1, tkHP, maxHP, speed = 300, stLen = 185, redHP = 0.33, yellowHP = 0.66;
|
||||
|
||||
function setHP(a, b, c) {
|
||||
tkHP = a;
|
||||
maxHP = b;
|
||||
TimerOn >= 0 && (clearTimeout(TimerOn), TimerOn = -1);
|
||||
speed = c;
|
||||
setHPlocal()
|
||||
}
|
||||
|
||||
function setHPlocal() {
|
||||
tkHP > maxHP && (tkHP = maxHP);
|
||||
var a = Math.round(tkHP) + "/" + maxHP, a = stLen - (a.length + 2) * 7,
|
||||
b = Math.round((a - 1) / maxHP * tkHP);
|
||||
a -= b;
|
||||
HP = document.getElementById("hp_value");
|
||||
HP1 = document.getElementById("HP1");
|
||||
HP2 = document.getElementById("HP2");
|
||||
if (HP) HP1.width = b, HP2.width = a, HP1.src = tkHP / maxHP < redHP ? "i/1red.gif" : tkHP / maxHP < yellowHP ? "i/1yellow.gif" : "i/1green.gif",
|
||||
HP.innerHTML = Math.round(tkHP) + "/" + maxHP;
|
||||
tkHP += maxHP / 60 / 20 * (speed / 100);
|
||||
TimerOn = tkHP < maxHP ? setTimeout("setHPlocal()", delay * 100) : -1
|
||||
}
|
||||
|
||||
setHP(<?=$user['hp'];?>, <?=$user['maxhp'];?>, 100);
|
||||
</script>
|
||||
</head>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor="#d7d7d7"
|
||||
style=" background-image: url(/i/bagr.gif); width=100%; background-repeat:repeat;background-position:top">
|
||||
<div id=hint3 class=ahint></div>
|
||||
<div style="z-index: 100; background-color: #E4F2DF; border-style: solid; border-width: 2px; border-color: #77c3fc; position: absolute; left: 0; top: 0; visibility: hidden; cursor:pointer;"
|
||||
id="oMenu"></div>
|
||||
|
@ -1372,10 +1330,11 @@ foreach ($party as $k => $v) {
|
|||
if ($user['hp'] <= 0) {
|
||||
makedeath();
|
||||
}
|
||||
|
||||
$botNames = CaveBots::$botnames;
|
||||
$botIds = CaveBots::$bots;
|
||||
function drawmap($map1, $players, $x, $y, $direction)
|
||||
{
|
||||
global $base, $user, CaveBots::$botnames, $imgdata;
|
||||
global $base, $user, $botNames, $imgdata;
|
||||
$startx = max($x * 2 - 8, 0);
|
||||
$starty = max($y * 2 - 8, 0);
|
||||
|
||||
|
@ -1473,7 +1432,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
|
||||
function drawbot($cell, $x, $y)
|
||||
{
|
||||
global CaveBots::$botnames, $imgdata, CaveBots::$bots, $dialogs, $user, $floor;
|
||||
global $botNames, $imgdata, $botIds, $dialogs, $user, $floor;
|
||||
$data = explode("/", $cell);
|
||||
$i = 1;
|
||||
$bc = (count($data) - 1) / 2;
|
||||
|
@ -1517,9 +1476,9 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
$ret .= drawobject2($aMap[$yy][$xx], $x, $y);
|
||||
}
|
||||
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
|
||||
if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user['room'] == 74)) {
|
||||
if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user->room == 74)) {
|
||||
$ret .= "<img title=\"$botname" . ($cnt > 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? "onclick=\"speakattackmenu(event);\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
|
||||
} else {
|
||||
$ret .= "<img title=\"$botname" . ($cnt > 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? " onclick=\"document.location.href='cave.php?attack=1';\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
|
||||
|
@ -1544,7 +1503,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
|
||||
function drawuser($cell, $x, $y)
|
||||
{
|
||||
global CaveBots::$botnames, $imgdata, $party;
|
||||
global $botNames, $imgdata, $party;
|
||||
$data = explode("/", $cell);
|
||||
$i = 1;
|
||||
$bc = (count($data) - 1);
|
||||
|
@ -1609,7 +1568,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
$left = $imgdata[$x][$y]["x"][1];
|
||||
$top = $imgdata[$x][$y]["y"] + $ht;
|
||||
}
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
if (!isset($imgmap[$obj])) {
|
||||
|
||||
$ret .= "
|
||||
|
@ -1654,7 +1613,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
$left = $imgdata[$x][$y]["x"][1];
|
||||
$top = $imgdata[$x][$y]["y"] + $ht;
|
||||
}
|
||||
$rrm = $user['room'];
|
||||
$rrm = $user->room;
|
||||
if (!isset($imgmap[$obj])) {
|
||||
$ret .= "
|
||||
" . ($y == 1 && $x == 3 ? "<a href=\"cave.php?useitem=1\">" : "") . "
|
||||
|
@ -1815,7 +1774,7 @@ function drawmap($map1, $players, $x, $y, $direction)
|
|||
}
|
||||
$objInWall = explode('/', $map[3][$wall]);
|
||||
if ($objInWall[1] == "o") {
|
||||
if ($user['room'] == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
|
||||
if ($user->room == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
|
||||
$ret .= drawobject('//' . $objInWall[2], 3, $i);
|
||||
}
|
||||
}
|
||||
|
@ -2038,10 +1997,10 @@ progress_update();
|
|||
<td width=540>
|
||||
<div style="text-align:right;padding-right:30px">
|
||||
<font style='font-size:14px; color:#8f0000'><b><?
|
||||
$dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user['room'] - 1)), 0, 0));
|
||||
$dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user->room - 1)), 0, 0));
|
||||
$cPlace = $dMap[$y * 2][$x * 2];
|
||||
$tmp = explode("/", $cPlace);
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
if ($floor == 1) {
|
||||
echo 'Проклятый Рудник, 1 этаж';
|
||||
} elseif ($floor == 2) {
|
||||
|
|
39
chat.php
|
@ -11,13 +11,13 @@ if (empty($_SESSION['uid'])) {
|
|||
exit;
|
||||
}
|
||||
require_once "config.php";
|
||||
//include_once "functions.php";
|
||||
|
||||
$msg = $_POST['msg'] ?? null;
|
||||
$uid = $_SESSION['uid'];
|
||||
$uid = $_SESSION['uid'] ?? null;
|
||||
if ($msg) {
|
||||
try { db::c()->query('INSERT INTO `chat` (`user_id`, `msg`) VALUES (?i, "?s")', $uid, $msg); }
|
||||
catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
try {
|
||||
db::c()->query('INSERT INTO `chat` (`user_id`, `msg`) VALUES (?i, "?s")', $uid, $msg);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
}
|
||||
|
@ -50,19 +50,29 @@ function show_messages()
|
|||
|
||||
|
||||
show_messages();
|
||||
Template::header('chat');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<style>
|
||||
form { padding: 3px; position: fixed; bottom: 0; width: 100%; }
|
||||
form input { border: 0; padding: 10px; width: 80%; margin-right: .5%; }
|
||||
form input[type="submit"] { width: 15%; border: none; padding: 10px; }
|
||||
form {
|
||||
padding: 3px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
form input {
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
width: 80%;
|
||||
margin-right: .5%;
|
||||
}
|
||||
|
||||
form input[type="submit"] {
|
||||
width: 15%;
|
||||
border: none;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<?php ?>
|
||||
</div>
|
||||
|
@ -70,4 +80,3 @@ show_messages();
|
|||
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
|
||||
<input type="submit" value="Отправить">
|
||||
</form>
|
||||
</body>
|
|
@ -33,13 +33,13 @@ if($_GET['id'] == 1) {
|
|||
} elseif($_GET['id'] == 6) {
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1'));
|
||||
if(isset($user['id'])) {
|
||||
addch('<font color=red>Внимание!</font> Ваш бой не может начаться по причине <b>Группа не набрана</b>', $user['login'], $user['room']);
|
||||
addch('<font color=red>Внимание!</font> Ваш бой не может начаться по причине <b>Группа не набрана</b>', $user['login'], $user->room);
|
||||
}
|
||||
} elseif($_GET['id'] == 7) {
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1'));
|
||||
if(isset($user['id'])) {
|
||||
addch('<font color=red>Внимание!</font> Ваш бой начался.', $user['login'], $user['room']);
|
||||
addch('<font color=red>Внимание!</font> Ваш бой начался.', $user['login'], $user->room);
|
||||
}
|
||||
} else {
|
||||
die();
|
||||
exit;
|
||||
}
|
48
city.php
|
@ -3,10 +3,11 @@
|
|||
* Центральная площадь
|
||||
*/
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once "functions.php";
|
||||
$user = $user ?? [];
|
||||
$tm = time();
|
||||
|
@ -72,11 +73,11 @@ switch ($location[0]) {
|
|||
move(2702, 'city.php');
|
||||
break;
|
||||
case 'got':
|
||||
if ($user['room'] == 20) {
|
||||
if ($user->room == 20) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: main.php?goto=arena');
|
||||
die();
|
||||
exit;
|
||||
break;
|
||||
case 'level7':
|
||||
header('location: city.php?strah');
|
||||
|
@ -106,7 +107,7 @@ switch ($location[0]) {
|
|||
move(25, 'comission.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 21) {
|
||||
} elseif ($user->room == 21) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?cp');
|
||||
|
@ -130,7 +131,7 @@ switch ($location[0]) {
|
|||
move(650, 'ul_clans.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2111) {
|
||||
} elseif ($user->room == 2111) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: city.php?strah');
|
||||
|
@ -148,7 +149,7 @@ switch ($location[0]) {
|
|||
move(666, 'jail.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2601) {
|
||||
} elseif ($user->room == 2601) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?bps');
|
||||
|
@ -166,7 +167,7 @@ switch ($location[0]) {
|
|||
move(404, 'vxod.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2701) {
|
||||
} elseif ($user->room == 2701) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: city.php?zaliv');
|
||||
|
@ -175,7 +176,7 @@ switch ($location[0]) {
|
|||
move(402, 'lab_chaos_enter.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2702) {
|
||||
} elseif ($user->room == 2702) {
|
||||
switch ($location[1]) {
|
||||
case 'level10':
|
||||
header('location: city.php?cp');
|
||||
|
@ -184,7 +185,7 @@ switch ($location[0]) {
|
|||
move(61, 'akadem.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 2655) {
|
||||
} elseif ($user->room == 2655) {
|
||||
switch ($location[1]) {
|
||||
case 'level10':
|
||||
header('location: city.php?zamk');
|
||||
|
@ -193,7 +194,7 @@ switch ($location[0]) {
|
|||
move(603, 'aren_of_angels.php');
|
||||
break;
|
||||
}
|
||||
} elseif ($user['room'] == 26) {
|
||||
} elseif ($user->room == 26) {
|
||||
switch ($location[1]) {
|
||||
case 'level4':
|
||||
header('location: city.php?cp');
|
||||
|
@ -255,12 +256,8 @@ function bgset($img)
|
|||
}
|
||||
|
||||
$online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60));
|
||||
Template::header('city');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<HEAD>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
img.building:hover {
|
||||
filter: drop-shadow(2px 2px 2px white) sepia(15%);
|
||||
|
@ -278,9 +275,6 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
|
||||
document.onmousedown = Down;
|
||||
</script>
|
||||
<title></title>
|
||||
</HEAD>
|
||||
<body>
|
||||
<table class="allzeroes">
|
||||
<TR>
|
||||
<TD align=center></TD>
|
||||
|
@ -289,7 +283,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
<TR>
|
||||
<TD align=center colspan=2>
|
||||
<?php
|
||||
if ($user['room'] == 20) {
|
||||
if ($user->room == 20) {
|
||||
bgset('cap_cp');
|
||||
buildset(1, "cap_club", 30, 235, "Бойцовский Клуб");
|
||||
buildset(2, "cap_shop", 202, 171, "Магазин");
|
||||
|
@ -304,7 +298,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
buildset(9, "cap_tree2", 260, 530, "Новогодняя елка");
|
||||
buildset(14, "cap_sneg_3", 210, 390, "Снеговик");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 21) {
|
||||
} elseif ($user->room == 21) {
|
||||
bgset('cap_strash');
|
||||
buildset(5, "cap_bank", 180, 485, "Банк");
|
||||
buildset(14, "cap_registratura", 170, 113, "Регистратура кланов");
|
||||
|
@ -314,14 +308,14 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
buildset(13, "cap_flowershop", 220, 613, "Цветочный магазин");
|
||||
buildset(4, "cap_arr_left", 258, 21, "Центральная площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 26) {
|
||||
} elseif ($user->room == 26) {
|
||||
bgset('cap_park');
|
||||
buildset(6, "cap_gate", 170, 340, "Городские ворота", 1);
|
||||
buildset(660, "cap_vokzal", 163, 43, "Общежитие");
|
||||
buildset(3, "cap_arr_left", 259, 27, "Замковая площадь", 1);
|
||||
buildset(4, "cap_arr_right", 259, 715, "Центральная площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2601) {
|
||||
} elseif ($user->room == 2601) {
|
||||
bgset('cap_zamk');
|
||||
buildset(1052, "cap_lavka", 240, 425, "Храмовая лавка");
|
||||
buildset(10, "ava_post", 240, 300, "Сувенирный магазинчик", 1);
|
||||
|
@ -330,12 +324,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
buildset(55, "cap_arr_left", 258, 21, "Арена Богов", 1);
|
||||
buildset(4, "cap_arr_right", 260, 710, "Большая парковая улица", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2655) {
|
||||
} elseif ($user->room == 2655) {
|
||||
bgset('ar_e_n');
|
||||
buildset(2055, "cap_altr_g", 230, 340, "Арена Ангелов");
|
||||
buildset(10, "arr_right_png", 260, 710, "Замковая площадь", 1);
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2111) {
|
||||
} elseif ($user->room == 2111) {
|
||||
bgset('rist_bg');
|
||||
buildset(1, "cap_arr_uleft", 240, 30, "Страшилкина Улица", 1);
|
||||
buildset(2, "cap_arr_right", 245, 708, "Секретный Лабиринт", 1);
|
||||
|
@ -345,12 +339,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
buildset(203, "cap_rist_monstr", 145, 570, "Вход в Груповые сражения");
|
||||
buildset(21, "angelscastle", 131, 628, "Замок Мэра Города");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2701) {
|
||||
} elseif ($user->room == 2701) {
|
||||
bgset('arena_bg1');
|
||||
buildset(1, "cap_3strelka", 260, 30, "Берег Залива");
|
||||
buildset(2, "cap_shar_dark", 234, 356, "Лабиринт Хаоса");
|
||||
echo "</div>";
|
||||
} elseif ($user['room'] == 2702) {
|
||||
} elseif ($user->room == 2702) {
|
||||
bgset('cap_torg');
|
||||
buildset(6, "cap_arenda", 175, 70, "Академия");
|
||||
buildset(16, "cap_t_build42", 120, 300, "Аукцион");
|
||||
|
@ -363,5 +357,3 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
16
clan.php
|
@ -3,10 +3,11 @@ ob_start("ob_gzhandler");
|
|||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
include_once 'functions.php';
|
||||
if (!$user->clan) {
|
||||
die(err('Вы не состоите в клане!'));
|
||||
exit(err('Вы не состоите в клане!'));
|
||||
}
|
||||
try {
|
||||
$clanRow = db::c()->query('SELECT * FROM `clans` WHERE `id` = ?i', $user->clan)->fetch_assoc();
|
||||
|
@ -99,15 +100,8 @@ if ($login && $action == 'edit_status') {
|
|||
}
|
||||
|
||||
$clan_memberlist = db::c()->query('SELECT `id`, `login`, `status`, `level`, `room`, `align`, (select `id` from `online` WHERE `date` >= ?i AND `id` = users.`id`) AS `online` FROM `users` WHERE `klan` = ?i ORDER BY `online` DESC , `login` ASC', (time() - 60), $clanRow['id']);
|
||||
|
||||
Template::header('clan');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<button onclick="location.href='main.php'">Вернуться</button>
|
||||
<?php if (!empty($status)) {err($status);} ?>
|
||||
|
@ -116,7 +110,7 @@ $clan_memberlist = db::c()->query('SELECT `id`, `login`, `status`, `level`, `roo
|
|||
<tr>
|
||||
<td>
|
||||
<p style="width: 50%; vertical-align: top;" rowspan=2>
|
||||
<h3><img src="./i/clan/<?= $clanRow['short'] ?>.gif"><?= $clanRow['name'] ?></h3>
|
||||
<h3><img src="./i/clan/<?= $clanRow['short'] ?>.png"><?= $clanRow['name'] ?></h3>
|
||||
Количество рейтинговых очков клана: <span
|
||||
style="color: #428f21; font-size: larger;"><?= $clanRow['rating'] ?></span><br>
|
||||
|
||||
|
@ -237,5 +231,3 @@ $clan_memberlist = db::c()->query('SELECT `id`, `login`, `status`, `level`, `roo
|
|||
document.getElementById(option).innerHTML = "<form method='post'><input placeholder='Имя персонажа' name='login'><button name='action' value='" + option + "' type='submit'>Ок</button><button>×</button></form>";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
296
clan_castle.php
|
@ -1,181 +1,178 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (!($_SESSION['uid'] >0)) header("Location: index.php");
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
include "config.php";
|
||||
|
||||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||||
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . " AND (type=13 OR type=12 OR type=14) limit 1;"));
|
||||
$klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;"));
|
||||
|
||||
include "functions.php";
|
||||
if ($user['room'] != 45) { header("Location: main.php"); die(); }
|
||||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user->room != 45) {
|
||||
header("Location: main.php");
|
||||
exit;
|
||||
}
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$cc_date = mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var`='cc_time' LIMIT 1;"));
|
||||
$ccd = $cc_date['value'];
|
||||
|
||||
if($_POST['admin_start'])
|
||||
{
|
||||
if ($_POST['admin_start']) {
|
||||
$tm = time();
|
||||
mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
if($_POST['admin_start1'])
|
||||
{
|
||||
if ($_POST['admin_start1']) {
|
||||
$tm = time() - 900;
|
||||
mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
|
||||
if($_POST['add_zay'])
|
||||
{
|
||||
if ($_POST['add_zay']) {
|
||||
mysql_query("INSERT INTO `clan_castle` VALUES ('{$user['id']}','{$user['klan']}');");
|
||||
die("<script>location.href='clan_castle.php';</script>");
|
||||
exit("<script>location.href='clan_castle.php';</script>");
|
||||
}
|
||||
|
||||
Template::header('Замок Мэра');
|
||||
?>
|
||||
<HTML><HEAD>
|
||||
<!-- JS -->
|
||||
<script>
|
||||
function refreshPeriodic()
|
||||
{
|
||||
function refreshPeriodic() {
|
||||
location.href = 'clan_castle.php';
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
</script>
|
||||
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<META Http-Equiv=Cache-Control Content=no-cache>
|
||||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
||||
<META Http-Equiv=Expires Content=0>
|
||||
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#d4d4d4>
|
||||
|
||||
<TABLE border=0 width=600 cellspacing="0" cellpadding="0" align=left>
|
||||
|
||||
<tr><td><h3>Замок Мэра</td></tr>
|
||||
<tr><td><FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM></td></tr>
|
||||
<tr><td>Добро пожаловать в Замок доброго и справедливого Мэра!
|
||||
Если Вы заинтерисованы в обладании правами на Замок, либо считаете что обладаете достаточными способностями для исполнения
|
||||
<tr>
|
||||
<td><h3>Замок Мэра</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<FORM action="city.php" method=GET><INPUT TYPE="submit" value="Вернуться в Город" name="bps"></FORM>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Добро пожаловать в Замок доброго и справедливого Мэра!
|
||||
Если Вы заинтерисованы в обладании правами на Замок, либо считаете что обладаете достаточными способностями
|
||||
для исполнения
|
||||
обязанностей Мэра, приглашаем Вас и Ваших единомышлеников поселиться в Замке! <br/> <br/>
|
||||
Внимание! Администрация не несет ответственности за возможные конфликты на основе спора о правах обладания Замком,
|
||||
Внимание! Администрация не несет ответственности за возможные конфликты на основе спора о правах обладания
|
||||
Замком,
|
||||
целость и сохранность Ваших личных вещей, здоровье и жизни посетителей!<br/>
|
||||
<?php
|
||||
$own=mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_owner' LIMIT 1;"));
|
||||
if($own['value']>0) $tmp_k=mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$own['value']}' LIMIT 1;"));
|
||||
echo('<br />Над Замком развевается флаг ');
|
||||
if($tmp_k['name'])
|
||||
echo('<strong>клана <img title="'.$tmp_k['name'].'" src="i/clan/'.$tmp_k['name'].'.gif">'.$tmp_k['name'].'</strong><br />');
|
||||
else
|
||||
echo('<strong>сил Хаоса</strong><br />');
|
||||
|
||||
if($user['align']==2.99) echo('<FORM action="clan_castle.php" method=POST><INPUT TYPE="submit" value="Админ: запустить" name="admin_start"><br></FORM>');
|
||||
if($user['align']==2.99) echo('<FORM action="clan_castle.php" method=POST><INPUT TYPE="submit" value="Админ: старт боя" name="admin_start1"><br></FORM>');
|
||||
if($ccd>=time())
|
||||
{
|
||||
echo("Следующая битва: ".(date("j.m",$ccd))." в ".(date("H:i",$ccd)));
|
||||
|
||||
$own = mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_owner'"));
|
||||
if ($own['value'] > 0) {
|
||||
$tmp_k = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$own['value']}'"));
|
||||
}
|
||||
elseif($ccd<time() && ($ccd+900)>=time())
|
||||
{
|
||||
$zays=array();
|
||||
echo("Заявили права на Замок Мэра:");
|
||||
echo('<TABLE border=0 width=100% cellspacing="0" cellpadding="0" align=left>');
|
||||
echo '<br />Над Замком развевается флаг ';
|
||||
if ($tmp_k['name']) {
|
||||
echo '<strong>клана <img title="' . $tmp_k['name'] . '" src="i/clan/' . $tmp_k['name'] . '.png">' . $tmp_k['name'] . '</strong><br />';
|
||||
} else {
|
||||
echo '<strong>сил Хаоса</strong><br />';
|
||||
}
|
||||
|
||||
if ($user->admin) {
|
||||
echo '<FORM action="clan_castle.php" method=POST><INPUT TYPE="submit" value="Админ: запустить" name="admin_start"><br></FORM>';
|
||||
echo '<FORM action="clan_castle.php" method=POST><INPUT TYPE="submit" value="Админ: старт боя" name="admin_start1"><br></FORM>';
|
||||
}
|
||||
if ($ccd >= time()) {
|
||||
echo "Следующая битва: " . (date("j.m", $ccd)) . " в " . (date("H:i", $ccd));
|
||||
} elseif ($ccd < time() && ($ccd + 900) >= time()) {
|
||||
$zays = [];
|
||||
echo "Заявили права на Замок Мэра:";
|
||||
echo '<TABLE border=0 width=100% cellspacing="0" cellpadding="0" align=left>';
|
||||
$all_c = mysql_query("SELECT * FROM `clan_castle`;");
|
||||
while ($a_zay=mysql_fetch_array($all_c))
|
||||
{
|
||||
while ($a_zay = mysql_fetch_array($all_c)) {
|
||||
$zays[] = $a_zay['clan'];
|
||||
$tmp_k = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$a_zay['clan']}' LIMIT 1;"));
|
||||
echo '<tr><td><strong>Клан <img title="'.$tmp_k['name'].'" src="i/clan/'.$tmp_k['name'].'.gif">'.$tmp_k['name'].'</strong></td></tr>';
|
||||
echo '<tr><td><strong>Клан <img title="' . $tmp_k['name'] . '" src="i/clan/' . $tmp_k['name'] . '.png">' . $tmp_k['name'] . '</strong></td></tr>';
|
||||
}
|
||||
if(empty($zays))
|
||||
if (empty($zays)) {
|
||||
echo '<tr><td><strong>Ждем смелых ...</strong></td></tr>';
|
||||
echo('</TABLE>');
|
||||
echo("<br/>Прием заявок до: <strong>".(date("H:i",$ccd+900))."</strong>");
|
||||
}
|
||||
echo '</TABLE>';
|
||||
echo "<br/>Прием заявок до: <strong>" . (date("H:i", $ccd + 900)) . "</strong>";
|
||||
|
||||
$own = mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_owner' LIMIT 1;"));
|
||||
|
||||
if ($klan['glava']==$user['id'] && !in_array($user['klan'],$zays) && $user['klan']!=$own['value'])
|
||||
{
|
||||
echo("<br />Прием заявок от глав кланов:");
|
||||
if ($klan['glava'] == $user['id'] && !in_array($user['klan'], $zays) && $user['klan'] != $own['value']) {
|
||||
echo "<br />Прием заявок от глав кланов:";
|
||||
echo '<tr><td><FORM action="clan_castle.php" method=POST><INPUT TYPE="submit" value="Заявиться" name="add_zay"></FORM></td></tr>';
|
||||
}
|
||||
|
||||
}
|
||||
elseif(($ccd+900)<time() && ($ccd+90+900)>=time())
|
||||
{
|
||||
$zays=array();
|
||||
} elseif (($ccd + 900) < time() && ($ccd + 90 + 900) >= time()) {
|
||||
$zays = [];
|
||||
$all_zay = mysql_query("SELECT * FROM `clan_castle`;");
|
||||
while ($a_zay=mysql_fetch_array($all_zay))
|
||||
{
|
||||
while ($a_zay = mysql_fetch_array($all_zay)) {
|
||||
$cur_c = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `klan`='{$a_zay['clan']}' AND `room`='45';"));
|
||||
for($cc=0;$cc<$cur_c;$cc++)
|
||||
for ($cc = 0; $cc < $cur_c; $cc++) {
|
||||
$zays[] = $a_zay['clan'];
|
||||
}
|
||||
}
|
||||
$own = mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_owner' LIMIT 1;"));
|
||||
shuffle($zays);
|
||||
$lucky = $zays[array_rand($zays)];
|
||||
// if($lucky>0 && $lucky!=$own['vlaue']);
|
||||
mysql_query("UPDATE `variables` SET `value`='{$lucky}' WHERE `var`='castle_att';");
|
||||
$tmp_k = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$lucky}' LIMIT 1;"));
|
||||
|
||||
if($own['value']>0)
|
||||
if ($own['value'] > 0) {
|
||||
$tmp_o = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$own['value']}' LIMIT 1;"));
|
||||
|
||||
if($tmp_k) echo('Внимание!<img title="'.$tmp_k['name'].'" src="i/clan/'.$tmp_k['name'].'.gif"><strong>'.$tmp_k['name'].'</strong> собираются штурмовать замок');
|
||||
if($tmp_k && $own['value']>0) echo('<img title="'.$tmp_o['name'].'" src="i/clan/'.$tmp_o['name'].'.gif"><strong>'.$tmp_o['name'].'</strong>!');
|
||||
if($tmp_k && !$own['value']>0) echo('!');
|
||||
}
|
||||
elseif(($ccd+90+900)<=time())
|
||||
{
|
||||
|
||||
if ($tmp_k) {
|
||||
echo 'Внимание!<img title="' . $tmp_k['name'] . '" src="i/clan/' . $tmp_k['name'] . '.png"><strong>' . $tmp_k['name'] . '</strong> собираются штурмовать замок';
|
||||
}
|
||||
if ($tmp_k && $own['value'] > 0) {
|
||||
echo '<img title="' . $tmp_o['name'] . '" src="i/clan/' . $tmp_o['name'] . '.png"><strong>' . $tmp_o['name'] . '</strong>!';
|
||||
}
|
||||
if ($tmp_k && !$own['value'] > 0) {
|
||||
echo '!';
|
||||
}
|
||||
} elseif (($ccd + 90 + 900) <= time()) {
|
||||
$att = mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_att' LIMIT 1;"));
|
||||
$own = mysql_fetch_array(mysql_query("SELECT `value` FROM `variables` WHERE `var` = 'castle_owner' LIMIT 1;"));
|
||||
|
||||
$at_t=array();
|
||||
$ow_t=array();
|
||||
$at_t = [];
|
||||
$ow_t = [];
|
||||
|
||||
if($att['value']>0)
|
||||
{
|
||||
if ($att['value'] > 0) {
|
||||
$att_r = mysql_query("SELECT `id` FROM `users` WHERE `klan`='{$att['value']}' AND `room`='45';");
|
||||
while($a=mysql_fetch_array($att_r))
|
||||
{
|
||||
while ($a = mysql_fetch_array($att_r)) {
|
||||
$at_on = mysql_fetch_array(mysql_query("select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = '{$a['id']}' LIMIT 1;"));
|
||||
if($at_on[0])
|
||||
if ($at_on[0]) {
|
||||
$at_t[] = $a['id'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($own['value']>0)
|
||||
{
|
||||
if ($own['value'] > 0) {
|
||||
$def_r = mysql_query("SELECT `id` FROM `users` WHERE `klan`='{$own['value']}' AND `room`='45';");
|
||||
while($o=mysql_fetch_array($def_r))
|
||||
{
|
||||
while ($o = mysql_fetch_array($def_r)) {
|
||||
$df_on = mysql_fetch_array(mysql_query("select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = '{$o['id']}' LIMIT 1;"));
|
||||
if($df_on[0])
|
||||
if ($df_on[0]) {
|
||||
$ow_t[] = $o['id'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($at_t))
|
||||
{
|
||||
echo("Смелых так и не нашлось...<br/>");
|
||||
}
|
||||
elseif(empty($ow_t) && ($own['value']>0))
|
||||
{
|
||||
echo("Хозяева слили замок без боя...<br/>");
|
||||
if (empty($at_t)) {
|
||||
echo "Смелых так и не нашлось...<br/>";
|
||||
} elseif (empty($ow_t) && ($own['value'] > 0)) {
|
||||
echo "Хозяева слили замок без боя...<br/>";
|
||||
$cc_own = mysql_fetch_array(mysql_query("SELECT `value` FROM variables WHERE var='castle_owner' LIMIT 1;"));
|
||||
$cc_k = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$cc_own['value']}' LIMIT 1;"));
|
||||
$cc_att = mysql_fetch_array(mysql_query("SELECT `value` FROM variables WHERE var='castle_att' LIMIT 1;"));
|
||||
$cc_a = mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id` = '{$cc_att['value']}' LIMIT 1;"));
|
||||
{AddChatSystem('<font color=red><strong>Клан <img title="'.$cc_a['name'].'" src="i/clan/'.$cc_a['name'].'.gif">'.$cc_a['name'].'</strong> без боя забрал у <strong>клана <img title="'.$cc_k['name'].'" src="i/clan/'.$cc_k['name'].'.gif">'.$cc_k['name'].'</strong> Замок Мэра</font>');}
|
||||
|
||||
AddChatSystem('<font color=red><strong>Клан <img title="' . $cc_a['name'] . '" src="i/clan/' . $cc_a['name'] . '.png">' . $cc_a['name'] . '</strong> без боя забрал у <strong>клана <img title="' . $cc_k['name'] . '" src="i/clan/' . $cc_k['name'] . '.gif">' . $cc_k['name'] . '</strong> Замок Мэра</font>');
|
||||
|
||||
|
||||
$c_prev = mysql_fetch_array(mysql_query("SELECT `glava`,`align` FROM `clans` WHERE `id`='{$own['value']}' LIMIT 1;"));
|
||||
mysql_query("UPDATE `users` SET `align`='{$c_prev['align']}',`abil`='' WHERE `id`='{$c_prev['glava']}';");
|
||||
|
@ -185,25 +182,20 @@ elseif(($ccd+90+900)<=time())
|
|||
mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';");
|
||||
|
||||
$c_lead = mysql_fetch_array(mysql_query("SELECT `glava` FROM `clans` WHERE `id`='{$att['value']}' LIMIT 1;"));
|
||||
$abil=array();
|
||||
for($i=0;$i<10;$i++) $abil[$i]=9;
|
||||
mysql_query("UPDATE `users` SET `align`='7.97',`abil`='".serialize($abil)."' WHERE `id`='{$c_lead['glava']}';");
|
||||
|
||||
|
||||
|
||||
mysql_query("DELETE FROM `clan_castle`");
|
||||
$abil = [];
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$abil[$i] = 9;
|
||||
}
|
||||
elseif($own['value']==0)
|
||||
{
|
||||
mysql_query("UPDATE `users` SET `align`='7.97',`abil`='" . serialize($abil) . "' WHERE `id`='{$c_lead['glava']}';");
|
||||
mysql_query("DELETE FROM `clan_castle`");
|
||||
} elseif ($own['value'] == 0) {
|
||||
//побоище против ботов
|
||||
//ставим ботов
|
||||
$bots_raw=array
|
||||
("2897","2897","2897","2897","2897","2897","2897","2897","2897","2897","4150","4150","4156","4156","4156","4156",
|
||||
"2895","2895","4158","4158","4158","4158","4158","2900");
|
||||
$bots=array();
|
||||
foreach($bots_raw as $bot_id)
|
||||
if($bot_id>0)
|
||||
{
|
||||
$bots_raw = ["2897", "2897", "2897", "2897", "2897", "2897", "2897", "2897", "2897", "2897", "4150", "4150", "4156", "4156", "4156", "4156",
|
||||
"2895", "2895", "4158", "4158", "4158", "4158", "4158", "2900"];
|
||||
$bots = [];
|
||||
foreach ($bots_raw as $bot_id) {
|
||||
if ($bot_id > 0) {
|
||||
$b_pers = mysql_fetch_array(mysql_query("SELECT `login`,`maxhp` FROM users WHERE id='{$bot_id}' LIMIT 1;"));
|
||||
$bot_hp = $b_pers['maxhp'];
|
||||
$bot_name = $b_pers['login'];
|
||||
|
@ -211,17 +203,15 @@ elseif(($ccd+90+900)<=time())
|
|||
mysql_query("INSERT INTO `bots` (`name`,`prototype`,`battle`,`hp`) values ('" . $bot_name . " " . ($nb[0] + 1) . "','" . $bot_id . "','','" . $bot_hp . "');");
|
||||
$bots[] = mysql_insert_id();
|
||||
}
|
||||
|
||||
//отаке!
|
||||
|
||||
$teams = array();
|
||||
foreach($at_t as $b)
|
||||
foreach($bots as $gf)
|
||||
{
|
||||
$teams[$gf][$b] = array(0,0,time());
|
||||
$teams[$b][$gf] = array(0,0,time());
|
||||
}
|
||||
|
||||
//отаке!
|
||||
$teams = [];
|
||||
foreach ($at_t as $b) {
|
||||
foreach ($bots as $gf) {
|
||||
$teams[$gf][$b] = [0, 0, time()];
|
||||
$teams[$b][$gf] = [0, 0, time()];
|
||||
}
|
||||
}
|
||||
mysql_query("INSERT INTO `battle`
|
||||
(
|
||||
`id`,`coment`,`teams`,`timeout`,`type`,`status`,`t1`,`t2`,`to1`,`to2`,`blood`
|
||||
|
@ -236,19 +226,26 @@ elseif(($ccd+90+900)<=time())
|
|||
$rr = "<b>";
|
||||
|
||||
foreach ($at_t as $k => $v) {
|
||||
if ($k!=0) { $rr.=", "; $rrc.=", "; }
|
||||
if ($k != 0) {
|
||||
$rr .= ", ";
|
||||
$rrc .= ", ";
|
||||
}
|
||||
$rr .= Nick::id($v)->full(1);
|
||||
$rrc .= Nick::id($v)->short();
|
||||
addchp('<font color=red>Внимание!</font> Ваш бой начался!<BR>\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ', '{[]}' . Nick::id($v)->short() . '{[]}');
|
||||
}
|
||||
$rr .= "</b> и <b>"; $rrc .= "</b> и <b>";
|
||||
$rr .= "</b> и <b>";
|
||||
$rrc .= "</b> и <b>";
|
||||
foreach ($bots as $k => $v) {
|
||||
if ($k!=0) { $rr.=", "; $rrc.=", ";}
|
||||
if ($k != 0) {
|
||||
$rr .= ", ";
|
||||
$rrc .= ", ";
|
||||
}
|
||||
$rr .= Nick::id($v)->full(1);
|
||||
$rrc .= Nick::id($v)->short();
|
||||
}
|
||||
$rr .= "</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Поединок</a> между <B>" . $rrc . "</B> начался. ", $user->room);
|
||||
mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>');");
|
||||
|
||||
addlog($id, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>");
|
||||
|
@ -261,17 +258,15 @@ elseif(($ccd+90+900)<=time())
|
|||
mysql_query("UPDATE `bots` SET `battle` ={$id} WHERE `id`= {$v}");
|
||||
}
|
||||
mysql_query("DELETE FROM `clan_castle`");
|
||||
}
|
||||
elseif(!empty($at_t) && !empty($ow_t))
|
||||
{
|
||||
} elseif (!empty($at_t) && !empty($ow_t)) {
|
||||
//побоище
|
||||
|
||||
$teams = array();
|
||||
foreach($at_t as $b)
|
||||
foreach($ow_t as $gf)
|
||||
{
|
||||
$teams[$gf][$b] = array(0,0,time());
|
||||
$teams[$b][$gf] = array(0,0,time());
|
||||
$teams = [];
|
||||
foreach ($at_t as $b) {
|
||||
foreach ($ow_t as $gf) {
|
||||
$teams[$gf][$b] = [0, 0, time()];
|
||||
$teams[$b][$gf] = [0, 0, time()];
|
||||
}
|
||||
}
|
||||
|
||||
mysql_query("INSERT INTO `battle`
|
||||
|
@ -288,20 +283,27 @@ elseif(($ccd+90+900)<=time())
|
|||
$rr = "<b>";
|
||||
|
||||
foreach ($at_t as $k => $v) {
|
||||
if ($k!=0) { $rr.=", "; $rrc.=", "; }
|
||||
if ($k != 0) {
|
||||
$rr .= ", ";
|
||||
$rrc .= ", ";
|
||||
}
|
||||
$rr .= Nick::id($v)->full(1);
|
||||
$rrc .= Nick::id($v)->short();
|
||||
addchp('<font color=red>Внимание!</font> Ваш бой начался!<BR>\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ', '{[]}' . Nick::id($v)->short() . '{[]}');
|
||||
}
|
||||
$rr .= "</b> и <b>"; $rrc .= "</b> и <b>";
|
||||
$rr .= "</b> и <b>";
|
||||
$rrc .= "</b> и <b>";
|
||||
foreach ($ow_t as $k => $v) {
|
||||
if ($k!=0) { $rr.=", "; $rrc.=", ";}
|
||||
if ($k != 0) {
|
||||
$rr .= ", ";
|
||||
$rrc .= ", ";
|
||||
}
|
||||
$rr .= Nick::id($v)->full(1);
|
||||
$rrc .= Nick::id($v)->short();
|
||||
addchp('<font color=red>Внимание!</font> Ваш бой начался!<BR>\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ', '{[]}' . Nick::id($v)->short() . '{[]}');
|
||||
}
|
||||
$rr .= "</b>";
|
||||
addch ("<a href=logs.php?log=".$id." target=_blank>Поединок</a> между <B>".$rrc."</B> начался. ",$user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Поединок</a> между <B>" . $rrc . "</B> начался. ", $user->room);
|
||||
mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>');");
|
||||
|
||||
addlog($id, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>");
|
||||
|
@ -321,9 +323,7 @@ elseif(($ccd+90+900)<=time())
|
|||
mysql_query("DELETE FROM `clan_castle`");
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align=right><img width="260" src="i/zamok/4.jpg" /></div>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<div align=right><img width="260" src="i/castle.jpg"></div>
|
|
@ -47,20 +47,13 @@ if ($klanName && $klanAbbr && $klanDescr) {
|
|||
err($errorMessage);
|
||||
}
|
||||
}
|
||||
Template::header('Регистратура кланов');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
function leave() {
|
||||
top.frames['main'].location = 'city.php?strah'
|
||||
}
|
||||
</script>
|
||||
<title>Регистратура кланов</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Регистратура кланов</h1>
|
||||
<a href=# onclick=leave()> ← выйти из регистратуры</a>
|
||||
<?php
|
||||
|
@ -97,5 +90,3 @@ if ($user->admin) {
|
|||
<input type="submit" value="Подать заявку">
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
17
clans.php
|
@ -1,18 +1,10 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2018.
|
||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||
* Project name: Battles-Game
|
||||
*/
|
||||
|
||||
Template::header('Список кланов');
|
||||
include_once "config.php";
|
||||
$claninf = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING'));
|
||||
|
||||
|
@ -20,16 +12,13 @@ if ($claninf AND ($query = db::c()->query('SELECT * FROM `clans` WHERE `name` =
|
|||
echo "<h1>{$query['name']}</h1><p>{$query['descr']}</p>";
|
||||
$clanlist = db::c()->query('SELECT `login`,`status` FROM `users` WHERE `klan` = ?i',$query['id']);
|
||||
while ($member = $clanlist->fetch_assoc()) {
|
||||
echo "<img src=i/align_",$query['align'],".gif> <img src=i/clan/",$query['short'],".gif> ",$member['login']," - ",$member['status'],"<br>";
|
||||
echo "<img src=i/align_",$query['align'],".png> <img src=i/clan/",$query['short'],".png> ",$member['login']," - ",$member['status'],"<br>";
|
||||
}
|
||||
} else {
|
||||
echo "<h1>Список кланов</h1>";
|
||||
$query = db::c()->query('SELECT `align`,`name`,`short` FROM `clans` ORDER BY `name` ASC');
|
||||
while ($clanrow = $query->fetch_assoc()) {
|
||||
$frm = "<img src='i/align_%s.gif'> <img src='i/clan/%s.gif'> <a href='?%s'>%s</a><br>";
|
||||
$frm = "<img src='i/align_%s.png'> <img src='i/clan/%s.png'> <a href='?%s'>%s</a><br>";
|
||||
echo sprintf($frm,$clanrow['align'],$clanrow['short'],$clanrow['name'],$clanrow['name']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -31,7 +31,7 @@ class Nick extends User
|
|||
private function getClan()
|
||||
{
|
||||
if (isset($this->clan)) {
|
||||
return sprintf('<img src="i/clan/%s.gif">', $this->clan);
|
||||
return sprintf('<img src="i/clan/%s.png">', $this->clan);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -10,14 +10,26 @@ class Template
|
|||
{
|
||||
}
|
||||
|
||||
public static function header($title = null)
|
||||
/**
|
||||
* @param string|null $title
|
||||
* @param int|null $return
|
||||
*
|
||||
* @return false|string
|
||||
*/
|
||||
public static function header(string $title = null, int $return = null)
|
||||
{
|
||||
return <<<HTML_HEADER
|
||||
$head = <<<HTML_HEADER
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<meta charset="utf-8">
|
||||
<link href="/css/main.css" rel="stylesheet">
|
||||
<link href="/css/btn.css" rel=stylesheet >
|
||||
<title>$title</title>
|
||||
HTML_HEADER;
|
||||
if (!$return) {
|
||||
echo $head;
|
||||
return false;
|
||||
}
|
||||
return $head;
|
||||
}
|
||||
}
|
|
@ -12,14 +12,14 @@ class Tournament
|
|||
global $user;
|
||||
$chek = mysql_fetch_row(mysql_query("select id from turnament where id=" . $id . " and old=0"));
|
||||
if ($chek[0] == '') {
|
||||
die("Жаль, очень жаль....");
|
||||
exit("Жаль, очень жаль....");
|
||||
}
|
||||
|
||||
if (mysql_query("insert into turnamuser (idturnam,iduser,level) values(" . $id . "," . $user['id'] . "," . $user['level'] . ")")) {
|
||||
mysql_query("update turnament set kolvo=kolvo+1 where id=" . $id);
|
||||
echo "Регистрация пройдена!";
|
||||
} else {
|
||||
die("Вы уже зарегистрированы.");
|
||||
exit("Вы уже зарегистрированы.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ class Tournament
|
|||
mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = " . $user1 . " OR `id` = " . $user2);
|
||||
// создаем лог
|
||||
$rr = "<b>" . Nick::id($user['id'])->full(1) . "</b> и <b>" . Nick::id($jert['id'])->full(1) . "</b>";
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $id . " target=_blank>Бой</a> между <B><b>" . Nick::id($user['id'])->short() . "</b> и <b>" . Nick::id($jert['id'])->short() . "</b> начался. ", $user->room);
|
||||
addlog($id, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " решили выяснить кто из них сильнее. <i>(турнир)</i><BR>");
|
||||
return $id;
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ class fbattle
|
|||
// ставим статус битвы на "нет битвы"
|
||||
$this->status = 0;
|
||||
//header ("Location:main.php");
|
||||
//die();
|
||||
//exit;
|
||||
//$this->return = 5;
|
||||
//return $this->return;
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ class fbattle
|
|||
// обновить битку
|
||||
$this->update_battle();
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1701,7 +1701,7 @@ class fbattle
|
|||
}
|
||||
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
|
||||
if ($location['dir'] == 0) {
|
||||
|
@ -1790,13 +1790,13 @@ class fbattle
|
|||
// выносим хп-ку и выходим из боя
|
||||
|
||||
mysql_query('UPDATE `battle` SET `t1hist` = \'' . implode(", ", $nks1hist) . '\', `t2hist` = \'' . implode(", ", $nks2hist) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;');
|
||||
addch("<a href=logs.php?log=" . $this->battle_data['id'] . " target=_blank>Поединок</a> между <B>" . $rr . "</B> закончен. ", $user['room']);
|
||||
addch("<a href=logs.php?log=" . $this->battle_data['id'] . " target=_blank>Поединок</a> между <B>" . $rr . "</B> закончен. ", $user->room);
|
||||
mysql_query('UPDATE `battle` SET `exp` = \'' . serialize($this->exp) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;');
|
||||
mysql_query("DELETE FROM `bots` WHERE `battle` = {$this->user['battle']};");
|
||||
mysql_query("UPDATE users SET `battle` =0, `fullhptime` = " . time() . " WHERE `battle` = {$this->user['battle']}");
|
||||
echo mysql_error();
|
||||
unset($this->battle);
|
||||
//header("Location: fbattle.php"); die();
|
||||
//header("Location: fbattle.php"); exit;
|
||||
return true;
|
||||
// =================================================================
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
$floor = mysql_fetch_row(mysql_query("SELECT `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
||||
if (!isset($cavedata[$user['room']]['x' . $floor])) {
|
||||
if (!isset($cavedata[$user->room]['x' . $floor])) {
|
||||
$floor = 1;
|
||||
}
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ $lomka1 = $lomka;
|
|||
|
||||
foreach ($lomka1 as $k => $v) {
|
||||
if ($v < _BOTSEPARATOR_) {
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
||||
}
|
||||
if ($user['laba'] > 0) {
|
||||
mysql_query('UPDATE `users` SET `x` = `xf`, `y` = `yr` WHERE `id` = "' . $v . '" LIMIT 1');
|
||||
die('Suka');
|
||||
exit('Suka');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ function cavesys($text)
|
|||
}
|
||||
}
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
include("CaveItems.php");
|
||||
mysql_query('LOCK TABLES `cavebots` WRITE, `caveitems` WRITE, `shop` WRITE, `caveparties` WRITE');
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir`, `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
||||
|
@ -55,7 +55,7 @@ if (in_array($user['room'], Config::$caverooms)) {
|
|||
$bot = $rec['bot'];
|
||||
$cnt = $rec['cnt'];
|
||||
if (@$caveitems[$bot]) {
|
||||
if ($user['room'] == 621) {
|
||||
if ($user->room == 621) {
|
||||
$i = mt_rand(0, (count($caveitems[$bot]) - 1));
|
||||
$item = $caveitems[$bot][$i];
|
||||
if (getchance($item['chance'])) {
|
||||
|
|
|
@ -391,7 +391,7 @@ TASK;
|
|||
return $r;
|
||||
}
|
||||
|
||||
public function endq($id, $tp, $user)
|
||||
public function endq($id, $tp, $user):void
|
||||
{
|
||||
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `delete` = "0" AND `min_lvl` <= "' . $user['level'] . '" AND `max_lvl` >= "' . $user['level'] . '" AND `id` = "' . mysql_real_escape_string($id) . '" LIMIT 1'));
|
||||
$qlst = mysql_fetch_array(mysql_query('SELECT `id` FROM `actions` WHERE `uid` = "' . $user['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` = "go" LIMIT 1'));
|
||||
|
@ -569,7 +569,7 @@ TASK;
|
|||
mysql_query('UPDATE `users` SET `money` = "' . $user['money'] . '", `exp` = "' . $user['exp'] . '", `doblest` = "' . $user['doblest'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
$this->error = 'Вы успешно сдали задание!';
|
||||
$text = '<font style="color: Red;">Внимание!</font> За успешно выполненное задание Вы получили : ' . $c;
|
||||
$this->msg($text, '{[]}' . $user['login'] . '{[]}', $user['room']);
|
||||
$this->msg($text, '{[]}' . $user['login'] . '{[]}', $user->room);
|
||||
} else {
|
||||
$this->error = 'Не все условия задания были выполнены ...';
|
||||
}
|
||||
|
|
|
@ -29,7 +29,9 @@ $byingItemId = (int)filter_input(INPUT_GET, 'set', FILTER_VALIDATE_INT, ['option
|
|||
|
||||
if ($putItemId) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`cost` FROM `inventory` WHERE `dressed` = 0 AND `id` = ?i AND `owner` = ?i', $putItemId, $_SESSION['uid'])->fetch_assoc();
|
||||
if (empty($putItemCost)) $putItemCost = $dress['cost'];
|
||||
if (empty($putItemCost)) {
|
||||
$putItemCost = $dress['cost'];
|
||||
}
|
||||
$commission = ceil($putItemCost / 10); # 10% от суммы с округлением вверх.
|
||||
if ($user['money'] > $commission) {
|
||||
|
||||
|
@ -39,8 +41,12 @@ if ($putItemId) {
|
|||
db::c()->query('UPDATE `inventory` SET `setsale` = ?i WHERE `id` = ?i', $putItemCost, $putItemId);
|
||||
db::c()->query('UPDATE `users` SET `money` = `money` - ?i WHERE `id` = ?i', $commission, $_SESSION['uid']);
|
||||
$status = "Вы сдали в магазин «{$dress['name']}» за {$putItemCost} кр. Вычтено за услуги магазина: {$commission} кр.";
|
||||
} else $status = "Предмет не найден в инвентаре!";
|
||||
} else $status = "У вас не хватает " . $commission - $user['money'] . " кр. чтобы оплатить комиссию!";
|
||||
} else {
|
||||
$status = "Предмет не найден в инвентаре!";
|
||||
}
|
||||
} else {
|
||||
$status = "У вас не хватает " . $commission - $user['money'] . " кр. чтобы оплатить комиссию!";
|
||||
}
|
||||
}
|
||||
|
||||
if ($returningItemId) {
|
||||
|
@ -50,7 +56,9 @@ if ($returningItemId) {
|
|||
addToDelo($deloText);
|
||||
db::c()->query('UPDATE `inventory` SET `setsale` = 0 WHERE `id` = ?i', $returningItemId);
|
||||
$status = "Вы забрали из магазина ваш «{$dress['name']}».";
|
||||
} else $status = "Предмет не найден на полках магазина!";
|
||||
} else {
|
||||
$status = "Предмет не найден на полках магазина!";
|
||||
}
|
||||
}
|
||||
|
||||
if ($byingItemId) {
|
||||
|
@ -69,8 +77,12 @@ if ($byingItemId) {
|
|||
addToDelo($deloText, $dress['owner']);
|
||||
$user['money'] = $user['money'] - $dress['setsale'];
|
||||
telegraph($dress['owner'], "Предмет «{$dress['name']}» продан на рынке за {$dress['setsale']} кр.");
|
||||
} else $status = "Недостаточно средств!";
|
||||
} else $status = "Предмет не найден на полках магазина!";
|
||||
} else {
|
||||
$status = "Недостаточно средств!";
|
||||
}
|
||||
} else {
|
||||
$status = "Предмет не найден на полках магазина!";
|
||||
}
|
||||
}
|
||||
|
||||
$classPrintControlName = "marketbuy";
|
||||
|
@ -132,15 +144,9 @@ while ($row = $data->fetch_assoc()) {
|
|||
$iteminfo[] = new ShopItem($row);
|
||||
}
|
||||
|
||||
Template::header('Рынок');
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<script src="js/main.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Рынок</title>
|
||||
</HEAD>
|
||||
<body>
|
||||
<h1>Рынок</h1>
|
||||
<a href=# onclick=hrefToFrame('city.php?cp')> ← выйти на Центральную площадь</a>
|
||||
<div><?php if (!empty($status)) err($status); ?></div>
|
||||
|
@ -199,5 +205,3 @@ while ($row = $data->fetch_assoc()) {
|
|||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -52,17 +52,21 @@ function getlist($razdel = 1, $level = null, $id = null)
|
|||
function delzayavka($id, $zay, $r)
|
||||
{
|
||||
$z = getlist($r, null, $zay);
|
||||
if ($z[$zay]['level'] > 3) return 'Ай-ай-ай!';
|
||||
|
||||
if ($z[$zay]['level'] > 3) {
|
||||
return 'Ай-ай-ай!';
|
||||
}
|
||||
if (db::c()->query('DELETE FROM `zayavka` WHERE `id` = ?i AND (`team1` LIKE "?S" OR `team2` LIKE "?S")', $zay, $id.';%', $id.';%')) {
|
||||
if (count($z[$zay]['team1']) > 0)
|
||||
foreach ($z[$zay]['team1'] as $k => $v)
|
||||
if (count($z[$zay]['team1']) > 0) {
|
||||
foreach ($z[$zay]['team1'] as $k => $v) {
|
||||
db::c()->query('UPDATE `users` SET `zayavka` = 0 WHERE `id` = ?i', $v);
|
||||
|
||||
if (count($z[$zay]['team2']) > 0)
|
||||
foreach ($z[$zay]['team2'] as $k => $v)
|
||||
}
|
||||
}
|
||||
if (count($z[$zay]['team2']) > 0) {
|
||||
foreach ($z[$zay]['team2'] as $k => $v) {
|
||||
db::c()->query('UPDATE `users` SET `zayavka` = 0 WHERE `id` = ?i', $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -166,16 +170,10 @@ function startbattle($id, $zay, $r)
|
|||
file_get_contents(GAMEDOMAIN . '/chats.php?id=6&user=' . $v);
|
||||
}
|
||||
mysql_query("DELETE FROM `zayavka` WHERE `id` = '" . $zay . "' LIMIT 1");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$arr = [3, 4, 5, 7, 10];
|
||||
|
||||
if (in_array($z['timeout'], $arr)) {
|
||||
|
||||
} else {
|
||||
$z['timeout'] = 3;
|
||||
}
|
||||
|
||||
if ($z['type'] == 1 || $z['type'] == 4) {
|
||||
$rs = ', `fiz`';
|
||||
|
@ -267,51 +265,10 @@ if (date("H-i") == "03-00") {
|
|||
mysql_query("OPTIMIZE `battle`, `delo`");
|
||||
}
|
||||
|
||||
// Снятие VIP. Раз в день, полночь.
|
||||
if (date("H-i") == "00-00") {
|
||||
$q = db::c()->query('SELECT `id`,`vip`,`vip_time` FROM `users` WHERE `vip` > 0 AND `vip_time` > 0');
|
||||
|
||||
while ($unvip = $q->fetch_assoc()) {
|
||||
if ($unvip['vip'] > 0 AND $unvip['vip_time'] <= time()) {
|
||||
db::c()->query('UPDATE `users` SET `vip` = 0, `vip_time` = 0 WHERE `id` = ?i', $unvip['id']);
|
||||
db::c()->query('UPDATE `abils_vip` SET `sokr` = 0, `zash` = 0, `invisible` = 0, `attack` = 0, `bloodattack` = 0, `sleep30` = 0, `travmoff` = 0, `unsleep` = 0, `pers_attack` = 0 WHERE `uid` = ?i', $unvip['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Обновление вип-способностей.
|
||||
$sp = db::c()->query('SELECT `id`,`vip` FROM `users` WHERE `vip` > 0 AND `vip_time` > ?i', time());
|
||||
while ($pl = $sp->fetch_assoc()) {
|
||||
|
||||
$abils = db::c()->query('SELECT `attack`, `bloodattack`, `travmoff` FROM `abils_vip` WHERE `uid` = ?i', $pl['id'])->fetch_assoc();
|
||||
|
||||
if ($pl['vip'] == 1) $abils['travmoff'] = 0;
|
||||
else $abils['travmoff'] += 1;
|
||||
|
||||
$abils['attack'] += 1;
|
||||
$abils['bloodattack'] += 1;
|
||||
if ($abils['attack'] > 10) $abils['attack'] = 10;
|
||||
if ($abils['bloodattack'] > 10) $abils['bloodattack'] = 10;
|
||||
if ($abils['travmoff'] > 10) $abils['travmoff'] = 10;
|
||||
|
||||
db::c()->query('UPDATE `abils_vip` SET `sokr` = 1, `zash` = 1, `attack` = ?i, `bloodattack` = ?i, `travmoff` = ?i WHERE `uid` = ?i', $abils['attack'], $abils['bloodattack'], $abils['travmoff'], $pl['id']);
|
||||
}
|
||||
|
||||
mysql_query('UPDATE `actions` SET `vals` = "end" WHERE `vars` LIKE "start_quest%" AND `vals` = "go" AND `val` <= "' . time() . '"');
|
||||
|
||||
// Раз в день. 6 утра.
|
||||
if (date("H-i") == "06-00") {
|
||||
// Первое число каждого месяца.
|
||||
if (date("d") == "01") {
|
||||
mysql_query("UPDATE `variables` SET `value` = '{$tm}' WHERE `var` = 'ref_month' LIMIT 1");
|
||||
mysql_query("UPDATE `variables` SET `value` = '0' WHERE `var` = 'ref_m_id' LIMIT 1");
|
||||
}
|
||||
// Каждый седьмой день недели.
|
||||
if (date("N") == "7") {
|
||||
mysql_query("UPDATE `variables` SET `value` = '{$tm}' WHERE `var` = 'ref_week' LIMIT 1");
|
||||
mysql_query("UPDATE `variables` SET `value` = '0' WHERE `var` = 'ref_w_id' LIMIT 1");
|
||||
}
|
||||
}
|
||||
|
||||
$st_ar = mysql_fetch_array(mysql_query('SELECT `value` FROM `variables` WHERE `var` = "arena_of_gods" LIMIT 1'));
|
||||
if ($st_ar['value'] <= time()) {
|
||||
|
@ -354,36 +311,31 @@ while ($ku = mysql_fetch_array($komp_users)) {
|
|||
db::c()->query('UPDATE `users` SET `hp` = 0 WHERE `hp` < 0');
|
||||
db::c()->query('UPDATE `users` SET `mana` = 0 WHERE `mana` < 0');
|
||||
|
||||
$its = mysql_query("SELECT `id`, `owner`, `name` FROM `inventory` WHERE AND ((`maxdur` <= `duration`) OR (`dategoden` > 0 AND `dategoden` <= '" . time() . "'))");
|
||||
while ($it = mysql_fetch_array($its)) {
|
||||
mysql_query("DELETE FROM `inventory` WHERE `id` = '" . $it['id'] . "' LIMIT 1;");
|
||||
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '" . $it['owner'] . "' '\"" . $it['name'] . "\" разрушился id:(cap" . $it['id'] . ").', 1, '" . time() . "')");
|
||||
}
|
||||
|
||||
$effs = mysql_query("SELECT * FROM `effects` WHERE `time` <= " . time() . " AND `sleep` = 0");
|
||||
mysql_query("DELETE FROM `effects` WHERE `time` <= " . time() . " AND `sleep` = 0");
|
||||
while ($eff = mysql_fetch_array($effs)) {
|
||||
switch ($eff['type']) {
|
||||
case 11:
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' ");
|
||||
break;
|
||||
case 12:
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' ");
|
||||
break;
|
||||
case 13:
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' ");
|
||||
break;
|
||||
case 14:
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`+'" . $eff['sila'] . "', `lovk` = `lovk`+'" . $eff['lovk'] . "', `inta` = `inta`+'" . $eff['inta'] . "' WHERE `id` = '" . $eff['owner'] . "' ");
|
||||
break;
|
||||
case 21:
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`-'" . $eff['sila'] . "', `lovk` = `lovk`-'" . $eff['lovk'] . "', `inta` = `inta`-'" . $eff['inta'] . "', `vinos` = `vinos`-'" . $eff['vinos'] . "' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `sila` = `sila`-'" . $eff['sila'] . "', `lovk` = `lovk`-'" . $eff['lovk'] . "', `inta` = `inta`-'" . $eff['inta'] . "', `vinos` = `vinos`-'" . $eff['vinos'] . "' WHERE `id` = '" . $eff['owner'] . "' ");
|
||||
break;
|
||||
case 4:
|
||||
mysql_query("UPDATE `users` SET `align` = '0' WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `align` = '0' WHERE `id` = '" . $eff['owner'] . "'");
|
||||
break;
|
||||
case 7:
|
||||
mysql_query("UPDATE `users` SET `maxhp` = (`maxhp`-200), `hp` = `maxhp` WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
mysql_query("UPDATE `users` SET `maxhp` = (`maxhp`-200), `hp` = `maxhp` WHERE `id` = '" . $eff['owner'] . "'");
|
||||
break;
|
||||
case 1022:
|
||||
mysql_query("UPDATE `users` SET `invis` = 0 WHERE `id` = '" . $eff['owner'] . "' LIMIT 1");
|
||||
|
|
|
@ -432,7 +432,7 @@ class fbattle
|
|||
addActions(time(), 'win_fiz', 0, $this->user['id']);
|
||||
}
|
||||
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
if ($location['dir'] == 0) {
|
||||
$y = $location['y'] * 2;
|
||||
|
@ -462,7 +462,7 @@ class fbattle
|
|||
$winers .= implode("</B>, <B>", $this->t2);
|
||||
$lomka = $this->t1;
|
||||
} else {
|
||||
if (in_array($user['room'], Config::$caverooms)) {
|
||||
if (in_array($user->room, Config::$caverooms)) {
|
||||
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1"));
|
||||
if ($location['dir'] == 0) {
|
||||
$y = $location['y'] * 2;
|
||||
|
@ -866,7 +866,7 @@ class fbattle
|
|||
$this->FastDeath();
|
||||
$this->UpdateBattle();
|
||||
#header('Location: fbattle.php');
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1062,7 +1062,7 @@ class fbattle
|
|||
}
|
||||
$this->UpdateBattle();
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
require_once "../config.php";
|
||||
// Осталось понять что делает, зачем написан и какой интервал запуска.
|
||||
// 4 hours: time() + 14400;
|
||||
|
||||
$q = db::c()->query('SELECT `value` FROM `variables` WHERE `var` = "?s"', 'pole_random')->fetch_assoc();
|
||||
|
||||
for ($i = 0; $i < 41; $i++) {
|
||||
$rand = mt_rand(1, 9);
|
||||
if ($rand == 1) $h = 100;
|
||||
elseif ($rand == 2) $h = 80;
|
||||
elseif ($rand == 3) $h = 70;
|
||||
elseif ($rand == 4) $h = 60;
|
||||
elseif ($rand == 5) $h = 50;
|
||||
elseif ($rand == 6) $h = 40;
|
||||
elseif ($rand == 7 || $rand == 8 || $rand == 9) $h = 0;
|
||||
|
||||
$h += $h * mt_rand(1, 11) / 10;
|
||||
$rekr = 0.1 + mt_rand(1, 13) / 100;
|
||||
|
||||
db::c()->query('UPDATE `pole` SET `type` = ?i, `heals` = ?i, `ekr` = ?i WHERE `id` = ?i', $rand, $h, $rekr, $i);
|
||||
}
|
||||
|
||||
if (empty($q['value']))
|
||||
db::c()->query('UPDATE `variables` SET `value` = ?i WHERE `var` = "?s"', (time() + 14400), 'pole_random');
|
||||
elseif ($q['value'] < time())
|
||||
db::c()->query('UPDATE `variables` SET `value` = `value` + 14400 WHERE `var` = "?s"', 'pole_random');
|
|
@ -1,42 +0,0 @@
|
|||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
select, textarea, input {
|
||||
border: solid 1pt #B0B0B0;
|
||||
font-family: MS Sans Serif;
|
||||
font-size: 8px;
|
||||
color: #191970;
|
||||
MARGIN-BOTTOM: 2px;
|
||||
MARGIN-TOP: 1px;
|
||||
}
|
||||
|
||||
.text_msg {
|
||||
border: 1px solid #CCCCCC;
|
||||
font-size: 11px;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.chatBtn1_1,
|
||||
.chatBtn1_2,
|
||||
.chatBtn2_1,
|
||||
.chatBtn2_2,
|
||||
.chatBtn4_1,
|
||||
.chatBtn4_2,
|
||||
.chatBtn5_1,
|
||||
.chatBtn5_2,
|
||||
.chatBtn5_3,
|
||||
.chatBtn6_1,
|
||||
.chatBtn6_2,
|
||||
.chatBtn7_1,
|
||||
.chatBtn7_2,
|
||||
.chatBtn7_3 {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
cursor: pointer;
|
||||
}
|
|
@ -1,207 +0,0 @@
|
|||
body {
|
||||
|
||||
margin: 0;
|
||||
|
||||
height: 100%;
|
||||
|
||||
width: 100%;
|
||||
|
||||
background-color: #dedede;
|
||||
|
||||
font-size:10px;
|
||||
|
||||
color: #000000;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.main_text {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
font-size: 10px;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
color:#f0f0f0;
|
||||
|
||||
cursor:hand;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.menutop, a.menutop:visited, a.menutop:active {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
font-size: 10px;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
color: #3B3936;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
a.menutop:hover {
|
||||
|
||||
color: #76726b;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.name {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.parametr_title {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
font-size: 11px;
|
||||
|
||||
color: #777773;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.prname {
|
||||
|
||||
padding-left: 4px;
|
||||
|
||||
font-size: 11px;
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.prvalue {
|
||||
|
||||
font-size: 11px;
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.btn {
|
||||
|
||||
border: 1px double #9a9996;
|
||||
|
||||
background-image: url(i/move/beg_butt.gif);
|
||||
|
||||
font-size: 7.5pt;
|
||||
|
||||
color: #dfdfdf;
|
||||
|
||||
background-color:#504F4C;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.mainmenu {
|
||||
|
||||
color: #23292C;
|
||||
|
||||
border-top-width: 1px;
|
||||
|
||||
border-right-width: 1px;
|
||||
|
||||
border-bottom-width: 1px;
|
||||
|
||||
border-left-width: 1px;
|
||||
|
||||
border-top-style: solid;
|
||||
|
||||
border-right-style: none;
|
||||
|
||||
border-bottom-style: solid;
|
||||
|
||||
border-left-style: solid;
|
||||
|
||||
border-top-color: #969697;
|
||||
|
||||
border-right-color: #969697;
|
||||
|
||||
border-bottom-color: #000000;
|
||||
|
||||
border-left-color: #969697;
|
||||
|
||||
background-color: #BABABB;
|
||||
|
||||
cursor:hand;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.maptext {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
font-size: 12px;
|
||||
|
||||
color: #000000;
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
}
|
||||
|
||||
.posit {
|
||||
|
||||
border-top-width: 1px;
|
||||
|
||||
border-right-width: 1px;
|
||||
|
||||
border-bottom-width: 1px;
|
||||
|
||||
border-left-width: 1px;
|
||||
|
||||
border-top-style: solid;
|
||||
|
||||
border-right-style: solid;
|
||||
|
||||
border-bottom-style: solid;
|
||||
|
||||
border-left-style: solid;
|
||||
|
||||
border-top-color: #FFFFFF;
|
||||
|
||||
border-right-color: #666666;
|
||||
|
||||
border-bottom-color: #666666;
|
||||
|
||||
border-left-color: #FFFFFF;
|
||||
|
||||
padding: 2px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
td {
|
||||
|
||||
font-size: 10pt;
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Alpha(opacity=100),Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( ../i/sprites/cs/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( ../i/sprites/cs/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( ../i/sprites/cs/Left/4_1.gif ) no-repeat; }
|
||||
.Dungeon .RightSide4_1 { background: url( ../i/sprites/cs/Right/4_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide4_0 { background: url( ../i/sprites/cs/Left/4_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide4_0 { background: url( ../i/sprites/cs/Right/4_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_2 { background: url( ../i/sprites/cs/Left/Front/4_2.gif ) no-repeat; }
|
||||
.Dungeon .RightFront3_2 { background: url( ../i/sprites/cs/Right/Front/4_2.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_1 { background: url( ../i/sprites/cs/Left/Front/4_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront3_1 { background: url( ../i/sprites/cs/Right/Front/4_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_0 { background: url( ../i/sprites/cs/Left/Front/4_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide3_1 { background: url( ../i/sprites/cs/Left/3_1.gif ) no-repeat; }
|
||||
.Dungeon .RightSide3_1 { background: url( ../i/sprites/cs/Right/3_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide3_0 { background: url( ../i/sprites/cs/Left/3_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide3_0 { background: url( ../i/sprites/cs/Right/3_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront2_1 { background: url( ../i/sprites/cs/Left/Front/3_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront2_1 { background: url( ../i/sprites/cs/Right/Front/3_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront2_0 { background: url( ../i/sprites/cs/Left/Front/3_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide2_0 { background: url( ../i/sprites/cs/Left/2_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide2_0 { background: url( ../i/sprites/cs/Right/2_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront1_1 { background: url( ../i/sprites/cs/Left/Front/2_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront1_1 { background: url( ../i/sprites/cs/Right/Front/2_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront1_0 { background: url( ../i/sprites/cs/Left/Front/2_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide1_0 { background: url( ../i/sprites/cs/Left/1_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide1_0 { background: url( ../i/sprites/cs/Right/1_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront0_1 { background: url( ../i/sprites/cs/Left/Front/1_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront0_1 { background: url( ../i/sprites/cs/Right/Front/1_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront0_0 { background: url( ../i/sprites/cs/Left/Front/1_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide0_0 { background: url( ../i/sprites/cs/Left/0_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide0_0 { background: url( ../i/sprites/cs/Right/0_0.gif ) no-repeat; }
|
|
@ -1,57 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Alpha(opacity=100),Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( ../i/sprites/noob/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( ../i/sprites/noob/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( ../i/sprites/noob/Left/4_1.gif ) no-repeat; }
|
||||
.Dungeon .RightSide4_1 { background: url( ../i/sprites/noob/Right/4_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide4_0 { background: url( ../i/sprites/noob/Left/4_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide4_0 { background: url( ../i/sprites/noob/Right/4_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_2 { background: url( ../i/sprites/noob/Left/Front/4_2.gif ) no-repeat; }
|
||||
.Dungeon .RightFront3_2 { background: url( ../i/sprites/noob/Right/Front/4_2.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_1 { background: url( ../i/sprites/noob/Left/Front/4_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront3_1 { background: url( ../i/sprites/noob/Right/Front/4_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront3_0 { background: url( ../i/sprites/noob/Left/Front/4_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide3_1 { background: url( ../i/sprites/noob/Left/3_1.gif ) no-repeat; }
|
||||
.Dungeon .RightSide3_1 { background: url( ../i/sprites/noob/Right/3_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide3_0 { background: url( ../i/sprites/noob/Left/3_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide3_0 { background: url( ../i/sprites/noob/Right/3_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront2_1 { background: url( ../i/sprites/noob/Left/Front/3_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront2_1 { background: url( ../i/sprites/noob/Right/Front/3_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront2_0 { background: url( ../i/sprites/noob/Left/Front/3_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide2_0 { background: url( ../i/sprites/noob/Left/2_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide2_0 { background: url( ../i/sprites/noob/Right/2_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront1_1 { background: url( ../i/sprites/noob/Left/Front/2_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront1_1 { background: url( ../i/sprites/noob/Right/Front/2_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront1_0 { background: url( ../i/sprites/noob/Left/Front/2_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide1_0 { background: url( ../i/sprites/noob/Left/1_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide1_0 { background: url( ../i/sprites/noob/Right/1_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront0_1 { background: url( ../i/sprites/noob/Left/Front/1_1.gif ) no-repeat; }
|
||||
.Dungeon .RightFront0_1 { background: url( ../i/sprites/noob/Right/Front/1_1.gif ) no-repeat; }
|
||||
.Dungeon .LeftFront0_0 { background: url( ../i/sprites/noob/Left/Front/1_0.gif ) no-repeat; }
|
||||
.Dungeon .LeftSide0_0 { background: url( ../i/sprites/noob/Left/0_0.gif ) no-repeat; }
|
||||
.Dungeon .RightSide0_0 { background: url( ../i/sprites/noob/Right/0_0.gif ) no-repeat; }
|
|
@ -1,62 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Alpha(opacity=100),Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Dungeon IMG {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
position: relative;
|
||||
}
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( http://img.combats.ru/i/sprites/gy0/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( http://img.combats.ru/i/sprites/gy0/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/4_1.gif ) }
|
||||
.Dungeon .RightSide4_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/4_1.gif ) }
|
||||
.Dungeon .LeftSide4_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/4_0.gif ) }
|
||||
.Dungeon .RightSide4_0 { background: url( http://img.combats.ru/i/sprites/gy0/Right/4_0.gif ) }
|
||||
.Dungeon .LeftFront3_2 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/4_2.gif ) }
|
||||
.Dungeon .RightFront3_2 { background: url( http://img.combats.ru/i/sprites/gy0/Right/Front/4_2.gif ) }
|
||||
.Dungeon .LeftFront3_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/4_1.gif ) }
|
||||
.Dungeon .RightFront3_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/Front/4_1.gif ) }
|
||||
.Dungeon .LeftFront3_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/4_0.gif ) }
|
||||
.Dungeon .LeftSide3_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/3_1.gif ) }
|
||||
.Dungeon .RightSide3_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/3_1.gif ) }
|
||||
.Dungeon .LeftSide3_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/3_0.gif ) }
|
||||
.Dungeon .RightSide3_0 { background: url( http://img.combats.ru/i/sprites/gy0/Right/3_0.gif ) }
|
||||
.Dungeon .LeftFront2_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/3_1.gif ) }
|
||||
.Dungeon .RightFront2_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/Front/3_1.gif ) }
|
||||
.Dungeon .LeftFront2_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/3_0.gif ) }
|
||||
.Dungeon .LeftSide2_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/2_0.gif ) }
|
||||
.Dungeon .RightSide2_0 { background: url( http://img.combats.ru/i/sprites/gy0/Right/2_0.gif ) }
|
||||
.Dungeon .LeftFront1_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/2_1.gif ) }
|
||||
.Dungeon .RightFront1_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/Front/2_1.gif ) }
|
||||
.Dungeon .LeftFront1_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/2_0.gif ) }
|
||||
.Dungeon .LeftSide1_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/1_0.gif ) }
|
||||
.Dungeon .RightSide1_0 { background: url( http://img.combats.ru/i/sprites/gy0/Right/1_0.gif ) }
|
||||
.Dungeon .LeftFront0_1 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/1_1.gif ) }
|
||||
.Dungeon .RightFront0_1 { background: url( http://img.combats.ru/i/sprites/gy0/Right/Front/1_1.gif ) }
|
||||
.Dungeon .LeftFront0_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/Front/1_0.gif ) }
|
||||
.Dungeon .LeftSide0_0 { background: url( http://img.combats.ru/i/sprites/gy0/Left/0_0.gif ) }
|
||||
.Dungeon .RightSide0_0 { background: url( http://img.combats.ru/i/sprites/gy0/Right/0_0.gif ) }
|
|
@ -1,57 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Alpha(opacity=100),Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( http://img.combats.ru/i/sprites/kn4/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( http://img.combats.ru/i/sprites/kn4/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/4_1.gif ) }
|
||||
.Dungeon .RightSide4_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/4_1.gif ) }
|
||||
.Dungeon .LeftSide4_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/4_0.gif ) }
|
||||
.Dungeon .RightSide4_0 { background: url( http://img.combats.ru/i/sprites/kn4/Right/4_0.gif ) }
|
||||
.Dungeon .LeftFront3_2 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/4_2.gif ) }
|
||||
.Dungeon .RightFront3_2 { background: url( http://img.combats.ru/i/sprites/kn4/Right/Front/4_2.gif ) }
|
||||
.Dungeon .LeftFront3_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/4_1.gif ) }
|
||||
.Dungeon .RightFront3_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/Front/4_1.gif ) }
|
||||
.Dungeon .LeftFront3_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/4_0.gif ) }
|
||||
.Dungeon .LeftSide3_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/3_1.gif ) }
|
||||
.Dungeon .RightSide3_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/3_1.gif ) }
|
||||
.Dungeon .LeftSide3_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/3_0.gif ) }
|
||||
.Dungeon .RightSide3_0 { background: url( http://img.combats.ru/i/sprites/kn4/Right/3_0.gif ) }
|
||||
.Dungeon .LeftFront2_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/3_1.gif ) }
|
||||
.Dungeon .RightFront2_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/Front/3_1.gif ) }
|
||||
.Dungeon .LeftFront2_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/3_0.gif ) }
|
||||
.Dungeon .LeftSide2_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/2_0.gif ) }
|
||||
.Dungeon .RightSide2_0 { background: url( http://img.combats.ru/i/sprites/kn4/Right/2_0.gif ) }
|
||||
.Dungeon .LeftFront1_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/2_1.gif ) }
|
||||
.Dungeon .RightFront1_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/Front/2_1.gif ) }
|
||||
.Dungeon .LeftFront1_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/2_0.gif ) }
|
||||
.Dungeon .LeftSide1_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/1_0.gif ) }
|
||||
.Dungeon .RightSide1_0 { background: url( http://img.combats.ru/i/sprites/kn4/Right/1_0.gif ) }
|
||||
.Dungeon .LeftFront0_1 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/1_1.gif ) }
|
||||
.Dungeon .RightFront0_1 { background: url( http://img.combats.ru/i/sprites/kn4/Right/Front/1_1.gif ) }
|
||||
.Dungeon .LeftFront0_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/Front/1_0.gif ) }
|
||||
.Dungeon .LeftSide0_0 { background: url( http://img.combats.ru/i/sprites/kn4/Left/0_0.gif ) }
|
||||
.Dungeon .RightSide0_0 { background: url( http://img.combats.ru/i/sprites/kn4/Right/0_0.gif ) }
|
|
@ -1,62 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Dungeon IMG {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
position: relative;
|
||||
}
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( http://img.combats.ru/i/sprites/sn/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( http://img.combats.ru/i/sprites/sn/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/4_1.gif ) }
|
||||
.Dungeon .RightSide4_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/4_1.gif ) }
|
||||
.Dungeon .LeftSide4_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/4_0.gif ) }
|
||||
.Dungeon .RightSide4_0 { background: url( http://img.combats.ru/i/sprites/sn/Right/4_0.gif ) }
|
||||
.Dungeon .LeftFront3_2 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/4_2.gif ) }
|
||||
.Dungeon .RightFront3_2 { background: url( http://img.combats.ru/i/sprites/sn/Right/Front/4_2.gif ) }
|
||||
.Dungeon .LeftFront3_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/4_1.gif ) }
|
||||
.Dungeon .RightFront3_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/Front/4_1.gif ) }
|
||||
.Dungeon .LeftFront3_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/4_0.gif ) }
|
||||
.Dungeon .LeftSide3_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/3_1.gif ) }
|
||||
.Dungeon .RightSide3_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/3_1.gif ) }
|
||||
.Dungeon .LeftSide3_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/3_0.gif ) }
|
||||
.Dungeon .RightSide3_0 { background: url( http://img.combats.ru/i/sprites/sn/Right/3_0.gif ) }
|
||||
.Dungeon .LeftFront2_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/3_1.gif ) }
|
||||
.Dungeon .RightFront2_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/Front/3_1.gif ) }
|
||||
.Dungeon .LeftFront2_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/3_0.gif ) }
|
||||
.Dungeon .LeftSide2_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/2_0.gif ) }
|
||||
.Dungeon .RightSide2_0 { background: url( http://img.combats.ru/i/sprites/sn/Right/2_0.gif ) }
|
||||
.Dungeon .LeftFront1_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/2_1.gif ) }
|
||||
.Dungeon .RightFront1_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/Front/2_1.gif ) }
|
||||
.Dungeon .LeftFront1_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/2_0.gif ) }
|
||||
.Dungeon .LeftSide1_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/1_0.gif ) }
|
||||
.Dungeon .RightSide1_0 { background: url( http://img.combats.ru/i/sprites/sn/Right/1_0.gif ) }
|
||||
.Dungeon .LeftFront0_1 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/1_1.gif ) }
|
||||
.Dungeon .RightFront0_1 { background: url( http://img.combats.ru/i/sprites/sn/Right/Front/1_1.gif ) }
|
||||
.Dungeon .LeftFront0_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/Front/1_0.gif ) }
|
||||
.Dungeon .LeftSide0_0 { background: url( http://img.combats.ru/i/sprites/sn/Left/0_0.gif ) }
|
||||
.Dungeon .RightSide0_0 { background: url( http://img.combats.ru/i/sprites/sn/Right/0_0.gif ) }
|
|
@ -1,62 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Dungeon IMG {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
position: relative;
|
||||
}
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( http://img.combats.ru/i/sprites/sun/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( http://img.combats.ru/i/sprites/sun/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/4_1.gif ) }
|
||||
.Dungeon .RightSide4_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/4_1.gif ) }
|
||||
.Dungeon .LeftSide4_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/4_0.gif ) }
|
||||
.Dungeon .RightSide4_0 { background: url( http://img.combats.ru/i/sprites/sun/Right/4_0.gif ) }
|
||||
.Dungeon .LeftFront3_2 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/4_2.gif ) }
|
||||
.Dungeon .RightFront3_2 { background: url( http://img.combats.ru/i/sprites/sun/Right/Front/4_2.gif ) }
|
||||
.Dungeon .LeftFront3_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/4_1.gif ) }
|
||||
.Dungeon .RightFront3_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/Front/4_1.gif ) }
|
||||
.Dungeon .LeftFront3_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/4_0.gif ) }
|
||||
.Dungeon .LeftSide3_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/3_1.gif ) }
|
||||
.Dungeon .RightSide3_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/3_1.gif ) }
|
||||
.Dungeon .LeftSide3_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/3_0.gif ) }
|
||||
.Dungeon .RightSide3_0 { background: url( http://img.combats.ru/i/sprites/sun/Right/3_0.gif ) }
|
||||
.Dungeon .LeftFront2_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/3_1.gif ) }
|
||||
.Dungeon .RightFront2_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/Front/3_1.gif ) }
|
||||
.Dungeon .LeftFront2_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/3_0.gif ) }
|
||||
.Dungeon .LeftSide2_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/2_0.gif ) }
|
||||
.Dungeon .RightSide2_0 { background: url( http://img.combats.ru/i/sprites/sun/Right/2_0.gif ) }
|
||||
.Dungeon .LeftFront1_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/2_1.gif ) }
|
||||
.Dungeon .RightFront1_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/Front/2_1.gif ) }
|
||||
.Dungeon .LeftFront1_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/2_0.gif ) }
|
||||
.Dungeon .LeftSide1_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/1_0.gif ) }
|
||||
.Dungeon .RightSide1_0 { background: url( http://img.combats.ru/i/sprites/sun/Right/1_0.gif ) }
|
||||
.Dungeon .LeftFront0_1 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/1_1.gif ) }
|
||||
.Dungeon .RightFront0_1 { background: url( http://img.combats.ru/i/sprites/sun/Right/Front/1_1.gif ) }
|
||||
.Dungeon .LeftFront0_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/Front/1_0.gif ) }
|
||||
.Dungeon .LeftSide0_0 { background: url( http://img.combats.ru/i/sprites/sun/Left/0_0.gif ) }
|
||||
.Dungeon .RightSide0_0 { background: url( http://img.combats.ru/i/sprites/sun/Right/0_0.gif ) }
|
|
@ -1,57 +0,0 @@
|
|||
DIV.Dungeon{
|
||||
width: 372px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
}
|
||||
.Dungeon BUTTON {
|
||||
border: 0 solid;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
filter: Alpha(opacity=100),Chroma( Color=#c1cacf );
|
||||
}
|
||||
|
||||
.Dungeon DIV {
|
||||
width: 352px;
|
||||
height: 240px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
DIV.Life{position:absolute;background:#008000;height:2px;}
|
||||
DIV.Life2{position:absolute;background:#00FF00;height:2px;}
|
||||
.Dungeon .Floor0{ background: url( http://img.combats.ru/i/sprites/ug/bg0.gif ) black }
|
||||
.Dungeon .Floor1{ background: url( http://img.combats.ru/i/sprites/ug/bg1.gif ) black }
|
||||
|
||||
.Dungeon .LeftSide4_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/4_1.gif ) }
|
||||
.Dungeon .RightSide4_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/4_1.gif ) }
|
||||
.Dungeon .LeftSide4_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/4_0.gif ) }
|
||||
.Dungeon .RightSide4_0 { background: url( http://img.combats.ru/i/sprites/ug/Right/4_0.gif ) }
|
||||
.Dungeon .LeftFront3_2 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/4_2.gif ) }
|
||||
.Dungeon .RightFront3_2 { background: url( http://img.combats.ru/i/sprites/ug/Right/Front/4_2.gif ) }
|
||||
.Dungeon .LeftFront3_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/4_1.gif ) }
|
||||
.Dungeon .RightFront3_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/Front/4_1.gif ) }
|
||||
.Dungeon .LeftFront3_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/4_0.gif ) }
|
||||
.Dungeon .LeftSide3_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/3_1.gif ) }
|
||||
.Dungeon .RightSide3_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/3_1.gif ) }
|
||||
.Dungeon .LeftSide3_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/3_0.gif ) }
|
||||
.Dungeon .RightSide3_0 { background: url( http://img.combats.ru/i/sprites/ug/Right/3_0.gif ) }
|
||||
.Dungeon .LeftFront2_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/3_1.gif ) }
|
||||
.Dungeon .RightFront2_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/Front/3_1.gif ) }
|
||||
.Dungeon .LeftFront2_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/3_0.gif ) }
|
||||
.Dungeon .LeftSide2_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/2_0.gif ) }
|
||||
.Dungeon .RightSide2_0 { background: url( http://img.combats.ru/i/sprites/ug/Right/2_0.gif ) }
|
||||
.Dungeon .LeftFront1_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/2_1.gif ) }
|
||||
.Dungeon .RightFront1_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/Front/2_1.gif ) }
|
||||
.Dungeon .LeftFront1_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/2_0.gif ) }
|
||||
.Dungeon .LeftSide1_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/1_0.gif ) }
|
||||
.Dungeon .RightSide1_0 { background: url( http://img.combats.ru/i/sprites/ug/Right/1_0.gif ) }
|
||||
.Dungeon .LeftFront0_1 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/1_1.gif ) }
|
||||
.Dungeon .RightFront0_1 { background: url( http://img.combats.ru/i/sprites/ug/Right/Front/1_1.gif ) }
|
||||
.Dungeon .LeftFront0_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/Front/1_0.gif ) }
|
||||
.Dungeon .LeftSide0_0 { background: url( http://img.combats.ru/i/sprites/ug/Left/0_0.gif ) }
|
||||
.Dungeon .RightSide0_0 { background: url( http://img.combats.ru/i/sprites/ug/Right/0_0.gif ) }
|
590
css/2/main.css
|
@ -1,590 +0,0 @@
|
|||
body, td, ol, ul, li, p {
|
||||
font-size: 10pt;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, serif;
|
||||
}
|
||||
|
||||
.seehp {
|
||||
color: #F4F4F4;
|
||||
line-height: 7px;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
padding-top: 1px;
|
||||
margin-left: 3px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.senohp {
|
||||
line-height: 7px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.hp_none {
|
||||
background: url('../i/hp.jpg') 0 0 repeat-x;
|
||||
}
|
||||
|
||||
.hp_1 {
|
||||
background: url('../i/hp.jpg') 0 -11px repeat-x;
|
||||
}
|
||||
|
||||
.hp_2 {
|
||||
background: url('../i/hp.jpg') 0 -21px repeat-x;
|
||||
}
|
||||
|
||||
.hp_3 {
|
||||
background: url('../i/hp.jpg') 0 -31px repeat-x;
|
||||
}
|
||||
|
||||
.hp_mp {
|
||||
background: url('../i/hp.jpg') 0 -41px repeat-x;
|
||||
}
|
||||
|
||||
.seemp {
|
||||
color: #00FFFF;
|
||||
line-height: 7px;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
padding-top: 1px;
|
||||
margin-left: 3px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.hpborder {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #DADADA;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 10pt;
|
||||
color: #000000;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, serif;
|
||||
}
|
||||
|
||||
H3 {
|
||||
COLOR: #8f0000;
|
||||
FONT-FAMILY: Arial, serif;
|
||||
FONT-SIZE: 12pt;
|
||||
FONT-WEIGHT: bold;
|
||||
TEXT-ALIGN: center;
|
||||
}
|
||||
|
||||
H4 {
|
||||
COLOR: #8f0000;
|
||||
FONT-FAMILY: Arial, serif;
|
||||
FONT-SIZE: 11pt;
|
||||
FONT-WEIGHT: bold;
|
||||
MARGIN-BOTTOM: 5px;
|
||||
}
|
||||
|
||||
H5 {
|
||||
COLOR: #4f0000;
|
||||
FONT-FAMILY: Arial, serif;
|
||||
FONT-SIZE: 11pt;
|
||||
FONT-WEIGHT: bold;
|
||||
MARGIN-BOTTOM: 0;
|
||||
MARGIN-TOP: 0;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
text-decoration: none;
|
||||
FONT-WEIGHT: bold;
|
||||
color: #003388;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #6F0000
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0066FF
|
||||
}
|
||||
|
||||
.date {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #007000
|
||||
}
|
||||
|
||||
.date1 {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #b00000;
|
||||
}
|
||||
|
||||
.date2 {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #007000;
|
||||
background-color: #00FFAA
|
||||
}
|
||||
|
||||
.date22 {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #007000;
|
||||
background-color: #00FFAA
|
||||
}
|
||||
|
||||
.date3 {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: underline;
|
||||
font-weight: normal;
|
||||
color: #007000;
|
||||
background-color: #00FFAA
|
||||
}
|
||||
|
||||
.priem_hint {
|
||||
position: absolute;
|
||||
background-color: #ffffcc;
|
||||
padding: 2px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
border: 1px #666666 solid;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.greaytext {
|
||||
color: grey;
|
||||
cursor: default;
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sysdate {
|
||||
font-family: Courier, serif;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #B00000
|
||||
}
|
||||
|
||||
.private {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
background-color: #FAE0E0
|
||||
}
|
||||
|
||||
.klan {
|
||||
font-weight: bold;
|
||||
color: green;
|
||||
background-color: #99FFCC;
|
||||
}
|
||||
|
||||
.number {
|
||||
font-size: 11pt;
|
||||
font-weight: bold;
|
||||
color: #6F0000
|
||||
}
|
||||
|
||||
.dsc {
|
||||
color: #606060;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
select, textarea, input {
|
||||
border: solid 1pt #B0B0B0;
|
||||
font-family: MS Sans Serif, serif;
|
||||
font-size: 10px;
|
||||
color: #191970;
|
||||
MARGIN-BOTTOM: 2px;
|
||||
MARGIN-TOP: 1px;
|
||||
}
|
||||
|
||||
.ahint {
|
||||
font-family: MS Sans Serif, serif;
|
||||
font-size: 8px;
|
||||
text-decoration: none;
|
||||
color: #666666;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#hint2 {
|
||||
position: absolute;
|
||||
width: 140;
|
||||
background-color: #FFF6DD;
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
#hint3 {
|
||||
position: absolute;
|
||||
width: 240;
|
||||
background-color: #FFF6DD;
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.hint {
|
||||
position: absolute;
|
||||
background-color: #ffffcc;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.hpborder {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #DADADA;
|
||||
}
|
||||
|
||||
#hint4 {
|
||||
position: absolute;
|
||||
width: 240;
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.B1 {
|
||||
font-weight: bold;
|
||||
color: #6666CC
|
||||
}
|
||||
|
||||
.B2 {
|
||||
font-weight: bold;
|
||||
color: #B06A00
|
||||
}
|
||||
|
||||
.B3 {
|
||||
font-weight: bold;
|
||||
color: #269088
|
||||
}
|
||||
|
||||
.B4 {
|
||||
font-weight: bold;
|
||||
color: #A0AF20
|
||||
}
|
||||
|
||||
.B5 {
|
||||
font-weight: bold;
|
||||
color: #0F79D3
|
||||
}
|
||||
|
||||
.B6 {
|
||||
font-weight: bold;
|
||||
color: #D85E23
|
||||
}
|
||||
|
||||
.B7 {
|
||||
font-weight: bold;
|
||||
color: #5C832F
|
||||
}
|
||||
|
||||
.B8 {
|
||||
font-weight: bold;
|
||||
color: #842B61
|
||||
}
|
||||
|
||||
.B9 {
|
||||
font-weight: bold;
|
||||
color: navy
|
||||
}
|
||||
|
||||
.Bs1 {
|
||||
font-size: 8pt;
|
||||
font-weight: bold;
|
||||
color: #6666CC
|
||||
}
|
||||
|
||||
.Bs2 {
|
||||
font-weight: bold;
|
||||
color: #B06A00
|
||||
}
|
||||
|
||||
img, table {
|
||||
border: 0
|
||||
}
|
||||
|
||||
.ismagic {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic1.gif)
|
||||
}
|
||||
|
||||
.glow_pink {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_pink.gif)
|
||||
}
|
||||
|
||||
.glow_red {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_red.gif)
|
||||
}
|
||||
|
||||
.glow_green {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_green.gif)
|
||||
}
|
||||
|
||||
.glow_yellow {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_yellow.gif)
|
||||
}
|
||||
|
||||
.glow_dark {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_dark.gif)
|
||||
}
|
||||
|
||||
.glow_blue {
|
||||
background-color: #E0E0E2;
|
||||
BACKGROUND-IMAGE: url(blinkmagic_blue.gif)
|
||||
}
|
||||
|
||||
.hpStyle1 {
|
||||
color: #F4F4F4;
|
||||
line-height: 7px;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
padding-top: 1px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.mpStyle1 {
|
||||
color: #00FFFF;
|
||||
line-height: 7px;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
padding-top: 1px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.ahint {
|
||||
FONT-SIZE: 8px;
|
||||
COLOR: #000080;
|
||||
FONT-FAMILY: MS Sans Serif, serif;
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
#hint2 {
|
||||
VISIBILITY: hidden;
|
||||
WIDTH: 140px;
|
||||
POSITION: absolute;
|
||||
BACKGROUND-COLOR: #fff6dd;
|
||||
}
|
||||
|
||||
#hint3 {
|
||||
VISIBILITY: hidden;
|
||||
WIDTH: 240px;
|
||||
POSITION: absolute;
|
||||
BACKGROUND-COLOR: #fff6dd;
|
||||
}
|
||||
|
||||
.genwnew {
|
||||
background-color: #EBEBEB;
|
||||
border: 1px solid #C1C1C1;
|
||||
}
|
||||
|
||||
.priem_style {
|
||||
margin: 0;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.priem_styleHover {
|
||||
margin: 1px;
|
||||
width: 38px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.priem_style2 {
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.priem_styleHover2 {
|
||||
cursor: pointer;
|
||||
margin: 1px;
|
||||
width: 38px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.menutop, a.menutop:visited, a.menutop:active {
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
text-decoration: none;
|
||||
color: #3B3936;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
border: 1px double #9a9996;
|
||||
font-size: 12px;
|
||||
color: #dfdfdf;
|
||||
background-color: #504F4C;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
color: #CECECE;
|
||||
background-color: #393937;
|
||||
}
|
||||
|
||||
.yesbtn {
|
||||
border: 1px solid #b0b0b0;
|
||||
background-color: #ece9d8;
|
||||
width: 70px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.iframeMain {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.windowsmf_css1 {
|
||||
position: absolute;
|
||||
background-color: #ddd5bf;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
border: solid #D8D8D8 1px;
|
||||
FONT-SIZE: 10pt;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, serif;
|
||||
}
|
||||
|
||||
.windowsmf_css1_active2 {
|
||||
position: absolute;
|
||||
background-color: #F9F9F9;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
border: solid #FDFDFD 1px;
|
||||
}
|
||||
|
||||
.inpt1 {
|
||||
font-size: 8pt;
|
||||
border: 1px solid #CDC698;
|
||||
}
|
||||
|
||||
.windowsmf_css1_title {
|
||||
background-color: #b1a993;
|
||||
color: #000000;
|
||||
padding-top: 2px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-bottom: 2px;
|
||||
FONT-SIZE: 10pt;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, serif;
|
||||
}
|
||||
|
||||
.usermenu {
|
||||
z-index: 900;
|
||||
position: absolute;
|
||||
LEFT: 0;
|
||||
TOP: 0;
|
||||
background-color: #E5E5E5;
|
||||
border: 1px ridge #CCCCCC;
|
||||
}
|
||||
|
||||
.usermenu1 {
|
||||
background-color: #E5E5E5;
|
||||
cursor: pointer;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.usermenu1:hover {
|
||||
background-color: #CECECE;
|
||||
}
|
||||
|
||||
.windowsmf_css1_title_active {
|
||||
background-color: #C9C4B4;
|
||||
color: #1A1A1A;
|
||||
padding-top: 2px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-bottom: 2px;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.windowsmf_css1_title_active2 {
|
||||
background-color: #D7D3C8;
|
||||
color: #333333;
|
||||
padding-top: 2px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.windowsmf_css1_main_active2 {
|
||||
background-color: #FDFDFD;
|
||||
color: #FDFDFD;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.windowsmf_css1_main {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.btn_grey {
|
||||
border-top-width: 1px;
|
||||
background-color: #e5e5e5;
|
||||
background-image: url(line1.jpg);
|
||||
border-top-style: solid;
|
||||
border-top-color: #EFEFEF;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 7px;
|
||||
padding-right: 7px;
|
||||
border-right-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-right-style: solid;
|
||||
border-left-style: solid;
|
||||
border-right-color: #D8D8D8;
|
||||
border-left-color: #D8D8D8;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #D8D8D8;
|
||||
color: #494949;
|
||||
-moz-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn_grey:hover {
|
||||
background-image: url(line2.jpg);
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.btn_grey:active {
|
||||
background-color: #e5e5e5;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #EFEFEF;
|
||||
border-right-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-right-style: solid;
|
||||
border-left-style: solid;
|
||||
border-right-color: #D8D8D8;
|
||||
border-left-color: #D8D8D8;
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
border-top-color: #D8D8D8;
|
||||
}
|
||||
|
||||
.mainframe {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-size: 10pt;
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, serif;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
BODY { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}TD { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}OL { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}UL { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}LI { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}P { FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}.inup { BORDER-RIGHT: #302F2A 1px double; BORDER-TOP: #302F2A 1px double; FONT-SIZE: 8pt; BORDER-LEFT: #302F2A 1px double; COLOR: #000000; BORDER-BOTTOM: #302F2A 1px double; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #DED7BD}.text { FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif}H3 { FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #8f0000; FONT-FAMILY: Arial; TEXT-ALIGN: center}H4 { FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN-BOTTOM: 5px; COLOR: #8f0000; FONT-FAMILY: Arial}A:link { FONT-WEIGHT: normal; COLOR: #524936; TEXT-DECORATION: none}A:visited { FONT-WEIGHT: normal; COLOR: #633525; TEXT-DECORATION: none}A:active { FONT-WEIGHT: normal; COLOR: #77684d; TEXT-DECORATION: none}A:hover { COLOR: #68727B; TEXT-DECORATION: underline}.date { FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #007000; FONT-FAMILY: Courier; TEXT-DECORATION: none}.dsc { FONT-WEIGHT: normal; COLOR: #606060}SELECT { BORDER-RIGHT: #b0b0b0 1pt solid; BORDER-TOP: #b0b0b0 1pt solid; MARGIN-TOP: 1px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; BORDER-LEFT: #b0b0b0 1pt solid; COLOR: #191970; BORDER-BOTTOM: #b0b0b0 1pt solid; FONT-FAMILY: MS Sans Serif}TEXTAREA { BORDER-RIGHT: #b0b0b0 1pt solid; BORDER-TOP: #b0b0b0 1pt solid; MARGIN-TOP: 1px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; BORDER-LEFT: #b0b0b0 1pt solid; COLOR: #191970; BORDER-BOTTOM: #b0b0b0 1pt solid; FONT-FAMILY: MS Sans Serif}INPUT { BORDER-RIGHT: #b0b0b0 1pt solid; BORDER-TOP: #b0b0b0 1pt solid; MARGIN-TOP: 1px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; BORDER-LEFT: #b0b0b0 1pt solid; COLOR: #191970; BORDER-BOTTOM: #b0b0b0 1pt solid; FONT-FAMILY: MS Sans Serif}.pagetknum { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0; MARGIN: 0; WIDTH: 1em; COLOR: #6f0000; PADDING-TOP: 0; TEXT-DECORATION: underline} .pagenum A:link { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 0; MARGIN: 0; WIDTH: 1em; PADDING-TOP: 0
|
||||
} .pagenum A:visited { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 0; MARGIN: 0; WIDTH: 1em; PADDING-TOP: 0
|
||||
} .pagenum A:active { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 0; MARGIN: 0; WIDTH: 1em; PADDING-TOP: 0
|
||||
} .pagenum A:hover { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 0; MARGIN: 0; WIDTH: 1em; PADDING-TOP: 0; BACKGROUND-COLOR: white} .phpeft { PADDING-RIGHT: 0; PADDING-LEFT: 20px; PADDING-BOTTOM: 7px; MARGIN: 0; PADDING-TOP: 3px} .pages { BACKGROUND-COLOR: #ffefbf} IMG { BORDER-RIGHT: 0; BORDER-TOP: 0; BORDER-LEFT: 0; BORDER-BOTTOM: 0
|
||||
} TABLE { BORDER-RIGHT: 0; BORDER-TOP: 0; BORDER-LEFT: 0; BORDER-BOTTOM: 0
|
||||
} .btn { BORDER-RIGHT: #817a63 1px double; BORDER-TOP: #817a63 1px double; FONT-SIZE: 7.5pt; BORDER-LEFT: #817a63 1px double; COLOR: #dfddd3; BORDER-BOTTOM: #817a63 1px double; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #2b2b18}
|
|
@ -1,15 +0,0 @@
|
|||
#tiptip_holder { display: none; position: absolute; top: 0; left: 0; z-index: 99999; }
|
||||
#tiptip_holder.tip_top { padding-bottom: 5px; }
|
||||
#tiptip_holder.tip_bottom { padding-top: 5px; }
|
||||
#tiptip_holder.tip_left { padding-right: 5px;}
|
||||
#tiptip_content { font-size: 11px; color: #000; text-shadow: 0 0 2px #fff; padding: 4px 8px; border: 1px solid rgba(255,255,255,0.25); background: #fff; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; box-shadow: 0 0 3px #555; -webkit-box-shadow: 0 0 3px #555; -moz-box-shadow: 0 0 3px #555; }
|
||||
#tiptip_arrow, #tiptip_arrow_inner { position: absolute; border-color: transparent; border-style: solid; border-width: 6px; height: 0; width: 0; }
|
||||
#tiptip_holder.tip_top #tiptip_arrow { border-top-color: #fff; border-top-color: rgba(255,255,255,0.35); }
|
||||
#tiptip_holder.tip_bottom #tiptip_arrow { border-bottom-color: #fff; border-bottom-color: rgba(255,255,255,0.35); }
|
||||
#tiptip_holder.tip_right #tiptip_arrow { border-right-color: #fff; border-right-color: rgba(255,255,255,0.35); }
|
||||
#tiptip_holder.tip_left #tiptip_arrow { border-left-color: #fff; border-left-color: rgba(255,255,255,0.35); }
|
||||
#tiptip_holder.tip_top #tiptip_arrow_inner { margin-top: -7px; margin-left: -6px; border-top-color: rgb(25,25,25); border-top-color: rgba(25,25,25,0.92); }
|
||||
#tiptip_holder.tip_bottom #tiptip_arrow_inner { margin-top: -5px; margin-left: -6px; border-bottom-color: rgb(25,25,25); border-bottom-color: rgba(25,25,25,0.92); }
|
||||
#tiptip_holder.tip_right #tiptip_arrow_inner { margin-top: -6px; margin-left: -5px; border-right-color: rgb(25,25,25); border-right-color: rgba(25,25,25,0.92); }
|
||||
#tiptip_holder.tip_left #tiptip_arrow_inner { margin-top: -6px; margin-left: -7px; border-left-color: rgb(25,25,25); border-left-color: rgba(25,25,25,0.92); }
|
||||
.txt { font-style: italic; }
|
20
enter.php
|
@ -51,19 +51,9 @@ if ($username && $password) {
|
|||
} else {
|
||||
$error = ERROR_EMPTY_CREDENTIALS;
|
||||
}
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="ru-RU">
|
||||
<head>
|
||||
<meta charset=UTF-8">
|
||||
<link href="css/main.css" rel="stylesheet">
|
||||
<title>Входим...</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php if (!empty($error)): ?>
|
||||
<a href="/"> ← на главную</a>
|
||||
<h1><?= $error ?></h1>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
Template::header('Входим...');
|
||||
|
||||
if ($error) {
|
||||
echo sprintf('<a href="/"> ← на главную</a><h1>%s</h1>', $error);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
@ -70,39 +70,23 @@ if ($_GET['ext'] == 1) {
|
|||
}
|
||||
|
||||
|
||||
if (in_array($user['room'], Config::$canalenters)) {
|
||||
$podzemroom = $user['room'] + 1;
|
||||
if (in_array($user->room, Config::$canalenters)) {
|
||||
$podzemroom = $user->room + 1;
|
||||
$cavedata = [620 => ['x1' => 3, 'y1' => 2, 'dir1' => 2]];
|
||||
$podzemdata = [621 => ['name1' => 'Проклятый Рудник', 'name2' => 'Проклятого Рудника']];
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<script LANGUAGE='JavaScript'>
|
||||
document.ondragstart = test;
|
||||
//запрет на перетаскивание
|
||||
document.onselectstart = test;
|
||||
//запрет на выделение элементов страницы
|
||||
document.oncontextmenu = test;
|
||||
|
||||
//запрет на выведение контекстного меню
|
||||
function test() {
|
||||
return false
|
||||
$warning = $_GET["warning"] ?? '';
|
||||
Template::header('enter_cave');
|
||||
if ($warning) {
|
||||
echo sprintf('<b style="color: #f80000">%s</b>', $warning);
|
||||
}
|
||||
</SCRIPT>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="UTF-8">
|
||||
</HEAD>
|
||||
<BODY style="background-color: #dedede;">
|
||||
<? if ($_GET["warning"] && strlen($_GET["warning"]) > 1) {
|
||||
echo "<b><font color=red>$_GET[warning]</font></b>";
|
||||
} ?>
|
||||
?>
|
||||
<div id=hint4 class=ahint></div>
|
||||
|
||||
<TABLE width=100%>
|
||||
<TR>
|
||||
<TD valign=top width=100%>
|
||||
<center><h3><?= $rooms[$user["room"]] ?></h3></center>
|
||||
<?
|
||||
<?php
|
||||
$select = mysql_query("SELECT `time` FROM `visit_podzem` WHERE `room` = '$podzemroom' AND `login` = '" . $user['login'] . "' AND `time` > 0 LIMIT 1");
|
||||
if ($el = mysql_fetch_array($select)) {
|
||||
$wait_sec = $el['time'];
|
||||
|
@ -113,11 +97,10 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
|
||||
if (($user['align'] == '2.99') && $wait_sec > $new_t) {
|
||||
$wait_sec = 1;
|
||||
mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user[room]' LIMIT 1");
|
||||
mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user->room' LIMIT 1");
|
||||
}
|
||||
|
||||
if ($wait_sec > $new_t) {
|
||||
if ($_GET['donate']) {
|
||||
if ($wait_sec > $new_t && $_GET['donate']) {
|
||||
if ($user['money'] >= $podzemdata[$podzemroom]['passprice']) {
|
||||
mysql_query("UPDATE `users` SET `money` = (`money`-" . $podzemdata[$podzemroom]['passprice'] . ") WHERE `id` = '$user[id]' LIMIT 1");
|
||||
mysql_query("INSERT INTO `delo` (`id`, `author`, `pers`, `text`, `type`, `date`) VALUES ('', '0', '{$_SESSION['uid']}', '\"" . $user['login'] . "\" пожертвовал на благоустройство пещеры \"" . $podzemdata[$podzemroom]['passprice'] . "\" кр. ($user[money]/$user[ekr]). ', 7, '" . time() . "')");
|
||||
|
@ -126,7 +109,6 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
echo "<b><font color=red>У вас недостаточно денег</font></b>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($wait_sec > $new_t) {
|
||||
echo " <font style='font-size: 12px;'>Вы можете посетить " . $podzemdata[$podzemroom]['name1'] . " через <font style='font-size: 11px; color: #000;'> " . secs2hrs($left_time) . "</font><br />";
|
||||
|
@ -225,7 +207,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
return $i;
|
||||
}
|
||||
|
||||
$Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user[room]'");
|
||||
$Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user->room'");
|
||||
while ($DATA = mysql_fetch_array($Q)) {
|
||||
$cr = $DATA['glav_id'];
|
||||
$z_login[$i] = $DATA['login'];
|
||||
|
@ -292,7 +274,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
<TD height=1 colspan=2><SPAN></SPAN></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<?
|
||||
<?php
|
||||
|
||||
///////////////Подача заявки////////////////////
|
||||
if ($_GET['open']) {
|
||||
|
@ -302,7 +284,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
exit();
|
||||
}
|
||||
$time = date("H:i");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user[room]')");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user->room')");
|
||||
$SQL2 = mysql_query("INSERT INTO `vxodd` (`login`, `glav_id`, `lvl`) VALUES('$login', '$user_id', '$user_lvl')");
|
||||
if ($SQL2) {
|
||||
echo "<script>location.href='main.php?act=none'</script>";
|
||||
|
@ -332,7 +314,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
}
|
||||
|
||||
$den = mysql_query("SELECT `id` FROM `vxodd` WHERE `glav_id` = '" . $_GET['naw_id'] . "'");
|
||||
if (mysql_num_rows($den) >= (in_array($user['room'] + 1, Config::$caverooms) ? 5 : 4)) {
|
||||
if (mysql_num_rows($den) >= (in_array($user->room + 1, Config::$caverooms) ? 5 : 4)) {
|
||||
echo "<script>location.href='?warning=5'</script>";
|
||||
exit();
|
||||
}
|
||||
|
@ -380,7 +362,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
}
|
||||
|
||||
if ($_GET['start']) {
|
||||
if (in_array($user['room'] + 1, Config::$caverooms)) {
|
||||
if (in_array($user->room + 1, Config::$caverooms)) {
|
||||
$nc = 1;
|
||||
$locs = [];
|
||||
}
|
||||
|
@ -402,8 +384,8 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
mysql_query("update `users` SET `money` = (`money-$nana[fee]) WHERE `id` = '$esth[id]' LIMIT 1");
|
||||
$user['money'] += $nana['fee'];
|
||||
$esth['money'] -= $nana['fee'];
|
||||
adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
|
||||
adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
|
||||
adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
|
||||
adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
|
||||
}
|
||||
if ($esth['level'] > $level) {
|
||||
$level = $esth['level'];
|
||||
|
@ -416,12 +398,12 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
$vrem = 30 * 60 + time();
|
||||
|
||||
$cavedata = Config::$cavedata ?? [];
|
||||
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user['room'] + 1]['x1'] . "', `y` = '" . $cavedata[$user['room'] + 1]['y1'] . "', `dir` = '" . $cavedata[$user['room'] + 1]['dir1'] . "', `floor` = 1");
|
||||
mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user['room'] + 1) . "', `online`.`room` = '" . ($user['room'] + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
|
||||
mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user->room + 1]['x1'] . "', `y` = '" . $cavedata[$user->room + 1]['y1'] . "', `dir` = '" . $cavedata[$user->room + 1]['dir1'] . "', `floor` = 1");
|
||||
mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user->room + 1) . "', `online`.`room` = '" . ($user->room + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
|
||||
}
|
||||
|
||||
if ($nc) {
|
||||
$r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user[room]'");
|
||||
$r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user->room'");
|
||||
while ($rec = mysql_fetch_assoc($r)) {
|
||||
$map = unserialize($rec['map']);
|
||||
foreach ($map as $k => $v) {
|
||||
|
@ -452,7 +434,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
}
|
||||
?>
|
||||
<script>top.frames['online'].location = 'ch.php?online=' + Math.round(Math.random() * 100000);</script>
|
||||
<?
|
||||
<?php
|
||||
mysql_query("DELETE FROM `vxod` WHERE `login` = '$login'");
|
||||
mysql_query("DELETE FROM `vxodd` WHERE `glav_id` = " . $user['id'] . "");
|
||||
mysql_query("DELETE FROM `vxodd` WHERE `login` = '$login'");
|
||||
|
@ -466,7 +448,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
|
||||
<BR>
|
||||
<DIV align=right>
|
||||
<INPUT style="font-size:12px;" onClick="document.location.href='enter_cave.php?<? echo time(); ?>'"
|
||||
<INPUT style="font-size:12px;" onClick="document.location.href='enter_cave.php?<?= time(); ?>'"
|
||||
value=Обновить type=button>
|
||||
<input style="font-size: 12px;" type="button" value="Вернуться"
|
||||
onclick="document.location.href='enter_cave.php?ext=1';"/>
|
||||
|
@ -478,10 +460,7 @@ if (in_array($user['room'], Config::$canalenters)) {
|
|||
</TABLE>
|
||||
<div id="goto" style="text-align:right;white-space:nowrap"> </div>
|
||||
<br><br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?
|
||||
<?php
|
||||
} else {
|
||||
header("location: main.php");
|
||||
}
|
||||
?>
|
23
fbattle.php
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
ob_start("ob_gzhandler");
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
@ -21,18 +21,11 @@ if (isset($user['id'])) {
|
|||
include('./classes/battle_new.class.php');
|
||||
|
||||
$fbattle = new fbattle($user['battle']);
|
||||
Template::header('fbattle');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
<script type="text/javascript" src="js/ZeroClipboard.js"></script>
|
||||
<script type="text/javascript" src="js/sl2.js"></script>
|
||||
<script type="text/javascript" src="js/ch.js"></script>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script src="js/tooltip.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/tooltip.css"/>
|
||||
<SCRIPT>
|
||||
<script>
|
||||
function refreshPeriodic() {
|
||||
<?php if($fbattle->battle) { ?>location.href = '<?=$_SERVER['PHP_SELF']?>?batl=<?=$_REQUEST['batl']?>';//reload();
|
||||
<?}?>
|
||||
|
@ -40,8 +33,6 @@ $fbattle = new fbattle($user['battle']);
|
|||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 20000);
|
||||
</SCRIPT>
|
||||
<script>
|
||||
let Hint3Name = '';
|
||||
|
||||
function findlogin(title, script, name) {
|
||||
|
@ -135,8 +126,6 @@ $fbattle = new fbattle($user['battle']);
|
|||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onLoad="top.setHP(<?= $user['hp'] ?>,<?= $user['maxhp'] ?>)">
|
||||
<div id="hint3" class="ahint"></div>
|
||||
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="POST" name="f1" id="f1">
|
||||
<table width=100% cellspacing=0 cellpadding=0 border=0>
|
||||
|
@ -183,7 +172,7 @@ $fbattle = new fbattle($user['battle']);
|
|||
$bb = str_replace('"', """, (strip_tags($bb[0])));
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "?buf=" . $bb);
|
||||
} else {
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -542,12 +531,8 @@ $fbattle = new fbattle($user['battle']);
|
|||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div id="oMenu" onmouseout="closeMenu()"
|
||||
style="position: absolute; border: 1px solid #666; background-color: #CCC; display: none; "></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
db::c()->query('UNLOCK TABLES');
|
||||
?>
|
10
fight.php
|
@ -11,12 +11,8 @@ if (empty($userLoginStatus)) {
|
|||
} else {
|
||||
db::c()->query('UPDATE `users` SET `enter_game` = 0 WHERE `enter_game` = 1 AND `id` = ?i', $_SESSION['uid']);
|
||||
}
|
||||
Template::header('Окно игры');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<title>Окно игры</title>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
if (!navigator.cookieEnabled) {
|
||||
document.write('Внимание! В вашем браузере отключена поддержка Cookies. Включите чтобы играть.');
|
||||
|
@ -51,8 +47,6 @@ if (empty($userLoginStatus)) {
|
|||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="frametable">
|
||||
<tr style="height: 25px;">
|
||||
<td class="frametd">
|
||||
|
@ -72,5 +66,3 @@ if (empty($userLoginStatus)) {
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
110
forest.php
|
@ -1,8 +1,13 @@
|
|||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { die();}
|
||||
if (empty($_SESSION['uid'])) {
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
if($user['room'] == 51) { header('location: city.php'); die(); }
|
||||
if ($user->room == 51) {
|
||||
header('location: city.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_GET['go'] == 'vixod') {
|
||||
$les_login = mysql_fetch_array(mysql_query("SELECT `room` FROM `les_game` WHERE `owner` = '" . $user['id'] . "' LIMIT 1"));
|
||||
|
@ -17,26 +22,23 @@ $tes = mysql_query("SELECT * FROM `les_res` WHERE `owner` = '".$user['id']."'");
|
|||
if (!$les_res = mysql_fetch_array($tes)) {
|
||||
$i = 0;
|
||||
while ($i++ < 25) {
|
||||
$res = array('', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore');
|
||||
$img = array('', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg');
|
||||
$res = ['', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore', 'Silver Nugget', 'Stem', 'Animal Bone', 'Suede', 'Iron Ore'];
|
||||
$img = ['', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg', 'Silver_Nugget.jpg', 'Stem.jpg', 'Animal_Bone.jpg', 'Suede.jpg', 'Iron_Ore.jpg'];
|
||||
$otdel = rand(1, 9);
|
||||
$komnata = rand(0, 7);
|
||||
$kmn[1] = array('A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8');
|
||||
$kmn[2] = array('B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8');
|
||||
$kmn[3] = array('C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8');
|
||||
$kmn[4] = array('D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8');
|
||||
$kmn[5] = array('E1', 'E2', 'E3', 'E4', 'E5', 'E6', 'E7', 'E8');
|
||||
$kmn[6] = array('F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8');
|
||||
$kmn[7] = array('G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8');
|
||||
$kmn[8] = array('H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'H7', 'H8');
|
||||
$kmn[9] = array('I1', 'I2', 'I3', 'I4', 'I5', 'I6', 'I7', 'I8');
|
||||
$kmn[1] = ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8'];
|
||||
$kmn[2] = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8'];
|
||||
$kmn[3] = ['C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8'];
|
||||
$kmn[4] = ['D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8'];
|
||||
$kmn[5] = ['E1', 'E2', 'E3', 'E4', 'E5', 'E6', 'E7', 'E8'];
|
||||
$kmn[6] = ['F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8'];
|
||||
$kmn[7] = ['G1', 'G2', 'G3', 'G4', 'G5', 'G6', 'G7', 'G8'];
|
||||
$kmn[8] = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'H7', 'H8'];
|
||||
$kmn[9] = ['I1', 'I2', 'I3', 'I4', 'I5', 'I6', 'I7', 'I8'];
|
||||
mysql_query("INSERT INTO les_res (`owner`, `name`, `img`, `kom`) VALUES ('" . $user['id'] . "', '" . $res[$i] . "', '" . $img[$i] . "', '" . $kmn[$otdel][$komnata] . "')");
|
||||
}
|
||||
}
|
||||
|
||||
#nick99($user['id']);
|
||||
|
||||
|
||||
$rand = rand(25, 100);
|
||||
$rbot = rand(1, 5);
|
||||
$bots[1] = 'Медведь';
|
||||
|
@ -49,9 +51,9 @@ if($rand < 15 && $user['battle'] == 0) {
|
|||
$dded = mysql_fetch_array($sex);
|
||||
mysql_query("INSERT INTO `bots` (`name`, `prototype`, `battle`, `hp`) VALUES ('" . $bots[$rbot] . "', '" . $dded["id"] . "', '', '" . $dded["maxhp"] . "')");
|
||||
$bot = mysql_insert_id();
|
||||
$teams = array();
|
||||
$teams[$user['id']][$bot] = array(0, 0, time());
|
||||
$teams[$bot][$user['id']] = array(0, 0, time());
|
||||
$teams = [];
|
||||
$teams[$user['id']][$bot] = [0, 0, time()];
|
||||
$teams[$bot][$user['id']] = [0, 0, time()];
|
||||
mysql_query("INSERT INTO `battle`(`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`) VALUES ('" . serialize($teams) . "', '3', '1', '0', '" . $user['id'] . "', '" . $bot . "', '" . time() . "', '" . time() . "')");
|
||||
$id = mysql_insert_id();
|
||||
mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE `id` = {$bot} LIMIT 1");
|
||||
|
@ -61,15 +63,19 @@ if($rand < 15 && $user['battle'] == 0) {
|
|||
addchp('<b style="color:#990000">Внимание!</b> На вас напал "' . $bots[$rbot] . '". ', '{[]}' . Nick::id($user["id"])->short() . '{[]}');
|
||||
}
|
||||
|
||||
|
||||
if($user['battle'] > 0) { header('location: fbattle.php'); die(); }
|
||||
if ($user['battle'] > 0) {
|
||||
header('location: fbattle.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$les_login = mysql_fetch_array(mysql_query("SELECT * FROM `les_game` WHERE `owner` = '" . $user['id'] . "' LIMIT 1"));
|
||||
|
||||
$rooms = array("A1" => array('20', '', 'A2', '', 'B1'), "A2" => array('15', 'A1', 'A3', '', ''), "A3" => array('15', 'A2', '', '', ''), "A4" => array('15', '', 'A5', '', 'B4'), "A5" => array('15', 'A4', '', '', 'B5'), "A6" => array('15', '', 'A7', '', 'B6'), "A7" => array('15', 'A6', 'A8', '', ''), "A8" => array('15', 'A7', '', '', 'B8'), "B1" => array('20', '', '', 'A1', ''), "B2" => array('15', '', 'B3', '', 'C2'), "B3" => array('15', 'B2', 'B4', '', ''), "B4" => array('15', 'B3', '', 'A4', ''), "B5" => array('15', '', 'B6', 'A5', ''), "B6" => array('15', 'B5', 'B7', 'A6', ''), "B7" => array('15', 'B6', '', '', 'C7'), "B8" => array('15', '', '', 'A8', 'C8'), "C1" => array('20', '', '', '', 'D1'), "C2" => array('15', '', 'C3', 'B2', 'D2'), "C3" => array('15', 'C2', '', '', 'D3'), "C4" => array('15', '', '', '', 'D4'), "C5" => array('15', '', '', '', 'D5'), "C6" => array('15', '', 'C7', '', ''), "C7" => array('15', 'C6', 'C8', 'B7', ''), "C8" => array('15', 'C7', '', 'B8', 'D8'), "D1" => array('20', '', 'D2', 'C1', 'E1'), "D2" => array('15', 'D1', 'D3', 'C2', 'E2'), "D3" => array('15', 'D2', 'D4', 'C3', 'E3'), "D4" => array('15', 'D3', 'D5', 'C4', 'E4'), "D5" => array('15', 'D4', '', 'C5', ''), "D6" => array('15', '', 'D7', '', 'E6'), "D7" => array('15', 'D6', '', '', ''), "D8" => array('15', '', '', 'C8', 'E8'), "E1" => array('20', '', 'E2', 'D1', 'F1'), "E2" => array('15', 'E1', 'E3', 'D2', 'F2'), "E3" => array('15', 'E2', 'E4', 'D3', 'F3'), "E4" => array('15', 'E3', 'E5', 'D4', 'F4'), "E5" => array('15', 'E4', 'E6', '', 'F5'), "E6" => array('15', 'E5', '', 'D6', ''), "E7" => array('15', '', 'E8', '', 'F7'), "E8" => array('15', 'E7', '', 'D8', 'F8'), "F1" => array('20', '', 'F2', 'E1', 'G1'), "F2" => array('15', 'F1', 'F3', 'E2', 'G2'), "F3" => array('15', 'F2', 'F4', 'E3', 'G3'), "F4" => array('15', 'F3', 'F5', 'E4', 'G4'), "F5" => array('15', 'F4', '', 'E5', 'G5'), "F6" => array('15', '', '', '', 'G6'), "F7" => array('15', '', '', 'E7', 'G7'), "F8" => array('15', '', '', 'E8', 'G8'), "G1" => array('20', '', '', 'F1', 'H1'), "G2" => array('15', '', '', 'F2', ''), "G3" => array('15', '', '', 'F3', ''), "G4" => array('15', '', '', 'F4', ''), "G5" => array('15', '', 'G6', 'F5', ''), "G6" => array('15', 'G5', 'G7', 'F6', ''), "G7" => array('15', 'G6', 'G8', 'F7', ''), "G8" => array('15', 'G7', '', 'F8', 'H8'), "H1" => array('20', '', 'H2', 'G1', 'I1'), "H2" => array('15', 'H1', '', '', 'I2'), "H3" => array('15', '', '', '', 'I3'), "H4" => array('15', '', 'H5', '', 'I4'), "H5" => array('15', 'H4', '', '', 'I5'), "H6" => array('15', '', 'H7', '', 'I6'), "H7" => array('15', 'H6', '', '', 'I7'), "H8" => array('15', 'H7', '', 'G8', 'I8'), "I1" => array('20', '', 'I2', 'H1', ''), "I2" => array('15', 'I1', 'I3', 'H2', ''), "I3" => array('15', 'I2', 'I4', 'H3', ''), "I4" => array('15', 'I3', 'I5', 'H4', ''), "I5" => array('15', 'I4', 'I6', 'H5', ''), "I6" => array('15', 'I5', 'I7', 'H6', ''), "I7" => array('15', 'I6', 'I8', 'H7', ''), "I8" => array('15', 'I7', '', 'H8', ''));
|
||||
$rooms = ["A1" => ['20', '', 'A2', '', 'B1'], "A2" => ['15', 'A1', 'A3', '', ''], "A3" => ['15', 'A2', '', '', ''], "A4" => ['15', '', 'A5', '', 'B4'], "A5" => ['15', 'A4', '', '', 'B5'], "A6" => ['15', '', 'A7', '', 'B6'], "A7" => ['15', 'A6', 'A8', '', ''], "A8" => ['15', 'A7', '', '', 'B8'], "B1" => ['20', '', '', 'A1', ''], "B2" => ['15', '', 'B3', '', 'C2'], "B3" => ['15', 'B2', 'B4', '', ''], "B4" => ['15', 'B3', '', 'A4', ''], "B5" => ['15', '', 'B6', 'A5', ''], "B6" => ['15', 'B5', 'B7', 'A6', ''], "B7" => ['15', 'B6', '', '', 'C7'], "B8" => ['15', '', '', 'A8', 'C8'], "C1" => ['20', '', '', '', 'D1'], "C2" => ['15', '', 'C3', 'B2', 'D2'], "C3" => ['15', 'C2', '', '', 'D3'], "C4" => ['15', '', '', '', 'D4'], "C5" => ['15', '', '', '', 'D5'], "C6" => ['15', '', 'C7', '', ''], "C7" => ['15', 'C6', 'C8', 'B7', ''], "C8" => ['15', 'C7', '', 'B8', 'D8'], "D1" => ['20', '', 'D2', 'C1', 'E1'], "D2" => ['15', 'D1', 'D3', 'C2', 'E2'], "D3" => ['15', 'D2', 'D4', 'C3', 'E3'], "D4" => ['15', 'D3', 'D5', 'C4', 'E4'], "D5" => ['15', 'D4', '', 'C5', ''], "D6" => ['15', '', 'D7', '', 'E6'], "D7" => ['15', 'D6', '', '', ''], "D8" => ['15', '', '', 'C8', 'E8'], "E1" => ['20', '', 'E2', 'D1', 'F1'], "E2" => ['15', 'E1', 'E3', 'D2', 'F2'], "E3" => ['15', 'E2', 'E4', 'D3', 'F3'], "E4" => ['15', 'E3', 'E5', 'D4', 'F4'], "E5" => ['15', 'E4', 'E6', '', 'F5'], "E6" => ['15', 'E5', '', 'D6', ''], "E7" => ['15', '', 'E8', '', 'F7'], "E8" => ['15', 'E7', '', 'D8', 'F8'], "F1" => ['20', '', 'F2', 'E1', 'G1'], "F2" => ['15', 'F1', 'F3', 'E2', 'G2'], "F3" => ['15', 'F2', 'F4', 'E3', 'G3'], "F4" => ['15', 'F3', 'F5', 'E4', 'G4'], "F5" => ['15', 'F4', '', 'E5', 'G5'], "F6" => ['15', '', '', '', 'G6'], "F7" => ['15', '', '', 'E7', 'G7'], "F8" => ['15', '', '', 'E8', 'G8'], "G1" => ['20', '', '', 'F1', 'H1'], "G2" => ['15', '', '', 'F2', ''], "G3" => ['15', '', '', 'F3', ''], "G4" => ['15', '', '', 'F4', ''], "G5" => ['15', '', 'G6', 'F5', ''], "G6" => ['15', 'G5', 'G7', 'F6', ''], "G7" => ['15', 'G6', 'G8', 'F7', ''], "G8" => ['15', 'G7', '', 'F8', 'H8'], "H1" => ['20', '', 'H2', 'G1', 'I1'], "H2" => ['15', 'H1', '', '', 'I2'], "H3" => ['15', '', '', '', 'I3'], "H4" => ['15', '', 'H5', '', 'I4'], "H5" => ['15', 'H4', '', '', 'I5'], "H6" => ['15', '', 'H7', '', 'I6'], "H7" => ['15', 'H6', '', '', 'I7'], "H8" => ['15', 'H7', '', 'G8', 'I8'], "I1" => ['20', '', 'I2', 'H1', ''], "I2" => ['15', 'I1', 'I3', 'H2', ''], "I3" => ['15', 'I2', 'I4', 'H3', ''], "I4" => ['15', 'I3', 'I5', 'H4', ''], "I5" => ['15', 'I4', 'I6', 'H5', ''], "I6" => ['15', 'I5', 'I7', 'H6', ''], "I7" => ['15', 'I6', 'I8', 'H7', ''], "I8" => ['15', 'I7', '', 'H8', '']];
|
||||
|
||||
$time = $_SESSION['time'] - time();
|
||||
if($time < 0) { $time = 0; }
|
||||
if ($time < 0) {
|
||||
$time = 0;
|
||||
}
|
||||
|
||||
if ($_GET["v"] && $_GET["v"] != '' && $time <= 0 && $rooms[$les_login['room']][1] == $_GET["v"]) {
|
||||
$_SESSION['time'] = time() + $rooms[$les_login['room']][0];
|
||||
|
@ -95,7 +101,6 @@ if($_GET["p"] && $_GET["p"] != '' && $time <= 0 && $rooms[$les_login['room']][4]
|
|||
$_GET["p"] = 0;
|
||||
}
|
||||
|
||||
|
||||
///////////////Сбор/////////////
|
||||
if ($_GET['res']) {
|
||||
$gss = mysql_fetch_array(mysql_query("SELECT * FROM `les_res` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($_GET['res']) . "' AND `kom` = '" . $les_login['room'] . "' LIMIT 1"));
|
||||
|
@ -110,24 +115,20 @@ if($_GET['res']) {
|
|||
addchp('<b style="color:#990000">Внимание!</b> <b>' . $user["login"] . '</b>, поднял предмет "' . $gss['name'] . '".', '{[]}' . Nick::id($user["id"])->short() . '{[]}');
|
||||
echo "<font style='color:#990000'>Вы подняли <b>'" . $gss['name'] . "'</b>.</font>";
|
||||
} else {
|
||||
echo " <font style='font-size:12px; color:cc0000;'>Кто-то оказался быстрее!</font>";}
|
||||
echo " <font style='font-size:12px; color:cc0000;'>Кто-то оказался быстрее!</font>";
|
||||
}
|
||||
|
||||
}
|
||||
Template::header('Лес');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV=imagetoolbar CONTENT=no>
|
||||
<script src="i/forest/char1.32.js"></script>
|
||||
<script src="i/forest/funcs1.6.js"></script>
|
||||
</head>
|
||||
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor="#e2e0e0" onLoad="top.setHP(<?=$user['hp']?>,<?=$user['maxhp']?>,<? if (!$user['battle']){echo"10";}else{echo"0";}?>)">
|
||||
<center><h4>Лес</h4></center>
|
||||
<dd>
|
||||
|
||||
<dd><table cellspacing=2 cellpadding=0>
|
||||
<table cellspacing=2 cellpadding=0>
|
||||
<tr>
|
||||
<td>
|
||||
<center><table width="450" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
|
||||
<center>
|
||||
<table width="450" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
|
||||
<tr>
|
||||
<td background="i/forest/bg_scroll_01.gif" align="center">Имя</td>
|
||||
<td background="i/forest/bg_scroll_01.gif" align="center">Hp</td>
|
||||
|
@ -140,24 +141,30 @@ while($more = mysql_fetch_array($rog)) {
|
|||
?>
|
||||
<tr>
|
||||
<td background="i/forest/bg_scroll_05.gif" align="center">
|
||||
<a href=inf.php?<?=$big['id']?> target=_blank title="Информация о <?=$big['login']?>"><?=$big['login']?></a></td>
|
||||
<td background="i/forest/bg_scroll_05.gif" align="center"><?=$big['hp']?>/<?=$big['maxhp']?> </td>
|
||||
<a href=inf.php?<?= $big['id'] ?> target=_blank
|
||||
title="Информация о <?= $big['login'] ?>"><?= $big['login'] ?></a></td>
|
||||
<td background="i/forest/bg_scroll_05.gif" align="center"><?= $big['hp'] ?>
|
||||
/<?= $big['maxhp'] ?> </td>
|
||||
<td background="i/forest/bg_scroll_05.gif" align="center"><?= $more['room'] ?></td>
|
||||
<?
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</table></center>
|
||||
</table>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=5 width=100%><tr valign=top><td>
|
||||
<table cellpadding=5 width=100%>
|
||||
<tr valign=top>
|
||||
<td>
|
||||
<table align=center width=95% height=100% cellpadding=5>
|
||||
<tr valign=top>
|
||||
<td width=100%>
|
||||
|
||||
<table width=100%><tr>
|
||||
<table width=100%>
|
||||
<tr>
|
||||
|
||||
<td align=center colspan=2 id="navtbl">
|
||||
<?
|
||||
|
@ -195,7 +202,9 @@ if($rooms[$les_login['room']][2] != '') {
|
|||
|
||||
|
||||
<? if ($les_login['room'] == 'G8') { ?>
|
||||
<input class=btn style="width:150px;height:20" type="button" value="Выйти из леса" onclick="location.href='?go=vixod';" /><br /><br />
|
||||
<input class=btn style="width:150px;height:20" type="button"
|
||||
value="Выйти из леса" onclick="location.href='?go=vixod';"/><br/>
|
||||
<br/>
|
||||
<? } ?>
|
||||
</td>
|
||||
<? $les = mysql_query("SELECT `id` FROM `les_res` WHERE `owner` = '" . $user['id'] . "'"); ?>
|
||||
|
@ -205,10 +214,13 @@ if($rooms[$les_login['room']][2] != '') {
|
|||
<a href='i/forest/les.jpg' target="_blank">Карта</a>
|
||||
<br/>
|
||||
<span>Расположение : <b><?= $les_login['room'] ?></b></span><br/>
|
||||
<span>Не собрано ресурсов : <b><?=$col = mysql_num_rows($les);?></b></span><br /><span id="moveid"></span>
|
||||
<span>Не собрано ресурсов : <b><?= $col = mysql_num_rows($les); ?></b></span><br/><span
|
||||
id="moveid"></span>
|
||||
<?
|
||||
$time = ($_SESSION['time'] - time());
|
||||
if($time < 0) { $time = 0; }
|
||||
if ($time < 0) {
|
||||
$time = 0;
|
||||
}
|
||||
?>
|
||||
<script>go_timer_on(<?=$time?>, 200);</script>
|
||||
</td>
|
||||
|
@ -225,8 +237,14 @@ while($res = mysql_fetch_array($le)) {
|
|||
<?
|
||||
$img = rand(1, 24);
|
||||
?>
|
||||
<td align=center><div id=bgid style="background-color:#cccccc;border:#666666 1px solid;position:relative;width:450px;height:300px"><img class=img2 height=300 src="forest/<?=$img?>.jpg" /></div></td>
|
||||
<td align=center>
|
||||
<div id=bgid
|
||||
style="background-color:#cccccc;border:#666666 1px solid;position:relative;width:450px;height:300px">
|
||||
<img class=img2 height=300 src="forest/<?= $img ?>.jpg"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td></tr></table>
|
||||
</body>
|
||||
</html>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
162
forum.php
|
@ -33,7 +33,7 @@ $replasepost = '';
|
|||
|
||||
function parse_bb_code($text)
|
||||
{
|
||||
$bbCodes = array(
|
||||
$bbCodes = [
|
||||
// Стандартные BB коды
|
||||
'/\[(\/?)(b|i|u|s)\s*\]/' => "<$1$2>",
|
||||
'/\[(left|center|right)\]/' => '<p style="text-align:$1;">',
|
||||
|
@ -44,138 +44,9 @@ function parse_bb_code($text)
|
|||
'/\[quote\](.+?)\[\/quote\]/' => "<blockquote>$1</blockquote>",
|
||||
'/\[code\](.+?)\[\/code\]/' => "<pre><code>$1</code></pre>",
|
||||
// Смайлы
|
||||
'/\:smile0\:/' => '<img src="i/forum/icon7.gif" />',
|
||||
'/\:baby\:/' => '<img src="i/smile/baby.gif" />',
|
||||
'/\:sniper\:/' => '<img src="i/smile/sniper.gif" />',
|
||||
'/\:trup\:/' => '<img src="i/smile/trup.gif" />',
|
||||
'/\:beggar\:/' => '<img src="i/smile/beggar.gif" />',
|
||||
'/\:rotate\:/' => '<img src="i/smile/rotate.gif" />',
|
||||
'/\:hello\:/' => '<img src="i/smile/hello.gif" />',
|
||||
'/\:sten\:/' => '<img src="i/smile/sten.gif" />',
|
||||
'/\:shuffle\:/' => '<img src="i/smile/shuffle.gif" />',
|
||||
'/\:elix\:/' => '<img src="i/smile/elix.gif" />',
|
||||
'/\:smil\:/' => '<img src="i/smile/smil.gif" />',
|
||||
'/\:mdr\:/' => '<img src="i/smile/mdr.gif" />',
|
||||
'/\:podz\:/' => '<img src="i/smile/podz.gif" />',
|
||||
'/\:dont\:/' => '<img src="i/smile/dont.gif" />',
|
||||
'/\:grust\:/' => '<img src="i/smile/grust.gif" />',
|
||||
'/\:boks\:/' => '<img src="i/smile/boks.gif" />',
|
||||
'/\:susel\:/' => '<img src="i/smile/susel.gif" />',
|
||||
'/\:dedmoroz\:/' => '<img src="i/smile/dedmoroz.gif" />',
|
||||
'/\:creator\:/' => '<img src="i/smile/creator.gif" />',
|
||||
'/\:no\:/' => '<img src="i/smile/no.gif" />',
|
||||
'/\:horse\:/' => '<img src="i/smile/horse.gif" />',
|
||||
'/\:vamp\:/' => '<img src="i/smile/vamp.gif" />',
|
||||
'/\:eek\:/' => '<img src="i/smile/eek.gif" />',
|
||||
'/\:sorry\:/' => '<img src="i/smile/sorry.gif" />',
|
||||
'/\:friday\:/' => '<img src="i/smile/friday.gif" />',
|
||||
'/\:obm\:/' => '<img src="i/smile/obm.gif" />',
|
||||
'/\:smile\:/' => '<img src="i/smile/smile.gif" />',
|
||||
'/\:nail\:/' => '<img src="i/smile/nail.gif" />',
|
||||
'/\:gent\:/' => '<img src="i/smile/gent.gif" />',
|
||||
'/\:beer\:/' => '<img src="i/smile/beer.gif" />',
|
||||
'/\:inv\:/' => '<img src="i/smile/inv.gif" />',
|
||||
'/\:fire\:/' => '<img src="i/smile/fire.gif" />',
|
||||
'/\:dance1\:/' => '<img src="i/smile/dance1.gif" />',
|
||||
'/\:maniac\:/' => '<img src="i/smile/maniac.gif" />',
|
||||
'/\:kiss4\:/' => '<img src="i/smile/kiss4.gif" />',
|
||||
'/\:confused\:/' => '<img src="i/smile/confused.gif" />',
|
||||
'/\:kiss2\:/' => '<img src="i/smile/kiss2.gif" />',
|
||||
'/\:snowfight\:/' => '<img src="i/smile/snowfight.gif" />',
|
||||
'/\:row\:/' => '<img src="i/smile/row.gif" />',
|
||||
'/\:naem\:/' => '<img src="i/smile/naem.gif" />',
|
||||
'/\:radio1\:/' => '<img src="i/smile/radio1.gif" />',
|
||||
'/\:fie\:/' => '<img src="i/smile/fie.gif" />',
|
||||
'/\:love\:/' => '<img src="i/smile/love.gif" />',
|
||||
'/\:sneeze\:/' => '<img src="i/smile/sneeze.gif" />',
|
||||
'/\:mol\:/' => '<img src="i/smile/mol.gif" />',
|
||||
'/\:showng\:/' => '<img src="i/smile/showng.gif" />',
|
||||
'/\:rocket\:/' => '<img src="i/smile/rocket.gif" />',
|
||||
'/\:dustman\:/' => '<img src="i/smile/dustman.gif" />',
|
||||
'/\:rupor\:/' => '<img src="i/smile/rupor.gif" />',
|
||||
'/\:nnn\:/' => '<img src="i/smile/nnn.gif" />',
|
||||
'/\:snegur\:/' => '<img src="i/smile/snegur.gif" />',
|
||||
'/\:dance2\:/' => '<img src="i/smile/dance2.gif" />',
|
||||
'/\:jeer\:/' => '<img src="i/smile/jeer.gif" />',
|
||||
'/\:kiss\:/' => '<img src="i/smile/kiss.gif" />',
|
||||
'/\:ponder\:/' => '<img src="i/smile/ponder.gif" />',
|
||||
'/\:drink\:/' => '<img src="i/smile/drink.gif" />',
|
||||
'/\:angel\:/' => '<img src="i/smile/angel.gif" />',
|
||||
'/\:idea\:/' => '<img src="i/smile/idea.gif" />',
|
||||
'/\:lady\:/' => '<img src="i/smile/lady.gif" />',
|
||||
'/\:gun\:/' => '<img src="i/smile/gun.gif" />',
|
||||
'/\:pif\:/' => '<img src="i/smile/pif.gif" />',
|
||||
'/\:help\:/' => '<img src="i/smile/help.gif" />',
|
||||
'/\:alch\:/' => '<img src="i/smile/alch.gif" />',
|
||||
'/\:kiss3\:/' => '<img src="i/smile/kiss3.gif" />',
|
||||
'/\:hug\:/' => '<img src="i/smile/hug.gif" />',
|
||||
'/\:lordhaos\:/' => '<img src="i/smile/lordhaos.gif" />',
|
||||
'/\:rose\:/' => '<img src="i/smile/rose.gif" />',
|
||||
'/\:radio2\:/' => '<img src="i/smile/radio2.gif" />',
|
||||
'/\:boks2\:/' => '<img src="i/smile/boks2.gif" />',
|
||||
'/\:str\:/' => '<img src="i/smile/str.gif" />',
|
||||
'/\:invis\:/' => '<img src="i/smile/invis.gif" />',
|
||||
'/\:rev\:/' => '<img src="i/smile/rev.gif" />',
|
||||
'/\:ok\:/' => '<img src="i/smile/ok.gif" />',
|
||||
'/\:alien\:/' => '<img src="i/smile/alien.gif" />',
|
||||
'/\:smash\:/' => '<img src="i/smile/smash.gif" />',
|
||||
'/\:super\:/' => '<img src="i/smile/super.gif" />',
|
||||
'/\:love2\:/' => '<img src="i/smile/love2.gif" />',
|
||||
'/\:victory\:/' => '<img src="i/smile/victory.gif" />',
|
||||
'/\:kruger\:/' => '<img src="i/smile/kruger.gif" />',
|
||||
'/\:agree\:/' => '<img src="i/smile/agree.gif" />',
|
||||
'/\:hi\:/' => '<img src="i/smile/hi.gif" />',
|
||||
'/\:privet\:/' => '<img src="i/smile/privet.gif" />',
|
||||
'/\:devil\:/' => '<img src="i/smile/devil.gif" />',
|
||||
'/\:naem2\:/' => '<img src="i/smile/naem2.gif" />',
|
||||
'/\:tongue\:/' => '<img src="i/smile/tongue.gif" />',
|
||||
'/\:red\:/' => '<img src="i/smile/red.gif" />',
|
||||
'/\:doc\:/' => '<img src="i/smile/doc.gif" />',
|
||||
'/\:icon7\:/' => '<img src="i/forum/icon7.gif" />',
|
||||
'/\:lightfly\:/' => '<img src="i/smile/lightfly.gif" />',
|
||||
'/\:owl\:/' => '<img src="i/smile/owl.gif" />',
|
||||
'/\:pirate\:/' => '<img src="i/smile/pirate.gif" />',
|
||||
'/\:sword\:/' => '<img src="i/smile/sword.gif" />',
|
||||
'/\:bye\:/' => '<img src="i/smile/bye.gif" />',
|
||||
'/\:mad\:/' => '<img src="i/smile/mad.gif" />',
|
||||
'/\:fingal\:/' => '<img src="i/smile/fingal.gif" />',
|
||||
'/\:nono\:/' => '<img src="i/smile/nono.gif" />',
|
||||
'/\:loveya\:/' => '<img src="i/smile/loveya.gif" />',
|
||||
'/\:cry\:/' => '<img src="i/smile/cry.gif" />',
|
||||
'/\:superng\:/' => '<img src="i/smile/superng.gif" />',
|
||||
'/\:yes\:/' => '<img src="i/smile/yes.gif" />',
|
||||
'/\:crying\:/' => '<img src="i/smile/crying.gif" />',
|
||||
'/\:\'\(\:/' => '<img src="i/smile/crying.gif" />',
|
||||
'/\:flowers\:/' => '<img src="i/smile/flowers.gif" />',
|
||||
'/\:tease\:/' => '<img src="i/smile/tease.gif" />',
|
||||
'/\:wink\:/' => '<img src="i/smile/wink.gif" />',
|
||||
'/\:sharp\:/' => '<img src="i/smile/sharp.gif" />',
|
||||
'/\:nunu\:/' => '<img src="i/smile/nunu.gif" />',
|
||||
'/\:angel2\:/' => '<img src="i/smile/angel2.gif" />',
|
||||
'/\:naem3\:/' => '<img src="i/smile/naem3.gif" />',
|
||||
'/\:lick\:/' => '<img src="i/smile/lick.gif" />',
|
||||
'/\:ninja\:/' => '<img src="i/smile/ninja.gif" />',
|
||||
'/\:cat\:/' => '<img src="i/smile/cat.gif" />',
|
||||
'/\:smoke\:/' => '<img src="i/smile/smoke.gif" />',
|
||||
'/\:chtoza\:/' => '<img src="i/smile/chtoza.gif" />',
|
||||
'/\:grace\:/' => '<img src="i/smile/grace.gif" />',
|
||||
'/\:tongue2\:/' => '<img src="i/smile/tongue2.gif" />',
|
||||
'/\:sorry2\:/' => '<img src="i/smile/sorry2.gif" />',
|
||||
'/\:yar\:/' => '<img src="i/smile/yar.gif" />',
|
||||
'/\:king2\:/' => '<img src="i/smile/king2.gif" />',
|
||||
'/\:carreat\:/' => '<img src="i/smile/carreat.gif" />',
|
||||
'/\:hlw\:/' => '<img src="i/smile/hlw.gif" />',
|
||||
'/\:grenade\:/' => '<img src="i/smile/grenade.gif" />',
|
||||
'/\:bow\:/' => '<img src="i/smile/bow.gif" />',
|
||||
'/\:doc2\:/' => '<img src="i/smile/doc2.gif" />',
|
||||
'/\:duel\:/' => '<img src="i/smile/duel.gif" />',
|
||||
'/\:mag\:/' => '<img src="i/smile/mag.gif" />',
|
||||
'/\:king\:/' => '<img src="i/smile/king.gif" />',
|
||||
'/\:laugh\:/' => '<img src="i/smile/laugh.gif" />',
|
||||
'/\:pal\:/' => '<img src="i/smile/pal.gif" />',
|
||||
'/\:nun\:/' => '<img src="i/smile/nun.gif" />',
|
||||
'/\:ura\:/' => '<img src="i/smile/ura.gif" />',
|
||||
);
|
||||
];
|
||||
|
||||
$text = preg_replace(array_keys($bbCodes), array_values($bbCodes), $text);
|
||||
$text = close_dangling_tags($text);
|
||||
|
@ -335,18 +206,10 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
exit();
|
||||
}
|
||||
}
|
||||
Template::header('Форум');
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Форум</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<link rel="stylesheet" href="css/wysibb/theme/default/wbbtheme.css"/>
|
||||
<script type="text/javascript" language="JavaScript" src='js/forum.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table width="100%" border="0">
|
||||
<tr valign="top">
|
||||
<td width="200">
|
||||
|
@ -449,7 +312,7 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isModerator AND (isset($_GET['conf']) OR isset($_GET['page']))): ?>
|
||||
<?php if ($isModerator and (isset($_GET['conf']) or isset($_GET['page']))): ?>
|
||||
<a href="?topic=<?= $_GET['topic'] ?>&konftop=<?= htmlspecialchars($_GET['conf']) ?>&page=<?= $_GET['page'] ?>&dp=<?= $row['id'] ?>">
|
||||
<small>Удалить</small>
|
||||
</a> |
|
||||
|
@ -473,8 +336,9 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<?= $row['author'] ?> <span class="date">(<?= $row['date'] ?>)</span>
|
||||
<?php if ($isModerator AND isset($_GET['conf']) AND isset($_GET['page'])): ?>
|
||||
<?= $row['author'] ?> <span
|
||||
class="date">(<?= $row['date'] ?>)</span>
|
||||
<?php if ($isModerator and isset($_GET['conf']) and isset($_GET['page'])): ?>
|
||||
<a href="?topic=<?= $_GET['topic'] ?>&konftop=<?= htmlspecialchars($_GET['conf']) ?>&page=<?= $_GET['page'] ?>&dp=<?= $row['id'] ?>">
|
||||
<small>Удалить</small>
|
||||
</a>
|
||||
|
@ -692,9 +556,11 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
<input type="hidden" name="icon" value="13">
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="submit" class="btn" value="Добавить" name="add"/>
|
||||
<input type="submit" class="btn" value="Добавить"
|
||||
name="add"/>
|
||||
<input type="hidden" name="n" value="klans">
|
||||
<input type="hidden" id="act" name="act" value="add_branch"/>
|
||||
<input type="hidden" id="act" name="act"
|
||||
value="add_branch"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -708,7 +574,9 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
<?
|
||||
}
|
||||
}
|
||||
} else echo ' <div style="width: 300px; margin: auto; font-weight: bold;">Ничего не найдено!</div> ';
|
||||
} else {
|
||||
echo ' <div style="width: 300px; margin: auto; font-weight: bold;">Ничего не найдено!</div> ';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- End of text -->
|
||||
|
@ -722,5 +590,3 @@ if (isset($_GET['do']) && $isModerator == true) {
|
|||
<input type='hidden' id='numt' name='numt'/>
|
||||
</form>
|
||||
<? endif; ?>
|
||||
</body>
|
||||
</html>
|
|
@ -145,8 +145,6 @@ function takeshopitem($item, $table = "shop", $present = '', $onlyonetrip = '',
|
|||
|
||||
define('_BOTSEPARATOR_', 10000000);
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
|
||||
function level_up($uid)
|
||||
{
|
||||
$us = db::c()->query('SELECT `id`, `login`, `level`, `money`, `exp`, `nextup`, `stats`, `master`, `ip`, `in_tower` FROM `users` WHERE `id` =?i', $uid)->fetch_assoc();
|
||||
|
|
13
game.php
|
@ -6,19 +6,14 @@
|
|||
*/
|
||||
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||
if (empty($_SESSION['uid'])) header("Location: index.php");
|
||||
//include("config.php");
|
||||
|
||||
//$msg = filter_input(INPUT_POST,'msg');
|
||||
//$uid = $_SESSION['uid'];
|
||||
//if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||
Template::header('Окно игры');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Окно игры</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<style>
|
||||
form {
|
||||
width: 100%;
|
||||
|
@ -71,8 +66,6 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
}
|
||||
</style>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header>
|
||||
<a href="/user_anketa.php" title="Анкета" target="main"><img src="http://placehold.it/32x32/33ff33?text=A"/></a>
|
||||
|
@ -107,5 +100,3 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
loadlink() // this will run after every 5 seconds
|
||||
}, 5000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
31
game2.php
|
@ -6,19 +6,14 @@
|
|||
*/
|
||||
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||
if (empty($_SESSION['uid'])) header("Location: index.php");
|
||||
//include("config.php");
|
||||
|
||||
//$msg = filter_input(INPUT_POST,'msg');
|
||||
//$uid = $_SESSION['uid'];
|
||||
//if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||
Template::header('Окно игры');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Окно игры</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<style>
|
||||
form {
|
||||
width: 100%;
|
||||
|
@ -79,34 +74,43 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
background: #555;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.chat-messages {
|
||||
min-height: 93%;
|
||||
max-height: 93%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.chat-messages__content {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.chat__message {
|
||||
border-left: 3px solid #333;
|
||||
margin-top: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.chat__message_black {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.chat__message_blue {
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
.chat__message_green {
|
||||
border-color: green;
|
||||
}
|
||||
|
||||
.chat__message_red {
|
||||
border-color: red;
|
||||
}
|
||||
|
||||
.chat-input {
|
||||
min-height: 6%;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: arial;
|
||||
font-size: 16px;
|
||||
|
@ -118,17 +122,16 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
margin: 1px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.chat-form__input {
|
||||
width: 79%;
|
||||
}
|
||||
|
||||
.chat-form__submit {
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header>
|
||||
Всякие заголовки, кнопки, ссылки, etc...
|
||||
|
@ -143,7 +146,9 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
</div>
|
||||
<div class='chat-input'>
|
||||
<form method='post' id='chat-form'>
|
||||
<input id='message-text' class='chat-form__input' placeholder='Введите сообщение'> <input type='submit' class='chat-form__submit' value='=>'>
|
||||
<input id='message-text' class='chat-form__input' placeholder='Введите сообщение'> <input type='submit'
|
||||
class='chat-form__submit'
|
||||
value='=>'>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -190,6 +195,7 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
function update() {
|
||||
send_request('load');
|
||||
}
|
||||
|
||||
interval = setInterval(update, 500);
|
||||
|
||||
//отлавливается событие отправки формы — это поможет отказаться от обновления страницы:
|
||||
|
@ -198,6 +204,3 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
|||
return false; //Возвращаем ложь, чтобы остановить классическую отправку формы
|
||||
};
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
74
gotzamok.php
|
@ -3,30 +3,46 @@
|
|||
* */
|
||||
session_start();
|
||||
define("CASTLE_MAX_LEVEL", 10);
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'functions.php';
|
||||
|
||||
if (!($user['room'] >= 37 AND $user['room'] <= 41)) {
|
||||
if (!($user->room >= 37 && $user->room <= 41)) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
exit;
|
||||
}
|
||||
|
||||
$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;
|
||||
if ($_GET['goto'] == 'dvor') $user['room'] = 39;
|
||||
if ($_GET['goto'] == 'master') $user['room'] = 40;
|
||||
if ($_GET['goto'] == 'rest') $user['room'] = 41;
|
||||
if ($_GET['goto'] == 'arsenal') {
|
||||
$user->room = 38;
|
||||
}
|
||||
if ($_GET['goto'] == 'home') {
|
||||
$user->room = 37;
|
||||
}
|
||||
if ($_GET['goto'] == 'dvor') {
|
||||
$user->room = 39;
|
||||
}
|
||||
if ($_GET['goto'] == 'master') {
|
||||
$user->room = 40;
|
||||
}
|
||||
if ($_GET['goto'] == 'rest') {
|
||||
$user->room = 41;
|
||||
}
|
||||
if (in_array($_GET['goto'], ['arsenal', 'home', 'dvor', 'master', 'rest'])) {
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user['room'], $user['room'], $_SESSION['uid']);
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user->room, $user->room, $_SESSION['uid']);
|
||||
header('location: gotzamok.php');
|
||||
} else $status = 'В этом замке нет такого места!';
|
||||
} else {
|
||||
$status = 'В этом замке нет такого места!';
|
||||
}
|
||||
}
|
||||
|
||||
switch ($user['room']) {
|
||||
switch ($user->room) {
|
||||
case '37' :
|
||||
$backgroundImage = '689_small_550.jpg';
|
||||
break;
|
||||
|
@ -35,13 +51,13 @@ switch ($user['room']) {
|
|||
break;
|
||||
}
|
||||
|
||||
if ($user['room'] == 38) {
|
||||
if ($user->room == 38) {
|
||||
$glava = db::c()->query('SELECT `glava` FROM `clans` WHERE `short` = "?s"', $user['klan'])->fetch_assoc();
|
||||
// возврат шмотки
|
||||
if ($_GET['back']) {
|
||||
$item = db::c()->query('SELECT * FROM `gotzam_arsenal` WHERE `id` = ?i', $_GET['back'])->fetch_assoc();
|
||||
|
||||
if ($_SESSION['uid'] == $item['owner'] OR $_SESSION['uid'] == $glava['glava']) {
|
||||
if ($_SESSION['uid'] == $item['owner'] or $_SESSION['uid'] == $glava['glava']) {
|
||||
$status = 'Вы забрали вещь из арсенала.';
|
||||
db::c()->query('UPDATE `inventory` SET `owner` = ?i WHERE `id` = ?i', $_SESSION['uid'], $item['id_it']);
|
||||
db::c()->query('DELETE FROM `gotzam_arsenal` WHERE `id` = ?i', $_GET['back']);
|
||||
|
@ -59,7 +75,7 @@ if ($user['room'] == 38) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($user['room'] == 40) {
|
||||
if ($user->room == 40) {
|
||||
$at = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_att')->fetch_assoc();
|
||||
$def = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_def')->fetch_assoc();
|
||||
|
||||
|
@ -80,20 +96,16 @@ if ($user['room'] == 40) {
|
|||
} else $status = 'Не хватает денег!';
|
||||
}
|
||||
}
|
||||
Template::header('Клановый замок');
|
||||
?>
|
||||
<HTML>
|
||||
<head>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<script src="js/main.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
body {
|
||||
background: url('i/<?= $backgroundImage ?>.jpg') no-repeat top right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Приветствую тебя в замке <img src='i/clan/<?= $castleOwners['short'] ?>.gif'> <?= $castleOwners['name'] ?>, воин!</h3>
|
||||
<h3>Приветствую тебя в замке <img src='i/clan/<?= $castleOwners['short'] ?>.png'> <?= $castleOwners['name'] ?>,
|
||||
воин!</h3>
|
||||
<div style="text-align: right;">
|
||||
<button onClick="hrefToFrame('city.php?bps')">Вернуться</button>
|
||||
</div>
|
||||
|
@ -107,32 +119,32 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
|||
<TD valign=top style="width:250px;">
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в приемную"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=home')">
|
||||
<? if ($user['room'] == 37): ?>
|
||||
<? if ($user->room == 37): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в арсенал"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=arsenal')">
|
||||
<? if ($user['room'] == 38): ?>
|
||||
<? if ($user->room == 38): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти во внутренний двор"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=dvor')">
|
||||
<? if ($user['room'] == 39): ?>
|
||||
<? if ($user->room == 39): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в мастерские"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=master')">
|
||||
<? if ($user['room'] == 40): ?>
|
||||
<? if ($user->room == 40): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
<INPUT TYPE=button style="width:200px;" value="Перейти в опочивальни"
|
||||
onClick="hrefToFrame('gotzamok.php?goto=rest')">
|
||||
<? if ($user['room'] == 41): ?>
|
||||
<? if ($user->room == 41): ?>
|
||||
<img src='i/flag.gif'>
|
||||
<?php endif; ?><BR>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?php if ($user['room'] == 38): ?>
|
||||
<?php if ($user->room == 38): ?>
|
||||
<h4>Арсенал</h4>
|
||||
<button onClick="hrefToFrame('gotzamok.php?do=zdat')">Сдать в арсенал</button>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
|
@ -149,7 +161,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
|||
<BR>
|
||||
<small>Положил: <?= Nick::id($item['owner'])->full(1) ?><BR></small>
|
||||
<?php
|
||||
if ($_SESSION['uid'] == $item['owner'] OR $_SESSION['uid'] == $glava['glava']): ?>
|
||||
if ($_SESSION['uid'] == $item['owner'] or $_SESSION['uid'] == $glava['glava']): ?>
|
||||
<A HREF="?back=<?= $item['id'] ?>">забрать</A><BR>
|
||||
<?php else: $status = 'Вы не можете забрать эту вещь из арсенала.';
|
||||
endif; ?>
|
||||
|
@ -175,7 +187,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
|||
<?php
|
||||
endif;
|
||||
endif;
|
||||
if ($user['room'] == 40): ?>
|
||||
if ($user->room == 40): ?>
|
||||
<h4>Мастерские</h4>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
Здесь вы можете улучшить оборонные способности вашего замка.
|
||||
|
@ -192,7 +204,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
|||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
if ($user['room'] == 41): ?>
|
||||
if ($user->room == 41): ?>
|
||||
<h4>Комнаты отдыха</h4>
|
||||
<div style="background: silver; border: 1px solid dimgray;">
|
||||
Посиди в тишине, внутри стен. Тут нет врагов. Тут спокойно.
|
||||
|
@ -202,5 +214,3 @@ if ($castleOwners['id'] == $user['klan']) { ?>
|
|||
</tr>
|
||||
</table>
|
||||
<? } else $status = 'Ворота замка закрыты, привратник отказывается даже разговаривать с тобой...'; ?>
|
||||
</body>
|
||||
</HTML>
|
111
group_arena.php
|
@ -1,21 +1,24 @@
|
|||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { die(); }
|
||||
if (empty($_SESSION['uid'])) {
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
|
||||
$error = '';
|
||||
|
||||
function login($uid) {
|
||||
function login($uid)
|
||||
{
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align`, `level`, `klan` FROM `users` WHERE `id` = "' . mysql_real_escape_string($uid) . '" LIMIT 1'));
|
||||
if (isset($user['id'])) {
|
||||
$align_img = '<img src="i/align_' . ($user['align'] ? $user['align'] : 0) . '.gif" /> ';
|
||||
if ($user['klan'] != '') {
|
||||
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `name` FROM `clans` WHERE `id` = "' . $user['klan'] . '" LIMIT 1'));
|
||||
$clan_img = '<img title="'.$clan['name'].'" src="i/clan/'.$clan['name'].'.gif" /> ';
|
||||
$clan_img = '<img title="' . $clan['name'] . '" src="i/clan/' . $clan['name'] . '.png" /> ';
|
||||
} else {
|
||||
$clan_img = '';
|
||||
}
|
||||
$r = $align_img.$clan_img.' <b>'.$user['login'].' ['.$user['level'].']</b><a href="http://capitalcity.old-dark.ru/inf.php?id='.$user['id'].'" target="_blank"><img src="http://capitalcity.old-dark.ru/i/inf.gif" /></a>';
|
||||
$r = $align_img . $clan_img . ' <b>' . $user['login'] . ' [' . $user['level'] . ']</b><a href="/inf.php?' . $user['id'] . '" target="_blank"><img src="/i/inf.gif" /></a>';
|
||||
} else {
|
||||
$r = 'Место свободно';
|
||||
}
|
||||
|
@ -23,12 +26,13 @@ function login($uid) {
|
|||
}
|
||||
|
||||
|
||||
function form_start($uid) {
|
||||
$r = ''; $go = '';
|
||||
function form_start($uid)
|
||||
{
|
||||
$r = '';
|
||||
$go = '';
|
||||
if ($uid > 0) {
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align`, `level`, `klan`, `zayrist` FROM `users` WHERE `id` = "' . $uid . '" LIMIT 1'));
|
||||
if(isset($user['id'])) {
|
||||
if($user['zayrist']) {
|
||||
if (isset($user['id']) ?? $user['zayrist']) {
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT `id`, `name`, `uid1`, `uid2`, `uid3` FROM `group_ristal` WHERE `id` = "' . $user['zayrist'] . '" LIMIT 1'));
|
||||
if (isset($zv['id'])) {
|
||||
$r .= '<form method="POST">';
|
||||
|
@ -47,11 +51,11 @@ function form_start($uid) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function forms($level) {
|
||||
function forms($level)
|
||||
{
|
||||
$r = '<br /></br />';
|
||||
$sp = mysql_query('SELECT `id`, `name`, `pass`, `comment`, `uid1`, `uid2`, `uid3` FROM `group_ristal` WHERE `level` = "' . (int)$level . '" ORDER BY `id` DESC');
|
||||
if (mysql_num_rows($sp) > 0) {
|
||||
|
@ -151,11 +155,13 @@ if($_POST['addZayavka']) {
|
|||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['leaveZv'])) {
|
||||
if($user['zayrist'] > 0) {
|
||||
if (isset($_POST['leaveZv']) ?? $user['zayrist']) {
|
||||
$zv = mysql_fetch_array(mysql_query('SELECT `id`, `uid1`, `uid2`, `uid3` FROM `group_ristal` WHERE `id` = "' . $user['zayrist'] . '" LIMIT 1'));
|
||||
if (isset($zv['id'])) {
|
||||
$i = 1; $j = 3; $k = 0; $h = 0;
|
||||
$i = 1;
|
||||
$j = 3;
|
||||
$k = 0;
|
||||
$h = 0;
|
||||
while ($i <= 3) {
|
||||
if ($k == 0 && $zv['uid' . $i] != $user['id']) {
|
||||
$k = $zv['uid' . $i];
|
||||
|
@ -191,7 +197,6 @@ if(isset($_POST['leaveZv'])) {
|
|||
}
|
||||
unset($zv);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($_GET['exit'] == 1) {
|
||||
|
||||
|
@ -199,31 +204,60 @@ if(isset($_POST['leaveZv'])) {
|
|||
header('Location: city.php');
|
||||
}
|
||||
|
||||
Template::header('group_arena');
|
||||
?>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" href="css/main.css" />
|
||||
<script>function growl(title, color, message, stycky) { if(!stycky) { stycky = false; } if(!color) { color = 'Red'; } $.jGrowl(message, { header: '<img src="/i/jgrowl_moover.png" class="jgrowl-moover" title="Передвинуть" style="cursor: pointer;" /> <font style="color: '+color+';">'+title+'</font>', sticky: stycky, glue: 'before' }); }</script>
|
||||
<script>function shows() {
|
||||
const clas = $("#alt").attr('class');
|
||||
$("#mkgrp").toggle(); if(clas == 'show') { $("#alt").attr('class','hide'); $("#alt").text('Скрыть ...'); } else { $("#alt").attr('class','show'); $("#alt").text('Создать группу'); } }</script>
|
||||
<style>body { background-image: url('i/r240_1.jpg'); background-repeat: no-repeat; background-position: top right; }</style>
|
||||
</head>
|
||||
<script>
|
||||
function growl(title, color, message, stycky) {
|
||||
if (!stycky) {
|
||||
stycky = false;
|
||||
}
|
||||
if (!color) {
|
||||
color = 'Red';
|
||||
}
|
||||
$.jGrowl(message, {
|
||||
header: '<img src="/i/jgrowl_moover.png" class="jgrowl-moover" title="Передвинуть" style="cursor: pointer;" /> <font style="color: ' + color + ';">' + title + '</font>',
|
||||
sticky: stycky,
|
||||
glue: 'before'
|
||||
});
|
||||
}
|
||||
|
||||
<body >
|
||||
function shows() {
|
||||
const clas = $("#alt").attr('class');
|
||||
$("#mkgrp").toggle();
|
||||
if (clas == 'show') {
|
||||
$("#alt").attr('class', 'hide');
|
||||
$("#alt").text('Скрыть ...');
|
||||
} else {
|
||||
$("#alt").attr('class', 'show');
|
||||
$("#alt").text('Создать группу');
|
||||
}
|
||||
}</script>
|
||||
<style>
|
||||
body {
|
||||
background-image: url('i/r240_1.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
<table class="allzeroes">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=center>
|
||||
<h3>Турниры: Групповые сражения.</h3>
|
||||
<b>Внимание! В боях этой локации разрешается использовать свитки "Восстановления энергии" номиналом не более 180НР!</b><br /><br />
|
||||
<b>Внимание! В боях этой локации разрешается использовать свитки "Восстановления энергии" номиналом не
|
||||
более 180НР!</b><br/><br/>
|
||||
<span style="color: Red;"><b>Внимание! При старте группового турнира руны автоматически будут сняты с персонажа. <br/>Проверьте, что ваши вещи после снятия рун не упадут, и не забудьте надеть руны после выхода из локации!</b></span>
|
||||
</div>
|
||||
<? if($user['zayrist'] == 0) { ?><div align=left><h4>Принять участие в турнире:</h4></div><a onclick="shows();" href="#" class="show" id="alt">Создать группу</a><br /><? echo forms($user['level']); } else { echo form_start($user['id']); } ?>
|
||||
<? if ($user['zayrist'] == 0) { ?>
|
||||
<div align=left><h4>Принять участие в турнире:</h4></div><a onclick="shows();" href="#" class="show"
|
||||
id="alt">Создать группу</a>
|
||||
<br/><? echo forms($user['level']);
|
||||
} else {
|
||||
echo form_start($user['id']);
|
||||
} ?>
|
||||
<div id="mkgrp" style="display: none;">
|
||||
<fieldset style="text-align: justify; width: 250px; max-width: 250px; height: 100px; max-height: 100px; margin-top: 15px;">
|
||||
<fieldset
|
||||
style="text-align: justify; width: 250px; max-width: 250px; height: 100px; max-height: 100px; margin-top: 15px;">
|
||||
<form method="post">
|
||||
Название: <input type="text" name="nameZv" size="20"/><br/>
|
||||
Комментарий: <input type="text" name="commentZv" size="15"/><br/>
|
||||
|
@ -232,13 +266,18 @@ if(isset($_POST['leaveZv'])) {
|
|||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div align="left"><p> </p><h4>Победители 10-ти предыдущих турниров: <span id="levelCheck"><?=$user['level'];?></span>-е уровни </h4></div>
|
||||
<div align="left"><p> </p><h4>Победители 10-ти предыдущих турниров: <span
|
||||
id="levelCheck"><?= $user['level']; ?></span>-е уровни </h4></div>
|
||||
<div id="rate"></div>
|
||||
</td>
|
||||
<td align=right><button onclick="location.href='city.php?zaliv'">Вернуться</button><br /><br />
|
||||
<td align=right>
|
||||
<button onclick="location.href='city.php?zaliv'">Вернуться</button>
|
||||
<br/><br/>
|
||||
<form method="POST">
|
||||
<input type="submit" value="Купить «Фамильный Герб» 5 кр." style="background-color: #A9AFC0;" name="buyFirst" />
|
||||
<input type="submit" value="Купить «Фамильный Герб (х2)» 15 кр." style="background-color: #A9AFC0;" name="buySecond" />
|
||||
<input type="submit" value="Купить «Фамильный Герб» 5 кр." style="background-color: #A9AFC0;"
|
||||
name="buyFirst"/>
|
||||
<input type="submit" value="Купить «Фамильный Герб (х2)» 15 кр." style="background-color: #A9AFC0;"
|
||||
name="buySecond"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -266,6 +305,6 @@ if(isset($_POST['leaveZv'])) {
|
|||
|
||||
});
|
||||
</script>
|
||||
<?if($error != '') { echo "<script>growl('Внимание', 'Red', '$error');</script>"; } ?>
|
||||
</body>
|
||||
</html>
|
||||
<? if ($error != '') {
|
||||
echo "<script>growl('Внимание', 'Red', '$error');</script>";
|
||||
}
|
28
hell.php
|
@ -42,13 +42,10 @@ $hr = new hellround;
|
|||
|
||||
$mytrip = $hr->is_in_trip($user['id']);
|
||||
$tr = $hr->get_par($mytrip);
|
||||
|
||||
Template::header('hell');
|
||||
if ($mytrip > 0) {
|
||||
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<style>
|
||||
body {
|
||||
background-image: url('i/hell.jpg');
|
||||
|
@ -56,20 +53,10 @@ if ($mytrip > 0) {
|
|||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#e0e0e0>
|
||||
<?
|
||||
<?php
|
||||
echo "<h3>Приближается <i>" . ($tr['volna'] + 1) . "</i> волна нашествия...</h3>";
|
||||
// диалоговый бот
|
||||
?>
|
||||
<table width=100%>
|
||||
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?
|
||||
} else {
|
||||
|
||||
if ($_GET['start'] > 0) {
|
||||
$f = mysql_fetch_array(mysql_query("SELECT `date_out` FROM `hellround_pohod` WHERE `owner`= " . $user['id'] . " ORDER by `id` DESC LIMIT 1;"));
|
||||
if ((time() - strtotime($f['date_out'])) < 3600 * 24) {
|
||||
|
@ -82,10 +69,6 @@ if ($mytrip > 0) {
|
|||
}
|
||||
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||||
<style>
|
||||
|
||||
body {
|
||||
|
@ -94,8 +77,6 @@ if ($mytrip > 0) {
|
|||
background-position: top right;
|
||||
}
|
||||
</style>
|
||||
</HEAD>
|
||||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor=#e0e0e0>
|
||||
<TABLE border=0 width=100% cellspacing="0" cellpadding="0">
|
||||
<td align=left>
|
||||
<INPUT TYPE="button" onclick="location.href = 'hell.php?start=1';" value="НАЧАТЬ ПОХОД" name="strah">
|
||||
|
@ -139,8 +120,5 @@ if ($mytrip > 0) {
|
|||
</fieldset>
|
||||
</center>
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?
|
||||
}
|
||||
?>
|
115
hostel.php
|
@ -1,14 +1,18 @@
|
|||
<?
|
||||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
include('config.php');
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$_SESSION['uid'].'" LIMIT 1'));
|
||||
$user = new User($_SESSION['uid']);
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||
#include('functions.php');
|
||||
$error = ''; $rs = '';
|
||||
$base = array(1 => array('type' => 'Сумка'), 2 => array('type' => 'Сундук'), 3 => array('type' => 'Комната'), 4 => array('type' => 'Амбар'));
|
||||
$times = array(1 => 7, 2 => 14, 3 => 21, 4 => 28);
|
||||
$cost = array(1 => array(8, 16, 24, 32), 2 => array(15, 30, 45, 60), 3 => array(25, 50, 75, 100), 4 => array(40, 80, 120, 160));
|
||||
$error = '';
|
||||
$rs = '';
|
||||
$base = [1 => ['type' => 'Сумка'], 2 => ['type' => 'Сундук'], 3 => ['type' => 'Комната'], 4 => ['type' => 'Амбар']];
|
||||
$times = [1 => 7, 2 => 14, 3 => 21, 4 => 28];
|
||||
$cost = [1 => [8, 16, 24, 32], 2 => [15, 30, 45, 60], 3 => [25, 50, 75, 100], 4 => [40, 80, 120, 160]];
|
||||
|
||||
function remove_hostel_items($u)
|
||||
{
|
||||
|
@ -21,7 +25,7 @@ function remove_hostel_items($u)
|
|||
function select_arenda($u, $type, $redirect = false)
|
||||
{
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id` FROM `hostel` WHERE `uid` = "' . $u['id'] . '" LIMIT 1'));
|
||||
$price = array(1 => 8, 2 => 15, 3 => 25, 4 => 40);
|
||||
$price = [1 => 8, 2 => 15, 3 => 25, 4 => 40];
|
||||
if (!isset($u['id'])) {
|
||||
$r = 'Персонаж не найден ...';
|
||||
} else {
|
||||
|
@ -42,13 +46,12 @@ function select_arenda($u, $type, $redirect = false)
|
|||
$r = 'Неверный тип аренды ...';
|
||||
}
|
||||
}
|
||||
if ($redirect == true) {
|
||||
if ($redirect) {
|
||||
header('Location: main.php');
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
if ($_GET['exit'] == 1) {
|
||||
if ($user['sleep'] == 0) {
|
||||
mysql_query('UPDATE `users`,`online` SET `users`.`room` = 26, `online`.`room` = 26 WHERE `users`.`id` = "' . $user['id'] . '" AND `online`.`id` = "' . $user['id'] . '"');
|
||||
|
@ -71,8 +74,7 @@ if($_GET['to_room'] == 1) {
|
|||
}
|
||||
}
|
||||
|
||||
if($_GET['pays']) {
|
||||
if((int)$_GET['pays'] >= 1 && (int)$_GET['pays'] <= 4) {
|
||||
if ($_GET['pays'] && (int)$_GET['pays'] >= 1 && (int)$_GET['pays'] <= 4) {
|
||||
if (isset($hostel['id'])) {
|
||||
if ($user['money'] >= $cost[$hostel['type']][(int)$_GET['pays']]) {
|
||||
$time = $hostel['time'] + 60 * 60 * 24 * $times[(int)$_GET['pays']];
|
||||
|
@ -88,7 +90,6 @@ if($_GET['pays']) {
|
|||
$error = 'Ошибка #1';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['select']) && isset($_POST['tariff'])) {
|
||||
if ($_POST['tariff'] == 0) {
|
||||
|
@ -121,7 +122,15 @@ if(isset($_POST['deselect']) && isset($_POST['retariff'])) {
|
|||
|
||||
if ($_GET['sleep'] && $user['sleep'] == 0) {
|
||||
if ($user['sleep_time'] <= time()) {
|
||||
if($user['vip'] == 1) { $sl = 8; } elseif($user['vip'] == 2) { $sl = 12; } elseif($user['vip'] == 3) { $sl = 18; } else { $sl = 2; }
|
||||
if ($user['vip'] == 1) {
|
||||
$sl = 8;
|
||||
} elseif ($user['vip'] == 2) {
|
||||
$sl = 12;
|
||||
} elseif ($user['vip'] == 3) {
|
||||
$sl = 18;
|
||||
} else {
|
||||
$sl = 2;
|
||||
}
|
||||
mysql_query('UPDATE `users` SET `sleep` = "' . (time() + 60 * 60 * $sl) . '", `sleep_time` = "' . (time() + 60 * 60 * 8) . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1');
|
||||
mysql_query('INSERT INTO `effects` (`type`, `name`, `time`, `owner`) VALUES ("8", "Сон", "' . (time() + 60 * 60 * $sl) . '", "' . $user['id'] . '")');
|
||||
$ef = mysql_query('SELECT `id`, `time`, `type` FROM `effects` WHERE `owner` = "' . $user['id'] . '" AND `type` != 11 AND `type` != 12 AND `type` != 13 AND `type` != 14 AND `type` != 5 AND `type` != 4 AND `type` != 2 AND `type` != 3 AND `type` != 8');
|
||||
|
@ -145,14 +154,8 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
}
|
||||
header('Location: hostel.php');
|
||||
}
|
||||
|
||||
Template::header('Хостел');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>404</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="content-language" content="ru" />
|
||||
<script src="js/ajaxLoad.js"></script>
|
||||
<? if (isset($hostel['id'])) { ?>
|
||||
<script>
|
||||
|
@ -161,9 +164,7 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<link rel="stylesheet" type="text/css" href="css/hostel.css" />
|
||||
</head>
|
||||
<body>
|
||||
<link rel="stylesheet" href="css/hostel.css"/>
|
||||
<div class="contentContainer">
|
||||
<div style="text-align: center;"><span class="hs">Гостиница, Холл</span></div>
|
||||
<div class="buttonContainer">
|
||||
|
@ -194,7 +195,9 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
<option value="4">Амбар</option>
|
||||
</select>
|
||||
<input type="submit" class="button" value="Выбрал" name="select"/>
|
||||
<? if($error != '') { echo '<br /><b style="color: Red;">'.$error.'</b><br />'; } ?>
|
||||
<? if ($error != '') {
|
||||
echo '<br /><b style="color: Red;">' . $error . '</b><br />';
|
||||
} ?>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
@ -203,7 +206,8 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
<legend>Добро пожаловать!</legend>
|
||||
<form method="post" style="text-align: center; width: 100%;">
|
||||
<p>Вы выбрали вариант предоставления жилья : <b><?= $base[$hostel['type']]['type']; ?></b></p>
|
||||
<p>Аренда оплачена по: <? echo date('h:i d.m.y', $hostel['time']); ?> (<small><? echo timeOut($hostel['time']-time()); ?></small>)</p>
|
||||
<p>Аренда оплачена по: <? echo date('h:i d.m.y', $hostel['time']); ?>
|
||||
(<small><? echo timeOut($hostel['time'] - time()); ?></small>)</p>
|
||||
<div style="text-align: center; width: 100%;">
|
||||
Сменить вариант аренды <select name="retariff" id="retariff">
|
||||
<option value="0">Выбор ...</option>
|
||||
|
@ -215,8 +219,14 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
<input type="submit" class="button" value="Сменить" name="deselect"/>
|
||||
</div>
|
||||
</form>
|
||||
<a href="javascript: void(0);" style="float: left; margin-left: 3px;" onclick="if(confirm('Вы уверены?')) { location.href='?del=1'; }">Расторгнуть договор</a> <a href="javascript: void(0);" onclick="ajaxLoad('/hostel_checkpoint.php', 'hostelInteractive', {act:'pay'})" style="float: right; margin-right: 3px;">Внести предоплату</a>
|
||||
<? if($error != '') { echo '<br /><center><b style="color: Red;">'.$error.'</b></center><br />'; } ?>
|
||||
<a href="javascript: void(0);" style="float: left; margin-left: 3px;"
|
||||
onclick="if(confirm('Вы уверены?')) { location.href='?del=1'; }">Расторгнуть договор</a> <a
|
||||
href="javascript: void(0);"
|
||||
onclick="ajaxLoad('/hostel_checkpoint.php', 'hostelInteractive', {act:'pay'})"
|
||||
style="float: right; margin-right: 3px;">Внести предоплату</a>
|
||||
<? if ($error != '') {
|
||||
echo '<br /><center><b style="color: Red;">' . $error . '</b></center><br />';
|
||||
} ?>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
@ -238,10 +248,12 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
|
||||
<h2>Как всем этим пользоваться?</h2>
|
||||
Всё просто. Плати и живи.
|
||||
<br />Приходишь, платишь по долгам, проходишь в аппартаменты. В сундуке есть секции для каждого вида вещей, фильтр поможет разобраться.
|
||||
<br/>Приходишь, платишь по долгам, проходишь в аппартаменты. В сундуке есть секции для каждого вида
|
||||
вещей, фильтр поможет разобраться.
|
||||
<h2>Что ещё мне нужно знать?</h2>
|
||||
- При смене размера комнаты, ты теряешь оставшееся оплаченное время.
|
||||
<br />- При просрочке платы более 60 суток, мы оставляем за собой право сдать вещи на аукцион для погашения задолжености.
|
||||
<br/>- При просрочке платы более 60 суток, мы оставляем за собой право сдать вещи на аукцион для
|
||||
погашения задолжености.
|
||||
<br/>- Если долг будет разумный, то подарки забирать с полки не будем.
|
||||
<br/>- Быстро сориентироваться с шмотом поможет фильтр предметов.
|
||||
<br/>- Если что потеряешь - твои проблемы.
|
||||
|
@ -257,37 +269,58 @@ if($_GET['unsleep'] && $user['sleep'] > 0) {
|
|||
<table class="tarifsList" cellpadding="0" cellspacing="0">
|
||||
<caption>Сумка</caption>
|
||||
<tbody>
|
||||
<tr><td class="tarifListLabel">Вместимость</td><td class="tarifListValue">15 ед.</td></tr>
|
||||
<tr><td class="tarifListLabel">Стоимость (7 сут.)</td><td class="tarifListValue">8.00 кр.</td></tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Вместимость</td>
|
||||
<td class="tarifListValue">15 ед.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Стоимость (7 сут.)</td>
|
||||
<td class="tarifListValue">8.00 кр.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table class="tarifsList" cellpadding="0" cellspacing="0">
|
||||
<caption>Сундук</caption>
|
||||
<tbody>
|
||||
<tr><td class="tarifListLabel">Вместимость</td><td class="tarifListValue">30 ед.</td></tr>
|
||||
<tr><td class="tarifListLabel">Стоимость (7 сут.)</td><td class="tarifListValue">15.00 кр.</td></tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Вместимость</td>
|
||||
<td class="tarifListValue">30 ед.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Стоимость (7 сут.)</td>
|
||||
<td class="tarifListValue">15.00 кр.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table class="tarifsList" cellpadding="0" cellspacing="0">
|
||||
<caption>Комната</caption>
|
||||
<tbody>
|
||||
<tr><td class="tarifListLabel">Вместимость</td><td class="tarifListValue">50 ед.</td></tr>
|
||||
<tr><td class="tarifListLabel">Стоимость (7 сут.)</td><td class="tarifListValue">25.00 кр.</td></tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Вместимость</td>
|
||||
<td class="tarifListValue">50 ед.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Стоимость (7 сут.)</td>
|
||||
<td class="tarifListValue">25.00 кр.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<table class="tarifsList" cellpadding="0" cellspacing="0">
|
||||
<caption>Амбар</caption>
|
||||
<tbody>
|
||||
<tr><td class="tarifListLabel">Вместимость</td><td class="tarifListValue">100 ед.</td></tr>
|
||||
<tr><td class="tarifListLabel">Стоимость (7 сут.)</td><td class="tarifListValue">40.00 кр.</td></tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Вместимость</td>
|
||||
<td class="tarifListValue">100 ед.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tarifListLabel">Стоимость (7 сут.)</td>
|
||||
<td class="tarifListValue">40.00 кр.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +1,14 @@
|
|||
<?
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||
$base = array(1 => array(8, 16, 24, 32), 2 => array(15, 30, 45, 60), 3 => array(25, 50, 75, 100), 4 => array(40, 80, 120, 160));
|
||||
$base = [1 => [8, 16, 24, 32], 2 => [15, 30, 45, 60], 3 => [25, 50, 75, 100], 4 => [40, 80, 120, 160]];
|
||||
|
||||
if(isset($_POST['act']) && $_POST['act'] == 'pay') {
|
||||
if(isset($user['id']) && isset($hostel['id'])) {
|
||||
if (isset($_POST['act']) && $_POST['act'] == 'pay' && isset($user['id']) && isset($hostel['id'])) {
|
||||
echo '<fieldset class="hostelClientState">';
|
||||
echo '<legend>Предварительная оплата</legend>';
|
||||
echo '<div style="text-align: center;"><p class="NORMAL" style="margin: 5px 0">';
|
||||
|
@ -21,4 +22,3 @@ if(isset($_POST['act']) && $_POST['act'] == 'pay') {
|
|||
</table>
|
||||
<div style="color: red; font-size: 9px; padding-top: 3px;"><b>Внимание!</b> При расторжении договора или смене тарифа, внесенная плата не возвращается</div></fieldset></div>';
|
||||
}
|
||||
}
|
|
@ -1,23 +1,29 @@
|
|||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); die(); }
|
||||
include('config.php');
|
||||
include('functions.php');
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
require_once "functions.php";
|
||||
|
||||
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `mass` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0"));
|
||||
$in = mysql_fetch_array(mysql_query('SELECT COUNT(*) AS `cnt` FROM `inventory` WHERE `owner` = "-101' . $user['id'] . '"'));
|
||||
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "' . $user['id'] . '" LIMIT 1'));
|
||||
|
||||
$base = array(1 => 15, 2 => 30, 3 => 50, 4 => 100);
|
||||
$vips = array(1 => 0.15, 2 => 0.30, 3 => 0.45);
|
||||
$base = [1 => 15, 2 => 30, 3 => 50, 4 => 100];
|
||||
$vips = [1 => 0.15, 2 => 0.30, 3 => 0.45];
|
||||
|
||||
function show_item($row, $txt, $place)
|
||||
{
|
||||
if (($row['maxdur'] <= $row['duration']) || ($row['dategoden'] && $row['dategoden'] <= time())) destructitem($row['id']);
|
||||
if (($row['maxdur'] <= $row['duration']) || ($row['dategoden'] && $row['dategoden'] <= time())) {
|
||||
destructitem($row['id']);
|
||||
}
|
||||
$r = '';
|
||||
|
||||
$ntxt = "В инвентаре";
|
||||
if ($txt == "В сундук") $ntxt = "В сундуке";
|
||||
if ($txt == "В сундук") {
|
||||
$ntxt = "В сундуке";
|
||||
}
|
||||
|
||||
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $$row['magic'])->fetch_assoc();
|
||||
$incmagic = mysql_fetch_array(mysql_query('SELECT * FROM `magic` WHERE `id` = \'' . $row['includemagic'] . '\' LIMIT 1'));
|
||||
|
@ -29,8 +35,8 @@ function show_item($row, $txt, $place)
|
|||
$magic['time'] = $incmagic['time'];
|
||||
$magic['targeted'] = $incmagic['targeted'];
|
||||
}
|
||||
#href="?search=1&otdel='.$row['otdel'].'&place='.$place.'&itm='.$row['id'].'&set=1"
|
||||
if (isset($row['id'])) {
|
||||
//todo подтянуть отображение предмета из класса
|
||||
$r .= '<div id="inv_' . $row['id'] . '"><table><tbody>';
|
||||
$r .= '<tr valign="top" style="border: 2px groove threedface;">';
|
||||
$r .= '<td class="even links original"><img src="/i/sh/' . $row['img'] . '">
|
||||
|
@ -57,7 +63,9 @@ function show_item($row, $txt, $place)
|
|||
if (!$row['needident']) {
|
||||
|
||||
if ($magic['chanse']) {
|
||||
if ($magic['chanse'] >= 95) $magic['chanse'] = 95;
|
||||
if ($magic['chanse'] >= 95) {
|
||||
$magic['chanse'] = 95;
|
||||
}
|
||||
$r .= 'Вероятность срабатывания: ' . $magic['chanse'] . '%<br />';
|
||||
}
|
||||
if ($magic['time']) {
|
||||
|
@ -68,7 +76,7 @@ function show_item($row, $txt, $place)
|
|||
}
|
||||
|
||||
$r .= '<div class="need">';
|
||||
$user = array();
|
||||
$user = [];
|
||||
|
||||
if ($row['nsila']) {
|
||||
$r .= '• ';
|
||||
|
@ -239,7 +247,7 @@ function show_item($row, $txt, $place)
|
|||
$r .= '<span style="color: maroon;"><b>Свойства предмета не идентифицированы</b></span><br />';
|
||||
}
|
||||
|
||||
$osob = array(22, 23);
|
||||
$osob = [22, 23];
|
||||
if (in_array($row['type'], $osob)) {
|
||||
$r .= 'Особенности:<br />';
|
||||
if ($row['type'] == 22) {
|
||||
|
@ -315,8 +323,10 @@ if($_GET['search']) {
|
|||
}
|
||||
|
||||
#######
|
||||
$w = (270*$d['mass']/get_meshok()); $w_a = 270-$w;
|
||||
$h = (270*$in['cnt']/$count); $h_a = 270-$h;
|
||||
$w = (270 * $d['mass'] / get_meshok());
|
||||
$w_a = 270 - $w;
|
||||
$h = (270 * $in['cnt'] / $count);
|
||||
$h_a = 270 - $h;
|
||||
#######
|
||||
|
||||
if ($_GET['go_back'] == 1) {
|
||||
|
@ -324,20 +334,13 @@ if($_GET['go_back'] == 1) {
|
|||
header('Location: hostel.php');
|
||||
}
|
||||
|
||||
|
||||
Template::header('hostel_room');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>404</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="content-language" content="ru" />
|
||||
<script src="js/ajaxLoad.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="contentContainer" id="hostelContainer">
|
||||
<div id="systemMsg" class="system-msg"></div><div class="buttonContainer">
|
||||
<div id="systemMsg" class="system-msg"></div>
|
||||
<div class="buttonContainer">
|
||||
<input type="button" class="btns" value="Обновить" onclick="location.href='hostel_room.php';"/>
|
||||
<input type="button" class="btns button-route" value="Спуститься" onclick="location.href='?go_back=1';"/>
|
||||
<h1>Комнатуха</h1>
|
||||
|
@ -346,26 +349,33 @@ if($_GET['go_back'] == 1) {
|
|||
.hides {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#hstInventory td.item {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
#hstInventory td.links {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 117px;
|
||||
}
|
||||
|
||||
#hstInventory td.links span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#hstInventory td.original span.pk-current {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#hstInventory td.moved {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#hstInventory td.odd {
|
||||
background-color: #c7c7c7;
|
||||
}
|
||||
|
||||
#hstInventory td.even {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
@ -388,8 +398,10 @@ function hide_this(id) {
|
|||
<legend>Фильтр инвентаря</legend>
|
||||
<div style="height: 53px">
|
||||
<form method="GET">
|
||||
<input type="radio" class="radio" id="hstF1" name="place" value="2" /><label for="hstF1">мешок</label>
|
||||
<input type="radio" class="radio" id="hstF2" name="place" value="1" /><label for="hstF2">сундук</label>
|
||||
<input type="radio" class="radio" id="hstF1" name="place" value="2"/><label
|
||||
for="hstF1">мешок</label>
|
||||
<input type="radio" class="radio" id="hstF2" name="place" value="1"/><label
|
||||
for="hstF2">сундук</label>
|
||||
|
||||
<div style="height: 5px;overflow: hidden;"></div>
|
||||
<select name="otdel">
|
||||
|
@ -427,15 +439,32 @@ function hide_this(id) {
|
|||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hstInventoryB"><legend>Состояние</legend>
|
||||
<fieldset id="hstInventoryB">
|
||||
<legend>Состояние</legend>
|
||||
<div style="height: 53px">
|
||||
<div class="progressBar" style='height:14px'><img title="Мешок за спиной" src="/i/bag.gif" height="14px"><img title="Мешок за спиной" src="/i/660000.gif" style="width: <?=$w;?>px; height: 14px;"><img title="Мешок за спиной" src="/i/1silver.gif" style=" width: <?=$w_a;?>px; height:14px"><tt style="font-size:13px"> <?=$d['mass'];?>/<?=get_meshok()?></tt></div><div class="progressBar" style='height:14px'><img title="Заполнение сундука" src="/i/chest.gif" height="14px"><img title="Заполнение сундука" src="/i/1blue.gif" style=" width: <?=$h;?>px; height:14px"><img title="Заполнение сундука" src="/i/1silver.gif" style=" width: <?=$h_a;?>px; height:14px"><tt style="font-size:13px"> <?=$in['cnt'];?>/<?=$count;?></tt></div></div>
|
||||
<div class="progressBar" style='height:14px'><img title="Мешок за спиной" src="/i/bag.gif"
|
||||
height="14px"><img title="Мешок за спиной"
|
||||
src="/i/660000.gif"
|
||||
style="width: <?= $w; ?>px; height: 14px;"><img
|
||||
title="Мешок за спиной" src="/i/1silver.gif"
|
||||
style=" width: <?= $w_a; ?>px; height:14px"><tt
|
||||
style="font-size:13px"> <?= $d['mass']; ?>/<?= get_meshok() ?></tt></div>
|
||||
<div class="progressBar" style='height:14px'><img title="Заполнение сундука" src="/i/chest.gif"
|
||||
height="14px"><img title="Заполнение сундука"
|
||||
src="/i/1blue.gif"
|
||||
style=" width: <?= $h; ?>px; height:14px"><img
|
||||
title="Заполнение сундука" src="/i/1silver.gif"
|
||||
style=" width: <?= $h_a; ?>px; height:14px"><tt
|
||||
style="font-size:13px"> <?= $in['cnt']; ?>/<?= $count; ?></tt></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="hstInventory" style="width: 100%; background-color: #a5a5a5;">
|
||||
<?= $r; ?>
|
||||
</div>
|
||||
<center><? if($error != '') { echo '<br /><b style=\'color: Red;\'>'.$error.'</b>'; } ?></center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
if (!empty($error)) {
|
||||
echo sprintf('<div style="text-align: center; font-weight: bold; color: #f80000;">%s</div>', $error);
|
||||
}
|
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 93 KiB |
BIN
i/2/center.jpg
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 62 KiB |
BIN
i/2/centern.jpg
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 48 KiB |
BIN
i/2/low.jpg
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 4.9 KiB |
BIN
i/2/sub/2pm.gif
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.2 KiB |