Файл: forum/inc/set_razdel_form.php
Строк: 46
<?php
if (isset($_POST['otmena'])) {
header("Location: /forum/$forum[id]/$razdel[id]/" . SID);
exit;
}
if (isset($_GET['act']) && $_GET['act'] == 'mesto') {
echo "<form class = 'foot' name = 'name' method = 'POST' action = '/forum/$forum[id]/$razdel[id]/?act=mesto&ok'>";
echo "Подфорум:<br />";
echo "<select name = 'forum'>n";
$q2 = mysql_query("SELECT * FROM `forum_f` ORDER BY `pos` ASC");
while ($forums = mysql_fetch_assoc($q2)) {
if ($forum['id'] == $forums['id']) {
$check = ' selected = "selected"';
} else {
$check = NULL;
}
echo "<option$check value = "$forums[id]">$forums[name]</option>n";
}
echo "</select><br />";
echo "<input value = 'Переместить' type = 'submit' />";
echo "<input type = 'submit' name = 'otmena' value = 'Отмена' />";
echo "</form>";
}
if (isset($_GET['act']) && $_GET['act'] == 'set') {
echo "<form class = 'foot' name = 'name' method = 'POST' action = '/forum/$forum[id]/$razdel[id]/?act=set&ok'>";
echo "Название раздела<br />";
echo "<input name = 'name' type = 'text' maxlength = '100' value = '$razdel[name]' /><br />";
echo "<input value = 'Изменить' type = 'submit' />n";
echo "<input type = 'submit' name = 'otmena' value = 'Отмена' />";
echo "</form>";
}
if (isset($_GET['act']) && $_GET['act'] == 'del') {
echo "<form class = 'foot' name = 'name' method = 'POST' action = '/forum/$forum[id]/$razdel[id]/?act=delete&ok'>";
echo "Подтвердите удаление раздела [$razdel[name]]<br />";
echo "<img src = '/captcha.php?SESS=$sess' width = '100' height = '30' alt = 'Проверочное число' /><br />";
echo "<input name = 'chislo' size = '5' maxlength = '5' value = '' type = 'text' /><br />";
echo "<input value = 'Да, удалить' type = 'submit' />";
echo "<input type = 'submit' name = 'otmena' value = 'Отмена' />";
echo "</form>";
}
echo "<div class = 'foot'>";
echo "<img src = '/style/icons/page_white_go.png' /> <a href = '/forum/$forum[id]/$razdel[id]/?act=mesto'>Переместить раздел</a><br />";
echo "<img src = '/style/icons/page_white_delete.png' /> <a href = '/forum/$forum[id]/$razdel[id]/?act=del'>Удалить раздел</a><br />";
echo "<img src = '/style/icons/page_white_edit.png' /> <a href = '/forum/$forum[id]/$razdel[id]/?act=set'>Изменить раздел</a><br />";
echo "</div>";