$pd) { if (preg_match("/move_(\d+)_x/", $pn, $matches)) { $movebtn = $matches[1]; break; } } /* move selected routes before this route */ if (isset($movebtn) && is_array($_POST['route']) && count($_POST['route'])) { $a_routes_new = array(); /* copy all routes < $movebtn and not selected */ for ($i = 0; $i < $movebtn; $i++) { if (!in_array($i, $_POST['route'])) { $a_routes_new[] = $a_routes[$i]; } } /* copy all selected routes */ for ($i = 0; $i < count($a_routes); $i++) { if ($i == $movebtn) { continue; } if (in_array($i, $_POST['route'])) { $a_routes_new[] = $a_routes[$i]; } } /* copy $movebtn route */ if ($movebtn < count($a_routes)) { $a_routes_new[] = $a_routes[$movebtn]; } /* copy all routes > $movebtn and not selected */ for ($i = $movebtn+1; $i < count($a_routes); $i++) { if (!in_array($i, $_POST['route'])) { $a_routes_new[] = $a_routes[$i]; } } if (count($a_routes_new) > 0) { $a_routes = $a_routes_new; } if (write_config()) { mark_subsystem_dirty('staticroutes'); } header("Location: system_routes.php"); exit; } } $pgtitle = array(gettext("System"), gettext("Static Routes")); $shortcut_section = "routing"; include("head.inc"); if ($input_errors) print_input_errors($input_errors); if ($savemsg) print_info_box($savemsg); if (is_subsystem_dirty('staticroutes')) print_info_box_np(gettext("The static route configuration has been changed.") . "
" . gettext("You must apply the changes in order for them to take effect.")); $tab_array = array(); $tab_array[0] = array(gettext("Gateways"), false, "system_gateways.php"); $tab_array[1] = array(gettext("Routes"), true, "system_routes.php"); $tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php"); display_top_tabs($tab_array); ?> $route): if (isset($route['disabled'])) $icon = 'icon-ban-circle'; else $icon = 'icon-ok-circle'; ?> >
')">