Project

General

Profile

Download (21.9 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php 
2
/* $Id$ */
3
/*
4
	system_gateways_edit.php
5
	part of pfSense (http://pfsense.com)
6
	
7
	Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
8
	All rights reserved.
9
	
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12
	
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15
	
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19
	
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*
32
	pfSense_MODULE:	routing
33
*/
34

    
35
##|+PRIV
36
##|*IDENT=page-system-gateways-editgateway
37
##|*NAME=System: Gateways: Edit Gateway page
38
##|*DESCR=Allow access to the 'System: Gateways: Edit Gateway' page.
39
##|*MATCH=system_gateways_edit.php*
40
##|-PRIV
41

    
42
require("guiconfig.inc");
43
require("pkg-utils.inc");
44

    
45
$a_gateways = return_gateways_array(true);
46
$a_gateways_arr = array();
47
foreach($a_gateways as $gw) {
48
	$a_gateways_arr[] = $gw;
49
}
50
$a_gateways = $a_gateways_arr;
51

    
52
if (!is_array($config['gateways']['gateway_item']))
53
        $config['gateways']['gateway_item'] = array();
54
        
55
$a_gateway_item = &$config['gateways']['gateway_item'];
56

    
57
$id = $_GET['id'];
58
if (isset($_POST['id']))
59
	$id = $_POST['id'];
60

    
61
if (isset($_GET['dup'])) {
62
	$id = $_GET['dup'];
63
}
64

    
65
if (isset($id) && $a_gateways[$id]) {
66
	$pconfig = array();
67
	$pconfig['name'] = $a_gateways[$id]['name'];
68
	$pconfig['weight'] = $a_gateways[$id]['weight'];
69
	$pconfig['interval'] = $a_gateways[$id]['interval'];
70
	$pconfig['interface'] = $a_gateways[$id]['interface'];
71
	$pconfig['friendlyiface'] = $a_gateways[$id]['friendlyiface'];
72
	if (isset($a_gateways[$id]['dynamic']))
73
		$pconfig['dynamic'] = true;
74
	$pconfig['gateway'] = $a_gateways[$id]['gateway'];
75
	$pconfig['defaultgw'] = isset($a_gateways[$id]['defaultgw']);
76
	$pconfig['latencylow'] = $a_gateway_item[$id]['latencylow'];
77
        $pconfig['latencyhigh'] = $a_gateway_item[$id]['latencyhigh'];
78
        $pconfig['losslow'] = $a_gateway_item[$id]['losslow'];
79
        $pconfig['losshigh'] = $a_gateway_item[$id]['losshigh'];
80
        $pconfig['down'] = $a_gateway_item[$id]['down'];
81
	$pconfig['monitor'] = $a_gateways[$id]['monitor'];
82
	$pconfig['monitor_disable'] = isset($a_gateways[$id]['monitor_disable']);
83
	$pconfig['descr'] = $a_gateways[$id]['descr'];
84
	$pconfig['attribute'] = $a_gateways[$id]['attribute'];
85
}
86

    
87
if (isset($_GET['dup'])) {
88
	unset($id);
89
	unset($pconfig['attribute']);
90
}
91

    
92
if ($_POST) {
93

    
94
	unset($input_errors);
95

    
96
	/* input validation */
97
	$reqdfields = explode(" ", "name interface");
98
	$reqdfieldsn = array(gettext("Name"), gettext("Interface"));
99

    
100
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
101

    
102
	if (! isset($_POST['name'])) {
103
		$input_errors[] = "A valid gateway name must be specified.";
104
	}
105
	if (! is_validaliasname($_POST['name'])) {
106
		$input_errors[] = gettext("The gateway name must not contain invalid characters.");
107
	}
108
	/* skip system gateways which have been automatically added */
109
	if (($_POST['gateway'] && (!is_ipaddr($_POST['gateway'])) && ($_POST['attribute'] != "system")) && ($_POST['gateway'] != "dynamic")) {
110
		$input_errors[] = gettext("A valid gateway IP address must be specified.");
111
	}
112

    
113
	if ($_POST['gateway'] && (is_ipaddr($_POST['gateway'])) && !$_REQUEST['isAjax']) {
114
		if (!empty($config['interfaces'][$_POST['interface']]['ipaddr'])) {
115
			if (is_ipaddr($config['interfaces'][$_POST['interface']]['ipaddr']) && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic"))
116
				$input_errors[] = gettext("Dynamic gateway values cannot be specified for interfaces with a static ip configuration.");
117
		}
118
		if(is_ipaddrv6($_POST['gateway'])) {
119
			$parent_ip = get_interface_ipv6($_POST['interface']);
120
		} else {		
121
			$parent_ip = get_interface_ip($_POST['interface']);
122
		}
123
		if (is_ipaddrv4($parent_ip)) {
124
			$parent_sn = get_interface_subnet($_POST['interface']);
125
			$subnet = gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn;
126
			if(!ip_in_subnet($_POST['gateway'], $subnet) && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['gateway'])) {
127
				$input_errors[] = sprintf(gettext("The gateway address %1\$s does not lie within the chosen interface's subnet '%2\$s'."), $_POST['gateway'],$subnet);
128
			}
129
		}
130
		if (is_ipaddrv6($parent_ip)) {
131
			$parent_sn = get_interface_subnetv6($_POST['interface']);
132
			$subnet = gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn;
133
			if(!ip_in_subnet($_POST['gateway'], $subnet)) {
134
				$input_errors[] = sprintf(gettext("The gateway address %1\$s does not lie within the chosen interface's subnet '%2\$s'."), $_POST['gateway'],$subnet);
135
			}
136
		}
137
	}
138
	if (($_POST['monitor'] <> "") && !is_ipaddr($_POST['monitor']) && $_POST['monitor'] != "dynamic") {
139
		$input_errors[] = gettext("A valid monitor IP address must be specified.");
140
	}
141

    
142
	if (isset($_POST['name'])) {
143
		/* check for overlaps */
144
		foreach ($a_gateways as $gateway) {
145
			if (isset($id) && ($a_gateways[$id]) && ($a_gateways[$id] === $gateway)) {
146
				if ($gateway['name'] != $_POST['name'])
147
					$input_errors[] = gettext("Changing name on a gateway is not allowed.");
148
				continue;
149
			}
150
			if($_POST['name'] <> "") {
151
				if (($gateway['name'] <> "") && ($_POST['name'] == $gateway['name']) && ($gateway['attribute'] != "system")) {
152
					$input_errors[] = sprintf(gettext('The gateway name "%s" already exists.'), $_POST['name']);
153
					break;
154
				}
155
			}
156
			if(is_ipaddr($_POST['gateway'])) {
157
				if (($gateway['gateway'] <> "") && ($_POST['gateway'] == $gateway['gateway']) && ($gateway['attribute'] != "system")) {
158
					$input_errors[] = sprintf(gettext('The gateway IP address "%s" already exists.'), $_POST['gateway']);
159
					break;
160
				}
161
			}
162
			if(is_ipaddr($_POST['monitor'])) {
163
				if (($gateway['monitor'] <> "") && ($_POST['monitor'] == $gateway['monitor']) && ($gateway['attribute'] != "system")) {
164
					$input_errors[] = sprintf(gettext('The monitor IP address "%s" is already in use. You must choose a different monitor IP.'), $_POST['monitor']);
165
					break;
166
				}
167
			}
168
		}
169
	}
170

    
171
	/* input validation */
172
        if($_POST['latencylow']) {
173
                if (! is_numeric($_POST['latencylow'])) {
174
                        $input_errors[] = gettext("The low latency watermark needs to be a numeric value.");
175
                }
176
        }
177

    
178
        if($_POST['latencyhigh']) {
179
                if (! is_numeric($_POST['latencyhigh'])) {
180
                        $input_errors[] = gettext("The high latency watermark needs to be a numeric value.");
181
                }
182
        }
183
        if($_POST['losslow']) {
184
                if (! is_numeric($_POST['losslow'])) {
185
                        $input_errors[] = gettext("The low loss watermark needs to be a numeric value.");
186
                }
187
        }
188
        if($_POST['losshigh']) {
189
                if (! is_numeric($_POST['losshigh'])) {
190
                        $input_errors[] = gettext("The high loss watermark needs to be a numeric value.");
191
                }
192
        }
193

    
194
        if(($_POST['latencylow']) && ($_POST['latencyhigh'])){
195
                if(($_POST['latencylow'] > $_POST['latencyhigh'])) {
196
                        $input_errors[] = gettext("The High latency watermark needs to be higher then the low latency watermark");
197
                }
198
        }
199

    
200
        if(($_POST['losslow']) && ($_POST['losshigh'])){
201
                if($_POST['losslow'] > $_POST['losshigh']) {
202
                        $input_errors[] = gettext("The High packet loss watermark needs to be higher then the low packet loss watermark");
203
                }
204
        }
205
	if($_POST['down']) {
206
                if (! is_numeric($_POST['down']) || $_POST['down'] < 1) {
207
                        $input_errors[] = gettext("The low latency watermark needs to be a numeric value.");
208
                }
209
        }
210

    
211
	if (!$input_errors) {
212
		if (!($_POST['weight'] > 1 || $_POST['latencylow'] || $_POST['latencyhigh'] ||
213
		    $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] ||
214
		    $_POST['defaultgw'] || is_ipaddr($_POST['monitor']) || is_ipaddr($_POST['gateway']))) {
215
		/* Delete from config if gw is dynamic and user is not saving any additional gateway data that system doesn't know */
216
			if (isset($id) && $a_gateway_item[$id])
217
				unset($a_gateway_item[$id]);
218
			write_config();
219
			header("Location: system_gateways.php");
220
			exit;
221
		}
222

    
223

    
224
		$reloadif = "";
225
		$gateway = array();
226

    
227
		if (empty($_POST['interface']))
228
			$gateway['interface'] = $pconfig['friendlyiface'];
229
		else
230
			$gateway['interface'] = $_POST['interface'];
231
		if (is_ipaddr($_POST['gateway']))
232
			$gateway['gateway'] = $_POST['gateway'];
233
		else
234
			$gateway['gateway'] = "dynamic";
235
		$gateway['name'] = $_POST['name'];
236
		$gateway['weight'] = $_POST['weight'];
237
		$gateway['interval'] = $_POST['interval'];
238
		$gateway['descr'] = $_POST['descr'];
239
		if ($_POST['monitor_disable'] == "yes")
240
			$gateway['monitor_disable'] = true;
241
		else if (is_ipaddr($_POST['monitor']))
242
			$gateway['monitor'] = $_POST['monitor'];
243

    
244
		if ($_POST['defaultgw'] == "yes" || $_POST['defaultgw'] == "on") {
245
			$i = 0;
246
			/* remove the default gateway bits for all gateways with the same address family */
247
			foreach($a_gateway_item as $gw) {
248
				if(is_ipaddrv4($gateway['gateway']) && is_ipaddrv4($gw['gateway'])) {
249
					unset($config['gateways']['gateway_item'][$i]['defaultgw']);
250
					if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
251
						$reloadif = $gw['interface'];
252
				}
253
				if(is_ipaddrv6($gateway['gateway']) && is_ipaddrv6($gw['gateway'])) {
254
					unset($config['gateways']['gateway_item'][$i]['defaultgw']);
255
					if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
256
						$reloadif = $gw['interface'];
257
				}
258
				$i++;
259
			}
260
			$gateway['defaultgw'] = true;
261
		}
262

    
263
		if ($_POST['latencylow'])
264
			$gateway['latencylow'] = $_POST['latencylow'];
265
		if ($_POST['latencyhigh'])
266
               		$gateway['latencyhigh'] = $_POST['latencyhigh'];
267
		if ($_POST['losslow'])
268
              			$gateway['losslow'] = $_POST['losslow'];
269
		if ($_POST['losshigh'])
270
               		$gateway['losshigh'] = $_POST['losshigh'];
271
		if ($_POST['down'])
272
               		$gateway['down'] = $_POST['down'];
273

    
274
		/* when saving the manual gateway we use the attribute which has the corresponding id */
275
		if (isset($id) && $a_gateway_item[$id])
276
			$a_gateway_item[$id] = $gateway;
277
		else
278
			$a_gateway_item[] = $gateway;
279

    
280
		mark_subsystem_dirty('staticroutes');
281
	
282
		write_config();
283

    
284
		if($_REQUEST['isAjax']) {
285
			echo $_POST['name'];
286
			exit;
287
		} else if (!empty($reloadif))
288
			send_event("interface reconfigure {$reloadif}");
289
		
290
		header("Location: system_gateways.php");
291
		exit;
292
	} else {
293
		$pconfig = $_POST;
294
		if (empty($_POST['friendlyiface']))
295
			$pconfig['friendlyiface'] = $_POST['interface'];
296
	}
297
}
298

    
299

    
300
$pgtitle = array(gettext("System"),gettext("Gateways"),gettext("Edit gateway"));
301
$statusurl = "status_gateways.php";
302

    
303
include("head.inc");
304

    
305
?>
306

    
307
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
308
<?php include("fbegin.inc"); ?>
309
<script language="JavaScript">
310
function show_advanced_gateway() {
311
        document.getElementById("showadvgatewaybox").innerHTML='';
312
        aodiv = document.getElementById('showgatewayadv');
313
        aodiv.style.display = "block";
314
}
315
function monitor_change() {
316
        document.iform.monitor.disabled = document.iform.monitor_disable.checked;
317
}
318
</script>
319
<?php if ($input_errors) print_input_errors($input_errors); ?>
320
            <form action="system_gateways_edit.php" method="post" name="iform" id="iform">
321
	<?php
322

    
323
	/* If this is a system gateway we need this var */
324
	if(($pconfig['attribute'] == "system") || is_numeric($pconfig['attribute'])) {
325
		echo "<input type='hidden' name='attribute' id='attribute' value='{$pconfig['attribute']}' >\n";
326
	}
327
	echo "<input type='hidden' name='friendlyiface' id='friendlyiface' value='{$pconfig['friendlyiface']}' >\n";
328
	?>
329
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
330
				<tr>
331
					<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit gateway"); ?></td>
332
				</tr>	
333
                <tr> 
334
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
335
                  <td width="78%" class="vtable">
336
		 	<select name='interface' class='formselect' >
337

    
338
		<?php 
339
                      	$interfaces = get_configured_interface_with_descr(false, true);
340
			foreach ($interfaces as $iface => $ifacename) {
341
				echo "<option value=\"{$iface}\"";
342
				if ($iface == $pconfig['friendlyiface'])
343
					echo " selected";
344
				echo ">" . htmlspecialchars($ifacename) . "</option>";
345
			}
346
			if (is_package_installed("openbgpd") == 1) {
347
				echo "<option value=\"bgpd\"";
348
				if ($pconfig['interface'] == "bgpd") 
349
					echo " selected";
350
				echo ">" . gettext("Use BGPD") . "</option>";
351
			}
352
 		  ?>
353
                    </select> <br>
354
                    <span class="vexpl"><?=gettext("Choose which interface this gateway applies to."); ?></span></td>
355
                </tr>
356
                <tr>
357
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
358
                  <td width="78%" class="vtable"> 
359
                    <input name="name" type="text" class="formfld unknown" id="name" size="20" value="<?=htmlspecialchars($pconfig['name']);?>"> 
360
                    <br> <span class="vexpl"><?=gettext("Gateway name"); ?></span></td>
361
                </tr>
362
		<tr>
363
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td>
364
                  <td width="78%" class="vtable"> 
365
                    <input name="gateway" type="text" class="formfld host" id="gateway" size="28" value="<?php if ($pconfig['dynamic']) echo "dynamic"; else echo $pconfig['gateway']; ?>">
366
                    <br> <span class="vexpl"><?=gettext("Gateway IP address"); ?></span></td>
367
                </tr>
368
		<tr>
369
		  <td width="22%" valign="top" class="vncell"><?=gettext("Default Gateway"); ?></td>
370
		  <td width="78%" class="vtable">
371
			<input name="defaultgw" type="checkbox" id="defaultgw" value="yes" <?php if ($pconfig['defaultgw'] == true) echo "checked"; ?> />
372
			<strong><?=gettext("Default Gateway"); ?></strong><br />
373
			<?=gettext("This will select the above gateway as the default gateway"); ?>
374
		  </td>
375
		</tr>
376
		<tr>
377
		  <td width="22%" valign="top" class="vncell"><?=gettext("Disable Gateway Monitoring"); ?></td>
378
		  <td width="78%" class="vtable">
379
			<input name="monitor_disable" type="checkbox" id="monitor_disable" value="yes" <?php if ($pconfig['monitor_disable'] == true) echo "checked"; ?> onClick="monitor_change()" />
380
			<strong><?=gettext("Disable Gateway Monitoring"); ?></strong><br />
381
			<?=gettext("This will consider this gateway as always being up"); ?>
382
		  </td>
383
		</tr>
384
		<tr>
385
		  <td width="22%" valign="top" class="vncell"><?=gettext("Monitor IP"); ?></td>
386
		  <td width="78%" class="vtable">
387
			<?php
388
				if ($pconfig['gateway'] == $pconfig['monitor'])
389
					$monitor = "";
390
				else
391
					$monitor = htmlspecialchars($pconfig['monitor']);
392
			?>
393
			<input name="monitor" type="text" id="monitor" value="<?php echo $monitor; ?>" size="28" />
394
			<strong><?=gettext("Alternative monitor IP"); ?></strong> <br />
395
			<?=gettext("Enter an alternative address here to be used to monitor the link. This is used for the " .
396
			"quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond " .
397
			"to ICMP echo requests (pings)"); ?>.</strong>
398
			<br />
399
		  </td>
400
		</tr>
401
		<tr>
402
		  <td width="22%" valign="top" class="vncell"><?=gettext("Advanced");?></td>
403
		  <td width="78%" class="vtable">
404
			<div id="showadvgatewaybox" <? if (!empty($pconfig['latencylow']) || !empty($pconfig['latencyhigh']) || !empty($pconfig['losslow']) || !empty($pconfig['losshigh']) || (isset($pconfig['weight']) && $pconfig['weight'] > 1) || (isset($pconfig['interval']) && $pconfig['interval'])) echo "style='display:none'"; ?>>
405
				<input type="button" onClick="show_advanced_gateway()" value="Advanced"></input> - Show advanced option</a>
406
			</div>
407
			<div id="showgatewayadv" <? if (empty($pconfig['latencylow']) && empty($pconfig['latencyhigh']) && empty($pconfig['losslow']) && empty($pconfig['losshigh']) && (empty($pconfig['weight']) || $pconfig['weight'] == 1) && (empty($pconfig['interval']) || $pconfig['interval'] == 1)) echo "style='display:none'"; ?>>
408
                        <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
409
			<tr>
410
                                <td width="22%" valign="top" class="vncellreq"><?=gettext("Weight");?></td>
411
                                <td width="78%" class="vtable">
412
					<select name='weight' class='formfldselect' id='weight'>
413
				<?php
414
					for ($i = 1; $i < 6; $i++) {
415
                                        	$selected = "";
416
                                        	if ($pconfig['weight'] == $i)
417
                                                	$selected = "selected";
418
                                        	echo "<option value='{$i}' {$selected} >{$i}</option>";
419
                                	}
420
				?>
421
					</select>
422
					<br /><?=gettext("Weight for this gateway when used in a Gateway Group.");?> <br />
423
		   		</td>
424
			</tr>
425
                        <tr>
426
                                <td width="22%" valign="top" class="vncellreq"><?=gettext("Latency thresholds");?></td>
427
                                <td width="78%" class="vtable">
428
                                <?=gettext("From");?>
429
                                    <input name="latencylow" type="text" class="formfld unknown" id="latencylow" size="2"
430
                                        value="<?=htmlspecialchars($pconfig['latencylow']);?>">
431
                                <?=gettext("To");?>
432
                                    <input name="latencyhigh" type="text" class="formfld unknown" id="latencyhigh" size="2"
433
                                        value="<?=htmlspecialchars($pconfig['latencyhigh']);?>">
434
                                    <br> <span class="vexpl"><?=gettext("These define the low and high water marks for latency in milliseconds.");?></span></td>
435
                                </td>
436
                        </tr>
437
                        <tr>
438
                                <td width="22%" valign="top" class="vncellreq"><?=gettext("Packet Loss thresholds");?></td>
439
                                <td width="78%" class="vtable">
440
                                <?=gettext("From");?>
441
                                    <input name="losslow" type="text" class="formfld unknown" id="losslow" size="2"
442
                                        value="<?=htmlspecialchars($pconfig['losslow']);?>">
443
                                <?=gettext("To");?>
444
                                    <input name="losshigh" type="text" class="formfld unknown" id="losshigh" size="2"
445
                                        value="<?=htmlspecialchars($pconfig['losshigh']);?>">
446
                                    <br> <span class="vexpl"><?=gettext("These define the low and high water marks for packet loss in %.");?></span></td>
447
                                </td>
448
                        </tr>
449
			<tr>
450
                                <td width="22%" valign="top" class="vncellreq"><?=gettext("Down");?></td>
451
                                <td width="78%" class="vtable">
452
                                    <input name="down" type="text" class="formfld unknown" id="down" size="2"
453
                                        value="<?=htmlspecialchars($pconfig['down']);?>">
454
                                    <br> <span class="vexpl"><?=gettext("This defines the down time for the alarm to fire, in seconds.");?></span></td>
455
                                </td>
456
                        </tr>
457
			<tr>
458
                                <td width="22%" valign="top" class="vncellreq"><?=gettext("Frequency Probe");?></td>
459
                                <td width="78%" class="vtable">
460
                                    <input name="interval" type="text" class="formfld unknown" id="interval" size="2"
461
                                        value="<?=htmlspecialchars($pconfig['interval']);?>">
462
                                    <br> <span class="vexpl"><?=gettext("This defines the frequency in seconds that an icmp probe will be sent. Default is 1 second.");?></span></td>
463
                                </td>
464
                        </tr>
465
                        </table>
466
			</div>
467
		   </td>
468
		</tr>
469
		<tr>
470
                  <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
471
                  <td width="78%" class="vtable"> 
472
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
473
                    <br> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span></td>
474
                </tr>
475
                <tr>
476
                  <td width="22%" valign="top">&nbsp;</td>
477
                  <td width="78%"> 
478
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel");?>" class="formbtn"  onclick="history.back()">
479
                    <?php if (isset($id) && $a_gateways[$id]): ?>
480
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
481
                    <?php endif; ?>
482
                  </td>
483
                </tr>
484
              </table>
485
</form>
486
<?php include("fend.inc"); ?>
487
<script language="JavaScript">
488
monitor_change();
489
</script>
490
</body>
491
</html>
(200-200/232)