Файл: tanks/new.tank.php
Строк: 85
<?
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['level']) or empty($_POST['name']) or empty($_POST['screen']) or empty($_POST['price']) or empty($_POST['opt'])){
$err[] = 'Вы не заполнили все поля';
err();
include_once '../sys/inc/tfoot.php';
exit;
}
$news_tanks = mysql_query("INSERT INTO `tanks_magazin` (`level`,`name`,`screen`,`price`,`experience`) VALUES ('$_POST[level]','$_POST[name]','$_POST[screen]','$_POST[price]','$_POST[opt]')");
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="level" value="X"><br/>';
echo 'Название:<br/><input type="text" name="name"><br/>';
echo 'Фотография:<br/><input type="text" name="screen"><br/>';
echo 'Стоимсть в кредитах:<br/><input type="text" name="price"><br/>';
echo 'Стоимсть в опытах:<br/><input type="text" name="opt"><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';
?>