Прикручиваем шаблон. Хороним идиотские ошибки.
This commit is contained in:
parent
733d1cf87b
commit
2f723e02b8
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
42
c_forest.php
42
c_forest.php
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
session_start();
|
session_start();
|
||||||
require_once('functions.php');
|
require_once('functions.php');
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header('Location: index.php');
|
header('Location: index.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -21,8 +21,7 @@ function loadmap_cell()
|
|||||||
{
|
{
|
||||||
global $forest;
|
global $forest;
|
||||||
$dat = unserialize($forest['data']);
|
$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 ['Up' => $dat[$forest['room']]['Up'], 'Down' => $dat[$forest['room']]['Down'], 'Left' => $dat[$forest['room']]['Left'], 'Right' => $dat[$forest['room']]['Right']];
|
||||||
return $dat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$map_user = loadmap_cell();
|
$map_user = loadmap_cell();
|
||||||
@ -73,33 +72,40 @@ if ($_GET['move'] == 'true') {
|
|||||||
} else {
|
} else {
|
||||||
$error = 'Not in this life';
|
$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;"
|
<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)]}"
|
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;
|
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; "
|
<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)]}"
|
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;
|
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;"
|
<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)]}"
|
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;
|
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;"
|
<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)]}"
|
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;
|
MAP;
|
||||||
|
}
|
||||||
|
Template::header('forest');
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
|
||||||
<html lang="ru">
|
|
||||||
<head>
|
|
||||||
<title>forest</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
<link rel="stylesheet" type="text/css" href="css/hostel.css"/>
|
||||||
<style>
|
<style>
|
||||||
.bt {
|
.bt {
|
||||||
@ -112,8 +118,6 @@ MAP;
|
|||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="ajaxContainer" style="display: none;"></div>
|
<div id="ajaxContainer" style="display: none;"></div>
|
||||||
<div class="contentContainer">
|
<div class="contentContainer">
|
||||||
<div class="buttonContainer">
|
<div class="buttonContainer">
|
||||||
@ -136,5 +140,3 @@ MAP;
|
|||||||
<?= $map_page ?>
|
<?= $map_page ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
2
ch.php
2
ch.php
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { exit;}
|
if(empty($_SESSION['uid'])) { exit;}
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
if($user->room == 51) { header('location: city.php'); exit; }
|
if($user->room == 51) { header('location: city.php'); exit; }
|
||||||
|
|
||||||
|
2
game.php
2
game.php
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
if (empty($_SESSION['uid'])) header("Location: index.php");
|
||||||
//include("config.php");
|
//include("config.php");
|
||||||
|
|
||||||
//$msg = filter_input(INPUT_POST,'msg');
|
//$msg = filter_input(INPUT_POST,'msg');
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
if (empty($_SESSION['uid'])) header("Location: index.php");
|
||||||
//include("config.php");
|
//include("config.php");
|
||||||
|
|
||||||
//$msg = filter_input(INPUT_POST,'msg');
|
//$msg = filter_input(INPUT_POST,'msg');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { exit; }
|
if(empty($_SESSION['uid'])) { exit; }
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
if(empty($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||||
include('config.php');
|
include('config.php');
|
||||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$_SESSION['uid'].'" LIMIT 1'));
|
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$_SESSION['uid'].'" LIMIT 1'));
|
||||||
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
$hostel = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `type`, `time` FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
if(empty($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$hostel = mysql_fetch_array(mysql_query('SELECT * FROM `hostel` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
$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 = 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));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
if(empty($_SESSION['uid'])) { header('Location: index.php'); exit; }
|
||||||
require_once "functions.php";
|
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"));
|
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `mass` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0"));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
|
if(empty($_SESSION['uid'])) { header("Location: index.php"); }
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
header("Cache-Control: no-cache");
|
header("Cache-Control: no-cache");
|
||||||
$errkom = '';
|
$errkom = '';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
|
if(empty($_SESSION['uid'])) { header("Location: index.php"); }
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
header("Cache-Control: no-cache");
|
header("Cache-Control: no-cache");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
|
if(empty($_SESSION['uid'])) { header("Location: index.php"); }
|
||||||
$tar = mysql_fetch_array(mysql_query("SELECT `id`, `align` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['ldnick'])."' LIMIT 1"));
|
$tar = mysql_fetch_array(mysql_query("SELECT `id`, `align` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['ldnick'])."' LIMIT 1"));
|
||||||
$target = $_POST['ldnick'];
|
$target = $_POST['ldnick'];
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { exit('Not access ...'); }
|
if(empty($_SESSION['uid'])) { exit('Not access ...'); }
|
||||||
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
|
$us = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `align` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
|
||||||
|
|
||||||
if($user['align'] != 2.99) {
|
if($user['align'] != 2.99) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
if(!isset($_SESSION['uid'])) { header('Location: ../index.php'); exit; }
|
if(empty($_SESSION['uid'])) { header('Location: ../index.php'); exit; }
|
||||||
$us = mysql_fetch_array(mysql_query('SELECT `id`, `vip`, `vip_time`, `login` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
|
$us = mysql_fetch_array(mysql_query('SELECT `id`, `vip`, `vip_time`, `login` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['target']).'" LIMIT 1'));
|
||||||
$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `sokr`, `zash`, `invisible`, `attack`, `bloodattack`, `sleep30`, `travmoff`, `dontattack`, `unsleep`, `pers_attack` FROM `abils_vip` WHERE `uid` = "'.$us['id'].'" LIMIT 1'));
|
$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `sokr`, `zash`, `invisible`, `attack`, `bloodattack`, `sleep30`, `travmoff`, `dontattack`, `unsleep`, `pers_attack` FROM `abils_vip` WHERE `uid` = "'.$us['id'].'" LIMIT 1'));
|
||||||
|
|
||||||
|
2
main.php
2
main.php
@ -6,7 +6,7 @@ if ($get === 'exit') {
|
|||||||
session_destroy();
|
session_destroy();
|
||||||
header("Location: fight.php");
|
header("Location: fight.php");
|
||||||
}
|
}
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header('Location: /index.php');
|
header('Location: /index.php');
|
||||||
}
|
}
|
||||||
require_once 'functions.php';
|
require_once 'functions.php';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
}
|
}
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (empty($_SESSION['uid'])) {
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
}
|
}
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
|
if(empty($_SESSION['uid'])) { header("Location: index.php"); }
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
$effect = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$user['id']}' LIMIT 1"));
|
$effect = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$user['id']}' LIMIT 1"));
|
||||||
|
Loading…
Reference in New Issue
Block a user