Вход Регистрация
Файл: tortuga/Adm_panel/new_port.php
Строк: 38
<?php
require_once '../core/system.php';
echo 
admin();
$header 'Админ Панель!';
require_once 
'../core/head.php';

if(isset(
$_GET['add'])){
$count_id mysql_result(mysql_query("SELECT id FROM teleport ORDER BY id DESC LIMIT 1"),0);
$id $count_id+1;
$map check($_POST['map']);
$img check($_POST['img']);
$x abs(intval($_POST['x']));
$y abs(intval($_POST['y']));
$to_x abs(intval($_POST['to_x']));
$to_y abs(intval($_POST['to_y']));
if(
$id == mysql_query("SELECT count(id) from `teleport`")){
echo
'Ошибка.';
}else{
echo
'Портал добавлен!<br/>';
mysql_query("INSERT INTO `teleport` set `to_x` = '".$to_x."', `to_y` = '".$to_y."', `img` = '".$img."', `map` = '".$map."', `y` = '".$y."', `x` = '".$x."', `id` = '".$id."'");
}
}
echo
'<form action="?add" method="post"> Карта:<br/><input type="text" name="map" value="1"/><br/>';
echo
' Тип:<br/>';
echo
'<input type="radio" name="img" value="teleport"/> <img src="/img/decoration/teleport.png">';
echo
'<input type="radio" name="img" value="house2"/> <img src="/img/decoration/house2.png"><br/>';

echo
'
X:<br/><input type="text" name="x" value=""/><br/>
Y:<br/><input type="text" name="y" value=""/><br/>
GO X:<br/><input type="text" name="to_x" value=""/><br/>
GO Y:<br/><input type="text" name="to_y" value=""/><br/>
<input type="submit" value="Добавить"/></form>'
;

echo 
"<div class='mini-line'></div>";
echo 
"<div class='player menuList'>";
echo 
"<li><a href='/Adm_panel/'><img src='/images/icon/arrow.png'>Админ-Панель</a></li>";
echo 
"</div>";
require_once 
H.'core/foot.php';
?>
Онлайн: 7
Реклама