Вход Регистрация
Файл: neuder/game/ship.php
Строк: 36
<?php
require ('../config/func.php');
$title 'Корабль';
require (
'../config/header.php');
if(
$my_town['lider'] == $user['id']){
$cena 0;
}else{
$cena 2;
}
if(isset(
$_POST['go'])){
if(
$_POST['go'] == 1$city 'Хоринис';
if(
$_POST['go'] == 2$city 'Аркания';
if(
$_POST['go'] == 3$city 'Миненталь';
if(
$_POST['go'] == 4$city 'Китеж';
if(
$user['town'] == $_POST['go']) $err 'Вы уже в этом городе';
if(
$user['cristal'] < $cena$err ' Нужно '.$cena.' <img src="/style/spach/cristal.png">';
if(!isset(
$err)){
mysql_query("UPDATE `user` set `town` = '".$_POST['go']."', `cristal` = '".($user['cristal'] - $cena)."' where `id` = '".$user['id']."'");
header('Location: ?');
$_SESSION['notif'] = 'Вы прибыли в город «'.$city.'»';
exit;
}else{
echo 
err(''.$err.'');
exit;
}
}
?>
<div class="block center"><img src="/style/spach/ship.png"></div>
<div class="block">Корабль доставит вас в любой город! Плавание обойдётся тебе в <?=$cena;?> <img src="/style/spach/cristal.png"></div>
<form class="block center" method="post" action=""><select name="go"><option value="1">Хоринис</option><option value="2">Аркания</option><option value="3">Миненталь</option></select><br/> <span class="button_on"><input class="button_on" type="submit" value="Отправиться"></span></form><?
require ('../config/footer.php');
?>
Онлайн: 2
Реклама