Файл: persy/mbuy.php
Строк: 74
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
only_reg();
if (!isset($_GET['id']) || !is_numeric($_GET['id'])){header("Location: /index.php?".SID);exit;}
$set['title']="Убить Персонажа";
include_once '../sys/inc/thead.php';
title();
aut();
if (isset($user) & $user['group_access']>=9 & $user['group_access']!=16 & $user['group_access']!=17)
{
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
else {header("Location: /index.php?".SID);exit;}
{
$item=mysql_fetch_array(mysql_query("select * from `persy` where `id`='".intval($_GET['id'])."'"));
if (-2 > $item['times'])
{
$err='Ошибка ';
err();
echo"<div class='niz_menu'>n";
echo "- <a href='buy.php?id=$item[id]'>Назад</a><br />n";
echo"</div>n";
include_once '../sys/inc/tfoot.php';
exit();
}
if (!isset($err) && isset($_GET['ok']))
{
mysql_query("UPDATE `persy` SET `times` = '".($item['times']=-1)."' WHERE `id` = '$item[id]';");
mysql_query("UPDATE `user` SET `pers` = '".($user['pers']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `missii` = '".($user['missii']=NULL)."' WHERE `id` = '$item[idit]';");
msg('Персонаж Мертв');
echo "<div class='p_m'><center>";
echo "Вы освободили $item[name]. .";
echo "</center></div>";
include_once '../sys/inc/tfoot.php';
exit();
}
err();
echo "<form method='post' action='?id=$item[id]&ok'>n";
echo "<div class='niz_menu'><center>Подтвердите Освобождение персонажа $item[name]</center></div>";
echo "<input value="Освободить" type="submit" />n";
echo "</form>n";
}
echo "<div class='foot'>n";
echo "- <a href='item.php?id=$item[id]'>Назад</a><br />n";
echo"</div>n";
}
include_once '../sys/inc/tfoot.php';
?>