Файл: html/admin/support.php
Строк: 26
<?php
require_once '../system/func.php';
require_once '../system/header.php';
if (!$user OR $user['access'] < 3) {
?><script>showContent("/");</script><?php
exit;
}
$hel = $mc->query("SELECT * FROM `support` ");
?>
<form id="form1">
<input type="text" name='name'>
<input type="text" name='text'>
</form>
<button id='save' class='button_alt_01' type='button' >Изменить</button>
<script>
$("#save").click(function () {
showContent("/admin/support.php?save=1&" + $("#form1").serialize());
});
</script>
<?php
if (!empty($_GET['save'])&&!empty($_GET['name'])&&!empty($_GET['text'])) {
$mc->query("INSERT INTO `support` (`name`,`text`) VALUES ('" . $_GET['name'] . "','" . $_GET['text'] . "')");
} else {
message("ошибка!");
}
$footval = 'adminindex';
include '../system/foot/foot.php';
?>