Вход Регистрация
Файл: anibiliwar.ru/admin/item2.php
Строк: 28
<?php

$title 
'Выдать вещи полный фарш!';

foreach (array(
"/system/common.php",
                
"/system/functions.php",
                
"/system/user.php",
                
"/system/h.php") as $include )
{
    require_once 
$_SERVER['DOCUMENT_ROOT'].$include;
}

if (!
$user  OR $user['id']>OR $user['access']!=2)
{
    
header("location:/");
    exit();
}

if (isset(
$_GET['go']))
{
    
$item_ _num($_POST['item']);
    
$us _num($_POST['user']);

        
mysql_query("INSERT INTO `inv` SET 
                    `user`='
$us',
                    `item`='
$item_',
                    `quality`='6',
                    `bonus`='65',
`smith`='20',
                    `_str`='300',
                    `_vit`='300',
                    `_agi`='300',
                    `_def`='300'
            "
);    
        
$_SESSION['light'] = 'Вешь выдана!';
        
header("location:?");
        exit();

}

///Форма

$all_items mysql_query("SELECT * FROM `items` WHERE `quality`='2' ORDER BY `id` ");
//$all_items = mysql_fetch_array($all_items);

?>
<form class='content' action = '?go' method = 'post'/>
<center/>
<input type='text' name ='user'  placeholder ='ID кому выдаем'/><br/>
</center>
<Select name = 'item' style ='width:90%;'/>
<?
while ($al =   mysql_fetch_array($all_items)) {
    
?>
    <option value ='<?=$al['id'];?>'/><?=$al['name'];?></option>
    <?
}
?>
</select/><br/>
<center>
    <input type='submit' value ='Отправить'/>
</center>
</form/>



<?

require_once $_SERVER['DOCUMENT_ROOT'].'/system/f.php';

?>
Онлайн: 1
Реклама