<?php

/****************************************/
// ИНФОРМАЦИЯ:
// ==== Форум: LogicBoard
// ==== Автор: Никита Курдин (ShapeShifter)
// ==== Copyright © Никита Курдин Игоревич 2011
// ==== Данный код защищен авторскими правами
// ==== Официальный сайт: http://logicboard.ru

/****************************************/

if (! defined('LogicBoard_ADMIN') )
{
	@include '../logs/save_log.php';
	exit ( "Error, wrong way to file.<br><a href=\"/\">Go to main</a>." );
}

if (isset ( $_REQUEST['op'] ))
	$op = totranslit ( $_REQUEST['op'] );
else
	$op = "";

if(control_center_admins($member_cca['board']['board']))
{
    switch ($op)
    {
	   case "addcategory":
            if(control_center_admins($member_cca['board']['addcategory']))
                include_once LB_CONTROL_CENTER . '/board/addcategory.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Добавление категории";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Добавление категории";
                control_center_admins_error();
            }
	   break;

	   case "addforum":
            if(control_center_admins($member_cca['board']['addforum']))
                include_once LB_CONTROL_CENTER . '/board/addforum.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Добавление форума";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Добавление форума";
                control_center_admins_error();
            }
	   break;

	   case "editforum":
            if(control_center_admins($member_cca['board']['editforum']))
                include_once LB_CONTROL_CENTER . '/board/edit_cat_forum.php';
            else
            {
           	    if ($cache_forums[$id]['parent_id'] == 0)
                {
                    $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Редактирование категории: ".$cache_forums[$id]['title'];
                    $control_center->header("Форум", $link_speddbar);
                    $onl_location = "Форум &raquo; Редактирование категории: ".$cache_forums[$id]['title'];
                }
                else
                {
                    $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Редактирование форума: ".$cache_forums[$id]['title'];
                    $control_center->header("Форум", $link_speddbar);
                    $onl_location = "Форум &raquo; Редактирование форума: ".$cache_forums[$id]['title'];
                }
                control_center_admins_error();
            }
   	    break;

	   case "delforum":
            if(control_center_admins($member_cca['board']['delforum']))
                include_once LB_CONTROL_CENTER . '/board/delforum.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Удаление категории/форума";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Удаление категории/форума";
                control_center_admins_error();
            }
	   break;
    
       case "moderators":
            if(control_center_admins($member_cca['board']['moders']))
                include_once LB_CONTROL_CENTER . '/board/moderators.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Модераторы";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Модераторы";
                control_center_admins_error();
            }
	   break;
    
       case "moder_add":
            if(control_center_admins($member_cca['board']['moders']) AND control_center_admins($member_cca['board']['moders_edit']))
                include_once LB_CONTROL_CENTER . '/board/moderators_add.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=moderators\">Модераторы</a>|Добавление модератора";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Модераторы &raquo; Добавление модератора";
                control_center_admins_error();
            }
	   break;

       case "moder_edit":
            if(control_center_admins($member_cca['board']['moders']) AND control_center_admins($member_cca['board']['moders_edit']))
                include_once LB_CONTROL_CENTER . '/board/moderators_edit.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=moderators\">Модераторы</a>|Редактирование модератора";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Модераторы &raquo; Редактирование модератора";
                control_center_admins_error();
            }
	   break;
       
       case "words_filter":
            if(control_center_admins($member_cca['board']['filters']))
                include_once LB_CONTROL_CENTER . '/board/words_filter.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Фильтр слов";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Фильтр слов";
                control_center_admins_error();
            }
	   break;
       
       case "notice":
            if(control_center_admins($member_cca['board']['notice']))
                include_once LB_CONTROL_CENTER . '/board/notice.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Объявления";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Объявления";
                control_center_admins_error();
            }
	   break;
       
       case "notice_add":
            if(control_center_admins($member_cca['board']['notice']))
                include_once LB_CONTROL_CENTER . '/board/notice_add.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=notice\">Объявления</a>|Добавление";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Объявления &raquo; Добавление";
                control_center_admins_error();
            }
	   break;
       
       case "notice_edit":
            if(control_center_admins($member_cca['board']['notice']))
                include_once LB_CONTROL_CENTER . '/board/notice_edit.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=notice\">Объявления</a>|Редактирование";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Объявления &raquo; Редактирование";
                control_center_admins_error();
            }
	   break;
       
       case "sharelink":
            if(control_center_admins($member_cca['board']['sharelink']))
                include_once LB_CONTROL_CENTER . '/board/sharelink.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|Сервисы публикации";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Сервисы публикации";
                control_center_admins_error();
            }
	   break;
       
       case "sharelink_add":
            if(control_center_admins($member_cca['board']['sharelink_edit']))
                include_once LB_CONTROL_CENTER . '/board/sharelink_add.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=sharelink\">Сервисы публикации</a>|Добавление";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Сервисы публикации &raquo; Добавление";
                control_center_admins_error();
            }
	   break;
       
       case "sharelink_edit":
            if(control_center_admins($member_cca['board']['sharelink_edit']))
                include_once LB_CONTROL_CENTER . '/board/sharelink_edit.php';
            else
            {
                $link_speddbar = "<a href=\"".$redirect_url."?do=board\">Форум</a>|<a href=\"".$redirect_url."?do=board&op=sharelink\">Сервисы публикации</a>|Редактирование";
                $control_center->header("Форум", $link_speddbar);
                $onl_location = "Форум &raquo; Сервисы публикации &raquo; Редактирование";
                control_center_admins_error();
            }
	   break;

	   default :
		  include_once LB_CONTROL_CENTER . '/board/main.php';
	   break;
    }
}
else
{   
    $link_speddbar = "Форум";
    $control_center->header("Форум", $link_speddbar);
    $onl_location = "Форум";
    control_center_admins_error();
}

$control_center->footer(3);

?>