Размер файла: 681B
- <?php
- include 'inc/db.php';
- include 'inc/1.php';
- if ($user['id']!=1){
- header("Location: /index.php");
- exit;
- }
- if (!$_GET['id']){
- header("Location: /index.php");
- exit;
- }
- if (!$_POST['name']){
- echo "<div class='input'><form method='POST' action='?id=".intval($_GET['id'])."'>Имя должности:<br><input type='text' name='name'><br><input type='submit' value='Назначить'></font></div>";
- }
- else
- {
- $name=mysql_real_escape_string($_POST['name']);
- mysql_query("UPDATE `user` SET `moder` = '1', `gname` = '$name' WHERE `id` = '".intval($_GET['id'])."'");
- header("Location: /ank.php?id=".intval($_GET['id']));
- }
- include_once 'inc/foot.php';
- ?>
-
-
-