diff options
author | Warren Baker <warren@decoy.co.za> | 2012-03-02 23:02:22 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2012-03-02 23:02:22 +0200 |
commit | bfe407e5a2184d0cceeb2349eb1408b4f28029eb (patch) | |
tree | 1e8dc53959f486f77b56199b70a7f4ebcdf569ba /usr/local/www/system_routes.php | |
parent | 3b8a17a1d060482cb2425c62418cd37445762226 (diff) | |
download | pfsense-bfe407e5a2184d0cceeb2349eb1408b4f28029eb.zip pfsense-bfe407e5a2184d0cceeb2349eb1408b4f28029eb.tar.gz |
Add the ability to disable static routes without deleting them
Diffstat (limited to 'usr/local/www/system_routes.php')
-rwxr-xr-x | usr/local/www/system_routes.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php index 64484a7..e4a36fb 100755 --- a/usr/local/www/system_routes.php +++ b/usr/local/www/system_routes.php @@ -60,7 +60,7 @@ if ($_POST) { $retval = 0; if (file_exists("{$g['tmp_path']}/.system_routes.apply")) { - $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply")); + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply")); foreach ($toapplylist as $toapply) mwexec("{$toapply}"); @@ -138,21 +138,32 @@ include("head.inc"); </tr> <tr> <?php $i = 0; foreach ($a_routes as $route): ?> + <?php + if (isset($route['disabled'])) { + $textss = "<span class=\"gray\">"; + $textse = "</span>"; + } else + $textss = $textse = ""; + ?> <td class="listlr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';"> - <?=strtolower($route['network']);?> + <?=$textss;?><?=strtolower($route['network']);?><?=$textse;?> </td> <td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';"> + <?=$textss;?> <?php echo htmlentities($a_gateways[$route['gateway']]['name']) . " - " . htmlentities($a_gateways[$route['gateway']]['gateway']); ?> + <?=$textse;?> </td> <td class="listr" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';"> + <?=$textss;?> <?php echo convert_friendly_interface_to_friendly_descr($a_gateways[$route['gateway']]['friendlyiface']) . " "; ?> + <?=$textse;?> </td> <td class="listbg" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($route['descr']);?> + <?=$textss;?><?=htmlspecialchars($route['descr']);?> <?=$textse;?> </td> <td valign="middle" nowrap class="list"> <table border="0" cellspacing="0" cellpadding="1"> |