Projet

Général

Profil

Télécharger (3,97 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / diag_ipsec_leases.php @ ca4e3e4c

1
<?php
2
/* $Id$ */
3
/*
4
	diag_ipsec_leases.php
5
	Copyright (C) 2014 Ermal LUÇi
6
	All rights reserved.
7

    
8
	Redistribution and use in source and binary forms, with or without
9
	modification, are permitted provided that the following conditions are met:
10

    
11
	1. Redistributions of source code must retain the above copyright notice,
12
	   this list of conditions and the following disclaimer.
13

    
14
	2. Redistributions in binary form must reproduce the above copyright
15
	   notice, this list of conditions and the following disclaimer in the
16
	   documentation and/or other materials provided with the distribution.
17

    
18
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
	POSSIBILITY OF SUCH DAMAGE.
28
*/
29

    
30
/*
31
	pfSense_BUILDER_BINARIES:	/usr/local/sbin/ipsec
32
	pfSense_MODULE:	ipsec
33
*/
34

    
35
##|+PRIV
36
##|*IDENT=page-status-ipsec-leases
37
##|*NAME=Status: IPsec: Leases page
38
##|*DESCR=Allow access to the 'Status: IPsec: Leases' page.
39
##|*MATCH=diag_ipsec_leases.php*
40
##|-PRIV
41

    
42
require("guiconfig.inc");
43
require("ipsec.inc");
44

    
45
$pgtitle = array(gettext("Status"),gettext("IPsec"),gettext("Leases"));
46
$shortcut_section = "ipsec";
47
include("head.inc");
48

    
49
$mobile = ipsec_dump_mobile();
50

    
51
?>
52

    
53
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
54
	<?php include("fbegin.inc"); ?>
55
	<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec sad">
56
		<tr>
57
			<td>
58
				<?php
59
					$tab_array = array();
60
					$tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php");
61
					$tab_array[1] = array(gettext("Leases"), true, "diag_ipsec_leases.php");
62
					$tab_array[2] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
63
					$tab_array[3] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
64
					$tab_array[4] = array(gettext("Logs"), false, "diag_logs_ipsec.php");
65
					display_top_tabs($tab_array);
66
				?>
67
			</td>
68
		</tr>
69
		<tr>
70
			<td>
71
				<div id="mainarea">
72
				<?php foreach($mobile['pool'] as $pool): ?>
73
					<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
74
						<tr>
75
							<td colspan="4" valign="top" class="listtopic">
76
							<?php
77
								echo gettext("Pool: ") . $pool['name'];
78
								echo '/ ' . gettext("usage: ") . $pool['usage'];
79
								echo '/ ' . gettext("online: ") . $pool['online'];
80
							?>
81
							</td>
82
						</tr>
83
						<?php if (is_array($pool['lease']) && count($pool['lease']) > 0): ?>
84
						<tr>
85
							<td class="listhdrr nowrap"><?=gettext("ID");?></td>
86
							<td class="listhdrr nowrap"><?=gettext("Host");?></td>
87
							<td class="listhdrr nowrap"><?=gettext("Status");?></td>
88
							<td class="list nowrap"></td>
89
						</tr>
90
						<?php foreach ($pool['lease'] as $lease): ?>
91
						<tr>
92
							<td class="listlr"><?=htmlspecialchars($lease['id']);?></td>
93
							<td class="listr"><?=htmlspecialchars($lease['host']);?></td>
94
							<td class="listr"><?=htmlspecialchars($lease['status']);?></td>
95
							<td class="list nowrap">
96
							</td>
97
						</tr>
98
						<?php endforeach;
99
						else: ?>
100
						<tr>
101
							<td>
102
								<p><strong><?=gettext("No leases from this pool yet.");?></strong></p>
103
							</td>
104
						</tr>
105
						<?php endif; ?>
106
					</table>
107
				<?php endforeach; ?>
108
				</div>
109
			</td>
110
		</tr>
111
	</table>
112

    
113
<p class="vexpl">
114
<span class="red"><strong><?=gettext("Note:");?><br /></strong></span>
115
<?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a>
116
</p>
117

    
118
<?php include("fend.inc"); ?>
119
</body>
120
</html>
(15-15/256)