/** * Volltextsuche ausfuehren * * *Description* * * @param $term string, $page string * * @return string */ public function startSearch($term = NULL, $page) { if (!empty($term)) { if ($page == 'search') { //Ergebnisse aus DB Tabelle holen $searchRequest = $this->result->getSearch($term); $arrResult = array(); foreach ($searchRequest as $key => $value) { $arrResult[$key] = preg_replace('/{%\\S*%}/', '', $value); } //Suchergebnis zurück geben return \View\Search::ViewResult($arrResult); } else { $term = \Controller\Helpers::Clean($term); if (!URL_REWRITING) { $s = '&'; } else { $s = '?'; } if (!empty($_GET)) { foreach ($_GET as $k => $v) { if ($k != 'site') { $param .= '&' . $k . '=' . $v; } } } $filename = \Controller\Helpers::buildLink('search') . $s . $param; $this->response->modifyHeader('location', $filename, TRUE); } } }
/** * Konstruktor * * *Description* * * @param * * @return */ public function __construct() { $this->request = array_merge(\Controller\Helpers::Clean($_GET), $_POST); $this->entries = new \Model\GetContent(); //Pflichtfelder Eintrag Seiten definieren $this->required_fields = array('site' => array('title', 'page', 'headline', 'indexation'), 'navigation' => array('anchor'), 'user' => array('email', 'username', 'status'), 'settings' => array('firstname', 'lastname', 'street', 'postalzip', 'city', 'phone', 'email', 'company', 'opening', 'variable'), 'setup' => array('logout', 'maintenance', 'cache', 'maxwidth', 'maxheight')); // Fixe Systemseiten definieren, bei denen nur der Inhalt geändert werden kann. // Sie sind nicht löschbar und auch der Pagename kann nicht geändert werden. $this->fixed_part = array('index', 'imprint', 'contact', 'search', 'error'); // Lege mögliche Panel für den Eintrag fest $this->panels = array('panel1', 'panel2', 'panel3'); }
/** * Konstruktor * * *Description* * * @param * * @return */ public function __construct() { $this->request = array_merge(\Controller\Helpers::Clean($_GET), $_POST); $this->response = new \Framework\Response(); $this->response->errorReporting(); $this->login = new \Controller\LoginController(); $this->view = new \View\Admin(); $this->entries = new \Model\GetContent(); $this->libs = new \View\Library(); // Wenn Datenbank noch nicht installiert weiter leiten an Installseite $this->checkInstall(); //MIME Typ festlegen $this->sendAllHeaders(); }
/** * Kontakt-Formular validieren * * *Description* * * @param array * * @return array */ public function validFormContact($param) { // clean send Data $send = \Controller\Helpers::Clean($param); // Required Content, Adress, Subject ... foreach ($this->data as $key => $value) { if (array_key_exists($key, $send)) { $this->data[$key] = !empty($send[$key]) ? $send[$key] : $key . ' no specification'; } else { break; $this->data = array(); } } }