Файл: play_gamescool/car/retry.php
Строк: 29
<?
include_once '../../connect.php';
include_once '../../head.php';
if(!isset($u)){
echo 'Вы неавторизованы';
include_once '../../foot.php';
exit;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `racing` WHERE `id_u`='".$u['id']."'"),0)==0)
mysql_query("INSERT INTO `racing`(`id_u`) VALUES('".$u['id']."')");
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `racing` WHERE `id_u`='".$u['id']."'"));
$car=mysql_fetch_array(mysql_query("SELECT * FROM `racing_car` WHERE `id`='".$arr['car']."'"));
echo "
<div class='aut'>
<img src='ico/exp.gif' alt=''/>".$arr['exp']."
<img src='ico/level.gif' alt=''/>".$arr['level']."
<img src='ico/money.gif' alt=''/>".$arr['money']."
<img src='ico/resp.gif' alt=''/>".$arr['resp']."</div>
<center><img src='".$car['screen']."' alt=''/> <br/>".$car['name']."</center>
";
if(isset($_GET['da'])){
mysql_query("DELETE FROM `racing` WHERE `id_u`='".$u['id']."'");
mysql_query("DELETE FROM `racing_race` WHERE `id_1`='".$u['id']."'");
mysql_query("DELETE FROM `racing_race` WHERE `id_2`='".$u['id']."'");
header("location:index.php");
exit;
}
echo "Вы действительно хотите начать игру сначала?<br/>
Весь игровой прогресс будет утерян<br/>
<a href='?da'>Да</a>/<a href='index.php'>Нет</a><br/>";
echo "<div class='aut'><a style='display:block;' href='index.php'><img src='ico/back.png' alt=''/> Назад</a></div>";
include_once '../../foot.php';
?>