battles/admin/NewItem.php

144 lines
10 KiB
PHP
Raw Normal View History

<?php
# Date: 31.01.2021 (20:21)
?>
<form method=post>
<div>
<table>
<caption>Добавление вещей в магазин</caption>
<tr>
<th id="main">Основное
<tr>
<td><input name="name" placeholder="Название">
<tr>
<td><input name="image" placeholder="Картинка">
<tr>
<td><select name="shop">
<option value="0" selected disabled>Тип магазина</option>
<option value="1">Обычный</option>
<option value="2">Цветной</option>
</select>
<tr>
<td><input name=count placeholder="Количество (шт.)">
<tr>
<td><select name="item_type">
<option value="0" selected disabled>Тип предмета</option>
<option value="1">Шлем</option>
<option value="2">Броня</option>
<option value="3">Поножи</option>
<option value="4">Сапоги</option>
<option value="5">Перчатки</option>
<option value="6">Оружие</option>
<option value="7">Щит</option>
<option value="8">Пояс</option>
<option value="9">Кольцо</option>
<option value="10">Амулет</option>
<option value="20">Расходник</option>
<option value="50">Всё остальное</option>
<option value="100">Хлам</option>
</select>
<tr>
<td><input name=weight placeholder="Масса">
<tr>
<td><input name=durability placeholder="Макс. износ">
<tr>
<td><input name=price placeholder="Цена (кр.)">
<tr>
<th id="needs">Требования
<tr>
<td><input name=need_level placeholder="Уровень">
<tr>
<td><input name=need_strength placeholder="Сила">
<tr>
<td><input name=need_dexterity placeholder="Ловкость">
<tr>
<td><input name=need_intuition placeholder="Интуиция">
<tr>
<td><input name=need_endurance placeholder="Выносливость">
<tr>
<td><input name=need_intelligence placeholder="Интеллект">
<tr>
<td><input name=need_wisdom placeholder="Мудрость">
<tr>
<th id="adds">Характеристики
<tr>
<td><input name=minu placeholder="Мин.урон">
<tr>
<td><input name=maxu placeholder="Макс.урон">
<tr>
<td><input name=gsila placeholder="Сила">
<tr>
<td><input name=glovk placeholder="Ловкость">
<tr>
<td><input name=ginta placeholder="Интуиция">
<tr>
<td><input name=gintel placeholder="Интеллект">
<tr>
<td><input name=ghp placeholder="НР">
<tr>
<td><input name=mfkrit placeholder="Мф.крит">
<tr>
<td><input name=mfakrit placeholder="Мф.антикрит">
<tr>
<td><input name=mfuvorot placeholder="Мф.уворот">
<tr>
<td><input name=mfauvorot placeholder="Мф.антиуворот">
<tr>
<td><input name=gnoj placeholder="Ум.ножи">
<tr>
<td><input name=gtopor placeholder="Ум.топоры">
<tr>
<td><input name=gdubina placeholder="Ум.дубины">
<tr>
<td><input name=gmech placeholder="Ум.мечи">
<tr>
<td><input name=bron1 placeholder="Броня головы">
<tr>
<td><input name=bron2 placeholder="Броня корпуса">
<tr>
<td><input name=bron3 placeholder="Броня пояса">
<tr>
<td><input name=bron4 placeholder="Броня ног">
<tr>
<td><input name=gfire placeholder="Мастерство огня">
<tr>
<td><input name=gwater placeholder="Мастерство воды">
<tr>
<td><input name=gair placeholder="Мастерство воздуха">
<tr>
<td><input name=gearth placeholder="Мастерство земли">
<tr>
<td><input name=glight placeholder="Светлая магия">
<tr>
<td><input name=ggray placeholder="Серая магия">
<tr>
<td><input name=gdark placeholder="Темная магия">
<tr>
<td><input name=encicl placeholder="В энциклопедию">
<tr>
<td><input name=magic placeholder="Наложенно заклятие">
</table>
<INPUT TYPE="submit" value="Добавить">
</div>
</form>
<?php
if (isset($_POST)) {
echo "Ждём лучших времён!";
//if($_POST['razdel'] !=7) $goden_tmp=0; else */
// $goden_tmp = $_POST['goden'];
//
// if ($_POST['shop'] == 1) if (mysql_query("INSERT INTO shop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['encicl'] . "','0','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) {
// echo "Предмет успешно добавлен";
// } else {
// echo "Предмет не был добавлен!-1";
// };
//
// if ($_POST['shop'] == 2) if (mysql_query("INSERT INTO fshop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) {
// echo "Предмет успешно добавлен";
// } else {
// echo "Предмет не был добавлен!" . mysql_error();
// };
//
}
//End item adder