public function checkAnswer() { if (!\fpcm\classes\http::get('answer') || \fpcm\classes\http::get('answer') != $this->text) { return false; } return true; }
/** * Controller-Processing * @return boolean */ public function exec() { $this->registerController(); $module = !is_null(\fpcm\classes\http::get('module')) ? \fpcm\classes\http::get('module', array(1, 4, 7)) : false; if (!$module) { header('Location: index.php?module=system/login'); return true; } $controllerName = isset($this->controllers[$module]) ? $this->controllers[$module] : ''; if (strpos($controllerName, 'fpcm/modules/') === false) { $controllerName = "fpcm/controller/" . $controllerName; } $controllerName = str_replace('/', '\\', $controllerName); if (!class_exists($controllerName)) { trigger_error('Undefined controller called: ' . $module); $this->errorPage("The requested controller <b>{$module}</b> does not exist! <span class=\"fa fa-frown-o\"></span>"); } /** * @var abstracts\controller */ $controller = new $controllerName(); if (!is_a($controller, 'fpcm\\controller\\abstracts\\controller')) { trigger_error("ERROR: The controller for <b>{$module}</b> must be an instance of <b>fpcm\\controller\\abstracts\\controller</b>."); die("Controller class <b>{$module}</b> must be an instance of <b>fpcm\\controller\\abstracts\\controller</b>. <span class=\"fa fa-frown-o\"></span>"); } if (!$controller->request()) { return false; } $controller->process(); }
/** * Artikel anzeigen * @return boolean */ public function showArticles() { if ($this->versionFailed) { return false; } $this->registerController(); $module = !is_null(\fpcm\classes\http::get('module')) ? \fpcm\classes\http::get('module', array(1, 4, 7)) : 'fpcm/list'; if (strpos($module, 'fpcm/') === false || !in_array($module, array('fpcm/list', 'fpcm/article', 'fpcm/archive'))) { return false; } $controllerName = "fpcm/controller/"; $controllerName .= isset($this->controllers[$module]) ? $this->controllers[$module] : ($module ? $module : 'action\\system\\login'); $controllerName = str_replace('/', '\\', $controllerName); if (!class_exists($controllerName)) { trigger_error('Undefined controller called: ' . $module); return false; } /** * @var abstracts\controller */ $controller = new $controllerName(true); if (!is_a($controller, 'fpcm\\controller\\abstracts\\controller')) { die("ERROR: The controller for <b>{$module}</b> must be an instance of <b>fpcm\\controller\\abstracts\\controller</b>. ;)"); return false; } if (!$controller->request()) { return false; } $controller->process(); }
public function run($params = null) { if (strpos(\fpcm\classes\http::get('module'), 'modules/config') === false) { return $params; } $params[] = 'inc/modules/nkorg/classicimporter/js/classicimporter.js'; return $params; }
public function run($params = null) { if (strpos(\fpcm\classes\http::get('module'), 'nkorg/inactivity_manager/') === false) { return $params; } $params[] = 'inc/modules/nkorg/inactivity_manager/js/inactivitymanager.js'; return $params; }
/** * zusätzliche Prüfungen durchführen * @return bool */ public function checkExtras() { $cdata = \fpcm\classes\http::get('newcomment'); if ($this->maxCommentTextLinks <= preg_match_all("#(https?)://\\S+[^\\s.,>)\\];'\"!?]#", $cdata['text'])) { return true; } $comment = new \fpcm\model\comments\comment(); $commentList = new \fpcm\model\comments\commentList(); $comment->setEmail($cdata['email']); $comment->setName($cdata['name']); $comment->setWebsite($cdata['website']); $comment->setIpaddress(\fpcm\classes\http::getIp()); if ($commentList->spamExistsbyCommentData($comment)) { return true; } return false; }
public function run($params = null) { $view = new \fpcm\model\view\module(\fpcm\model\abstracts\module::getModuleKeyByFolder(__DIR__), 'acp', 'main'); $messages = new \fpcm\modules\nkorg\inactivity_manager\model\messages(); if (!is_null(\fpcm\classes\http::get('added'))) { $view->addNoticeMessage('NKORGINACTIVITY_MANAGER_SAVED_OK'); } if (!is_null(\fpcm\classes\http::get('btnDeleteTerms')) && !is_null(\fpcm\classes\http::get('ids'))) { $ids = \fpcm\classes\http::get('ids'); if ($messages->deleteMessage($ids)) { $view->addNoticeMessage('NKORGINACTIVITY_MANAGER_DELETE_OK'); } else { $view->addErrorMessage('NKORGINACTIVITY_MANAGER_DELETE_FAILED'); } } $view->assign('messages', $messages->getMessages()); $view->render(); }
public function run($params = null) { $view = new \fpcm\model\view\module(\fpcm\model\abstracts\module::getModuleKeyByFolder(__DIR__), 'acp', 'main'); $termlist = new \fpcm\modules\nkorg\tweetextender\model\termlist(); if (!is_null(\fpcm\classes\http::get('added'))) { $view->addNoticeMessage('NKORG_TWEETENTENDER_SAVED_OK'); } if (!is_null(\fpcm\classes\http::get('btnDeleteTerms')) && !is_null(\fpcm\classes\http::get('ids'))) { $ids = \fpcm\classes\http::get('ids'); if ($termlist->deleteTerms($ids)) { $view->addNoticeMessage('NKORG_TWEETENTENDER_DELETE_OK'); } else { $view->addErrorMessage('NKORG_TWEETENTENDER_DELETE_FAILED'); } } $terms = $termlist->getTerms(); $view->assign('terms', $terms); $view->render(); }
/** * View-Variablen initialisieren */ protected function initAssigns() { /** * CSS und JS Files */ $this->assign('FPCM_CSS_FILES', $this->config->system_mode && !$this->forceCss ? array() : $this->getViewCssFiles()); $jsFiles = $this->getViewJsFiles(); if ($this->config->system_mode && !$this->config->system_loader_jquery) { unset($jsFiles[0]); } $this->assign('FPCM_JS_FILES', $jsFiles); $this->assign('FPCM_JS_VARS', $this->getJsVars()); /** * Pfade */ $this->assign('FPCM_BASELINK', \fpcm\classes\baseconfig::$rootPath); $this->assign('FPCM_THEMEPATH', \fpcm\classes\baseconfig::$themePath); $this->assign('FPCM_BASEMODULELINK', \fpcm\classes\baseconfig::$rootPath . 'index.php?module='); $this->assign('FPCM_SELF', $_SERVER['PHP_SELF']); /** * Sprache */ $this->assign('FPCM_LANG', $this->language); /** * Meldungen */ $this->assign('FPCM_MESSAGES', $this->getMessages()); /** * Login-Status */ $this->assign('FPCM_LOGGEDIN', $this->session->exists()); /** * System config data */ $this->assign('FPCM_VERSION', $this->config->system_version); $this->assign('FPCM_FRONTEND_LINK', $this->config->system_url); $this->assign('FPCM_DATETIME_MASK', $this->config->system_dtmask); $this->assign('FPCM_DATETIME_ZONE', $this->config->system_timezone); $this->assign('FPCM_MAINTENANCE_MODE', $this->config->system_maintenance); /** * Current module */ $this->assign('FPCM_CURRENT_MODULE', \fpcm\classes\http::get('module')); helper::init($this->config->system_lang); }
/** * View-Variablen initialisieren */ public function initAssigns() { /** * Pfade */ $this->assign('FPCM_BASELINK', \fpcm\classes\baseconfig::$rootPath); $this->assign('FPCM_THEMEPATH', \fpcm\classes\baseconfig::$themePath); $this->assign('FPCM_BASEMODULELINK', \fpcm\classes\baseconfig::$rootPath . 'index.php?module='); $this->assign('FPCM_SELF', $_SERVER['PHP_SELF']); /** * Sprache */ $this->assign('FPCM_LANG', $this->language); /** * Login-Status */ $this->assign('FPCM_LOGGEDIN', $this->session->exists()); /** * System config data */ $this->assign('FPCM_VERSION', $this->config->system_version); $this->assign('FPCM_FRONTEND_LINK', $this->config->system_url); $this->assign('FPCM_DATETIME_MASK', $this->config->system_dtmask); $this->assign('FPCM_DATETIME_ZONE', $this->config->system_timezone); $this->assign('FPCM_MAINTENANCE_MODE', $this->config->system_maintenance); $this->assign('FPCM_CRONJOBS_DISABLED', \fpcm\classes\baseconfig::asyncCronjobsEnabled()); /** * Current module */ $this->assign('FPCM_CURRENT_MODULE', \fpcm\classes\http::get('module')); if ($this->session->exists()) { $this->assign('FPCM_USER', $this->session->currentUser->getDisplayName()); $this->assign('FPCM_SESSION_LOGIN', $this->session->getLogin()); } helper::init($this->config->system_lang); }
/** * View-Variablen initialisieren */ protected function initAssigns() { /** * Current module */ $this->assign('FPCM_CURRENT_MODULE', \fpcm\classes\http::get('module')); if ($this->session->exists()) { $this->assign('FPCM_USER', $this->session->currentUser->getDisplayName()); $this->assign('FPCM_SESSION_LOGIN', $this->session->getLogin()); $nav = new \fpcm\model\theme\navigation(); $this->assign('FPCM_NAVIGATION', $nav->render()); $this->assign('FPCM_NAVIGATION_ACTIVE', $this->getNavigationActiveCheckStr()); $this->jsvars = array('fpcmSessionCheckEnabled' => true) + $this->jsvars; $this->addJsLangVars(array('sessionCheckMsg' => $this->language->translate('SESSION_TIMEOUT'))); } /** * Meldungen */ $this->addJsVars(array('fpcmMsg' => $this->getMessages())); /** * CSS und JS Files */ $this->assign('FPCM_CSS_FILES', $this->getViewCssFiles()); $this->assign('FPCM_JS_FILES', $this->getViewJsFiles()); $this->assign('FPCM_JS_VARS', $this->getJsVars()); /** * Pfade */ $this->assign('FPCM_BASELINK', \fpcm\classes\baseconfig::$rootPath); $this->assign('FPCM_THEMEPATH', \fpcm\classes\baseconfig::$themePath); $this->assign('FPCM_BASEMODULELINK', \fpcm\classes\baseconfig::$rootPath . 'index.php?module='); $this->assign('FPCM_SELF', $_SERVER['PHP_SELF']); /** * Sprache */ $this->assign('FPCM_LANG', $this->language); /** * Login-Status */ $this->assign('FPCM_LOGGEDIN', $this->session->exists()); /** * Aufruf durch mobile Endgerät */ $this->assign('FPCM_ISMOBILE', $this->isMobile); /** * System config data */ $this->assign('FPCM_VERSION', $this->config->system_version); $this->assign('FPCM_FRONTEND_LINK', $this->config->system_url); $this->assign('FPCM_DATETIME_MASK', $this->config->system_dtmask); $this->assign('FPCM_DATETIME_ZONE', $this->config->system_timezone); $this->assign('FPCM_MAINTENANCE_MODE', $this->config->system_maintenance); $this->assign('FPCM_CRONJOBS_DISABLED', \fpcm\classes\baseconfig::asyncCronjobsEnabled()); helper::init($this->config->system_lang); }
/** * Gibt Wert in $_GET, $_POST, $_FILE zurück * @param string $varname * @param array $filter * @return mixed */ public function getRequestVar($varname = null, array $filter = array(1, 3, 4, 7)) { return \fpcm\classes\http::get($varname, $filter); }