Вход Регистрация
Файл: rusalc/apadd_ach.php
Строк: 92
<?
include_once '../sys/core/start.php';
include_once 
'../sys/core/compress.php';
include_once 
'../sys/core/sess.php';
include_once 
'../sys/core/home.php';

include_once 
'../sys/core/db_connect.php';
include_once 
'../sys/core/ipua.php';
include_once 
'../sys/core/fnc.php';
include_once 
'../sys/core/user.php';
include_once 
'../sys/inc/fnc_game.php';
include_once 
'../sys/inc/thead.php';
include_once 
'../sys/inc/uhead.php';
only_reg();


if (
$user['acces']==765466656)
{
    
if(isset(
$_SESSION['add_msg']))
{
echo 
"<table class='wdt msg-table'><tr><td align='left' style='vertical-align: top; width: 10%'><img src='/style/img/images/face-ajl.png'></td><td align='left' style='vertical-align: top'>";
echo 
"Достижение успешно передано!</td></tr></table></td></tr></table>";
unset(
$_SESSION['add_msg']);
}

if(isset(
$_POST['add'])){
$name=htmlspecialchars($_POST['name']);
$id_user=htmlspecialchars($_POST['id_user']);
$description=htmlspecialchars($_POST['description']);
$image=htmlspecialchars($_POST['image']);


if (
strlen2($_POST['name'])<1)$err[]='Заполните Название достижения';
elseif (
strlen2($_POST['id_user'])<1)$err[]='Заполните ID игрока';
elseif (
strlen2($_POST['description'])<1)$err[]='Заполните описание достижения';
elseif (
strlen2($_POST['image'])<1)$err[]='Заполните URL картинки';


if (!isset(
$err))
{
mysql_query("INSERT INTO `ach` (name,id_user,description,image) values('$name','$id_user','$description','$image')");
header("Location: #");
$_SESSION['add_msg']=$_GET['name'];
}
}

echo 
"<table class='wdt msg-table'>";
echo 
"<tr><td align='left' style='vertical-align: top; width: 10%'><img src='/style/img/images/face-mex.png'></td>";
echo 
"<td align='left' style='vertical-align: top'>Дарова , ".$user['nick']." хочешь наградить игрока? заполни все поля!</td></tr></table></td></tr></table>";

err();

echo 
'<table class="wdt brown-header"><tbody><tr><td align="left">Добавление:</td></tr></tbody></table>';
echo 
"<table class='wdt gray-table'><tbody><tr><td class='white' align='center' style='padding: 10px;'>";
echo 
"<form method='post'><table><tbody>";

echo 
"<tr><td>Название достижения:</td><td><input style='height:25px' type='text' name='name' maxlength='250' value='Название'></td></tr>";

echo 
"<tr><td>ID игрока:</td><td><input style='height:25px' type='text' name='id_user' maxlength='250' value='ID'></td></tr>";

echo 
"<tr><td>Описание:</td><td><input style='height:25px' type='text' name='description' maxlength='250' value='Описание'></td></tr>";

echo 
"<tr><td>Картинка:</td><td><input style='height:25px' type='text' name='image' maxlength='250' value='Картинка'></td></tr>";


echo 
"<tr><td colspan='2'><input class='yes-btn' type='submit' name='add' value='Добавить'></td></tr>";
echo 
"</tbody></table></form></td></tr></tbody></table>";

echo 
"<table class='wdt gray-table'><tr><td class='white td-cell' align='center' style='height:30px;'><form action ='/rusalc/apcars.php' method='post'><input class='no-btn' type='submit' value='Автомобили'></form></td></tr></table>";


include_once 
'../sys/inc/tfoot.php';
}
else
{
header("Location: /dev/garage.php");
}
?>
Онлайн: 0
Реклама