Exemplo n.º 1
0
 /**
  * Controller-Processing
  * @return boolean
  */
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $timezones = array();
     foreach ($this->getTimeZones() as $area => $zones) {
         foreach ($zones as $zone) {
             $timezones[$area][$zone] = $zone;
         }
     }
     $this->view->assign('timezoneAreas', $timezones);
     $modes = array($this->lang->translate('SYSTEM_OPTIONS_USEMODE_IFRAME') => 0, $this->lang->translate('SYSTEM_OPTIONS_USEMODE_PHPINCLUDE') => 1);
     $this->view->assign('systemModes', $modes);
     $editor = array($this->lang->translate('SYSTEM_OPTIONS_NEWS_EDITOR_STD') => 0, $this->lang->translate('SYSTEM_OPTIONS_NEWS_EDITOR_CLASSIC') => 1);
     $this->view->assign('editors', $editor);
     $sorts = array($this->lang->translate('SYSTEM_OPTIONS_NEWS_BYINTERNALID') => 'id', $this->lang->translate('SYSTEM_OPTIONS_NEWS_BYAUTHOR') => 'createuser', $this->lang->translate('SYSTEM_OPTIONS_NEWS_BYWRITTENTIME') => 'createtime', $this->lang->translate('SYSTEM_OPTIONS_NEWS_BYEDITEDTIME') => 'changetime');
     $this->view->assign('sorts', $sorts);
     $sortOrders = array($this->lang->translate('SYSTEM_OPTIONS_NEWS_ORDERASC') => 'ASC', $this->lang->translate('SYSTEM_OPTIONS_NEWS_ORDERDESC') => 'DESC');
     $this->view->assign('sortsOrders', $sortOrders);
     $templates = new \fpcm\model\pubtemplates\templatelist();
     $this->view->assign('articleTemplates', $templates->getArticleTemplates());
     $this->view->assign('commentTemplates', $templates->getCommentTemplates());
     $this->view->assign('globalConfig', $this->config->getData());
     $this->view->assign('languages', array_flip($this->lang->getLanguages()));
     $notify = array($this->lang->translate('SYSTEM_OPTIONS_COMMENT_NOTIFY_GLOBAL') => 0, $this->lang->translate('SYSTEM_OPTIONS_COMMENT_NOTIFY_AUTHOR') => 1, $this->lang->translate('SYSTEM_OPTIONS_COMMENT_NOTIFY_ALL') => 2);
     $this->view->assign('notify', $notify);
     $this->view->assign('articleLimitList', \fpcm\model\system\config::getArticleLimits());
     $this->view->assign('articleLimitListAcp', \fpcm\model\system\config::getAcpArticleLimits());
     $this->view->assign('defaultFontsizes', \fpcm\model\system\config::getDefaultFontsizes());
     $this->view->addJsVars(array('fpcmDtMasks' => \fpcm\classes\baseconfig::$dateTimeMasks));
     $twitter = new \fpcm\model\system\twitter();
     $showTwitter = $twitter->checkRequirements();
     $this->view->assign('showTwitter', $showTwitter);
     $this->view->assign('twitterIsActive', $twitter->checkConnection());
     $this->view->assign('twitterScreenName', $twitter->getUsername());
     $this->view->setViewJsFiles(array(\fpcm\classes\baseconfig::$jsPath . 'options.js'));
     $this->view->addJsVars(array('showTwitter' => $showTwitter ? 1 : 0, 'syscheck' => $this->syscheck));
     $this->view->render();
 }
Exemplo n.º 2
0
 public function process()
 {
     if (!parent::process()) {
         return false;
     }
     $userRolls = new \fpcm\model\users\userRollList();
     $this->view->assign('userRolls', $userRolls->getUserRollsTranslated());
     $this->view->assign('languages', array_flip($this->lang->getLanguages()));
     $timezones = array();
     foreach ($this->getTimeZones() as $area => $zones) {
         foreach ($zones as $zone) {
             $timezones[$area][$zone] = $zone;
         }
     }
     $this->view->assign('timezoneAreas', $timezones);
     $this->view->assign('externalSave', true);
     $this->view->assign('articleLimitList', \fpcm\model\system\config::getAcpArticleLimits());
     $this->view->assign('defaultFontsizes', \fpcm\model\system\config::getDefaultFontsizes());
     $userList = new \fpcm\model\users\userList();
     $showDisableButton = !$this->userEnabled && ($this->userId == $this->session->getUserId() || $userList->countActiveUsers() == 1) ? false : true;
     $this->view->assign('showDisableButton', $showDisableButton);
     $this->view->setViewJsFiles(array(\fpcm\classes\loader::libGetFileUrl('password-generator', 'password-generator.min.js')));
     $this->view->addJsVars(array('fpcmNavigationActiveItemId' => 'submenu-itemnav-item-users', 'fpcmDtMasks' => \fpcm\classes\baseconfig::$dateTimeMasks));
     $this->view->render();
 }