<?
if(isset($_POST['save'])){
	if(is_array($_POST['form']) && count($_POST['form'])>0){
		foreach($_POST['form'] as $key=>$val){
			Serval::call('db')->update("mod_settings",array(
				'is_value'=>$val
			),"is_key=".Serval::call('db')->quote($key));
		}                                           
	}
	header("location: /settings/?ok=1");
}
Serval::call('tpl')->PAGE['name'] = "Настройка системы";
Serval::call('tpl')->PAGE['meta_title'] = "Настройка системы";
Serval::call('tpl')->settings = $config['settings'];
Serval::call('tpl')->display("settings");
?>