mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
services: apply whitespace cleanups
This commit is contained in:
parent
e78874a7fa
commit
a8641315f3
@ -497,16 +497,16 @@ function enable_change(enable_change) {
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), true, "services_captiveportal.php?zone={$cpzone}");
|
||||
@ -517,14 +517,14 @@ function enable_change(enable_change) {
|
||||
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal.php" method="post" name="iform" id="iform">
|
||||
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
@ -553,7 +553,7 @@ function enable_change(enable_change) {
|
||||
<td class="vtable">
|
||||
<table cellpadding="0" cellspacing="0" summary="connections">
|
||||
<tr>
|
||||
<td><input name="maxprocperip" type="text" class="formfld unknown" id="maxprocperip" size="5" value="<?=htmlspecialchars($pconfig['maxprocperip']);?>" /> <?=gettext("per client IP address (0 = no limit)"); ?></td>
|
||||
<td><input name="maxprocperip" type="text" class="formfld unknown" id="maxprocperip" size="5" value="<?=htmlspecialchars($pconfig['maxprocperip']);?>" /> <?=gettext("per client IP address (0 = no limit)"); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?=gettext("This setting limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in " .
|
||||
@ -859,7 +859,7 @@ function enable_change(enable_change) {
|
||||
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
|
||||
$end = ip2long32(gen_subnet_max($sn['subnet'], $sn['subnet_bits']));
|
||||
$len = $end - $start;
|
||||
|
||||
|
||||
for ($i = 0; $i <= $len; $i++) {
|
||||
$snip = long2ip32($start+$i);
|
||||
echo "<option value='{$snip}' {$selected}>" . htmlspecialchars("{$sn['descr']} - {$snip}") . "></option>\n";
|
||||
@ -873,13 +873,13 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Choose the IP to use for calling station attribute."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vncell" valign="top"><?=gettext("Session-Timeout"); ?></td>
|
||||
<td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked=\"checked\""; ?> /><strong><?=gettext("Use RADIUS Session-Timeout attributes"); ?></strong><br />
|
||||
<?=gettext("When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute."); ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vncell" valign="top"><?=gettext("Type"); ?></td>
|
||||
<td class="vtable"><select name="radiusvendor" id="radiusvendor">
|
||||
@ -897,13 +897,13 @@ function enable_change(enable_change) {
|
||||
"the Called-Station-Id to the client's MAC address. Default behavior is Calling-Station-Id = client's MAC address and Called-Station-Id = %s's WAN IP address."),
|
||||
$g['product_name']);?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vncell" valign="top"><?=gettext("Accounting Style"); ?></td>
|
||||
<td class="vtable"><input name="reverseacct" type="checkbox" id="reverseacct" value="yes" <?php if ($pconfig['reverseacct']) echo "checked=\"checked\""; ?> /><strong><?=gettext("Invert Acct-Input-Octets and Acct-Output-Octets"); ?></strong><br />
|
||||
<?=gettext("When this is enabled, data counts for RADIUS accounting packets will be taken from the client perspective, not the NAS. Acct-Input-Octets will represent download, and Acct-Output-Octets will represent upload."); ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vncell" valign="top"><?=gettext("NAS Identifier"); ?></td>
|
||||
<td class="vtable"><input name="radiusnasid" type="text" maxlength="253" class="formfld unknown" id="radiusnasid" value="<?=htmlspecialchars($pconfig['radiusnasid']);?>" /><br />
|
||||
@ -1080,7 +1080,7 @@ function enable_change(enable_change) {
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -1092,4 +1092,4 @@ function enable_change(enable_change) {
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -58,7 +58,7 @@ require("captiveportal.inc");
|
||||
$cpzone = $_GET['zone'];
|
||||
if (isset($_POST['zone']))
|
||||
$cpzone = $_POST['zone'];
|
||||
|
||||
|
||||
if (empty($cpzone)) {
|
||||
header("Location: services_captiveportal_zones.php");
|
||||
exit;
|
||||
@ -86,14 +86,14 @@ if ($_POST) {
|
||||
|
||||
if (is_uploaded_file($_FILES['new']['tmp_name'])) {
|
||||
|
||||
if(!stristr($_FILES['new']['name'], "captiveportal-"))
|
||||
$name = "captiveportal-" . $_FILES['new']['name'];
|
||||
else
|
||||
$name = $_FILES['new']['name'];
|
||||
$size = filesize($_FILES['new']['tmp_name']);
|
||||
if(!stristr($_FILES['new']['name'], "captiveportal-"))
|
||||
$name = "captiveportal-" . $_FILES['new']['name'];
|
||||
else
|
||||
$name = $_FILES['new']['name'];
|
||||
$size = filesize($_FILES['new']['tmp_name']);
|
||||
|
||||
// is there already a file with that name?
|
||||
foreach ($a_element as $element) {
|
||||
// is there already a file with that name?
|
||||
foreach ($a_element as $element) {
|
||||
if ($element['name'] == $name) {
|
||||
$input_errors[] = sprintf(gettext("A file with the name '%s' already exists."), $name);
|
||||
break;
|
||||
@ -146,14 +146,14 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
|
||||
@ -164,49 +164,49 @@ $main_buttons = array(
|
||||
$tab_array[] = array(gettext("File Manager"), true, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_filemanager.php" method="post" name="iform" id="iform" enctype="multipart/form-data">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_filemanager.php" method="post" name="iform" id="iform" enctype="multipart/form-data">
|
||||
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if ($_GET['act'] == 'add'): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="10%">Upload file</td>
|
||||
<td width="10%">Upload file</td>
|
||||
<td class="listlr" colspan="2"><input type="file" name="new" class="formfld file" size="40" id="new" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Upload"); ?>" />
|
||||
<a href="services_captiveportal_filemanager.php?zone=<?=$cpzone;?>" class="btn btn-default">Cancel</a>
|
||||
|
||||
<a href="services_captiveportal_filemanager.php?zone=<?=$cpzone;?>" class="btn btn-default">Cancel</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="70%" class="listhdrr"><?=gettext("Name"); ?></td>
|
||||
<td width="20%" class="listhdr"><?=gettext("Size"); ?></td>
|
||||
<td width="10%" class="list">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (is_array($a_cp[$cpzone]['element'])):
|
||||
$i = 0; foreach ($a_cp[$cpzone]['element'] as $element): ?>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="listlr"><?=htmlspecialchars($element['name']);?></td>
|
||||
<td class="listr" align="right"><?=format_bytes($element['size']);?></td>
|
||||
<td valign="middle" class="list nowrap">
|
||||
@ -214,18 +214,18 @@ $main_buttons = array(
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; endif; ?>
|
||||
|
||||
|
||||
<?php if ($total_size > 0): ?>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="listlr" style="background-color: #eee"><strong><?=gettext("TOTAL"); ?></strong></td>
|
||||
<td class="listr" style="background-color: #eee" align="right"><strong><?=format_bytes($total_size);?></strong></td>
|
||||
<td valign="middle" class="list nowrap"></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<span class="vexpl"><span class="text-danger"><strong>
|
||||
<?=gettext("Note:"); ?><br />
|
||||
</strong></span>
|
||||
@ -242,13 +242,13 @@ $main_buttons = array(
|
||||
<tt><a href="/captiveportal-aup.php?zone=$PORTAL_ZONE$&redirurl=$PORTAL_REDIRURL$"><?=gettext("Acceptable usage policy"); ?></a></tt>
|
||||
<br /><br />
|
||||
<?php printf(gettext("The total size limit for all files is %s."), format_bytes($g['captiveportal_element_sizelimit']));?></span>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -67,7 +67,7 @@ if ($_GET['act'] == "del" && !empty($cpzone)) {
|
||||
$a_allowedhostnames =& $a_cp[$cpzone]['allowedhostname'];
|
||||
if ($a_allowedhostnames[$_GET['id']]) {
|
||||
$ipent = $a_allowedhostnames[$_GET['id']];
|
||||
|
||||
|
||||
if (isset($a_cp[$cpzone]['enable'])) {
|
||||
if (!empty($ipent['sn']))
|
||||
$ipent['ip'] .= "/{$ipent['sn']}";
|
||||
@ -83,7 +83,7 @@ if ($_GET['act'] == "del" && !empty($cpzone)) {
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 4, $ip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unset($a_allowedhostnames[$_GET['id']]);
|
||||
write_config();
|
||||
captiveportal_allowedhostname_configure();
|
||||
@ -105,14 +105,14 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
|
||||
@ -122,22 +122,22 @@ $main_buttons = array(
|
||||
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_hostname.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_hostname.php" method="post" name="iform" id="iform">
|
||||
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="60%" class="listhdrr"><?=gettext("Hostname"); ?></td>
|
||||
<td width="40%" class="listhdr"><?=gettext("Description"); ?></td>
|
||||
<td width="10%" class="list">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (is_array($a_cp[$cpzone]['allowedhostname'])):
|
||||
@ -155,8 +155,8 @@ $main_buttons = array(
|
||||
if($ip['dir'] == "from") {
|
||||
echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_in.gif\" width=\"11\" height=\"11\" align=\"middle\" alt=\"in\" /> any";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="listbg">
|
||||
<?=htmlspecialchars($ip['descr']);?>
|
||||
@ -165,7 +165,7 @@ $main_buttons = array(
|
||||
<a href="services_captiveportal_hostname.php?zone=<?=$cpzone;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this address?"); ?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; endif; ?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="list"><p class="vexpl"><span class="red"><strong>
|
||||
<?=gettext("Note:"); ?><br />
|
||||
@ -193,11 +193,11 @@ $main_buttons = array(
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
services_captiveportal_hostname_edit.php
|
||||
Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
|
||||
@ -7,17 +7,17 @@
|
||||
Originally part of m0n0wall (http://m0n0.ch/wall)
|
||||
Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -99,10 +99,10 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "hostname");
|
||||
$reqdfieldsn = array(gettext("Allowed Hostname"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if (($_POST['hostname'] && !is_hostname($_POST['hostname'])))
|
||||
|
||||
if (($_POST['hostname'] && !is_hostname($_POST['hostname'])))
|
||||
$input_errors[] = sprintf(gettext("A valid Hostname must be specified. [%s]"), $_POST['hostname']);
|
||||
|
||||
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
|
||||
@ -113,11 +113,11 @@ if ($_POST) {
|
||||
foreach ($a_allowedhostnames as $ipent) {
|
||||
if (isset($id) && ($a_allowedhostnames[$id]) && ($a_allowedhostnames[$id] === $ipent))
|
||||
continue;
|
||||
|
||||
|
||||
if ($ipent['hostname'] == $_POST['hostname']){
|
||||
$input_errors[] = sprintf("[%s] %s.", $_POST['hostname'], gettext("already allowed")) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$input_errors) {
|
||||
@ -136,7 +136,7 @@ if ($_POST) {
|
||||
$a_allowedhostnames[] = $ip;
|
||||
|
||||
allowedhostnames_sort();
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
$rules = captiveportal_allowedhostname_configure();
|
||||
@ -144,7 +144,7 @@ if ($_POST) {
|
||||
$cpzoneid = $a_cp[$cpzone]['zoneid'];
|
||||
mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/hostname_rules");
|
||||
unset($rules);
|
||||
|
||||
|
||||
header("Location: services_captiveportal_hostname.php?zone={$cpzone}");
|
||||
exit;
|
||||
}
|
||||
@ -161,25 +161,25 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_hostname_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_hostname_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<select name="dir" class="formfld">
|
||||
<?php
|
||||
<?php
|
||||
$dirs = array(gettext("Both"),gettext("From"),gettext("To")) ;
|
||||
foreach ($dirs as $dir): ?>
|
||||
<option value="<?=strtolower($dir);?>" <?php if (strtolower($dir) == strtolower($pconfig['dir'])) echo "selected=\"selected\"";?> >
|
||||
@ -187,20 +187,20 @@ include("head.inc");
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Use"); ?> <em><?=gettext("From"); ?></em> <?=gettext("to always allow an Hostname through the captive portal (without authentication)"); ?>.
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Use"); ?> <em><?=gettext("From"); ?></em> <?=gettext("to always allow an Hostname through the captive portal (without authentication)"); ?>.
|
||||
<?=gettext("Use"); ?> <em><?=gettext("To"); ?></em> <?=gettext("to allow access from all clients (even non-authenticated ones) behind the portal to this Hostname"); ?>.</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="hostname" type="text" class="formfld unknown" id="hostname" size="17" value="<?=htmlspecialchars($pconfig['hostname']);?>" />
|
||||
<br />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Hostname");?>.</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span></td>
|
||||
</tr>
|
||||
@ -218,7 +218,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
<?php if (isset($id) && $a_allowedhostnames[$id]): ?>
|
||||
@ -227,12 +227,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -65,21 +65,21 @@ if ($_GET['act'] == "del") {
|
||||
$a_allowedips =& $config['captiveportal'][$cpzone]['allowedip'];
|
||||
if ($a_allowedips[$_GET['id']]) {
|
||||
$ipent = $a_allowedips[$_GET['id']];
|
||||
|
||||
|
||||
if (isset($config['captiveportal'][$cpzone]['enable'])) {
|
||||
$mask = (!empty($ipent['sn'])) ? $ipent['sn'] : 32;
|
||||
|
||||
|
||||
$ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $ipent['ip'], $mask);
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 3, $ipent['ip'], $mask);
|
||||
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_XDEL, 4, $ipent['ip'], $mask);
|
||||
|
||||
|
||||
if (is_array($ipfw)) {
|
||||
captiveportal_free_dn_ruleno($ipfw['dnpipe']);
|
||||
pfSense_pipe_action("pipe delete {$ipfw['dnpipe']}");
|
||||
pfSense_pipe_action("pipe delete " . ($ipfw['dnpipe']+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unset($a_allowedips[$_GET['id']]);
|
||||
write_config();
|
||||
header("Location: services_captiveportal_ip.php?zone={$cpzone}");
|
||||
@ -102,14 +102,14 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
|
||||
@ -120,21 +120,21 @@ $main_buttons = array(
|
||||
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_ip.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_ip.php" method="post" name="iform" id="iform">
|
||||
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="40%" class="listhdrr"><?=gettext("IP address"); ?></td>
|
||||
<td width="50%" class="listhdr"><?=gettext("Description"); ?></td>
|
||||
<td width="10%" class="list">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (is_array($a_cp[$cpzone]['allowedip'])):
|
||||
@ -151,13 +151,13 @@ $main_buttons = array(
|
||||
echo strtolower($ip['ip']);
|
||||
if($ip['sn'] != "32" && is_numeric($ip['sn'])) {
|
||||
$sn = $ip['sn'];
|
||||
echo "/$sn";
|
||||
echo "/$sn";
|
||||
}
|
||||
if($ip['dir'] == "from") {
|
||||
echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_in.gif\" width=\"11\" height=\"11\" align=\"middle\" alt=\"any\" /> any";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="listbg">
|
||||
<?=htmlspecialchars($ip['descr']);?>
|
||||
@ -166,7 +166,7 @@ $main_buttons = array(
|
||||
<a href="services_captiveportal_ip.php?zone=<?=$cpzone;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this address?"); ?>')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; endif; ?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="list"><p class="vexpl"><span class="red"><strong>
|
||||
<?=gettext("Note:"); ?><br />
|
||||
@ -178,11 +178,11 @@ $main_buttons = array(
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
services_captiveportal_ip_edit.php
|
||||
Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Originally part of m0n0wall (http://m0n0.ch/wall)
|
||||
Originally part of m0n0wall (http://m0n0.ch/wall)
|
||||
Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -63,7 +63,7 @@ $shortcut_section = "captiveportal";
|
||||
$cpzone = $_GET['zone'];
|
||||
if (isset($_POST['zone']))
|
||||
$cpzone = $_POST['zone'];
|
||||
|
||||
|
||||
if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
|
||||
header("Location: services_captiveportal_zones.php");
|
||||
exit;
|
||||
@ -98,15 +98,15 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "ip sn");
|
||||
$reqdfieldsn = array(gettext("Allowed IP address"), gettext("Subnet mask"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
|
||||
if ($_POST['ip'] && !is_ipaddr($_POST['ip']))
|
||||
$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['ip']);
|
||||
|
||||
|
||||
if ($_POST['sn'] && (!is_numeric($_POST['sn']) || ($_POST['sn'] < 1) || ($_POST['sn'] > 32)))
|
||||
$input_errors[] = gettext("A valid subnet mask must be specified");
|
||||
|
||||
|
||||
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
|
||||
$input_errors[] = gettext("Upload speed needs to be an integer");
|
||||
|
||||
@ -116,11 +116,11 @@ if ($_POST) {
|
||||
foreach ($a_allowedips as $ipent) {
|
||||
if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent))
|
||||
continue;
|
||||
|
||||
|
||||
if ($ipent['ip'] == $_POST['ip']){
|
||||
$input_errors[] = sprintf("[%s] %s.", $_POST['ip'], gettext("already allowed")) ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$input_errors) {
|
||||
@ -168,7 +168,7 @@ if ($_POST) {
|
||||
mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp");
|
||||
@unlink("{$g['tmp_path']}/{$uniqid}_tmp");
|
||||
}
|
||||
|
||||
|
||||
header("Location: services_captiveportal_ip.php?zone={$cpzone}");
|
||||
exit;
|
||||
}
|
||||
@ -185,38 +185,38 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_ip_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_ip_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit allowed ip rule");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<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=\"selected\""; ?>><?=$i;?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<br />
|
||||
<br />
|
||||
<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>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span>
|
||||
</td>
|
||||
@ -237,7 +237,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
<?php if (isset($id) && $a_allowedips[$id]): ?>
|
||||
@ -246,12 +246,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -148,17 +148,17 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('passthrumac')): ?><p>
|
||||
<?php print_info_box_np(gettext("The captive portal MAC address configuration has been changed.<br />You must apply the changes in order for them to take effect."));?><br />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("MAC"), true, "services_captiveportal_mac.php?zone={$cpzone}");
|
||||
@ -169,16 +169,16 @@ $main_buttons = array(
|
||||
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_mac.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_mac.php" method="post" name="iform" id="iform">
|
||||
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="3%" class="list"></td>
|
||||
<td width="37%" class="listhdrr"><?=gettext("MAC address"); ?></td>
|
||||
@ -211,7 +211,7 @@ $main_buttons = array(
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="list">
|
||||
<span class="vexpl">
|
||||
@ -224,12 +224,12 @@ $main_buttons = array(
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -180,19 +180,19 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_mac_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_mac_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit MAC address rules");?></td>
|
||||
</tr>
|
||||
@ -266,12 +266,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>
|
||||
All rights reserved.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -78,7 +78,7 @@ if (!is_array($config['captiveportal']))
|
||||
$config['captiveportal'] = array();
|
||||
$a_cp =& $config['captiveportal'];
|
||||
|
||||
if (!is_array($config['voucher']))
|
||||
if (!is_array($config['voucher']))
|
||||
$config['voucher'] = array();
|
||||
|
||||
if (empty($a_cp[$cpzone])) {
|
||||
@ -91,17 +91,17 @@ if (empty($a_cp[$cpzone])) {
|
||||
$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Vouchers"), $a_cp[$cpzone]['zone']);
|
||||
$shortcut_section = "captiveportal-vouchers";
|
||||
|
||||
if (!is_array($config['voucher'][$cpzone]['roll']))
|
||||
if (!is_array($config['voucher'][$cpzone]['roll']))
|
||||
$config['voucher'][$cpzone]['roll'] = array();
|
||||
if (!isset($config['voucher'][$cpzone]['charset']))
|
||||
if (!isset($config['voucher'][$cpzone]['charset']))
|
||||
$config['voucher'][$cpzone]['charset'] = '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
|
||||
if (!isset($config['voucher'][$cpzone]['rollbits']))
|
||||
if (!isset($config['voucher'][$cpzone]['rollbits']))
|
||||
$config['voucher'][$cpzone]['rollbits'] = 16;
|
||||
if (!isset($config['voucher'][$cpzone]['ticketbits']))
|
||||
if (!isset($config['voucher'][$cpzone]['ticketbits']))
|
||||
$config['voucher'][$cpzone]['ticketbits'] = 10;
|
||||
if (!isset($config['voucher'][$cpzone]['checksumbits']))
|
||||
if (!isset($config['voucher'][$cpzone]['checksumbits']))
|
||||
$config['voucher'][$cpzone]['checksumbits'] = 5;
|
||||
if (!isset($config['voucher'][$cpzone]['magic']))
|
||||
if (!isset($config['voucher'][$cpzone]['magic']))
|
||||
$config['voucher'][$cpzone]['magic'] = rand(); // anything slightly random will do
|
||||
if (!isset($config['voucher'][$cpzone]['exponent'])) {
|
||||
while (true) {
|
||||
@ -128,9 +128,9 @@ if (!isset($config['voucher'][$cpzone]['publickey'])) {
|
||||
}
|
||||
|
||||
// Check for invalid or expired vouchers
|
||||
if (!isset($config['voucher'][$cpzone]['descrmsgnoaccess']))
|
||||
if (!isset($config['voucher'][$cpzone]['descrmsgnoaccess']))
|
||||
$config['voucher'][$cpzone]['descrmsgnoaccess'] = gettext("Voucher invalid");
|
||||
if (!isset($config['voucher'][$cpzone]['descrmsgexpired']))
|
||||
if (!isset($config['voucher'][$cpzone]['descrmsgexpired']))
|
||||
$config['voucher'][$cpzone]['descrmsgexpired'] = gettext("Voucher expired");
|
||||
|
||||
$a_roll = &$config['voucher'][$cpzone]['roll'];
|
||||
@ -138,7 +138,7 @@ $a_roll = &$config['voucher'][$cpzone]['roll'];
|
||||
if ($_GET['act'] == "del") {
|
||||
$id = $_GET['id'];
|
||||
if ($a_roll[$id]) {
|
||||
$roll = $a_roll[$id]['number'];
|
||||
$roll = $a_roll[$id]['number'];
|
||||
$voucherlck = lock("voucher{$cpzone}");
|
||||
unset($a_roll[$id]);
|
||||
voucher_unlink_db($roll);
|
||||
@ -207,36 +207,36 @@ if ($_POST) {
|
||||
|
||||
/* input validation */
|
||||
if ($_POST['enable'] == "yes") {
|
||||
if (!$_POST['vouchersyncusername']) {
|
||||
if (!$_POST['vouchersyncusername']) {
|
||||
$reqdfields = explode(" ", "charset rollbits ticketbits checksumbits publickey magic");
|
||||
$reqdfieldsn = array(gettext("charset"),gettext("rollbits"),gettext("ticketbits"),gettext("checksumbits"),gettext("publickey"),gettext("magic"));
|
||||
} else {
|
||||
$reqdfields = explode(" ", "vouchersyncdbip vouchersyncport vouchersyncpass vouchersyncusername");
|
||||
$reqdfieldsn = array(gettext("Synchronize Voucher Database IP"),gettext("Sync port"),gettext("Sync password"),gettext("Sync username"));
|
||||
}
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
}
|
||||
|
||||
if (!$_POST['vouchersyncusername']) {
|
||||
|
||||
if (!$_POST['vouchersyncusername']) {
|
||||
// Check for form errors
|
||||
if ($_POST['charset'] && (strlen($_POST['charset'] < 2)))
|
||||
if ($_POST['charset'] && (strlen($_POST['charset'] < 2)))
|
||||
$input_errors[] = gettext("Need at least 2 characters to create vouchers.");
|
||||
if ($_POST['charset'] && (strpos($_POST['charset'],"\"")>0))
|
||||
if ($_POST['charset'] && (strpos($_POST['charset'],"\"")>0))
|
||||
$input_errors[] = gettext("Double quotes aren't allowed.");
|
||||
if ($_POST['charset'] && (strpos($_POST['charset'],",")>0))
|
||||
if ($_POST['charset'] && (strpos($_POST['charset'],",")>0))
|
||||
$input_errors[] = "',' " . gettext("aren't allowed.");
|
||||
if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31)))
|
||||
if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31)))
|
||||
$input_errors[] = gettext("# of Bits to store Roll Id needs to be between 1..31.");
|
||||
if ($_POST['ticketbits'] && (!is_numeric($_POST['ticketbits']) || ($_POST['ticketbits'] < 1) || ($_POST['ticketbits'] > 16)))
|
||||
if ($_POST['ticketbits'] && (!is_numeric($_POST['ticketbits']) || ($_POST['ticketbits'] < 1) || ($_POST['ticketbits'] > 16)))
|
||||
$input_errors[] = gettext("# of Bits to store Ticket Id needs to be between 1..16.");
|
||||
if ($_POST['checksumbits'] && (!is_numeric($_POST['checksumbits']) || ($_POST['checksumbits'] < 1) || ($_POST['checksumbits'] > 31)))
|
||||
if ($_POST['checksumbits'] && (!is_numeric($_POST['checksumbits']) || ($_POST['checksumbits'] < 1) || ($_POST['checksumbits'] > 31)))
|
||||
$input_errors[] = gettext("# of Bits to store checksum needs to be between 1..31.");
|
||||
if ($_POST['publickey'] && (!strstr($_POST['publickey'],"BEGIN PUBLIC KEY")))
|
||||
if ($_POST['publickey'] && (!strstr($_POST['publickey'],"BEGIN PUBLIC KEY")))
|
||||
$input_errors[] = gettext("This doesn't look like an RSA Public key.");
|
||||
if ($_POST['privatekey'] && (!strstr($_POST['privatekey'],"BEGIN RSA PRIVATE KEY")))
|
||||
if ($_POST['privatekey'] && (!strstr($_POST['privatekey'],"BEGIN RSA PRIVATE KEY")))
|
||||
$input_errors[] = gettext("This doesn't look like an RSA Private key.");
|
||||
if ($_POST['vouchersyncdbip'] && (is_ipaddr_configured($_POST['vouchersyncdbip'])))
|
||||
if ($_POST['vouchersyncdbip'] && (is_ipaddr_configured($_POST['vouchersyncdbip'])))
|
||||
$input_errors[] = gettext("You cannot sync the voucher database to this host (itself).");
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ if ($_POST) {
|
||||
$newvoucher['vouchersyncport'] = $_POST['vouchersyncport'];
|
||||
$newvoucher['vouchersyncusername'] = $_POST['vouchersyncusername'];
|
||||
$newvoucher['vouchersyncpass'] = $_POST['vouchersyncpass'];
|
||||
if($newvoucher['vouchersyncpass'] && $newvoucher['vouchersyncusername'] &&
|
||||
if($newvoucher['vouchersyncpass'] && $newvoucher['vouchersyncusername'] &&
|
||||
$newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) {
|
||||
// Synchronize the voucher DB from the master node
|
||||
require_once("xmlrpc.inc");
|
||||
@ -283,7 +283,7 @@ if ($_POST) {
|
||||
$protocol = "https";
|
||||
if ($protocol == "https" || $newvoucher['vouchersyncport'] == "443")
|
||||
$url = "https://{$newvoucher['vouchersyncdbip']}";
|
||||
else
|
||||
else
|
||||
$url = "http://{$newvoucher['vouchersyncdbip']}";
|
||||
|
||||
$execcmd = <<<EOF
|
||||
@ -322,9 +322,9 @@ EOF;
|
||||
if (!$input_errors) {
|
||||
$toreturn = XML_RPC_Decode($resp->value());
|
||||
if(!is_array($toreturn)) {
|
||||
if($toreturn == "Authentication failed")
|
||||
if($toreturn == "Authentication failed")
|
||||
$input_errors[] = "Could not synchronize the voucher database: Authentication Failed.";
|
||||
} else {
|
||||
} else {
|
||||
// If we received back the voucher roll and other information then store it.
|
||||
if($toreturn['voucher']['roll'])
|
||||
$newvoucher['roll'] = $toreturn['voucher']['roll'];
|
||||
@ -378,10 +378,10 @@ function generatenewkey() {
|
||||
jQuery('#privatekey').val('One moment please...');
|
||||
jQuery.ajax("services_captiveportal_vouchers.php?zone=<?php echo($cpzone); ?>&generatekey=true", {
|
||||
type: 'get',
|
||||
success: function(data) {
|
||||
success: function(data) {
|
||||
eval(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function before_save() {
|
||||
document.iform.charset.disabled = false;
|
||||
@ -399,7 +399,7 @@ function before_save() {
|
||||
}
|
||||
function enable_change(enable_change) {
|
||||
var endis;
|
||||
endis = !(document.iform.enable.checked || enable_change);
|
||||
endis = !(document.iform.enable.checked || enable_change);
|
||||
document.iform.charset.disabled = endis;
|
||||
document.iform.rollbits.disabled = endis;
|
||||
document.iform.ticketbits.disabled = endis;
|
||||
@ -441,15 +441,15 @@ function enable_change(enable_change) {
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
|
||||
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
|
||||
@ -460,17 +460,17 @@ function enable_change(enable_change) {
|
||||
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_vouchers.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<form action="services_captiveportal_vouchers.php" method="post" name="iform" id="iform">
|
||||
<input type="hidden" name="zone" id="zone" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vtable"> </td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> onclick="enable_change(false)" />
|
||||
@ -480,8 +480,8 @@ function enable_change(enable_change) {
|
||||
<tr>
|
||||
<td valign="top" class="vncell">
|
||||
<?=gettext("Voucher Rolls"); ?>
|
||||
<?php
|
||||
if($pconfig['vouchersyncdbip'])
|
||||
<?php
|
||||
if($pconfig['vouchersyncdbip'])
|
||||
echo "<br />(Synchronized from {$pconfig['vouchersyncdbip']})";
|
||||
?>
|
||||
</td>
|
||||
@ -508,20 +508,20 @@ function enable_change(enable_change) {
|
||||
<td class="listr">
|
||||
<?=htmlspecialchars($rollent['descr']); ?>
|
||||
</td>
|
||||
<td valign="middle" class="list nowrap">
|
||||
<td valign="middle" class="list nowrap">
|
||||
<div id='addeditdelete<?=$i?>'>
|
||||
<?php if ($pconfig['enable']): ?>
|
||||
<?php if ($pconfig['enable']): ?>
|
||||
<a href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone;?>&id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit voucher"); ?>" width="17" height="17" border="0" alt="<?=gettext("edit voucher"); ?>" /></a>
|
||||
<a href="services_captiveportal_vouchers.php?zone=<?=$cpzone;?>&act=del&id=<?=$i; ?>" onclick="return confirm('<?=gettext("Do you really want to delete this voucher? This makes all vouchers from this roll invalid"); ?>')"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete vouchers"); ?>" width="17" height="17" border="0" alt="<?=gettext("delete vouchers"); ?>" /></a>
|
||||
<a href="services_captiveportal_vouchers.php?zone=<?=$cpzone;?>&act=csv&id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_log_s.gif" title="<?=gettext("generate vouchers for this roll to CSV file"); ?>" width="11" height="15" border="0" alt="<?=gettext("generate vouchers for this roll to CSV file"); ?>" /></a>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
</table>
|
||||
<?php if ($pconfig['enable']): ?>
|
||||
|
||||
</table>
|
||||
<?php if ($pconfig['enable']): ?>
|
||||
<?=gettext("Create, generate and activate Rolls with Vouchers that allow access through the " .
|
||||
"captive portal for the configured time. Once a voucher is activated, " .
|
||||
"its clock is started and runs uninterrupted until it expires. During that " .
|
||||
@ -548,7 +548,7 @@ function enable_change(enable_change) {
|
||||
<br />
|
||||
<?=gettext("Paste an RSA private key (64 Bit or smaller) in PEM format here. This key is only used to generate encrypted vouchers and doesn't need to be available if the vouchers have been generated offline."); ?> <a href='#' onclick='generatenewkey();'> <?=gettext('Generate');?></a> <?=gettext('new key');?>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Character set"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="charset" type="text" class="formfld" id="charset" size="80" value="<?=htmlspecialchars($pconfig['charset']);?>" />
|
||||
@ -556,7 +556,7 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Tickets are generated with the specified character set. It should contain printable characters (numbers, lower case and upper case letters) that are hard to confuse with others. Avoid e.g. 0/O and l/1."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"># <?=gettext("of Roll Bits"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="rollbits" type="text" class="formfld" id="rollbits" size="2" value="<?=htmlspecialchars($pconfig['rollbits']);?>" />
|
||||
@ -564,7 +564,7 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Reserves a range in each voucher to store the Roll # it belongs to. Allowed range: 1..31. Sum of Roll+Ticket+Checksum bits must be one Bit less than the RSA key size."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"># <?=gettext("of Ticket Bits"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="ticketbits" type="text" class="formfld" id="ticketbits" size="2" value="<?=htmlspecialchars($pconfig['ticketbits']);?>" />
|
||||
@ -572,7 +572,7 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Reserves a range in each voucher to store the Ticket# it belongs to. Allowed range: 1..16. Using 16 bits allows a roll to have up to 65535 vouchers. A bit array, stored in RAM and in the config, is used to mark if a voucher has been used. A bit array for 65535 vouchers requires 8 KB of storage."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"># <?=gettext("of Checksum Bits"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="checksumbits" type="text" class="formfld" id="checksumbits" size="2" value="<?=htmlspecialchars($pconfig['checksumbits']);?>" />
|
||||
@ -580,7 +580,7 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Reserves a range in each voucher to store a simple checksum over Roll # and Ticket#. Allowed range is 0..31."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Magic Number"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="magic" type="text" class="formfld" id="magic" size="20" value="<?=htmlspecialchars($pconfig['magic']);?>" />
|
||||
@ -588,14 +588,14 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Magic number stored in every voucher. Verified during voucher check. Size depends on how many bits are left by Roll+Ticket+Checksum bits. If all bits are used, no magic number will be used and checked."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Invalid Voucher Message"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="msgnoaccess" type="text" class="formfld" id="msgnoaccess" size="80" value="<?=htmlspecialchars($pconfig['msgnoaccess']);?>" />
|
||||
<br /><?=gettext("Error message displayed for invalid vouchers on captive portal error page"); ?> ($PORTAL_MESSAGE$).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Expired Voucher Message"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="msgexpired" type="text" class="formfld" id="msgexpired" size="80" value="<?=htmlspecialchars($pconfig['msgexpired']);?>" />
|
||||
@ -608,11 +608,11 @@ function enable_change(enable_change) {
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<!-- voucher xmlrpc, disabled
|
||||
<!-- voucher xmlrpc, disabled
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Voucher database synchronization"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Synchronize Voucher Database IP"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="vouchersyncdbip" type="text" class="formfld" id="vouchersyncdbip" size="17" value="<?=htmlspecialchars($pconfig['vouchersyncdbip']);?>" />
|
||||
@ -620,28 +620,28 @@ function enable_change(enable_change) {
|
||||
<br /><?=gettext("NOTE: this should be setup on the slave nodes and not the primary node!"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Voucher sync port"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="vouchersyncport" type="text" class="formfld" id="vouchersyncport" size="7" value="<?=htmlspecialchars($pconfig['vouchersyncport']);?>" />
|
||||
<br /><?=gettext("This is the port of the master voucher nodes webConfigurator. Example: 443"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Voucher sync username"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="vouchersyncusername" type="text" class="formfld" id="vouchersyncusername" size="25" value="<?=htmlspecialchars($pconfig['vouchersyncusername']);?>" autocomplete="off" />
|
||||
<br /><?=gettext("This is the username of the master voucher nodes webConfigurator."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Voucher sync password"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="vouchersyncpass" type="password" class="formfld" id="vouchersyncpass" size="25" value="<?=htmlspecialchars($pconfig['vouchersyncpass']);?>" autocomplete="off" />
|
||||
<br /><?=gettext("This is the password of the master voucher nodes webConfigurator."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
-->
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
@ -659,11 +659,11 @@ function enable_change(enable_change) {
|
||||
<?=gettext("Specifying the Voucher Database Synchronization options will not record any other value from the other options. They will be retrieved/synced from the master."); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -675,4 +675,4 @@ function enable_change(enable_change) {
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
|
||||
All rights reserved.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -24,7 +24,7 @@
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
/*
|
||||
pfSense_MODULE: captiveportal
|
||||
*/
|
||||
|
||||
@ -84,7 +84,7 @@ $maxnumber = (1<<$config['voucher'][$cpzone]['rollbits']) -1; // Highest Roll
|
||||
$maxcount = (1<<$config['voucher'][$cpzone]['ticketbits']) -1; // Highest Ticket#
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
|
||||
unset($input_errors);
|
||||
$pconfig = $_POST;
|
||||
|
||||
@ -101,8 +101,8 @@ if ($_POST) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_numeric($_POST['number']) || $_POST['number'] >= $maxnumber)
|
||||
|
||||
if (!is_numeric($_POST['number']) || $_POST['number'] >= $maxnumber)
|
||||
$input_errors[] = sprintf(gettext("Roll number must be numeric and less than %s"), $maxnumber);
|
||||
|
||||
if (!is_numeric($_POST['count']) || $_POST['count'] < 1 || $_POST['count'] > $maxcount)
|
||||
@ -171,57 +171,57 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_vouchers_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_vouchers_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Roll"); ?>#</td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="number" type="text" class="formfld" id="number" size="10" value="<?=htmlspecialchars($pconfig['number']);?>" />
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="number" type="text" class="formfld" id="number" size="10" value="<?=htmlspecialchars($pconfig['number']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Enter the Roll"); ?># (0..<?=htmlspecialchars($maxnumber);?>) <?=gettext("found on top of the generated/printed vouchers"); ?>.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Minutes per Ticket"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="minutes" type="text" class="formfld" id="minutes" size="10" value="<?=htmlspecialchars($pconfig['minutes']);?>" />
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="minutes" type="text" class="formfld" id="minutes" size="10" value="<?=htmlspecialchars($pconfig['minutes']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication"); ?>.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Count"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="count" type="text" class="formfld" id="count" size="10" value="<?=htmlspecialchars($pconfig['count']);?>" />
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="count" type="text" class="formfld" id="count" size="10" value="<?=htmlspecialchars($pconfig['count']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Enter the number of vouchers"); ?> (1..<?=htmlspecialchars($maxcount);?>) <?=gettext("found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again"); ?>.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Comment"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="descr" type="text" class="formfld" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="descr" type="text" class="formfld" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Can be used to further identify this roll. Ignored by the system"); ?>.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" />
|
||||
<?php if (isset($id) && $a_roll[$id]): ?>
|
||||
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
|
||||
@ -229,12 +229,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -43,7 +43,7 @@ $shortcut_section = "captiveportal";
|
||||
include("head.inc");
|
||||
|
||||
$main_buttons = array(
|
||||
array('href'=>'services_captiveportal_zones_edit.php', 'label'=>gettext("add a new captiveportal instance")),
|
||||
array('href'=>'services_captiveportal_zones_edit.php', 'label'=>gettext("add a new captiveportal instance")),
|
||||
);
|
||||
|
||||
?>
|
||||
@ -52,22 +52,22 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('captiveportal')): ?><p>
|
||||
<?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."));?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_zones.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_captiveportal_zones.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="15%" class="listhdrr"><?=gettext("Zone");?></td>
|
||||
@ -75,7 +75,7 @@ $main_buttons = array(
|
||||
<td width="10%" class="listhdrr"><?=gettext("Users");?></td>
|
||||
<td width="35%" class="listhdrr"><?=gettext("Description");?></td>
|
||||
<td width="10%" class="list">
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($a_cp as $cpzone => $cpitem):
|
||||
@ -109,10 +109,10 @@ $main_buttons = array(
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -91,24 +91,24 @@ include("head.inc");
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<div class="content-box">
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Edit Captiveportal Zones");?></h3>
|
||||
</header>
|
||||
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<form action="services_captiveportal_zones_edit.php" method="post" name="iform" id="iform">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Zone name"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -132,7 +132,7 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -141,4 +141,4 @@ include("head.inc");
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -705,9 +705,9 @@ include("head.inc");
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('staticmaps')): ?><br/>
|
||||
@ -715,9 +715,9 @@ include("head.inc");
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
<?php
|
||||
/* active tabs */
|
||||
$tab_array = array();
|
||||
$tabscounter = 0;
|
||||
@ -744,16 +744,16 @@ include("head.inc");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_dhcp.php" method="post" name="iform" id="iform">
|
||||
|
||||
|
||||
<?php if (isset($config['dhcrelay']['enable'])): ?>
|
||||
<?php echo gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface."); ?>
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php if (!is_numeric($pool) && !($act == "newpool")): ?>
|
||||
@ -893,7 +893,7 @@ include("head.inc");
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@ -1177,7 +1177,7 @@ include("head.inc");
|
||||
//]]>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
@ -1210,7 +1210,7 @@ include("head.inc");
|
||||
</table>
|
||||
<?php if (!is_numeric($pool) && !($act == "newpool")): ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
@ -1265,23 +1265,23 @@ include("head.inc");
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -361,19 +361,19 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcp_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcp_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td>
|
||||
</tr>
|
||||
@ -556,12 +556,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
services_dhcp_relay.php
|
||||
|
||||
Copyright (C) 2003-2004 Justin Ellison <justin@techadvise.com>.
|
||||
Copyright (C) 2010 Ermal Luçi
|
||||
Copyright (C) 2010 Ermal Luçi
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -56,8 +56,8 @@ $iflist = get_configured_interface_with_descr();
|
||||
*/
|
||||
$dhcpd_enabled = false;
|
||||
if (is_array($config['dhcpd'])) {
|
||||
foreach($config['dhcpd'] as $dhcp)
|
||||
if (isset($dhcp['enable']))
|
||||
foreach($config['dhcpd'] as $dhcp)
|
||||
if (isset($dhcp['enable']))
|
||||
$dhcpd_enabled = true;
|
||||
}
|
||||
|
||||
@ -128,29 +128,29 @@ function enable_change(enable_over) {
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcp_relay.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcpd_enabled): ?>
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcp_relay.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcpd_enabled): ?>
|
||||
<p>DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.</p>
|
||||
<? else: ?>
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("DHCP Relay configuration"); ?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<h3><?=gettext("DHCP Relay configuration"); ?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq">Enable</td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -198,16 +198,16 @@ function enable_change(enable_over) {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
enable_change(false);
|
||||
|
||||
@ -238,7 +238,7 @@ if ($_POST) {
|
||||
|
||||
if (is_ipaddrv6($ifcfgip)) {
|
||||
if ((! is_inrange_v6($_POST['range_from'], $subnet_start, $subnet_end)) ||
|
||||
(! is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) {
|
||||
(! is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) {
|
||||
$input_errors[] = gettext("The specified range lies outside of the current subnet.");
|
||||
}
|
||||
}
|
||||
@ -504,9 +504,9 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('staticmaps')): ?><p>
|
||||
@ -514,33 +514,33 @@ include("head.inc");
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<? if ($tabscount > 0) display_top_tabs($tab_array); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_dhcpv6.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcrelay_enabled): ?>
|
||||
|
||||
<? if ($tabscount > 0) display_top_tabs($tab_array); ?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_dhcpv6.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcrelay_enabled): ?>
|
||||
<p>DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.</p>
|
||||
<? elseif ($tabscounter == 0): ?>
|
||||
|
||||
|
||||
<? else: ?>
|
||||
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("DHCPv6 Server"), true, "services_dhcpv6.php?if={$if}");
|
||||
$tab_array[] = array(gettext("Router Advertisements"), false, "services_router_advertisements.php?if={$if}");
|
||||
?>
|
||||
<ul class="nav nav-pills" role="tablist"><? foreach ($tab_array as $tab): ?>
|
||||
<ul class="nav nav-pills" role="tablist"><? foreach ($tab_array as $tab): ?>
|
||||
<li role="presentation" <? if ($tab[1]):?>class="active"<? endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
|
||||
<? endforeach; ?></ul><br />
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCPv6 Server");?></td>
|
||||
@ -573,7 +573,7 @@ include("head.inc");
|
||||
$range_from = gen_subnetv6($ifcfgip, $ifcfgsn);
|
||||
$range_from++;
|
||||
echo $range_from;
|
||||
|
||||
|
||||
?>
|
||||
-
|
||||
<?php
|
||||
@ -583,7 +583,7 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if($is_olsr_enabled): ?>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet Mask");?></td>
|
||||
@ -623,7 +623,7 @@ include("head.inc");
|
||||
<option value="63" <?php if($pconfig['prefixrange_length'] == 63) echo "selected=\"selected\""; ?>>63</option>
|
||||
<option value="64" <?php if($pconfig['prefixrange_length'] == 64) echo "selected=\"selected\""; ?>>64</option>
|
||||
</select> <br />
|
||||
<?php echo gettext("You can define a Prefix range here for DHCP Prefix Delegation. This allows for
|
||||
<?php echo gettext("You can define a Prefix range here for DHCP Prefix Delegation. This allows for
|
||||
assigning networks to subrouters. The start and end of the range must end on boundaries of the prefix delegation size."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -686,9 +686,9 @@ include("head.inc");
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<span class="red"><strong><?=gettext("Note:");?></strong></span> <?=gettext("By default DHCPv6 leases are displayed in UTC time. By checking this
|
||||
<span class="red"><strong><?=gettext("Note:");?></strong></span> <?=gettext("By default DHCPv6 leases are displayed in UTC time. By checking this
|
||||
box DHCPv6 lease time will be displayed in local time and set to time zone selected. This will be used for all DHCPv6 interfaces lease time."); ?>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -826,7 +826,7 @@ include("head.inc");
|
||||
//]]>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -850,9 +850,9 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="static mappings">
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="static mappings">
|
||||
<tr>
|
||||
<td colspan="4" valign="top" class="listtopic"><?=gettext("DHCPv6 Static Mappings for this interface.");?></td>
|
||||
<td> </td>
|
||||
@ -912,12 +912,12 @@ include("head.inc");
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -926,4 +926,4 @@ include("head.inc");
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
<?php
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_dhcpv6_edit.php
|
||||
part of m0n0wall (http://m0n0.ch/wall)
|
||||
|
||||
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
Copyright (C) 2011 Seth Mos <seth.mos@dds.nl>.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -65,7 +65,7 @@ require("guiconfig.inc");
|
||||
$if = $_GET['if'];
|
||||
if ($_POST['if'])
|
||||
$if = $_POST['if'];
|
||||
|
||||
|
||||
if (!$if) {
|
||||
header("Location: services_dhcpv6.php");
|
||||
exit;
|
||||
@ -112,13 +112,13 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "duid");
|
||||
$reqdfieldsn = array(gettext("DUID Identifier"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if ($_POST['hostname']) {
|
||||
preg_match("/\-\$/", $_POST['hostname'], $matches);
|
||||
if($matches)
|
||||
$input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952");
|
||||
$input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952");
|
||||
if (!is_hostname($_POST['hostname'])) {
|
||||
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
|
||||
} else {
|
||||
@ -133,7 +133,7 @@ if ($_POST) {
|
||||
if (empty($_POST['duid'])) {
|
||||
$input_errors[] = gettext("A valid DUID Identifier must be specified.");
|
||||
}
|
||||
|
||||
|
||||
/* check for overlaps */
|
||||
foreach ($a_maps as $mapent) {
|
||||
if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent))
|
||||
@ -144,7 +144,7 @@ if ($_POST) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* make sure it's not within the dynamic subnet */
|
||||
if ($_POST['ipaddrv6']) {
|
||||
/* oh boy, we need to be able to somehow do this at some point. skip */
|
||||
@ -164,7 +164,7 @@ if ($_POST) {
|
||||
else
|
||||
$a_maps[] = $mapent;
|
||||
staticmaps_sort($if);
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
if(isset($config['dhcpdv6'][$if]['enable'])) {
|
||||
@ -194,26 +194,26 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcpv6_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcpv6_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCPv6 Mapping");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("DUID Identifier");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="duid" type="text" class="formfld unknown" id="duid" size="40" value="<?=htmlspecialchars($pconfig['duid']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Enter a DUID Identifier in the following format: ");?><br />
|
||||
@ -222,7 +222,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 address");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="ipaddrv6" type="text" class="formfld unknown" id="ipaddrv6" size="28" value="<?=htmlspecialchars($pconfig['ipaddrv6']);?>" />
|
||||
<br />
|
||||
<?=gettext("If an IPv6 address is entered, the address must be outside of the pool.");?>
|
||||
@ -230,12 +230,12 @@ include("head.inc");
|
||||
<?=gettext("If no IPv6 address is given, one will be dynamically allocated from the pool.");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Hostname");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="hostname" type="text" class="formfld unknown" id="hostname" size="28" value="<?=htmlspecialchars($pconfig['hostname']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php if($netboot_enabled) { ?>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell">Netboot filename</td>
|
||||
@ -250,16 +250,16 @@ include("head.inc");
|
||||
<br /> <span class="vexpl"><?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>, overrides setting on main page.</span></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here ".
|
||||
"for your reference (not parsed).");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
|
||||
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
||||
<?php if (isset($id) && $a_maps[$id]): ?>
|
||||
@ -269,12 +269,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
services_dhcpv6_relay.php
|
||||
|
||||
Copyright (C) 2003-2004 Justin Ellison <justin@techadvise.com>.
|
||||
Copyright (C) 2010 Ermal Luçi
|
||||
Copyright (C) 2010 Seth Mos
|
||||
Copyright (C) 2010 Ermal Luçi
|
||||
Copyright (C) 2010 Seth Mos
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -57,8 +57,8 @@ $iflist = get_configured_interface_with_descr();
|
||||
*/
|
||||
$dhcpd_enabled = false;
|
||||
if (is_array($config['dhcpdv6'])) {
|
||||
foreach($config['dhcpdv6'] as $dhcp)
|
||||
if (isset($dhcp['enable']))
|
||||
foreach($config['dhcpdv6'] as $dhcp)
|
||||
if (isset($dhcp['enable']))
|
||||
$dhcpd_enabled = true;
|
||||
}
|
||||
|
||||
@ -129,29 +129,29 @@ function enable_change(enable_over) {
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcpv6_relay.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcpd_enabled): ?>
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dhcpv6_relay.php" method="post" name="iform" id="iform">
|
||||
|
||||
<?php if ($dhcpd_enabled): ?>
|
||||
<p>DHCPv6 Server is currently enabled. Cannot enable the DHCPv6 Relay service while the DHCPv6 Server is enabled on any interface.</p>
|
||||
<? else: ?>
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("DHCPv6 Relay configuration"); ?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<h3><?=gettext("DHCPv6 Relay configuration"); ?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq">Enable</td>
|
||||
@ -201,10 +201,10 @@ function enable_change(enable_over) {
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -177,9 +177,9 @@ function show_advanced_dns() {
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('hosts')): ?><br/>
|
||||
@ -187,18 +187,18 @@ function show_advanced_dns() {
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("General DNS Forwarder Options");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<h3><?=gettext("General DNS Forwarder Options");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("General DNS Forwarder Options");?></td>
|
||||
</tr>
|
||||
@ -336,8 +336,8 @@ function show_advanced_dns() {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<p><span class="vexpl"><span class="text-danger"><strong><?=gettext("Note:");?><br />
|
||||
</strong></span><?php printf(gettext("If the DNS forwarder is enabled, the DHCP".
|
||||
@ -353,13 +353,13 @@ function show_advanced_dns() {
|
||||
"General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br />
|
||||
</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td><?=gettext("Host Overrides");?></td>
|
||||
</tr>
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td><?=gettext("Host Overrides");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br />
|
||||
<?=gettext("Entries in this section override individual results from the forwarders.");?>
|
||||
@ -368,9 +368,9 @@ function show_advanced_dns() {
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<table class="table table-striped table-sort">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="20%" class="listhdrr"><?=gettext("Host");?></td>
|
||||
@ -436,7 +436,7 @@ function show_advanced_dns() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
@ -447,8 +447,8 @@ function show_advanced_dns() {
|
||||
" authoritative DNS server to be queried for that domain.");?></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped table-sort">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -465,7 +465,7 @@ function show_advanced_dns() {
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
|
||||
<tr>
|
||||
@ -498,4 +498,4 @@ function show_advanced_dns() {
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -130,18 +130,18 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq_domainoverride_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq_domainoverride_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<tr>
|
||||
@ -183,12 +183,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
<?php
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_dnsmasq_edit.php
|
||||
part of m0n0wall (http://m0n0.ch/wall)
|
||||
|
||||
|
||||
Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -56,7 +56,7 @@ require("guiconfig.inc");
|
||||
|
||||
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php');
|
||||
|
||||
if (!is_array($config['dnsmasq']['hosts']))
|
||||
if (!is_array($config['dnsmasq']['hosts']))
|
||||
$config['dnsmasq']['hosts'] = array();
|
||||
|
||||
$a_hosts = &$config['dnsmasq']['hosts'];
|
||||
@ -82,16 +82,16 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "domain ip");
|
||||
$reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if (($_POST['host'] && !is_hostname($_POST['host'])))
|
||||
|
||||
if (($_POST['host'] && !is_hostname($_POST['host'])))
|
||||
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
|
||||
|
||||
if (($_POST['domain'] && !is_domain($_POST['domain'])))
|
||||
if (($_POST['domain'] && !is_domain($_POST['domain'])))
|
||||
$input_errors[] = gettext("A valid domain must be specified.");
|
||||
|
||||
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
|
||||
|
||||
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
|
||||
$input_errors[] = gettext("A valid IP address must be specified.");
|
||||
|
||||
/* collect aliases */
|
||||
@ -156,11 +156,11 @@ if ($_POST) {
|
||||
else
|
||||
$a_hosts[] = $hostent;
|
||||
hosts_sort();
|
||||
|
||||
|
||||
mark_subsystem_dirty('hosts');
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
|
||||
header("Location: services_dnsmasq.php");
|
||||
exit;
|
||||
}
|
||||
@ -195,24 +195,24 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dnsmasq_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit DNS Forwarder entry");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Host");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("Name of the host, without".
|
||||
" domain part"); ?><br />
|
||||
@ -220,21 +220,21 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("Domain of the host"); ?><br />
|
||||
<?=gettext("e.g."); ?> <em><?=gettext("example.com"); ?></em></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("IP address of the host"); ?><br />
|
||||
<?=gettext("e.g."); ?> <em>192.168.100.100</em> <?=gettext("or"); ?> <em>fd00:abcd::1</em></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here".
|
||||
" for your reference (not parsed).");?></span></td>
|
||||
@ -298,7 +298,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" />
|
||||
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
||||
<?php if (isset($id) && $a_hosts[$id]): ?>
|
||||
@ -307,12 +307,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -71,29 +71,29 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("DynDns"), true, "services_dyndns.php");
|
||||
$tab_array[] = array(gettext("RFC 2136"), false, "services_rfc2136.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_dyndns.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_dyndns.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="5%" class="listhdrr"><?=gettext("Interface");?></td>
|
||||
@ -193,7 +193,7 @@ $main_buttons = array(
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="list"><p class="vexpl"><span class="text-danger"><strong>
|
||||
<?=gettext("Note:");?><br />
|
||||
@ -206,12 +206,12 @@ $main_buttons = array(
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
function is_dyndns_username($uname) {
|
||||
if (!is_string($uname))
|
||||
return false;
|
||||
|
||||
|
||||
if (preg_match("/[^a-z0-9\-.@_:]/i", $uname))
|
||||
return false;
|
||||
else
|
||||
@ -85,9 +85,9 @@ if ($_POST) {
|
||||
|
||||
unset($input_errors);
|
||||
$pconfig = $_POST;
|
||||
|
||||
|
||||
if(($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "")
|
||||
$_POST['username'] = "none";
|
||||
$_POST['username'] = "none";
|
||||
|
||||
/* input validation */
|
||||
$reqdfields = array();
|
||||
@ -99,12 +99,12 @@ if ($_POST) {
|
||||
$reqdfieldsn[] = gettext("Hostname");
|
||||
$reqdfields[] = "password";
|
||||
$reqdfieldsn[] = gettext("Password");
|
||||
$reqdfields[] = "username";
|
||||
$reqdfieldsn[] = gettext("Username");
|
||||
$reqdfields[] = "username";
|
||||
$reqdfieldsn[] = gettext("Username");
|
||||
}else{
|
||||
$reqdfields[] = "updateurl";
|
||||
$reqdfieldsn[] = gettext("Update URL");
|
||||
}
|
||||
}
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
@ -120,10 +120,10 @@ if ($_POST) {
|
||||
|
||||
unset($host_to_check);
|
||||
}
|
||||
if (($_POST['mx'] && !is_domain($_POST['mx'])))
|
||||
if (($_POST['mx'] && !is_domain($_POST['mx'])))
|
||||
$input_errors[] = gettext("The MX contains invalid characters.");
|
||||
if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == "")))
|
||||
$input_errors[] = gettext("The username contains invalid characters.");
|
||||
if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == "")))
|
||||
$input_errors[] = gettext("The username contains invalid characters.");
|
||||
|
||||
if (!$input_errors) {
|
||||
$dyndns = array();
|
||||
@ -150,14 +150,14 @@ if ($_POST) {
|
||||
($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
|
||||
$dyndns['descr'] = $_POST['descr'];
|
||||
$dyndns['force'] = isset($_POST['force']);
|
||||
|
||||
|
||||
if($dyndns['username'] == "none")
|
||||
$dyndns['username'] = "";
|
||||
|
||||
if (isset($id) && $a_dyndns[$id])
|
||||
$a_dyndns[$id] = $dyndns;
|
||||
else {
|
||||
$a_dyndns[] = $dyndns;
|
||||
$a_dyndns[] = $dyndns;
|
||||
$id = count($a_dyndns) - 1;
|
||||
}
|
||||
|
||||
@ -184,10 +184,10 @@ include("head.inc");
|
||||
|
||||
<body>
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function _onTypeChange(type){
|
||||
function _onTypeChange(type){
|
||||
switch(type) {
|
||||
case "custom":
|
||||
case "custom-v6":
|
||||
@ -226,24 +226,24 @@ include("head.inc");
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="optsect_t">
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
|
||||
@ -272,12 +272,12 @@ include("head.inc");
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="interface" class="formselect" id="interface">
|
||||
<?php
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
foreach ($iflist as $if => $ifdesc) {
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
foreach ($iflist as $if => $ifdesc) {
|
||||
echo "<option value=\"{$if}\"";
|
||||
if ($pconfig['interface'] == $if)
|
||||
echo "selected=\"selected\"";
|
||||
@ -285,7 +285,7 @@ include("head.inc");
|
||||
}
|
||||
unset($iflist);
|
||||
$grouplist = return_gateway_groups_array();
|
||||
foreach ($grouplist as $name => $group) {
|
||||
foreach ($grouplist as $name => $group) {
|
||||
echo "<option value=\"{$name}\"";
|
||||
if ($pconfig['interface'] == $name)
|
||||
echo "selected=\"selected\"";
|
||||
@ -295,13 +295,13 @@ include("head.inc");
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr id="_requestiftr">
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="requestif" class="formselect" id="requestif">
|
||||
<?php
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
foreach ($iflist as $if => $ifdesc) {
|
||||
echo "<option value=\"{$if}\"";
|
||||
if ($pconfig['requestif'] == $if)
|
||||
@ -384,7 +384,7 @@ include("head.inc");
|
||||
<br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr id="r53_zoneid" style="display:none">
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -416,7 +416,7 @@ include("head.inc");
|
||||
<?= gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr id="r53_ttl" style="display:none">
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -424,8 +424,8 @@ include("head.inc");
|
||||
<br /><?= gettext("Choose TTL for your dns record.");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -437,7 +437,7 @@ include("head.inc");
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
|
||||
<a href="services_dyndns.php" class="btn btn-default"><?=gettext("Cancel");?></a>
|
||||
|
||||
|
||||
<?php if (isset($id) && $a_dyndns[$id]): ?>
|
||||
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
|
||||
<input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" />
|
||||
@ -452,17 +452,17 @@ include("head.inc");
|
||||
by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
_onTypeChange("<?php echo $pconfig['type']; ?>");
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_igmpproxy.php
|
||||
|
||||
|
||||
Copyright (C) 2009 Ermal Luçi
|
||||
Copyright (C) 2004 Scott Ullrich
|
||||
All rights reserved.
|
||||
@ -92,28 +92,28 @@ $main_buttons = array(
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('igmpproxy')): ?><br/>
|
||||
<?php print_info_box_np(gettext("The IGMP entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_igmpproxy.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_igmpproxy.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="15%" class="listhdrr"><?=gettext("Name");?></td>
|
||||
<td width="10%" class="listhdrr"><?=gettext("Type");?></td>
|
||||
<td width="25%" class="listhdrr"><?=gettext("Values");?></td>
|
||||
<td width="20%" class="listhdr"><?=gettext("Description");?></td>
|
||||
<td width="10%" class="list">
|
||||
|
||||
|
||||
</tr>
|
||||
<?php $i = 0; foreach ($a_igmpproxy as $igmpentry): ?>
|
||||
<tr>
|
||||
@ -143,7 +143,7 @@ $main_buttons = array(
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="5" width="78%">
|
||||
<br />
|
||||
@ -157,12 +157,12 @@ $main_buttons = array(
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -110,7 +110,7 @@ if ($_POST) {
|
||||
|
||||
mark_subsystem_dirty('igmpproxy');
|
||||
header("Location: services_igmpproxy.php");
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
//we received input errors, copy data to prevent retype
|
||||
else
|
||||
@ -127,48 +127,48 @@ include("head.inc");
|
||||
|
||||
<body>
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js">
|
||||
</script>
|
||||
<script type="text/javascript" src="/javascript/row_helper.js">
|
||||
</script>
|
||||
|
||||
|
||||
<input type="hidden" name="address_type" value="textbox" class="formfld unknown" />
|
||||
<input type="hidden" name="address_subnet_type" value="select" />
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
rowname[0] = "address";
|
||||
rowtype[0] = "textbox,ipv4v6";
|
||||
rowsize[0] = "30";
|
||||
|
||||
|
||||
rowname[1] = "address_subnet";
|
||||
rowtype[1] = "select,ipv4v6";
|
||||
rowsize[1] = "1";
|
||||
|
||||
|
||||
rowname[2] = "detail";
|
||||
rowtype[2] = "textbox";
|
||||
rowsize[2] = "50";
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<div id="inputerrors"></div>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_igmpproxy_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_igmpproxy_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("IGMP Proxy Edit");?></td>
|
||||
</tr>
|
||||
@ -181,7 +181,7 @@ include("head.inc");
|
||||
if ($ifnam == $pconfig['ifname'])
|
||||
echo " selected=\"selected\"";
|
||||
echo ">{$ifdescr}</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
@ -238,7 +238,7 @@ include("head.inc");
|
||||
<td><div id="onecolumn"><?=gettext("Network");?></div></td>
|
||||
<td><div id="twocolumn"><?=gettext("CIDR");?></div></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php
|
||||
$counter = 0;
|
||||
$address = $pconfig['address'];
|
||||
@ -270,13 +270,13 @@ include("head.inc");
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" alt="delete" /></a>
|
||||
<a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" alt="delete" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$counter++;
|
||||
|
||||
} // end foreach
|
||||
$counter++;
|
||||
|
||||
} // end foreach
|
||||
} // end if
|
||||
?>
|
||||
</tbody>
|
||||
@ -295,14 +295,14 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
field_counter_js = 2;
|
||||
@ -312,4 +312,4 @@ include("head.inc");
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -226,30 +226,30 @@ include("head.inc");
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("NTP"), true, "services_ntpd.php");
|
||||
$tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php");
|
||||
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_ntpd.php" method="post" name="iform" id="iform" enctype="multipart/form-data" accept-charset="utf-8">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_ntpd.php" method="post" name="iform" id="iform" enctype="multipart/form-data" accept-charset="utf-8">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("NTP Server Configuration"); ?></td>
|
||||
</tr>
|
||||
@ -267,7 +267,7 @@ include("head.inc");
|
||||
$size = (count($interfaces) < 10) ? count($interfaces) : 10;
|
||||
?>
|
||||
<select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?php echo $size; ?>">
|
||||
<?php
|
||||
<?php
|
||||
foreach ($interfaces as $iface => $ifacename) {
|
||||
if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface))
|
||||
continue;
|
||||
@ -297,7 +297,7 @@ include("head.inc");
|
||||
echo " style=\"display:none\"";
|
||||
}
|
||||
echo ">\n";
|
||||
|
||||
|
||||
echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeservers[$i]}\" type=\"text\" /> ";
|
||||
echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" onclick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\"";
|
||||
if (substr_count($config['ntpd']['prefer'], $timeservers[$i])) echo " checked=\"checked\"";
|
||||
@ -418,11 +418,11 @@ include("head.inc");
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -236,7 +236,7 @@ U-Blox = #U-Blox 5, 6 and probably 7
|
||||
$PUBX,40,THS,0,0,0,0,0,0*54 #turn off THS all ports (U-Blox 6)
|
||||
$PUBX,41,1,0007,0003,4800,0*13 # set port 1 to 4800 baud
|
||||
|
||||
SureGPS = #Sure Electronics SKG16B
|
||||
SureGPS = #Sure Electronics SKG16B
|
||||
$PMTK225,0*2B
|
||||
$PMTK314,1,1,0,1,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0*2D
|
||||
$PMTK301,2*2E
|
||||
@ -358,28 +358,28 @@ SureGPS = #Sure Electronics SKG16B
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("NTP"), false, "services_ntpd.php");
|
||||
$tab_array[] = array(gettext("Serial GPS"), true, "services_ntpd_gps.php");
|
||||
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_ntpd_gps.php" method="post" name="iform" id="iform" accept-charset="utf-8">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_ntpd_gps.php" method="post" name="iform" id="iform" accept-charset="utf-8">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("NTP Serial GPS Configuration"); ?></td>
|
||||
</tr>
|
||||
@ -412,7 +412,7 @@ SureGPS = #Sure Electronics SKG16B
|
||||
<strong><?php echo gettext("Note: ");?></strong><?php echo gettext("The perdefined configurations assume your GPS has already been set to NMEA mode."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php
|
||||
/* Probing would be nice, but much more complex. Would need to listen to each port for 1s+ and watch for strings. */
|
||||
$serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
|
||||
@ -584,19 +584,19 @@ SureGPS = #Sure Electronics SKG16B
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
set_gps_default(this.form);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -87,7 +87,7 @@ if ($_POST) {
|
||||
$config['ntpd']['pps']['refid'] = $_POST['ppsrefid'];
|
||||
elseif (isset($config['ntpd']['pps']['refid']))
|
||||
unset($config['ntpd']['pps']['refid']);
|
||||
|
||||
|
||||
write_config("Updated NTP PPS Settings");
|
||||
|
||||
$retval = 0;
|
||||
@ -106,37 +106,37 @@ include("head.inc");
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("NTP"), false, "services_ntpd.php");
|
||||
$tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php");
|
||||
$tab_array[] = array(gettext("PPS"), true, "services_ntpd_pps.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_ntpd_pps.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form action="services_ntpd_pps.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("NTP PPS Configuration"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq">
|
||||
</td>
|
||||
<td width="78%" class="vtable"><?php echo gettext("Devices with a Pulse Per Second output such as radios that receive a time signal from DCF77 (DE), JJY (JP), MSF (GB) or WWVB (US) may be used as a PPS reference for NTP.");?>
|
||||
<?php echo gettext("A serial GPS may also be used, but the serial GPS driver would usually be the better option.");?>
|
||||
<td width="78%" class="vtable"><?php echo gettext("Devices with a Pulse Per Second output such as radios that receive a time signal from DCF77 (DE), JJY (JP), MSF (GB) or WWVB (US) may be used as a PPS reference for NTP.");?>
|
||||
<?php echo gettext("A serial GPS may also be used, but the serial GPS driver would usually be the better option.");?>
|
||||
<?php echo gettext("A PPS signal only provides a reference to the change of a second, so at least one other source to number the seconds is required.");?>
|
||||
<br />
|
||||
<br /><strong><?php echo gettext("Note");?>:</strong> <?php echo gettext("At least 3 additional time sources should be configured under"); ?> <a href="services_ntpd.php"><?php echo gettext("Services > NTP"); ?></a> <?php echo gettext("to reliably supply the time of each PPS pulse."); ?>
|
||||
@ -223,12 +223,12 @@ include("head.inc");
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -64,28 +64,28 @@ $main_buttons = array(
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php");
|
||||
$tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_rfc2136.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_rfc2136.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="5%" class="listhdrr"><?=gettext("If");?></td>
|
||||
@ -178,16 +178,16 @@ $main_buttons = array(
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -74,9 +74,9 @@ if ($_POST) {
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if (($_POST['host'] && !is_domain($_POST['host'])))
|
||||
if (($_POST['host'] && !is_domain($_POST['host'])))
|
||||
$input_errors[] = gettext("The DNS update host name contains invalid characters.");
|
||||
if (($_POST['ttl'] && !is_numericint($_POST['ttl'])))
|
||||
if (($_POST['ttl'] && !is_numericint($_POST['ttl'])))
|
||||
$input_errors[] = gettext("The DNS update TTL must be an integer.");
|
||||
if (($_POST['keyname'] && !is_domain($_POST['keyname'])))
|
||||
$input_errors[] = gettext("The DNS update key name contains invalid characters.");
|
||||
@ -124,24 +124,24 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_rfc2136_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_rfc2136_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="optsect_t">
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
|
||||
<tr><td class="optsect_s"><strong><?=gettext("RFC 2136 client");?></strong></td></tr>
|
||||
<tr><td class="optsect_s"><strong><?=gettext("RFC 2136 client");?></strong></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@ -152,16 +152,16 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="interface" class="formselect" id="interface">
|
||||
<?php $iflist = get_configured_interface_with_descr();
|
||||
foreach ($iflist as $if => $ifdesc):?>
|
||||
foreach ($iflist as $if => $ifdesc):?>
|
||||
<option value="<?=$if;?>" <?php if ($pconfig['interface'] == $if) echo "selected=\"selected\"";?>><?=$ifdesc;?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -241,12 +241,12 @@ include("head.inc");
|
||||
"by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">', '</a>');?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
<?php
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_snmp.php
|
||||
part of m0n0wall (http://m0n0.ch/wall)
|
||||
|
||||
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -89,7 +89,7 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
if ($_POST['enable']) {
|
||||
if (strstr($_POST['syslocation'],"#")) $input_errors[] = gettext("Invalid character '#' in system location");
|
||||
if (strstr($_POST['syscontact'],"#")) $input_errors[] = gettext("Invalid character '#' in system contact");
|
||||
if (strstr($_POST['syscontact'],"#")) $input_errors[] = gettext("Invalid character '#' in system contact");
|
||||
if (strstr($_POST['rocommunity'],"#")) $input_errors[] = gettext("Invalid character '#' in read community string");
|
||||
|
||||
$reqdfields = explode(" ", "rocommunity");
|
||||
@ -99,8 +99,8 @@ if ($_POST) {
|
||||
$reqdfields = explode(" ", "pollport");
|
||||
$reqdfieldsn = array(gettext("Polling Port"));
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($_POST['trapenable']) {
|
||||
@ -128,12 +128,12 @@ if ($_POST) {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
if (!$input_errors) {
|
||||
$config['snmpd']['enable'] = $_POST['enable'] ? true : false;
|
||||
$config['snmpd']['pollport'] = $_POST['pollport'];
|
||||
$config['snmpd']['syslocation'] = $_POST['syslocation'];
|
||||
$config['snmpd']['syslocation'] = $_POST['syslocation'];
|
||||
$config['snmpd']['syscontact'] = $_POST['syscontact'];
|
||||
$config['snmpd']['rocommunity'] = $_POST['rocommunity'];
|
||||
/* disabled until some docs show up on what this does.
|
||||
@ -144,7 +144,7 @@ if ($_POST) {
|
||||
$config['snmpd']['trapserver'] = $_POST['trapserver'];
|
||||
$config['snmpd']['trapserverport'] = $_POST['trapserverport'];
|
||||
$config['snmpd']['trapstring'] = $_POST['trapstring'];
|
||||
|
||||
|
||||
$config['snmpd']['modules']['mibii'] = $_POST['mibii'] ? true : false;
|
||||
$config['snmpd']['modules']['netgraph'] = $_POST['netgraph'] ? true : false;
|
||||
$config['snmpd']['modules']['pf'] = $_POST['pf'] ? true : false;
|
||||
@ -153,9 +153,9 @@ if ($_POST) {
|
||||
$config['snmpd']['modules']['ucd'] = $_POST['ucd'] ? true : false;
|
||||
$config['snmpd']['modules']['regex'] = $_POST['regex'] ? true : false;
|
||||
$config['snmpd']['bindip'] = $_POST['bindip'];
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
|
||||
$retval = 0;
|
||||
$retval = services_snmpd_configure();
|
||||
$savemsg = get_std_save_message($retval);
|
||||
@ -252,7 +252,7 @@ function enable_change(whichone) {
|
||||
document.iform.syslocation.disabled = true;
|
||||
document.iform.syscontact.disabled = true;
|
||||
document.iform.rocommunity.disabled = true;
|
||||
/*
|
||||
/*
|
||||
document.iform.rwenable.disabled = true;
|
||||
document.iform.rwcommunity.disabled = true;
|
||||
*/
|
||||
@ -280,37 +280,37 @@ function enable_change(whichone) {
|
||||
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
|
||||
<form action="services_snmp.php" method="post" name="iform" id="iform">
|
||||
|
||||
<form action="services_snmp.php" method="post" name="iform" id="iform">
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("SNMP Daemon");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<h3><?=gettext("SNMP Daemon");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -318,39 +318,39 @@ function enable_change(whichone) {
|
||||
<br /><?=gettext("Enter the port to accept polling events on (default 161)");?><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>" />
|
||||
<br /><?=gettext("The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.");?><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
/* disabled until some docs show up on what this does.
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vtable"> </td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="rwenable" id="rwenable" type="checkbox" value="yes" <?php if ($pconfig['rwenable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" />
|
||||
<input name="rwenable" id="rwenable" type="checkbox" value="yes" <?php if ($pconfig['rwenable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" />
|
||||
<strong>Enable Write Community String</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq">Write community string</td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -358,36 +358,36 @@ function enable_change(whichone) {
|
||||
<br />Please use something other then "private" here<br />
|
||||
</td>
|
||||
</tr>
|
||||
*/
|
||||
*/
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("SNMP Traps");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("SNMP Traps");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" /> <strong><?=gettext("Enable");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -395,7 +395,7 @@ function enable_change(whichone) {
|
||||
<br /><?=gettext("Enter trap server name");?><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -403,7 +403,7 @@ function enable_change(whichone) {
|
||||
<br /><?=gettext("Enter the port to send the traps to (default 162)");?><br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -411,26 +411,26 @@ function enable_change(whichone) {
|
||||
<br /><?=gettext("Trap string");?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Modules");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Modules");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -448,26 +448,26 @@ function enable_change(whichone) {
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Interface Binding");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Interface Binding");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Bind Interface"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -486,25 +486,25 @@ function enable_change(whichone) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
enable_change(this);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -191,31 +191,31 @@ function show_advanced_dns() {
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('unbound')): ?><br/>
|
||||
<?php print_info_box_np(gettext("The configuration for the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<form action="services_unbound.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("General settings"), true, "services_unbound.php");
|
||||
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
|
||||
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -356,8 +356,8 @@ function show_advanced_dns() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="container-fluid">
|
||||
<p><span class="vexpl"><span class="text-danger"><strong><?=gettext("Note:");?><br />
|
||||
</strong></span><?php printf(gettext("If the DNS Resolver is enabled, the DHCP".
|
||||
" service (if enabled) will automatically serve the LAN IP".
|
||||
@ -369,22 +369,22 @@ function show_advanced_dns() {
|
||||
" is checked."),'<a href="system.php">','</a>');?><br />
|
||||
</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Host Overrides");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
<?=gettext("Entries in this section override individual results from the forwarders.");?>
|
||||
<?=gettext("Use these for changing DNS results or for adding custom DNS records.");?>
|
||||
</div>
|
||||
<h3><?=gettext("Host Overrides");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
<?=gettext("Entries in this section override individual results from the forwarders.");?>
|
||||
<?=gettext("Use these for changing DNS results or for adding custom DNS records.");?>
|
||||
</div>
|
||||
<div class="content-box-main col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
@ -435,22 +435,22 @@ function show_advanced_dns() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Domain Overrides");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
<p><?=gettext("Entries in this area override an entire domain by specifying an".
|
||||
<h3><?=gettext("Domain Overrides");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
<p><?=gettext("Entries in this area override an entire domain by specifying an".
|
||||
" authoritative DNS server to be queried for that domain.");?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort"><thead>
|
||||
@ -468,7 +468,7 @@ function show_advanced_dns() {
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
|
||||
<tr>
|
||||
@ -499,7 +499,7 @@ function show_advanced_dns() {
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -510,4 +510,4 @@ function show_advanced_dns() {
|
||||
enable_change(false);
|
||||
//]]>
|
||||
</script>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -164,46 +164,46 @@ include("head.inc");
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php
|
||||
if (!$savemsg)
|
||||
$savemsg = "";
|
||||
|
||||
|
||||
if ($input_errors)
|
||||
print_input_errors($input_errors);
|
||||
|
||||
|
||||
if ($savemsg)
|
||||
print_info_box($savemsg);
|
||||
|
||||
|
||||
if (is_subsystem_dirty("unbound"))
|
||||
print_info_box_np(gettext("The settings for the DNS Resolver have changed. You must apply the configuration to take affect."));
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
|
||||
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
|
||||
$tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_unbound_acls.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_unbound_acls.php" method="post" name="iform" id="iform">
|
||||
<?php if($act=="new" || $act=="edit"): ?>
|
||||
<input name="aclid" type="hidden" value="<?=$id;?>" />
|
||||
<input name="act" type="hidden" value="<?=$act;?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=ucwords(sprintf(gettext("%s Access List"),$act));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -291,10 +291,10 @@ include("head.inc");
|
||||
loaded = <?php echo $counter; ?>;
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -315,13 +315,13 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped sortable">
|
||||
<table class="table table-striped sortable">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
@ -384,13 +384,13 @@ include("head.inc");
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -135,33 +135,33 @@ include_once("head.inc");
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
<?php if (is_subsystem_dirty('unbound')): ?><br/>
|
||||
<?php print_info_box_np(gettext("The configuration of the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("General settings"), false, "services_unbound.php");
|
||||
$tab_array[] = array(gettext("Advanced settings"), true, "services_unbound_advanced.php");
|
||||
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
|
||||
display_top_tabs($tab_array, true);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<form action="services_unbound_advanced.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -434,11 +434,11 @@ include_once("head.inc");
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
part of the pfSense project (https://www.pfsense.org)
|
||||
Copyright (C) 2014 Warren Baker (warren@decoy.co.za)
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Copyright (C) 2003-2005 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
@ -125,20 +125,20 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_unbound_domainoverride_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_unbound_domainoverride_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -180,12 +180,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
<?php
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_unbound_edit_host.php
|
||||
part of the pfSense project (https://www.pfsense.org)
|
||||
Copyright (C) 2014 Warren Baker (warren@decoy.co.za)
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -58,7 +58,7 @@ function hosts_sort() {
|
||||
|
||||
require("guiconfig.inc");
|
||||
|
||||
if (!is_array($config['unbound']['hosts']))
|
||||
if (!is_array($config['unbound']['hosts']))
|
||||
$config['unbound']['hosts'] = array();
|
||||
|
||||
$a_hosts = &$config['unbound']['hosts'];
|
||||
@ -84,16 +84,16 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "domain ip");
|
||||
$reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if (($_POST['host'] && !is_hostname($_POST['host'])))
|
||||
|
||||
if (($_POST['host'] && !is_hostname($_POST['host'])))
|
||||
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
|
||||
|
||||
if (($_POST['domain'] && !is_domain($_POST['domain'])))
|
||||
if (($_POST['domain'] && !is_domain($_POST['domain'])))
|
||||
$input_errors[] = gettext("A valid domain must be specified.");
|
||||
|
||||
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
|
||||
|
||||
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
|
||||
$input_errors[] = gettext("A valid IP address must be specified.");
|
||||
|
||||
/* collect aliases */
|
||||
@ -156,11 +156,11 @@ if ($_POST) {
|
||||
else
|
||||
$a_hosts[] = $hostent;
|
||||
hosts_sort();
|
||||
|
||||
|
||||
mark_subsystem_dirty('unbound');
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
|
||||
header("Location: services_unbound.php");
|
||||
exit;
|
||||
}
|
||||
@ -175,7 +175,7 @@ include("head.inc");
|
||||
|
||||
<body onload="<?= $jsevents["body"]["onload"] ?>">
|
||||
<script type="text/javascript" src="/javascript/row_helper.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
rowname[0] = "aliashost";
|
||||
@ -195,19 +195,19 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_unbound_host_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form action="services_unbound_host_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit DNS Resolver entry");?></td>
|
||||
</tr>
|
||||
@ -310,12 +310,12 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
<?php
|
||||
require_once('vpn_pppoe.php');
|
||||
require_once('vpn_pppoe.php');
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
pfSense_BUILDER_BINARIES: /usr/local/bin/wol
|
||||
pfSense_BUILDER_BINARIES: /usr/local/bin/wol
|
||||
pfSense_MODULE: wol
|
||||
*/
|
||||
|
||||
@ -70,13 +70,13 @@ if ($_POST || $_GET['mac']) {
|
||||
unset($input_errors);
|
||||
|
||||
if ($_GET['mac']) {
|
||||
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
|
||||
$_GET['mac'] = strtolower(str_replace("-", ":", $_GET['mac']));
|
||||
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
|
||||
$_GET['mac'] = strtolower(str_replace("-", ":", $_GET['mac']));
|
||||
$mac = $_GET['mac'];
|
||||
$if = $_GET['if'];
|
||||
} else {
|
||||
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
|
||||
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
|
||||
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
|
||||
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
|
||||
$mac = $_POST['mac'];
|
||||
$if = $_POST['interface'];
|
||||
}
|
||||
@ -123,33 +123,33 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Wake on LAN");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
|
||||
<form action="services_wol.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<h3><?=gettext("Wake on LAN");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main ">
|
||||
|
||||
<form action="services_wol.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="interface" class="formselect">
|
||||
<?php
|
||||
<select name="interface" class="formselect">
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr();
|
||||
foreach ($interfaces as $iface => $ifacename): ?>
|
||||
<option value="<?=$iface;?>" <?php if (!link_interface_to_bridge($iface) && $iface == $if) echo "selected=\"selected\""; ?>>
|
||||
foreach ($interfaces as $iface => $ifacename): ?>
|
||||
<option value="<?=$iface;?>" <?php if (!link_interface_to_bridge($iface) && $iface == $if) echo "selected=\"selected\""; ?>>
|
||||
<?=htmlspecialchars($ifacename);?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
@ -169,13 +169,13 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<p><?=gettext("Wake all clients at once: ");?><a href="services_wol.php?wakeall=true" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-time"></span></a> <?=gettext("Or Click the MAC address to wake up an individual device:");?></p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<p><?=gettext("Wake all clients at once: ");?><a href="services_wol.php?wakeall=true" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-time"></span></a> <?=gettext("Or Click the MAC address to wake up an individual device:");?></p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
|
||||
@ -211,23 +211,23 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<p class="vexpl">
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<p class="vexpl">
|
||||
<span class="text-danger">
|
||||
<strong>
|
||||
<?=gettext("Note:");?><br />
|
||||
</strong>
|
||||
</strong>
|
||||
</span><?=gettext("This service can be used to wake up (power on) computers by sending special"); ?> "<?=gettext("Magic Packets"); ?>". <?=gettext("The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings). ");?>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
<?php
|
||||
<?php
|
||||
/* $Id$ */
|
||||
/*
|
||||
services_wol_edit.php
|
||||
part of m0n0wall (http://m0n0.ch/wall)
|
||||
|
||||
|
||||
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
@ -83,12 +83,12 @@ if ($_POST) {
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "interface mac");
|
||||
$reqdfieldsn = array(gettext("Interface"),gettext("MAC address"));
|
||||
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
|
||||
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
|
||||
|
||||
|
||||
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
|
||||
$input_errors[] = gettext("A valid MAC address must be specified.");
|
||||
}
|
||||
@ -104,9 +104,9 @@ if ($_POST) {
|
||||
else
|
||||
$a_wol[] = $wolent;
|
||||
wol_sort();
|
||||
|
||||
|
||||
write_config();
|
||||
|
||||
|
||||
header("Location: services_wol.php");
|
||||
exit;
|
||||
}
|
||||
@ -123,33 +123,33 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
||||
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Edit WOL entry");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
|
||||
<form action="services_wol_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<h3><?=gettext("Edit WOL entry");?></h3>
|
||||
</header>
|
||||
|
||||
<div class="content-box-main col-xs-12">
|
||||
|
||||
<form action="services_wol_edit.php" method="post" name="iform" id="iform">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name="interface" class="formfld">
|
||||
<?php
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr();
|
||||
foreach ($interfaces as $iface => $ifacename): ?>
|
||||
<option value="<?=$iface;?>" <?php if (!link_interface_to_bridge($iface) && $iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
|
||||
<option value="<?=$iface;?>" <?php if (!link_interface_to_bridge($iface) && $iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
|
||||
<?=htmlspecialchars($ifacename);?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
@ -158,22 +158,22 @@ include("head.inc");
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>" />
|
||||
<br />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
|
||||
"xx:xx:xx:xx:xx:xx");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here".
|
||||
" for your reference (not parsed).");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" />
|
||||
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
||||
<?php if (isset($id) && $a_wol[$id]): ?>
|
||||
@ -182,13 +182,13 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user