Файл: forum/inc/set_razdel_form.php
Строк: 91
<?php
if (isset($_POST['otmena'])) {
header("Location: /forum/$forum[id]/$razdel[id]/" . SID);
exit;
}
if (isset($_GET['act']) && $_GET['act'] == 'mesto') {
echo "<form class = 'razd' 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 "<button class = 'action green'>";
echo "<span class = 'label'>Сохранить</span>";
echo "</button>";
echo "<button class = 'action red' name = 'otmena'>";
echo "<span class = 'label'>Отмена</span>";
echo "</button></form>";
}
if (isset($_GET['act']) && $_GET['act'] == 'set') {
echo "<form class = 'razd' 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 "<button class = 'action green'>";
echo "<span class = 'label'>Сохранить</span>";
echo "</button>";
echo "<button class = 'action red' name = 'otmena'>";
echo "<span class = 'label'>Отмена</span>";
echo "</button></form>";
}
if (isset($_GET['act']) && $_GET['act'] == 'del') {
echo "<form class = 'razd' 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 "<button class = 'action green'>";
echo "<span class = 'label'>Да, удалить</span>";
echo "</button>";
echo "<button class = 'action red' name = 'otmena'>";
echo "<span class = 'label'>Отмена</span>";
echo "</button></form>";
}
echo "<div class = 'razd clear_fix'>";
echo "<div class = 'dropdown'>";
echo "<a href = '#' class = 'button'><span class = 'icon icon96' /><span class = 'label'>Администрирование</span><span class = 'toggle'></span></a>";
echo "<div class = 'dropdown-slider'>";
echo "<a href = '/forum/$forum[id]/$razdel[id]/?act=mesto' class = 'ddm'><span class = 'icon icon159' /><span class = 'label'>Переместить раздел</span></a>";
echo "<a href = '/forum/$forum[id]/$razdel[id]/?act=set' class = 'ddm'><span class = 'icon icon98' /><span class = 'label'>Изменить раздел</span></a>";
echo "<a href = '/forum/$forum[id]/$razdel[id]/?act=del' class = 'ddm'><span class = 'icon icon58' /><span class = 'label'>Удалить раздел</span></a>";
echo "</div></div></div>";