$val) { if (isset($val) and $val != 1) { $opt_def = get_record($db_link, "config_options","id=$val"); LOG_INFO($db_link, WEB_config_remove_option." id: ".$val." name: ".$opt_def["option_name"]); delete_record($db_link, "config", "id=" . $val); } } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST['save'])) { $len = is_array($_POST['save']) ? count($_POST['save']) : 0; for ($i = 0; $i < $len; $i ++) { $save_id = intval($_POST['save'][$i]); $len_all = is_array($_POST['r_id']) ? count($_POST['r_id']) : 0; for ($j = 0; $j < $len_all; $j ++) { if (intval($_POST['r_id'][$j]) != $save_id) { continue; } $value = $_POST['f_config_value'][$j]; if (isset($value) and $value!=='********') { $new['value'] = $value; $opt_cur = get_record($db_link, "config","id=$save_id"); if (isset($opt_cur) and !empty($opt_cur["option_id"])) { $opt_def = get_record($db_link, "config_options","id=".$opt_cur["option_id"]); LOG_INFO($db_link, WEB_config_set_option." id: ".$save_id." name: ".$opt_def["option_name"]." = ".$value); update_record($db_link, "config", "id='$save_id'", $new); } } } } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } if (isset($_POST["create"])) { $new_option = $_POST["f_new_option"]; if (isset($new_option)) { $new['option_id'] = $new_option; $new['value'] = get_option($db_link,$new_option); $opt_def = get_record($db_link, "config_options","id=$new_option"); LOG_INFO($db_link, WEB_config_add_option." id: ".$new_option." name: ".$opt_def["option_name"]." = ".$new['value']); insert_record($db_link, "config", $new); } header("Location: " . $_SERVER["REQUEST_URI"]); exit; } unset($_POST); fix_auth_rules($db_link); require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php"); print_control_submenu($page_url); ?>



\n"; print "\n"; print "\n"; print "\n"; $type = $row['type']; print "\n"; print "\n"; print "\n"; print "\n"; } ?>
Id
{$row['id']}"; $option_value = $row['value']; if ($row['option_id']==29) { $option_value='********'; } if (!isset($option_value)) { $option_value = get_option($db_link, $row['option_id']); set_option($db_link, $row['option_id'], $option_value); } if ($type == 'int') { $min = ''; $max = ''; if (!empty($row['min_value']) or $row['min_value']==0) { $min="min=".$row['min_value']; } if (!empty($row['max_value'])) { $max="max=".$row['max_value']; } print ""; } if ($type == 'text') { print ""; } if ($type == 'bool') { print_qa_select("f_config_value[]", $option_value); } print "".$row[$descr_field]."