1
|
<?php
|
2
|
/*
|
3
|
LICENSE
|
4
|
*/
|
5
|
|
6
|
##|+PRIV
|
7
|
##|*IDENT=page-services-captiveportal-zones
|
8
|
##|*NAME=Services: Captiveprotal Zones page
|
9
|
##|*DESCR=Allow access to the 'Services: CaptivePortal Zones' page.
|
10
|
##|*MATCH=services_captiveportal_zones.php*
|
11
|
##|-PRIV
|
12
|
|
13
|
require("guiconfig.inc");
|
14
|
require("functions.inc");
|
15
|
require_once("filter.inc");
|
16
|
require("shaper.inc");
|
17
|
require("captiveportal.inc");
|
18
|
|
19
|
if (!is_array($config['captiveportal']))
|
20
|
$config['captiveportal'] = array();
|
21
|
$a_cp = &$config['captiveportal'];
|
22
|
|
23
|
if ($_GET['act'] == "del" && !empty($_GET['zone'])) {
|
24
|
$cpzone = $_GET['zone'];
|
25
|
if ($a_cp[$cpzone]) {
|
26
|
unset($a_cp[$cpzone]['enable']);
|
27
|
captiveportal_configure_zone($a_cp[$cpzone]);
|
28
|
unset($a_cp[$cpzone]);
|
29
|
if (isset($config['voucher'][$cpzone]))
|
30
|
unset($config['voucher'][$cpzone]);
|
31
|
write_config();
|
32
|
header("Location: services_captiveportal_zones.php");
|
33
|
exit;
|
34
|
}
|
35
|
}
|
36
|
|
37
|
$pgtitle = array(gettext("Captiveportal"),gettext("Zones"));
|
38
|
$shortcut_section = "captiveportal";
|
39
|
include("head.inc");
|
40
|
|
41
|
?>
|
42
|
|
43
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
44
|
<?php include("fbegin.inc"); ?>
|
45
|
<form action="services_captiveportal_zones.php" method="post">
|
46
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
47
|
<?php if (is_subsystem_dirty('captiveportal')): ?><p>
|
48
|
<?php print_info_box_np(gettext("The CaptivePortal entry list has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?>
|
49
|
<?php endif; ?>
|
50
|
|
51
|
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
|
52
|
<tr>
|
53
|
<td width="15%" class="listhdrr"><?=gettext("Zone");?></td>
|
54
|
<td width="30%" class="listhdrr"><?=gettext("Interfaces");?></td>
|
55
|
<td width="10%" class="listhdrr"><?=gettext("Number of users");?></td>
|
56
|
<td width="40%" class="listhdrr"><?=gettext("Description");?></td>
|
57
|
<td width="5%" class="list">
|
58
|
<table border="0" cellspacing="0" cellpadding="1">
|
59
|
<tr>
|
60
|
<td valign="middle" width="17"> </td>
|
61
|
<td valign="middle"><a href="services_captiveportal_zones_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new captiveportal instance");?>"></a></td>
|
62
|
</tr>
|
63
|
</table>
|
64
|
</td>
|
65
|
</tr>
|
66
|
<?php foreach ($a_cp as $cpzone => $cpitem):
|
67
|
if (!is_array($cpitem))
|
68
|
continue;
|
69
|
?>
|
70
|
<tr>
|
71
|
<td class="listlr" ondblclick="document.location='services_captiveportal.php?zone=<?=$cpzone;?>';">
|
72
|
<?=htmlspecialchars($cpitem['zone']);?>
|
73
|
</td>
|
74
|
<td class="listlr" ondblclick="document.location='services_captiveportal.php?zone=<?=$cpzone;?>';">
|
75
|
<?php $cpifaces = explode(",", $cpitem['interface']);
|
76
|
foreach ($cpifaces as $cpiface)
|
77
|
echo convert_friendly_interface_to_friendly_descr($cpiface) . " ";
|
78
|
?>
|
79
|
</td>
|
80
|
<td class="listr" ondblclick="document.location='services_captiveportal.php?zone=<?=$cpzone;?>';">
|
81
|
<?=count(captiveportal_read_db());?>
|
82
|
</td>
|
83
|
<td class="listbg" ondblclick="document.location='services_captiveportal.php?zone=<?=$cpzone;?>';">
|
84
|
<?=htmlspecialchars($cpitem['descr']);?>
|
85
|
</td>
|
86
|
<td valign="middle" nowrap class="list">
|
87
|
<table border="0" cellspacing="0" cellpadding="1">
|
88
|
<tr>
|
89
|
<td valign="middle"><a href="services_captiveportal.php?zone=<?=$cpzone?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit captiveportal instance"); ?>"></a></td>
|
90
|
<td><a href="services_captiveportal_zones.php?act=del&zone=<?=$cpzone;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete captiveportal instance");?>"></a></td>
|
91
|
</tr>
|
92
|
</table>
|
93
|
</td>
|
94
|
</tr>
|
95
|
<?php endforeach; ?>
|
96
|
<tr>
|
97
|
<td class="list" colspan="4"></td>
|
98
|
<td class="list">
|
99
|
<table border="0" cellspacing="0" cellpadding="1">
|
100
|
<tr>
|
101
|
<td valign="middle" width="17"> </td>
|
102
|
<td valign="middle"><a href="services_captiveportal_zones_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new captiveportal instance");?>"></a></td>
|
103
|
</td>
|
104
|
</tr>
|
105
|
</table>
|
106
|
</td>
|
107
|
</tr>
|
108
|
</table>
|
109
|
</tr>
|
110
|
</table>
|
111
|
|
112
|
<!-- univnautes -->
|
113
|
<br/><br/>
|
114
|
<div><span class="pgtitle"><a href="services_captiveportal_saml_sp.php">SAML 2.0 Configuration</a></span>
|
115
|
<p>
|
116
|
<a href="services_captiveportal_saml_sp.php">Service provider</a> |
|
117
|
<a href="services_captiveportal_saml_federation.php">Federations</a> |
|
118
|
<a href="services_captiveportal_saml_whitelist.php">Whitelist</a>
|
119
|
</p>
|
120
|
</div>
|
121
|
|
122
|
</form>
|
123
|
<?php include("fend.inc"); ?>
|
124
|
</body>
|
125
|
</html>
|