Beispiel #1
0
 function save()
 {
     if ($this->request('hash') == $this->hash()) {
         $newParams = array();
         foreach ($this->_allowedConfigFields as $acf) {
             $getacf = $this->request(str_replace('.', '__', $acf));
             //beacuse we can't get form params with "." in name
             if ($getacf !== NULL) {
                 $newParams[$acf] = $getacf;
             }
         }
         if ($this->validateParams($newParams)) {
             $modelSettings = rad_instances::get('model_core_settings');
             $modelSettings->updateItemsByfldName($newParams);
             rad_config::setParam('lang.location_show', $newParams['lang.location_show']);
             header('Location: ' . $this->makeUrl('alias=' . SITE_ALIAS));
         }
     } else {
         $this->securityHoleAlert(__FILE__, __LINE__, $this->getClassName());
     }
 }
Beispiel #2
0
    exit;
}
$mem = memory_get_usage();
require 'config.php';
foreach ($config['db_delimiters'] as $id => $value) {
    define($id, $value);
}
foreach ($config['folders'] as $id => $value) {
    define($id, $value);
}
define('SITE_URL', $config['url']);
require LIBPATH . 'simplefunctions.php';
$time_start = microtime_float();
foreach ($config as $id => $value) {
    if (!is_array($value)) {
        rad_config::setParam($id, $value);
    }
}
rad_config::loadConfig();
rad_exception::setHandlers();
rad_input::init_all();
rad_session::start();
define('SITE_ALIAS', rad_input::get('alias', rad_config::getParam('defaultAlias', 'index.html')));
rad_lang::init();
call_user_func(array(rad_config::getParam('loader_class'), 'init'));
if (rad_config::getParam('lang.caching')) {
    call_user_func(array(rad_config::getParam('loader_class'), 'saveLangCache'));
}
/*
$time_end = microtime_float();
$time = $time_end - $time_start;