Вход Регистрация
Файл: www-1/altar.php
Строк: 22
<?php
define
('cms'1);
require_once 
'core.php'
if (
$user
Error_Reporting(E_ALL & ~E_NOTICE);
if (
$user
{
$u mysql_fetch_array(mysql_query("SELECT `x`,`y`,`hp`,`hp_all` FROM `users` WHERE `id` = '".$user."'")); 
if (
(
$u['x'] == AND $u['y'] == 1) OR 
(
$u['x'] == AND $u['y'] == 2) OR 
(
$u['x'] == AND $u['y'] == 5) OR 
(
$u['x'] == AND $u['y'] == 9) OR 
(
$u['x'] == AND $u['y'] == 5) OR 
(
$u['x'] == AND $u['y'] == 4) OR 
(
$u['x'] == AND $u['y'] == 8) OR
(
$u['x'] == AND $u['y'] == 1) OR
(
$u['x'] == AND $u['y'] == 4) OR
(
$u['x'] == AND $u['y'] == 9) OR
(
$u['x'] == AND $u['y'] == 2) OR
(
$u['x'] == AND $u['y'] == 6)
)
        {
switch(
$_GET['a'])
    {
    default:
    if (
$_SERVER['PHP_SELF'] == '/world.php') {echo '<br /><img src="./img/crit.png" alt=*> <a href="altar.php?a=enter">Алтарь восстановления</a>';}
    else 
header('Location: ./world.php');
    break;
    

    
    
    case 
'enter':    
    echo 
'<div class="menu">Алтарь</div>';
    echo 
'<div class="pt">';    
    
$find_location mysql_fetch_array(mysql_query("SELECT * FROM `locations` WHERE `x` = '".$u['x']."' AND `y` = '".$u['y']."' "));
    echo 
'Перед вами '.$find_location['title'].'. Рядом Вы обноружили волшебный алатрь, который восстанавливает здоровье...';
        echo 
'<form method="POST" VALUE=""><input type="submit" name="submit" value="восстановиться"><br /></form>';
    echo 
'<img src="./img/heart_100.png" alt=*> Ваши жизни: '.$u['hp'].'/'.$u['hp_all'].'';
    if (isset(
$_POST['submit']))
    {
    if (
$u['hp'] < $u['hp_all']) {mysql_query("UPDATE `users` SET `hp` = '".$u['hp_all']."' WHERE `id` = '".$user."'");}
    else echo 
'<br />Ваши жизни полны, аура здоровья не подействовала...';
    }
    echo 
'<br /><img src="./img/portal.png" alt=*>  <a href="./world.php">Уйти</a>';
    echo 
'';
    echo 
'</div>';
    include 
'./include/foot.php';
    break;
    
    }

        }



else
{
header('Location: ./index.php');
}



?>
Онлайн: 1
Реклама