Файл: persy/dbuy.php
Строк: 84
<?
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 (1 == $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]';");
mysql_query("UPDATE `user` SET `simrang` = '".($user['simrang']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `opit` = '".($item['opit']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `rie` = '".($item['rie']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `ank_10` = '".($item['ank_10']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `ank_11` = '".($item['ank_11']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `ank_9` = '".($item['ank_9']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `ank_12` = '".($item['ank_12']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `mis` = '".($item['mis']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `mis1` = '".($item['mis1']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `mis2` = '".($item['mis2']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `mis3` = '".($item['mis3']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `mis4` = '".($item['mis4']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `vsemis` = '".($item['vsemis']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `im` = '".($item['im']=1)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `dei` = '".($item['dei']=1)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `stix1` = '".($item['stix1']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `stix2` = '".($item['stix2']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `stix3` = '".($item['stix3']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `stix4` = '".($item['stix4']=NULL)."' WHERE `id` = '$item[idit]';");
mysql_query("UPDATE `user` SET `stix5` = '".($item['stix5']=NULL)."' WHERE `id` = '$item[idit]';");
msg('Персонаж Освобожден');
echo "<div class='p_t'><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';
?>