Файл: tanks/new.shop.php
Строк: 83
<?
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';
user_access('adm_panel_show',null,'/index.php?'.SID);
$set['title'] = 'Танки - Добавить товар в магазин';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
if(isset($_POST['submit'])){
if(empty($_POST['screen']) or empty($_POST['name']) or empty($_POST['sell_price']) or empty($_POST['price']) or empty($_POST['opt'])){
$err[] = 'Вы не заполнили все поля';
err();
include_once '../sys/inc/tfoot.php';
exit;
}
$news_tanks = mysql_query("INSERT INTO `tanks_shop` (`screen`,`name`,`opt`,`price`,`sell_price`) VALUES ('$_POST[screen]','$_POST[name]','$_POST[opt]','$_POST[price]','$_POST[sell_price]')");
if($news_tanks == true){
msg('Товар успешно добавлен в магазин');
}else{
$err[] = 'Товар не добавлен';
err();
include_once '../sys/inc/tfoot.php';
exit;
}
}
echo '<div class="trnt-block mb6">
<div class="wrap1">
<div class="wrap2">
<div class="wrap3">
<div class="wrap4">
<div class="wrap5">
<div class="wrap6">
<div class="wrap7">
<div class="wrap8">
<div class="wrap-content-mini">
';
echo '<form action="?" method="post">';
echo 'Фотография:<br/><input type="text" name="screen"><br/>';
echo 'Название:<br/><input type="text" name="name"><br/>';
echo 'Стоимсть в кредитах:<br/><input type="text" name="opt"><br/>';
echo 'Стоимсть в опытах:<br/><input type="text" name="price"><br/>';
echo 'Стоимсть продажи:<br/><input type="text" name="sell_price"><br/>';
echo '<input class="btn" type="submit" name="submit"></form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>';
include_once '../sys/inc/tfoot.php';
?>