Ejemplo n.º 1
0
 /**
  * Liefert "Keine Einträge gefunden"-Zeile zurück
  * @param array $data
  * @param int $cols
  * @return void
  */
 public static function notFoundContainer(array $data, $cols)
 {
     if (count($data)) {
         return false;
     }
     print "<tr class=\"fpcm-td-spacer\"><td colspan=\"{$cols}\"></td></tr><tr><td colspan=\"6\">" . self::$language->translate('GLOBAL_NOTFOUND2') . "</td></tr>";
 }
Ejemplo n.º 2
0
 /**
  * Installer Step 6
  */
 protected function runStep6()
 {
     $user = new \fpcm\model\users\author();
     $this->view->assign('author', $user);
     $this->view->assign('userRolls', array($this->lang->translate('GLOBAL_ADMINISTRATOR') => 1));
     $this->view->assign('externalSave', true);
     if (!is_null($this->getRequestVar('msg'))) {
         switch ($this->getRequestVar('msg')) {
             case false:
                 $this->view->addErrorMessage('SAVE_FAILED_USER');
                 break;
             case \fpcm\model\users\author::AUTHOR_ERROR_PASSWORDINSECURE:
                 $this->view->addErrorMessage('SAVE_FAILED_PASSWORD_SECURITY');
                 break;
             case \fpcm\model\users\author::AUTHOR_ERROR_EXISTS:
                 $this->view->addErrorMessage('SAVE_FAILED_USER_EXISTS');
                 break;
             case -4:
                 $this->view->addErrorMessage('SAVE_FAILED_PASSWORD_MATCH');
                 break;
             case -5:
                 $this->view->addErrorMessage('SAVE_FAILED_USER_SECURITY');
                 break;
             case -6:
                 $this->view->addErrorMessage('SAVE_FAILED_USER');
                 break;
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Controller-Processing
  * @return boolean
  */
 public function process()
 {
     $currentClass = get_class($this);
     if (strpos($currentClass, 'fpcm\\modules\\') !== false) {
         $modulename = explode('\\', $currentClass);
         $modulename = $modulename[2] . '/' . $modulename[3];
         if (!in_array($modulename, $this->enabledModules)) {
             trigger_error("Request for controller '{$currentClass}' of disabled module '{$modulename}'!");
             $view = new \fpcm\model\view\error();
             $view->setMessage("The controller '{$this->getRequestVar('module')}' is not enabled for execution!");
             $view->render();
             die;
         }
     }
     if (!$this->session->exists()) {
         $this->redirectNoSession();
         return false;
     }
     if ($this->permissions) {
         if (count($this->checkPermission) && !$this->permissions->check($this->checkPermission)) {
             $view = new \fpcm\model\view\error();
             $view->setMessage($this->lang->translate('PERMISSIONS_REQUIRED'));
             $view->render();
             die;
         }
         if ($this->session->getCurrentUser()->isAdmin() && $this->permissions->check(array('system' => 'update'))) {
             $this->checkUpdates();
         }
     }
     return true;
 }