public function createConfigKey($newConfig) { include \base_config::$baseDir . '/version.php'; $newConfig['sysVersion'] = $afltrVersion; $newConfig['loginPasswortSalt'] = uniqid(md5($_SERVER['HTTP_HOST']), true); if (!preg_match("/^.*(?=.{6,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*\$/", $newConfig['loginPasswort'])) { return false; } $newConfig['loginPasswort'] = \tools::createPasswordHash($newConfig['loginPasswort'], $newConfig['loginPasswortSalt']); $config = new \model\system_config($this->dbconnection); foreach ($newConfig as $key => $value) { $value = \contrl\base_contrl::filterRequest($value, array(1, 4, 7)); $config->save($key, $value); } return true; }
<?php /** * Bewerbungsform ausgeben * @author Stefan Seehafer <*****@*****.**> * @copyright (c) 2013-2015, Stefan Seehafer * @license http://www.gnu.org/licenses/gpl.txt GPLv3 */ include __DIR__ . '/affiliatr_functions.php'; $baseCtrl = new \contrl\base_contrl(); $config = new model\system_config($baseCtrl->getDbconnection()); if ($config->getSystemMode() == 2) { die(basename(__FILE__) . ' should be used with system mode "iframe"!'); } $maxSize = array(); $maxWidth = $baseCtrl->getRequestVar('maxwidth'); $maxHeight = $baseCtrl->getRequestVar('maxheight'); if (!is_null($maxWidth)) { $maxSize['width'] = $maxWidth; } if (!is_null($maxHeight)) { $maxSize['height'] = $maxHeight; } ?> <!DOCTYPE HTML> <HTML lang="de"> <head> <title>Affiliat*r - <?php print $config->getSysVersion(); ?> </title>
private function createConfigKey($key, $value) { $config = new \model\system_config($this->dbconnection); $config->save($key, $value); }