'" . db_fetch_cell("select name from rra where id=" . $_GET["id"]) . "'?", "rra.php", "rra.php?action=remove&id=" . $_GET["id"]); exit; } if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) { db_execute("delete from rra where id=" . $_GET["id"]); db_execute("delete from rra_cf where rra_id=" . $_GET["id"]); } } function rra_edit() { global $colors, $fields_rra_edit; /* ================= input validation ================= */ input_validate_input_number(get_request_var("id")); /* ==================================================== */ if (!empty($_GET["id"])) { $rra = db_fetch_row("select * from rra where id=" . $_GET["id"]); $header_label = "[edit: " . $rra["name"] . "]"; }else{ $header_label = "[new]"; } html_start_box("Round Robin Archives $header_label", "100%", $colors["header"], "3", "center", ""); draw_edit_form(array( "config" => array(), "fields" => inject_form_variables($fields_rra_edit, (isset($rra) ? $rra : array())) )); html_end_box(); form_save_button("rra.php"); } function rra() { global $colors; /* clean up sort_column */ if (isset($_REQUEST["sort_column"])) { $_REQUEST["sort_column"] = sanitize_search_string(get_request_var("sort_column")); } /* clean up search string */ if (isset($_REQUEST["sort_direction"])) { $_REQUEST["sort_direction"] = sanitize_search_string(get_request_var("sort_direction")); } /* remember these search fields in session vars so we don't have to keep passing them around */ load_current_session_value("sort_column", "sess_rra_sort_column", "timespan"); load_current_session_value("sort_direction", "sess_rra_sort_direction", "ASC"); html_start_box("Round Robin Archives", "100%", $colors["header"], "3", "center", "rra.php?action=edit"); $display_text = array( "name" => array("Name", "ASC"), "steps" => array("Steps", "ASC"), "rows" => array("Rows", "ASC"), "timespan" => array("Timespan", "ASC")); html_header_sort($display_text, $_REQUEST["sort_column"], $_REQUEST["sort_direction"], 4); $rras = db_fetch_assoc("SELECT id, name, rows, steps, timespan FROM rra ORDER BY " . $_REQUEST['sort_column'] . " " . $_REQUEST['sort_direction']); $i = 0; if (sizeof($rras) > 0) { foreach ($rras as $rra) { form_alternate_row_color($colors["alternate"],$colors["light"],$i); $i++; ?> "> ">Delete