summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_ip_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-03 11:11:57 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-03 11:11:57 -0300
commit4daa45d861ab448da4fdc910619a4ab6b213bc50 (patch)
tree4a432f7120d120443156e3cf3cf950d74f30ada8 /usr/local/www/services_captiveportal_ip_edit.php
parenteb4ae8913eb745580cc0b5da2fb74d6f9590961c (diff)
parent073a2697dd86a8dece8dafa28b71084a547ba31e (diff)
downloadpfsense-4daa45d861ab448da4fdc910619a4ab6b213bc50.zip
pfsense-4daa45d861ab448da4fdc910619a4ab6b213bc50.tar.gz
Merge remote branch 'mainline/master' into 4_load_balancer_and_services
Conflicts: usr/local/www/services_captiveportal_ip_edit.php usr/local/www/services_captiveportal_mac_edit.php usr/local/www/services_dhcp_edit.php usr/local/www/services_rfc2136.php usr/local/www/services_snmp.php
Diffstat (limited to 'usr/local/www/services_captiveportal_ip_edit.php')
-rwxr-xr-xusr/local/www/services_captiveportal_ip_edit.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php
index f630afa..b9b4efc 100755
--- a/usr/local/www/services_captiveportal_ip_edit.php
+++ b/usr/local/www/services_captiveportal_ip_edit.php
@@ -71,6 +71,7 @@ if (isset($_POST['id']))
if (isset($id) && $a_allowedips[$id]) {
$pconfig['ip'] = $a_allowedips[$id]['ip'];
+ $pconfig['sn'] = $a_allowedips[$id]['sn'];
$pconfig['dir'] = $a_allowedips[$id]['dir'];
$pconfig['bw_up'] = $a_allowedips[$id]['bw_up'];
$pconfig['bw_down'] = $a_allowedips[$id]['bw_down'];
@@ -109,6 +110,7 @@ if ($_POST) {
if (!$input_errors) {
$ip = array();
$ip['ip'] = $_POST['ip'];
+ $ip['sn'] = $_POST['sn'];
$ip['dir'] = $_POST['dir'];
$ip['descr'] = $_POST['descr'];
if ($_POST['bw_up'])
@@ -117,9 +119,13 @@ if ($_POST) {
$ip['bw_down'] = $_POST['bw_down'];
if (isset($id) && $a_allowedips[$id]) {
$oldip = $a_allowedips[$id]['ip'];
+ if (!empty($a_allowedips[$id]['sn']))
+ $oldip .= "/{$a_allowedips[$id]['sn']}";
$a_allowedips[$id] = $ip;
} else {
$oldip = $ip['ip'];
+ if (!empty($$ip['sn']))
+ $oldip .= "/{$$ip['sn']}";
$a_allowedips[] = $ip;
}
allowedips_sort();
@@ -169,8 +175,13 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="17" value="<?=htmlspecialchars($pconfig['ip']);?>">
+ /<select name='sn' class="formselect" id='sn'>
+ <?php for ($i = 32; $i >= 1; $i--): ?>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['sn']) echo "selected"; ?>><?=$i;?></option>
+ <?php endfor; ?>
+ </select>
<br>
- <span class="vexpl"><?=gettext("IP address"); ?></span></td>
+ <span class="vexpl"><?=gettext("IP address and subnet mask. Use /32 for a single IP");?>.</span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
OpenPOWER on IntegriCloud