Example #1
0
 function FillTopMenu()
 {
     if (!user_authorized()) {
         $this->topmenu->AppendItem('Представиться системе / Зарегистрироваться', config_get('document-root') . '/login?redirect=' . get_redirection(), 'logout', 'key.gif');
     }
     if (!user_authorized() || user_access_root()) {
         if (nav_inside('/admin') >= 0) {
             $this->topmenu->AppendItem('Основной раздел', config_get('document-root') . '/', 'main', '');
         } else {
             $this->topmenu->AppendItem('Административный интерфейс', config_get('document-root') . '/admin/?redirect=' . get_redirection(), 'main', '');
         }
     }
     if (user_authorized()) {
         $this->topmenu->AppendItem('Выйти из системы', config_get('document-root') . '/?action=logout&redirect=' . get_redirection(), 'logout', 'lock.gif');
     }
 }
Example #2
0
 function ReturnContents()
 {
     global $CORE;
     if (!check_locked()) {
         // Getting the content and printing it to page
         if (!$this->wiki) {
             $content_type = "wiki";
             if (nav_inside('/admin') >= 0) {
                 $this->PAGE->AppendTitle('Администрирование', true);
             }
             $this->PAGE->TPrint(content_static_page($this->URL));
         } else {
             $content_type = "system";
             $this->PAGE->TPrint(wiki_get_page($this->URL));
         }
     } else {
         die;
     }
 }