Содержимое файла | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
2 | leon | 1 | <?PHP |
2 | session_start(); |
||
3 | if ($_SESSION['$user_privileges'] < 16) |
||
4 | header("Location: index.php"); |
||
5 | include "head.php"; |
||
6 | $section_id = $_GET['section_id']; |
||
7 | $db = mysql_connect("localhost", "linwin"); |
||
8 | mysql_select_db("linwin", $db); |
||
9 | mysql_query("SET NAMES 'utf8';", $db); |
||
10 | $sql = "SELECT name, description FROM section WHERE id = ". $section_id; |
||
11 | $query=mysql_query($sql, $db); |
||
12 | $section_name = mysql_result($query,0,0); |
||
13 | $section_description = mysql_result($query,0,1); |
||
14 | |||
15 | print " |
||
16 | <table> |
||
17 | <tr><td><form action = \"edit_section_sql.php\"></td></tr> |
||
18 | <tr><td><input type = \"hidden\" name = \"section_id\" value = \"$section_id\"/></td></tr> |
||
19 | <tr><td>Название раздела</td></tr> |
||
20 | <tr><td><input type = \"text\" class = \"text\" size = \"25\" name = \"section_name\" value = \"$section_name\"/></td></tr> |
||
21 | <tr><td>Описание раздела</td></tr> |
||
22 | <tr><td><textarea cols = \"25\" name = \"section_description\" rows = \"4\">$section_description</textarea></td></tr> |
||
23 | <tr><td><input type = \"submit\" name = \"delete_section\" class = \"submit\" value = \"delete\"/> |
||
24 | <input type = \"submit\" name = \"save_section\" class = \"submit\" value = \"save\"/></td></tr> |
||
25 | <tr><td></table></td></tr> |
||
26 | </form>"; |
||
27 | include "foot.php"; |
||
28 | ?> |