示例#1
0
 public function render($tpl = null)
 {
     //authenticate the current user to make sure they are an admin
     UsersHelper::authenticateAdmin();
     //display toolbar
     $this->toolbar = new Toolbar();
     $this->toolbar->save();
     //document
     $document = JFactory::getDocument();
     $document->addScript(JURI::base() . "/src/Cobalt/media/js/cobalt-admin.js");
     /* Menu Links **/
     $menu = MenuHelper::getMenuModules();
     $this->menu = $menu;
     //get model
     $model = new ConfigModel();
     $layout = $this->getLayout();
     $model->set("_layout", $layout);
     //get config
     $config = $model->getConfig();
     //generate timezones
     $list = timezone_identifiers_list();
     $timezones = array();
     foreach ($list as $zone) {
         $timezones[$zone] = $zone;
     }
     //view references
     $this->imap_found = function_exists('imap_open') ? TRUE : FALSE;
     $this->config = $config;
     $this->timezones = $timezones;
     $this->time_formats = DateHelper::getTimeFormats();
     $this->languages = ConfigHelper::getLanguages();
     $this->language = ConfigHelper::getLanguage();
     //display
     return parent::render();
 }