Файл: cave_go.php
Строк: 9
<?php
require_once 'core/system.php';
echo only_reg();
$header = 'Подземелье';
require_once 'core/head.php';
?>
<?
$taxi_time = intval($_GET['time']);
$time = time();
if($user['cave_start'] == '0')
{
if(isset($_GET['cave']))
{
if(isset($taxi_time))
{
if($taxi_time == 1)
{
$time_plus = '1800';
}
elseif($taxi_time == 2)
{
$time_plus = '3600';
}
elseif($taxi_time == 3)
{
$time_plus = '7200';
}
elseif($taxi_time == 4)
{
$time_plus = '14400';
}
elseif($taxi_time == 5)
{
$time_plus = '28800';
}
$time_db = $time + $time_plus;
mysql_query("UPDATE `user` SET `cave_time` = '".$time_db."' WHERE `id` = '".$user['id']."'");
mysql_query("UPDATE `user` SET `cave_start` = '".$taxi_time."' WHERE `id` = '".$user['id']."'");
mysql_query("UPDATE `user` SET `cave` = '1' WHERE `id` = '".$user['id']."'");
header("Location: cave.php");
exit();
}
else
{
header("Location: cave.php");
exit();
}
}
else
{
header("Location: cave.php");
exit();
}
}
else
{
header("Location: cave.php");
exit();
}
?>