Revision e3153473
Added by Simon Cornelius P. Umacob over 16 years ago
usr/local/www/system_gateways.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/* $Id$ */ |
|
2 |
/* $Id: system_gateways.php,v 1.1 2008/11/06 16:46:42 sumacob Exp $ */
|
|
3 | 3 |
/* |
4 | 4 |
system_gateways.php |
5 | 5 |
part of pfSense (http://pfsense.com) |
... | ... | |
39 | 39 |
|
40 | 40 |
require("guiconfig.inc"); |
41 | 41 |
|
42 |
$a_gateways = return_gateways_array(); |
|
42 |
if (!is_array($config['gateways']['gateway_item'])) |
|
43 |
$config['gateways']['gateway_item'] = array(); |
|
44 |
|
|
45 |
$a_gateways = &$config['gateways']['gateway_item']; |
|
43 | 46 |
$changedesc = "Gateways: "; |
44 | 47 |
|
45 | 48 |
if ($_POST) { |
... | ... | |
68 | 71 |
|
69 | 72 |
if ($_GET['act'] == "del") { |
70 | 73 |
if ($a_gateways[$_GET['id']]) { |
71 |
/* remove the real entry */ |
|
72 |
$realid = $a_gateways[$_GET['id']]['attribute']; |
|
73 |
$a_gateways = &$config['gateways']['gateway_item']; |
|
74 |
|
|
75 |
$changedesc .= "removed gateway {$realid}"; |
|
76 |
unset($a_gateways[$realid]); |
|
74 |
$changedesc .= "removed gateway {$_GET['id']}"; |
|
75 |
unset($a_gateways[$_GET['id']]); |
|
77 | 76 |
write_config($changedesc); |
78 | 77 |
touch($d_staticroutesdirty_path); |
79 | 78 |
header("Location: system_gateways.php"); |
... | ... | |
81 | 80 |
} |
82 | 81 |
} |
83 | 82 |
|
84 |
|
|
85 | 83 |
$pgtitle = array("System","Gateways"); |
86 | 84 |
include("head.inc"); |
87 | 85 |
|
... | ... | |
130 | 128 |
<tr> |
131 | 129 |
<td class="listlr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';"> |
132 | 130 |
<?php |
133 |
echo strtoupper($gateway['name']);
|
|
131 |
echo $gateway['name'];
|
|
134 | 132 |
if(isset($gateway['defaultgw'])) { |
135 |
echo " <strong>(default)<strong>";
|
|
133 |
echo " <br /><strong>({$gateway['type']} default)<strong>";
|
|
136 | 134 |
} |
137 | 135 |
?> |
138 | 136 |
|
Also available in: Unified diff
Unbreak System Gateways page. I'll just add back the changes from the old CVS repo afterwards.