public function saveconfig(){
		$fields=$this->getallfields();
		foreach($fields as $k=>&$v){
			$v->value=BRequest::getVar($k,$v->default);
			}
		$cfgfile='<?php'.PHP_EOL;
		foreach($fields as $fld){
			$cfgfile.=$fld->getcfg();
			}
		$fn_config=BROOTPATH.'config'.DIRECTORY_SEPARATOR.'config.php';
		return file_put_contents($fn_config,$cfgfile);
		}