Projet

Général

Profil

Télécharger (20 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / vpn_ipsec.php @ eca6f787

1
<?php
2
/*
3
	vpn_ipsec.php
4
	part of m0n0wall (http://m0n0.ch/wall)
5

    
6
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7
	Copyright (C) 2008 Shrew Soft Inc
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
##|+PRIV
33
##|*IDENT=page-vpn-ipsec
34
##|*NAME=VPN: IPsec page
35
##|*DESCR=Allow access to the 'VPN: IPsec' page.
36
##|*MATCH=vpn_ipsec.php*
37
##|-PRIV
38

    
39
require("guiconfig.inc");
40
require_once("functions.inc");
41
require_once("filter.inc");
42
require_once("shaper.inc");
43
require_once("ipsec.inc");
44
require_once("vpn.inc");
45

    
46
if (!is_array($config['ipsec']['phase1']))
47
	$config['ipsec']['phase1'] = array();
48

    
49
if (!is_array($config['ipsec']['phase2']))
50
	$config['ipsec']['phase2'] = array();
51

    
52
$a_phase1 = &$config['ipsec']['phase1'];
53
$a_phase2 = &$config['ipsec']['phase2'];
54

    
55
$pconfig['enable'] = isset($config['ipsec']['enable']);
56

    
57
if ($_POST) {
58
	if ($_POST['apply']) {
59
		$retval = 0;
60
		$retval = vpn_ipsec_configure();
61
		/* reload the filter in the background */
62
		filter_configure();
63
		$savemsg = get_std_save_message($retval);
64
		if ($retval >= 0) {
65
			if (is_subsystem_dirty('ipsec'))
66
				clear_subsystem_dirty('ipsec');
67
		}
68
	} else if ($_POST['submit']) {
69
		$pconfig = $_POST;
70

    
71
		$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
72

    
73
		write_config();
74

    
75
		$retval = vpn_ipsec_configure();
76
	} else if (isset($_POST['del_x'])) {
77
		/* delete selected p1 entries */
78
		if (is_array($_POST['p1entry']) && count($_POST['p1entry'])) {
79
			foreach ($_POST['p1entry'] as $p1entrydel) {
80
				unset($a_phase1[$p1entrydel]);
81
			}
82
			if (write_config())
83
				mark_subsystem_dirty('ipsec');
84
			header("Location: vpn_ipsec.php");
85
			exit;
86
		}
87
	} else {
88
		/* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */
89
		unset($movebtn);
90
		foreach ($_POST as $pn => $pd) {
91
			if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
92
				$movebtn = $matches[1];
93
				break;
94
			}
95
		}
96
		/* move selected p1 entries before this */
97
		if (isset($movebtn) && is_array($_POST['p1entry']) && count($_POST['p1entry'])) {
98
			$a_phase1_new = array();
99

    
100
			/* copy all p1 entries < $movebtn and not selected */
101
			for ($i = 0; $i < $movebtn; $i++) {
102
				if (!in_array($i, $_POST['p1entry']))
103
					$a_phase1_new[] = $a_phase1[$i];
104
			}
105

    
106
			/* copy all selected p1 entries */
107
			for ($i = 0; $i < count($a_phase1); $i++) {
108
				if ($i == $movebtn)
109
					continue;
110
				if (in_array($i, $_POST['p1entry']))
111
					$a_phase1_new[] = $a_phase1[$i];
112
			}
113

    
114
			/* copy $movebtn p1 entry */
115
			if ($movebtn < count($a_phase1))
116
				$a_phase1_new[] = $a_phase1[$movebtn];
117

    
118
			/* copy all p1 entries > $movebtn and not selected */
119
			for ($i = $movebtn+1; $i < count($a_phase1); $i++) {
120
				if (!in_array($i, $_POST['p1entry']))
121
					$a_phase1_new[] = $a_phase1[$i];
122
			}
123
			if (count($a_phase1_new) > 0)
124
				$a_phase1 = $a_phase1_new;
125

    
126
			if (write_config())
127
				mark_subsystem_dirty('ipsec');
128
			header("Location: vpn_ipsec.php");
129
			exit;
130
		}
131
	}
132
}
133

    
134
if (isset($_GET['p1index']) && is_numericint($_GET['p1index']) && isset($a_phase1[$_GET['p1index']])) {
135
	if ($_GET['act'] == "delph1") {
136
		/* remove static route if interface is not WAN */
137
		if ($a_phase1[$_GET['p1index']]['interface'] <> "wan")
138
			mwexec("/sbin/route delete -host {$a_phase1[$_GET['p1index']]['remote-gateway']}");
139

    
140
		/* remove all phase2 entries that match the ikeid */
141
		$ikeid = $a_phase1[$_GET['p1index']]['ikeid'];
142
		foreach ($a_phase2 as $p2index => $ph2tmp)
143
			if ($ph2tmp['ikeid'] == $ikeid) {
144
				unset($a_phase2[$p2index]);
145
			}
146

    
147
		/* remove the phase1 entry */
148
		unset($a_phase1[$_GET['p1index']]);
149
		write_config();
150
		mark_subsystem_dirty('ipsec');
151
	} else if ($_GET['act'] == "delph2") {
152
		/* remove the phase2 entry */
153
		foreach ($a_phase2 as $ph2idx => $ph2) {
154
			if ($ph2['uniqid'] == $_GET['p2index']) {
155
				unset($a_phase2[$ph2idx]);
156
				write_config();
157
				mark_subsystem_dirty('ipsec');
158
				break;
159
			}
160
		}
161
	} else if ($_GET['act'] == "toggle") {
162
		if (isset($a_phase1[$_GET['p1index']]['disabled']))
163
			unset($a_phase1[$_GET['p1index']]['disabled']);
164
		else
165
			$a_phase1[$_GET['p1index']]['disabled'] = true;
166

    
167
		write_config();
168
		mark_subsystem_dirty('ipsec');
169
	}
170

    
171
	header("Location: vpn_ipsec.php");
172
	exit;
173
}
174

    
175
$pgtitle = array(gettext("VPN"),gettext("IPsec"));
176
$shortcut_section = "ipsec";
177

    
178
include("head.inc");
179

    
180
?>
181

    
182
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
183
<?php include("fbegin.inc"); ?>
184
<form action="vpn_ipsec.php" method="post">
185
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
186
<?php
187
	if ($savemsg)
188
		print_info_box($savemsg);
189
	if ($pconfig['enable'] && is_subsystem_dirty('ipsec'))
190
		print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
191
?>
192
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec">
193
	<tr>
194
		<td class="tabnavtbl">
195
<?php
196
			$tab_array = array();
197
			$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
198
			$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
199
			$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
200
			$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
201
			display_top_tabs($tab_array);
202
?>
203
		</td>
204
	</tr>
205
	<tr>
206
		<td>
207
			<div id="mainarea">
208
				<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
209
					<tr>
210
						<td class="vtable">
211
							<table border="0" cellspacing="2" cellpadding="0" summary="enable">
212
								<tr>
213
									<td>
214
										<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> />
215
									</td>
216
									<td>
217
										<strong><?=gettext("Enable IPsec"); ?></strong>
218
									</td>
219
								</tr>
220
							</table>
221
						</td>
222
					</tr>
223
					<tr>
224
						<td>
225
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
226
						</td>
227
					</tr>
228
				</table>
229
				<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="phase-1 entries">
230
					<tr id="frheader">
231
						<td class="list">&nbsp;</td>
232
						<td class="list">&nbsp;</td>
233
						<td class="listhdrr"><?=gettext("IKE"); ?></td>
234
						<td class="listhdrr"><?=gettext("Remote Gateway"); ?></td>
235
						<td class="listhdrr"><?=gettext("Mode"); ?></td>
236
						<td class="listhdrr"><?=gettext("P1 Protocol"); ?></td>
237
						<td class="listhdrr"><?=gettext("P1 Transforms"); ?></td>
238
						<td class="listhdrr"><?=gettext("P1 Description"); ?></td>
239
						<td class="list">
240
						</td>
241
					</tr>
242
<?php
243
				$i = 0;
244
				foreach ($a_phase1 as $ph1ent):
245
					$iconfn = "pass";
246
					$spans = $spane = "";
247
					if (isset($ph1ent['disabled'])) {
248
						$spans = "<span class=\"gray\">";
249
						$spane = "</span>";
250
						$iconfn .= "_d";
251
					}
252
?>
253
					<tr valign="top" id="fr<?=$i;?>" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i;?>'">
254
						<td class="listt" align="center" valign="middle">
255
							<input type="checkbox" id="frc<?=$i;?>" name="p1entry[]" value="<?=$i;?>" onclick="fr_bgcolor('<?=$i;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" />
256
						</td>
257
						<td class="listt" align="center" valign="middle">
258
							<a href="?p1index=<?=$i;?>&amp;act=toggle"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>" alt="icon" /></a>
259
<?php
260
							if (isset($filterent['log'])):
261
								$iconfnlog = "log_s";
262
							if (isset($filterent['disabled']))
263
								$iconfnlog .= "_d";
264
?>
265
						<br /><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfnlog;?>.gif" width="11" height="15" border="0" alt="icon" />
266
			<?php endif; ?>
267
						</td>
268
						<td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
269
							<?=$spans;?>
270
<?php
271
							if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
272
								echo "V1";
273
							else
274
								echo "V2";
275
?>
276
							<?=$spane;?>
277
						</td>
278
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
279
							<?=$spans;?>
280
<?php
281
							if ($ph1ent['interface']) {
282
								$iflabels = get_configured_interface_with_descr();
283

    
284
								$carplist = get_configured_carp_interface_list();
285
								foreach ($carplist as $cif => $carpip)
286
									$iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")";
287

    
288
								$aliaslist = get_configured_ip_aliases_list();
289
								foreach ($aliaslist as $aliasip => $aliasif)
290
									$iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
291

    
292
								$grouplist = return_gateway_groups_array();
293
								foreach ($grouplist as $name => $group) {
294
									if($group[0]['vip'] <> "")
295
										$vipif = $group[0]['vip'];
296
									else
297
										$vipif = $group[0]['int'];
298
									$iflabels[$name] = "GW Group {$name}";
299
								}
300
								$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
301
							}
302
							else
303
								$if = "WAN";
304

    
305
							if (!isset($ph1ent['mobile']))
306
								echo $if."<br />".$ph1ent['remote-gateway'];
307
							else
308
								echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>";
309
?>
310
							<?=$spane;?>
311
						</td>
312
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
313
							<?=$spans;?>
314
							<?=$ph1ent['mode'];?>
315
							<?=$spane;?>
316
						</td>
317
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
318
							<?=$spans;?>
319
							<?=$p1_ealgos[$ph1ent['encryption-algorithm']['name']]['name'];?>
320
<?php
321
							if ($ph1ent['encryption-algorithm']['keylen']) {
322
								if ($ph1ent['encryption-algorithm']['keylen']=="auto")
323
									echo " (" . gettext("auto") . ")";
324
								else
325
									echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
326
							}
327
?>
328
							<?=$spane;?>
329
						</td>
330
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
331
							<?=$spans;?>
332
							<?=$p1_halgos[$ph1ent['hash-algorithm']];?>
333
							<?=$spane;?>
334
						</td>
335
						<td class="listbg" onclick="fr_toggle(<?=$i;?>)">
336
							<?=$spans;?>
337
							<?=htmlspecialchars($ph1ent['descr']);?>&nbsp;
338
							<?=$spane;?>
339
						</td>
340
						<td valign="middle" class="list nowrap">
341
							<table border="0" cellspacing="0" cellpadding="1" summary="icons">
342
								<tr>
343
									<td>
344
										<input onmouseover="fr_insline(<?=$i;?>, true)" onmouseout="fr_insline(<?=$i;?>, false)"
345
											name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif"
346
											title="<?=gettext("move selected entries before this");?>"
347
											type="image" style="height:17;width:17;border:0" />
348
									</td>
349
									<td>
350
										<a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>">
351
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0" alt="edit" />
352
										</a>
353
									</td>
354
								</tr>
355
								<tr>
356
									<td>
357
										<a href="vpn_ipsec.php?act=delph1&amp;p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')">
358
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0" alt="delete" />
359
										</a>
360
									</td>
361
									<td>
362
<?php
363
							if (!isset($ph1ent['mobile'])):
364
?>
365
										<a href="vpn_ipsec_phase1.php?dup=<?=$i;?>">
366
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
367
										</a>
368
<?php
369
							endif;
370
?>
371
									</td>
372
								</tr>
373
							</table>
374
						</td>
375
					</tr>
376
					<tr>
377
						<td class="listt">&nbsp;</td>
378
						<td class="listt">&nbsp;</td>
379
						<td class="listrborder" colspan="6">
380
							<div id="shph2but-<?=$i?>">
381
<?php
382
								$phase2count=0;
383
								foreach ($a_phase2 as $ph2ent) {
384
									if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
385
										continue;
386
									$phase2count++;
387
								}
388
?>
389
								<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
390
							</div>
391
							<div id="tdph2-<?=$i?>" style="display:none">
392
							<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="phase-2 entries">
393
								<tr>
394
									<td class="listhdrr"><?=gettext("Mode"); ?></td>
395
<?php
396
								if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")):
397
?>
398
									<td class="listhdrr"><?=gettext("Local Subnet"); ?></td>
399
									<td class="listhdrr"><?=gettext("Remote Subnet"); ?></td>
400
<?php
401
								endif;
402
?>
403
									<td class="listhdrr"><?=gettext("P2 Protocol"); ?></td>
404
									<td class="listhdrr"><?=gettext("P2 Transforms"); ?></td>
405
									<td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td>
406
									<td class ="list">
407
										<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true";?>">
408
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0" alt="add" />
409
										</a>
410
									</td>
411
								</tr>
412
<?php
413
								foreach ($a_phase2 as $ph2ent):
414
									if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
415
										continue;
416

    
417
									if (isset( $ph2ent['disabled']) || isset($ph1ent['disabled'])) {
418
										$spans = "<span class=\"gray\">";
419
										$spane = "</span>";
420
									} else
421
										$spans = $spane = "";
422
?>
423
								<tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid'];?>'">
424

    
425
									<td class="listlr nowrap">
426
										<?=$spans;?>
427
										<?=$ph2ent['mode'];?>
428
										<?=$spane;?>
429
									</td>
430
<?php
431
									if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) {
432
										echo "<td class=\"listr nowrap\">&nbsp;</td><td class=\"listr nowrap\">&nbsp;</td>";
433
									}
434
?>
435
<?php
436
									if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")):
437
?>
438
										<td class="listr nowrap">
439
											<?=$spans;?>
440
												<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
441
											<?=$spane;?>
442
										</td>
443
										<td class="listr nowrap">
444
											<?=$spans;?>
445
												<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
446
											<?=$spane;?>
447
										</td>
448
<?php
449
									endif;
450
?>
451
									<td class="listr nowrap">
452
										<?=$spans;?>
453
										<?php echo $p2_protos[$ph2ent['protocol']]; ?>
454
										<?=$spane;?>
455
									</td>
456
									<td class="listr">
457
										<?=$spans;?>
458
<?php
459
										foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
460
											if ($k)
461
												echo ", ";
462
											echo $p2_ealgos[$ph2ea['name']]['name'];
463
											if ($ph2ea['keylen']) {
464
												if ($ph2ea['keylen']=="auto")
465
													echo " (" . gettext("auto") . ")";
466
												else
467
													echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
468
											}
469
										}
470
?>
471
										<?=$spane;?>
472
									</td>
473
									<td class="listr nowrap">
474
										<?=$spans;?>
475
<?php
476
										if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
477
											foreach ($ph2ent['hash-algorithm-option'] as $k => $ph2ha) {
478
												if ($k)
479
													echo ", ";
480
												echo $p2_halgos[$ph2ha];
481
											}
482
										}
483
?>
484
										<?=$spane;?>
485
									</td>
486
									<td class="list nowrap">
487
										<a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid'];?>">
488
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0" alt="edit" />
489
										</a>
490
										<a href="vpn_ipsec.php?act=delph2&amp;p1index=<?=$i;?>&amp;p2index=<?=$ph2ent['uniqid'];?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
491
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0" alt="delete" />
492
										</a>
493
										<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid'];?>">
494
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0" alt="add" />
495
										</a>
496
									</td>
497
								</tr>
498
<?php
499
								endforeach;
500
?>
501
							</table>
502
							</div>
503
						</td>
504
					</tr>
505
<?php
506
					$i++;
507
				endforeach;  // $a_phase1 as $ph1ent
508
?>
509
					<tr>
510
						<td class="list" colspan="8"></td>
511
						<td class="list nowrap" valign="middle">
512
							<table border="0" cellspacing="0" cellpadding="1" summary="edit">
513
								<tr>
514
									<td>
515
	<?php
516
									if ($i == 0):
517
	?>
518
										<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected phase1 entries to end");?>" border="0" alt="move" />
519
	<?php
520
									else:
521
	?>
522
										<input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" style="width:17;height:17;border:0" title="<?=gettext("move selected phase1 entries to end");?>" />
523
	<?php
524
									endif;
525
	?>
526
									</td>
527
									<td>
528
										<a href="vpn_ipsec_phase1.php">
529
											<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new phase1");?>" alt="add" />
530
										</a>
531
									</td>
532
								</tr>
533
								<tr>
534
									<td>
535
	<?php
536
									if ($i == 0):
537
	?>
538
										<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected phase1 entries");?>" border="0" alt="delete" />
539
	<?php
540
									else:
541
	?>
542
										<input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" style="width:17;height:17" title="<?=gettext("delete selected phase1 entries");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected phase1 entries?");?>')" />
543
	<?php
544
									endif;
545
	?>
546
									</td>
547
								</tr>
548
							</table>
549
						</td>
550
					</tr>
551
					<tr>
552
						<td colspan="8">
553
							<p>
554
								<span class="vexpl">
555
									<span class="red">
556
										<strong><?=gettext("Note"); ?>:<br /></strong>
557
									</span>
558
									<?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.<br />
559
									<?=gettext("IPsec Debug Mode can be enabled at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.<br />
560
									<?=gettext("IPsec can be set to prefer older SAs at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.
561
								</span>
562
							</p>
563
						</td>
564
					</tr>
565
				</table>
566
			</div>
567
		</td>
568
	</tr>
569
</table>
570
</form>
571
<?php include("fend.inc"); ?>
572
<script type="text/javascript">
573
//<![CDATA[
574
function show_phase2(id, buttonid) {
575
	document.getElementById(buttonid).innerHTML='';
576
	aodiv = document.getElementById(id);
577
	aodiv.style.display = "block";
578
}
579
//]]>
580
</script>
581
</body>
582
</html>
(236-236/255)