$tz) { $timezones[$tz] = $tz; } $cfg = array(); $q = $mysqli->query("SELECT * FROM config WHERE category!='system' ORDER BY category,`order`,var"); while($r = $q->fetch_assoc()) { if(!array_key_exists($r['category'], $cfg)) $cfg[$r['category']] = array(); $cfg[$r['category']][$r['var']] = $r; } $cfg_tab_names = array(); foreach($cfg as $k=>&$v) { $cfg_tab_names[$k] = str_replace(' ', '_', $k); //$ksort($v); } //ksort($cfg); $action = array_key_exists('action', $_POST) ? $_POST['action'] : ''; switch($action) { case 'save': $need_update_divisional = False; /* Scan everythign that was just saved */ foreach($_POST as $p=>$v) { if(substr($p, 0, 4) == 'cfg_') { $var = substr($p, 4); $val = $mysqli->real_escape_string($v); $mysqli->real_query("UPDATE config SET `val`='$val' WHERE `var`='$var'"); /* Do variable-dependent things when a variable is saved */ switch($var) { case 'judge_divisional_prizes': $need_update_divisional = True; break; } } } /* Reload config */ sfiab_load_config($mysqli); /* Do any additional updates with the new config */ if($need_update_divisional) { debug("config judge_divisional_prizes was saved, running award_update_divisional()\n"); award_update_divisional($mysqli); } form_ajax_response(0); exit(); } $page_id = 'c_config_variables'; $help = '
SFIAB Configuration'; sfiab_page_begin($u, "SFIAB Configuration", $page_id, $help); ?>
Don't change these unless you know what you're doing!
=$d['var']?> | : | =$d['description']?> |