<?php
$location = true;
require_once($_SERVER['DOCUMENT_ROOT']."/core/func.php");
//
head("Добавить снаряжение",$uid); # Голова
//
if($user['adm'] != 3){
header ('location:/');
exit ();
}
//
//
if(isset($_REQUEST['ok'])) {
$name = checking($_POST['name']);
$case = abs(intval($_POST['case']));
$param = abs(intval($_POST['param']));
$set = abs(intval($_POST['set']));
$level = abs(intval($_POST['level']));
$smitch = abs(intval($_POST['smitch']));
$res = abs(intval($_POST['res']));
//
$err = false;
//
if($err == false){
//
$type = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8');
//
$n = array('1' => 'Шлем '.$name.'', '2' => 'Наплечники '.$name.'', '3' => 'Броня '.$name.'', '4' => 'Перчатки '.$name.'', '5' => 'Меч '.$name.'', '6' => 'Щит '.$name.'', '7' => 'Штаны '.$name.'', '8' => 'Сапоги '.$name.'');
//
for($i=1;$i<=8;$i++) {
//
qry("INSERT INTO `items` SET `name` = ?, `type` = ?, `gold` = ?, `power` = ?, `health` = ?, `block` = ?, `set` = ?, `level` = ?, `max_smitch` = ?, `res` = ?", array($n[$i],$type[$i],$case,$param,$param,$param,$set,$level,$smitch,$res));
//
}
//
header('Location: ?'.$r.'');
exit();
}
//
header('Location: ?'.$r.'');
exit();
}
//
//
?>
<div class="tophead cntr">
<form action="" method="post">
Название:<br /><input type="text" name="name" maxlength="1000" value="" /><br />
Цена рубины:<br><input type="text" name="case" maxlength="1000" value="" /><br />
Цена ресурсы:<br><input type="text" name="res" maxlength="1000" value="" /><br />
Параметры:<br><input type="text" name="param" maxlength="1000" value="" /><br />
Set Комплекта:<br><input type="text" name="set" maxlength="1000" value="" /><br />
Уровень:<br><input type="text" name="level" maxlength="1000" value="" /><br />
Max заточка:<br><input type="text" name="smitch" maxlength="1000" value="" /><br />
<input class="" type="submit" name="ok" value="Добавить" /></form>
</div>
<a href="/update.php" class="tophead">Вернуться назад</a>
<?
//
//
foot($uid);
?>