summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php40
1 files changed, 39 insertions, 1 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 77a20e5..3895268 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -151,6 +151,7 @@ if (is_array($config['dhcpd'][$if])){
$pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip'];
$pconfig['netmask'] = $config['dhcpd'][$if]['netmask'];
$pconfig['numberoptions'] = $config['dhcpd'][$if]['numberoptions'];
+ $pconfig['dhcpleaseinlocaltime'] = $config['dhcpd'][$if]['dhcpleaseinlocaltime'];
if (!is_array($config['dhcpd'][$if]['staticmap']))
$config['dhcpd'][$if]['staticmap'] = array();
$a_maps = &$config['dhcpd'][$if]['staticmap'];
@@ -231,6 +232,16 @@ if ($_POST) {
$input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
+ if ($_POST['domainsearchlist']) {
+ $domain_array=preg_split("/[ ;]+/",$_POST['domainsearchlist']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid domain search list must be specified.");
+ break;
+ }
+ }
+ }
+
if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
@@ -370,6 +381,7 @@ if ($_POST) {
$config['dhcpd'][$if]['nextserver'] = $_POST['nextserver'];
$config['dhcpd'][$if]['filename'] = $_POST['filename'];
$config['dhcpd'][$if]['rootpath'] = $_POST['rootpath'];
+ $config['dhcpd'][$if]['dhcpleaseinlocaltime'] = $_POST['dhcpleaseinlocaltime'];
// Handle the custom options rowhelper
if(isset($config['dhcpd'][$if]['numberoptions']['item']))
@@ -468,6 +480,7 @@ include("head.inc");
document.iform.domain.disabled = endis;
document.iform.domainsearchlist.disabled = endis;
document.iform.staticarp.disabled = endis;
+ document.iform.dhcpleaseinlocaltime.disabled = endis;
document.iform.ddnsdomain.disabled = endis;
document.iform.ddnsupdate.disabled = endis;
document.iform.ntp1.disabled = endis;
@@ -669,7 +682,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- <?=gettext("The DHCP server can optionally provide a domain search list.");?>
+ <?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as seperator ");?>
</td>
</tr>
<tr>
@@ -719,6 +732,31 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td>
+ <td width="78%" class="vtable">
+ <table>
+ <tr>
+ <td>
+ <input name="dhcpleaseinlocaltime" type="checkbox" id="dhcpleaseinlocaltime" value="yes" <?php if ($pconfig['dhcpleaseinlocaltime']) echo "checked"; ?>>
+ </td>
+ <td>
+ <strong>
+ <?=gettext("Change DHCP display lease time from UTC to local time."); ?>
+ </strong>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td>
+ <span class="red"><strong><?=gettext("Note:");?></strong></span> <?=gettext("By default DHCP leases are displayed in UTC time. By checking this
+ box DHCP lease time will be displayed in local time and set to time zone selected. This will be used for all DHCP interfaces lease time."); ?>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
OpenPOWER on IntegriCloud