Example #1
0
 public function before()
 {
     parent::before();
     $active = $this->currAction;
     $unsent = M_Mail::Instance()->count_unsent_mail();
     // Получение пути к шаблону
     $templateName = $this->getTemplate('components/mailing/v_inner_nav.php');
     // Формирование контента страницы
     $this->inner_nav = $this->Template($templateName, array('active' => $active, 'unsent' => $unsent));
 }
Example #2
0
 public function before()
 {
     parent::before();
     // Подготавливаем подменю
     $action = $this->getInfoAction();
     $privs = M_Users::Instance()->GetPrivs();
     // Определяем активную вкладку
     $tabs_users = array('C_Users:action_index', 'C_Users:action_all', 'C_Users:action_add');
     $tabs_roles = array('C_Users:action_allroles', 'C_Users:action_addroles', 'C_Users:action_allroles_privs');
     $tabs['active'] = "";
     $tabs['empty'] = array();
     if (in_array($action, $tabs_users)) {
         $tabs['active'] = 'users';
     } elseif (in_array($action, $tabs_roles)) {
         $tabs['active'] = 'roles';
     }
     $count_u = 0;
     $count_r = 0;
     foreach ($tabs_users as $priv) {
         if ($this->check_priv($priv)) {
             ++$count_u;
         }
     }
     foreach ($tabs_roles as $priv2) {
         if ($this->check_priv($priv2)) {
             ++$count_r;
         }
     }
     if ($count_u == 0) {
         $tabs['empty'][] = 'users';
     }
     if ($count_r == 0) {
         $tabs['empty'][] = 'roles';
     }
     // Получение пути к шаблону
     $templateName = $this->getTemplate('components/users/v_tabs.php');
     // Формирование контента страницы
     $this->tabs = $this->Template($templateName, $tabs);
 }
Example #3
0
 public function before()
 {
     parent::before();
 }
Example #4
0
 protected function OnOutput()
 {
     $vars = array('data' => $this->data);
     $this->content = $this->Template($this->tpl, $vars);
     parent::OnOutput();
 }