Файл: waphero.ru/Adm_panel/user3.php
Строк: 21
<?
require_once '../core/system.php';
echo admin();
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
$ank = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = '".intval($_GET['id'])."'"));
}
$header = 'Редактор Игрока';
require_once H.'core/head.php';
if(isset($_POST['nick']) && isset($_POST['gold']) && isset($_POST['silver']) && isset($_POST['prava']) && isset($_POST['ban'])) {
$nick = $_POST['nick'];
$gold = $_POST['gold'];
$silver = $_POST['silver'];
$prava = $_POST['prava'];
$ban = $_POST['ban'];
if(!isset($err)) {
mysql_query("UPDATE `user` SET `ban` = '$ban', `nick` = '$nick', `gold` = '$gold', `silver` = '$silver', `prava` = '$prava' WHERE `id` = '$ank[id]' LIMIT 1");
header('Location: user.php');
$_SESSION['message'] = 'Игрок изменен!';
exit();
}else{
header('Location: user.php');
$_SESSION['err'] = $err;
// Вывод ошибки
exit();
}
}
require_once H.'core/foot.php';?>