View file comm/forum/inc/set_razdel_form.php

File size: 2.59Kb
<?php
if(isset($user) && $admin['uid']==$user['id'] && $admin['priv']==2 && isset($_GET['act']) && $_GET['act']=='mesto'){
	echo '<form method="post" action="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=mesto&amp;ok">';
	echo 'Подфорум:<br/><select name="forum">';

$q2 = mysql_query("SELECT * FROM `comm_forum_f` WHERE `id_comm` = '$id_comm' ORDER BY `pos` ASC");
while($forums = mysql_fetch_array($q2)){

if($forum['id']==$forums['id']){
	$check=' selected="selected"';
	}else{
		$check=NULL;
		}

echo '<option'.$check.' value="'.$forums['id'].'">'.$forums['name'].'</option>';}
echo '</select><br/>';
echo '<input value="Переместить" type="submit"/><br/>';
echo '&#187;&nbsp;<a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'">Отмена</a></form>';
}

if(isset($user) && $admin['uid']==$user['id'] && $admin['priv']==2 && isset($_GET['act']) && $_GET['act']=='set'){
	echo '<form method="post" action="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=set&amp;ok">';
	echo 'Название раздела:<br/><input name="name" type="text" maxlength="32" value="'.$razdel['name'].'"/><br/>';

if($user['set_translit']==1){
	echo '<label><input type="checkbox" name="translit1" value="1"/> Транслит</label><br/>';
	}

echo '<input value="Изменить" type="submit"/><br/>';
echo ' - <a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'">Отмена</a></form>';
}

if(isset($user) && $admin['uid']==$user['id'] && $admin['priv']==2 && isset($_GET['act']) && $_GET['act']=='del'){
	echo '<div class="err">Подтвердите удаление раздела<br/>';
	echo '<a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=delete&amp;ok">Да</a> <a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'">Нет</a></div>';
	}

echo '&#187;&nbsp;<a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=mesto">Переместить раздел</a><br/>';
echo '&#187;&nbsp;<a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=del">Удалить раздел</a><br/>';
echo '&#187;&nbsp;<a href="index.php?id_forum='.$forum['id'].'&amp;id_razdel='.$razdel['id'].'&amp;id_comm='.$id_comm.'&amp;act=set">Параметры раздела</a><br/>';
?>