Commit 0686ee0a authored by Fabian Franz's avatar Fabian Franz

fix #599; closes #599

parent bcc6d757
...@@ -193,7 +193,7 @@ include("head.inc"); ...@@ -193,7 +193,7 @@ include("head.inc");
//then revise the add another server line //then revise the add another server line
if (add < 9) { if (add < 9) {
var next = add + 1; var next = add + 1;
var newdiv = '<a class="btn btn-default btn-xs" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(' + next + ')" alt="add" ><span class="glyphicon glyphicon-plus"></span></a>\n'; var newdiv = '<a class="btn btn-default btn-xs" title="<?= gettext("Add another Time server");?>" onclick="NewTimeServer(' + next + ')" alt="add" ><span class="glyphicon glyphicon-plus"></span></a>\n';
document.getElementById('addserver').innerHTML=newdiv; document.getElementById('addserver').innerHTML=newdiv;
}else{ }else{
document.getElementById('addserver').style.display = 'none'; document.getElementById('addserver').style.display = 'none';
...@@ -238,7 +238,7 @@ include("head.inc"); ...@@ -238,7 +238,7 @@ include("head.inc");
$interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
$size = (count($interfaces) < 10) ? count($interfaces) : 10; $size = (count($interfaces) < 10) ? count($interfaces) : 10;
?> ?>
<select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?php echo $size; ?>"> <select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?= $size; ?>">
<?php <?php
foreach ($interfaces as $iface => $ifacename) { foreach ($interfaces as $iface => $ifacename) {
if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface))
...@@ -250,10 +250,10 @@ include("head.inc"); ...@@ -250,10 +250,10 @@ include("head.inc");
} ?> } ?>
</select> </select>
<br /> <br />
<br /><?php echo gettext("Interfaces without an IP address will not be shown."); ?> <br /><?= gettext("Interfaces without an IP address will not be shown."); ?>
<br /> <br />
<br /><?php echo gettext("Selecting no interfaces will listen on all interfaces with a wildcard."); ?> <br /><?= gettext("Selecting no interfaces will listen on all interfaces with a wildcard."); ?>
<br /><?php echo gettext("Selecting all interfaces will explicitly listen on only the interfaces/IPs specified."); ?> <br /><?= gettext("Selecting all interfaces will explicitly listen on only the interfaces/IPs specified."); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -277,47 +277,47 @@ include("head.inc"); ...@@ -277,47 +277,47 @@ include("head.inc");
echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeserverVal}\" type=\"text\" />&emsp;"; echo "<input name=\"server{$i}\" class=\"formfld unknown\" id=\"server{$i}\" size=\"30\" value=\"{$timeserverVal}\" type=\"text\" />&emsp;";
echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" onclick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\""; echo "\n<input name=\"servprefer{$i}\" class=\"formcheckbox\" id=\"servprefer{$i}\" onclick=\"CheckOffOther('servprefer{$i}', 'servselect{$i}')\" type=\"checkbox\"";
if (!empty($config['ntpd']['prefer']) && !empty($timeserverVal) && substr_count($config['ntpd']['prefer'], $timeserverVal)) echo " checked=\"checked\""; if (!empty($config['ntpd']['prefer']) && !empty($timeserverVal) && substr_count($config['ntpd']['prefer'], $timeserverVal)) echo " checked=\"checked\"";
echo " />&nbsp;prefer&emsp;"; echo " />&nbsp;" . gettext('prefer') . "&emsp;";
echo "\n<input name=\"servselect{$i}\" class=\"formcheckbox\" id=\"servselect{$i}\" onclick=\"CheckOffOther('servselect{$i}', 'servprefer{$i}')\" type=\"checkbox\""; echo "\n<input name=\"servselect{$i}\" class=\"formcheckbox\" id=\"servselect{$i}\" onclick=\"CheckOffOther('servselect{$i}', 'servprefer{$i}')\" type=\"checkbox\"";
if (!empty($config['ntpd']['noselect']) && !empty($timeserverVal) && substr_count($config['ntpd']['noselect'], $timeserverVal)) echo " checked=\"checked\""; if (!empty($config['ntpd']['noselect']) && !empty($timeserverVal) && substr_count($config['ntpd']['noselect'], $timeserverVal)) echo " checked=\"checked\"";
echo " />&nbsp;noselect\n<br />\n</div>\n"; echo " />&nbsp;" . gettext('noselect') . "\n<br />\n</div>\n";
} }
?> ?>
<div id="addserver"> <div id="addserver">
<a class="btn btn-default btn-xs" title="<?php echo gettext("Add another Time server");?>" onclick="NewTimeServer(<?php echo $j;?>)" alt="add" ><span class="glyphicon glyphicon-plus"></span> </a> <a class="btn btn-default btn-xs" title="<?= gettext("Add another Time server");?>" onclick="NewTimeServer(<?= $j;?>)" alt="add" ><span class="glyphicon glyphicon-plus"></span> </a>
</div> </div>
<br /> <br />
<?php echo gettext('For best results three to five servers should be configured here.'); ?> <?= gettext('For best results three to five servers should be configured here.'); ?>
<br /> <br />
<?php echo gettext('The <i>prefer</i> option indicates that NTP should favor the use of this server more than all others.'); ?> <?= sprintf(gettext('The %sprefer%s option indicates that NTP should favor the use of this server more than all others.'),'<i>','</i>') ?>
<br /> <br />
<?php echo gettext('The <i>noselect</i> option indicates that NTP should not use this server for time, but stats for this server will be collected and displayed.'); ?> <?= sprintf(gettext('The %snoselect%s option indicates that NTP should not use this server for time, but stats for this server will be collected and displayed.'),'<i>','</i>') ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext('Orphan mode') ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext('Orphan mode') ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<input name="ntporphan" type="text" class="formfld unknown" id="ntporphan" min="1" max="16" size="20" value="<?=htmlspecialchars(isset($pconfig['orphan']) ? $pconfig['orphan']:"");?>" /><?php echo gettext("(0-15)");?><br /> <input name="ntporphan" type="text" class="formfld unknown" id="ntporphan" min="1" max="16" size="20" value="<?=htmlspecialchars(isset($pconfig['orphan']) ? $pconfig['orphan']:"");?>" /><?= gettext("(0-15)");?><br />
<?php echo gettext("Orphan mode allows the system clock to be used when no other clocks are available. The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough to insure that any other servers available to clients are preferred over this server. (default: 12)."); ?> <?= gettext("Orphan mode allows the system clock to be used when no other clocks are available. The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough to insure that any other servers available to clients are preferred over this server. (default: 12)."); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext('NTP graphs') ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext('NTP graphs') ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<input name="statsgraph" type="checkbox" class="formcheckbox" id="statsgraph" <?php if(!empty($pconfig['statsgraph'])) echo " checked=\"checked\""; ?> /> <input name="statsgraph" type="checkbox" class="formcheckbox" id="statsgraph" <?php if(!empty($pconfig['statsgraph'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable rrd graphs of NTP statistics (default: disabled)."); ?> <?= gettext("Enable rrd graphs of NTP statistics (default: disabled)."); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext('Syslog logging') ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext('Syslog logging') ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<?php echo gettext("These options enable additional messages from NTP to be written to the System Log");?> (<a href="diag_logs_ntpd.php"><?php echo gettext("Status > System Logs > NTP"); ?></a>). <?= gettext("These options enable additional messages from NTP to be written to the System Log");?> (<a href="diag_logs_ntpd.php"><?= gettext("Status > System Logs > NTP"); ?></a>).
<br /><br /> <br /><br />
<input name="logpeer" type="checkbox" class="formcheckbox" id="logpeer"<?php if(!empty($pconfig['logpeer'])) echo " checked=\"checked\""; ?> /> <input name="logpeer" type="checkbox" class="formcheckbox" id="logpeer"<?php if(!empty($pconfig['logpeer'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of peer messages (default: disabled)."); ?> <?= gettext("Enable logging of peer messages (default: disabled)."); ?>
<br /> <br />
<input name="logsys" type="checkbox" class="formcheckbox" id="logsys"<?php if(!empty($pconfig['logsys'])) echo " checked=\"checked\""; ?> /> <input name="logsys" type="checkbox" class="formcheckbox" id="logsys"<?php if(!empty($pconfig['logsys'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of system messages (default: disabled)."); ?> <?= gettext("Enable logging of system messages (default: disabled)."); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -327,16 +327,16 @@ include("head.inc"); ...@@ -327,16 +327,16 @@ include("head.inc");
<input class="btn btn-default btn-xs" type="button" onclick="show_advanced('showstatisticsbox', 'showstatistics')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?> <input class="btn btn-default btn-xs" type="button" onclick="show_advanced('showstatisticsbox', 'showstatistics')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show statistics logging options");?>
</div> </div>
<div id="showstatistics" style="display:none"> <div id="showstatistics" style="display:none">
<strong><?php echo gettext("Warning: ")?></strong><?php echo gettext("these options will create persistant daily log files in /var/log/ntp."); ?> <strong><?= gettext("Warning: ")?></strong><?= gettext("these options will create persistant daily log files in /var/log/ntp."); ?>
<br /><br /> <br /><br />
<input name="clockstats" type="checkbox" class="formcheckbox" id="clockstats"<?php if(!empty($pconfig['clockstats'])) echo " checked=\"checked\""; ?> /> <input name="clockstats" type="checkbox" class="formcheckbox" id="clockstats"<?php if(!empty($pconfig['clockstats'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of reference clock statistics (default: disabled)."); ?> <?= gettext("Enable logging of reference clock statistics (default: disabled)."); ?>
<br /> <br />
<input name="loopstats" type="checkbox" class="formcheckbox" id="loopstats"<?php if(!empty($pconfig['loopstats'])) echo " checked=\"checked\""; ?> /> <input name="loopstats" type="checkbox" class="formcheckbox" id="loopstats"<?php if(!empty($pconfig['loopstats'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of clock discipline statistics (default: disabled)."); ?> <?= gettext("Enable logging of clock discipline statistics (default: disabled)."); ?>
<br /> <br />
<input name="peerstats" type="checkbox" class="formcheckbox" id="peerstats"<?php if(!empty($pconfig['peerstats'])) echo " checked=\"checked\""; ?> /> <input name="peerstats" type="checkbox" class="formcheckbox" id="peerstats"<?php if(!empty($pconfig['peerstats'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable logging of NTP peer statistics (default: disabled)."); ?> <?= gettext("Enable logging of NTP peer statistics (default: disabled)."); ?>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -347,25 +347,25 @@ include("head.inc"); ...@@ -347,25 +347,25 @@ include("head.inc");
<input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showrestrictbox', 'showrestrict')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?> <input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showrestrictbox', 'showrestrict')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show access restriction options");?>
</div> </div>
<div id="showrestrict" style="display:none"> <div id="showrestrict" style="display:none">
<?php echo gettext("these options control access to NTP from the WAN."); ?> <?= gettext("these options control access to NTP from the WAN."); ?>
<br /><br /> <br /><br />
<input name="kod" type="checkbox" class="formcheckbox" id="kod"<?php if(empty($pconfig['kod'])) echo " checked=\"checked\""; ?> /> <input name="kod" type="checkbox" class="formcheckbox" id="kod"<?php if(empty($pconfig['kod'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Enable Kiss-o'-death packets (default: enabled)."); ?> <?= gettext("Enable Kiss-o'-death packets (default: enabled)."); ?>
<br /> <br />
<input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(empty($pconfig['nomodify'])) echo " checked=\"checked\""; ?> /> <input name="nomodify" type="checkbox" class="formcheckbox" id="nomodify"<?php if(empty($pconfig['nomodify'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled)."); ?> <?= gettext("Deny state modifications (i.e. run time configuration) by ntpq and ntpdc (default: enabled)."); ?>
<br /> <br />
<input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if(!empty($pconfig['noquery'])) echo " checked=\"checked\""; ?> /> <input name="noquery" type="checkbox" class="formcheckbox" id="noquery"<?php if(!empty($pconfig['noquery'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Disable ntpq and ntpdc queries (default: disabled)."); ?> <?= gettext("Disable ntpq and ntpdc queries (default: disabled)."); ?>
<br /> <br />
<input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if(!empty($pconfig['noserve'])) echo " checked=\"checked\""; ?> /> <input name="noserve" type="checkbox" class="formcheckbox" id="noserve"<?php if(!empty($pconfig['noserve'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Disable all except ntpq and ntpdc queries (default: disabled)."); ?> <?= gettext("Disable all except ntpq and ntpdc queries (default: disabled)."); ?>
<br /> <br />
<input name="nopeer" type="checkbox" class="formcheckbox" id="nopeer"<?php if(empty($pconfig['nopeer'])) echo " checked=\"checked\""; ?> /> <input name="nopeer" type="checkbox" class="formcheckbox" id="nopeer"<?php if(empty($pconfig['nopeer'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny packets that attempt a peer association (default: enabled)."); ?> <?= gettext("Deny packets that attempt a peer association (default: enabled)."); ?>
<br /> <br />
<input name="notrap" type="checkbox" class="formcheckbox" id="notrap"<?php if(empty($pconfig['notrap'])) echo " checked=\"checked\""; ?> /> <input name="notrap" type="checkbox" class="formcheckbox" id="notrap"<?php if(empty($pconfig['notrap'])) echo " checked=\"checked\""; ?> />
<?php echo gettext("Deny mode 6 control message trap service (default: enabled)."); ?> <?= gettext("Deny mode 6 control message trap service (default: enabled)."); ?>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -376,12 +376,12 @@ include("head.inc"); ...@@ -376,12 +376,12 @@ include("head.inc");
<input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showleapsecbox', 'showleapsec')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?> <input type="button" class="btn btn-default btn-xs" onclick="show_advanced('showleapsecbox', 'showleapsec')" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Leap second configuration");?>
</div> </div>
<div id="showleapsec" style="display:none"> <div id="showleapsec" style="display:none">
<?php echo gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?> <?= gettext("A leap second file allows NTP to advertize an upcoming leap second addition or subtraction.");?>
<?php echo gettext("Normally this is only useful if this server is a stratum 1 time server.");?> <?= gettext("Normally this is only useful if this server is a stratum 1 time server.");?>
<br /><br /> <br /><br />
<?php echo gettext("Enter Leap second configuration as text:");?><br /> <?= gettext("Enter Leap second configuration as text:");?><br />
<textarea name="leaptxt" class="formpre" id="leaptxt" cols="65" rows="7"><?php $text = base64_decode(chunk_split(isset($pconfig['leapsec'])?$pconfig['leapsec']:"")); echo $text;?></textarea><br /> <textarea name="leaptxt" class="formpre" id="leaptxt" cols="65" rows="7"><?php $text = base64_decode(chunk_split(isset($pconfig['leapsec'])?$pconfig['leapsec']:"")); echo $text;?></textarea><br />
<strong><?php echo gettext("Or");?></strong>, <?php echo gettext("select a file to upload:");?> <strong><?= gettext("Or");?></strong>, <?= gettext("select a file to upload:");?>
<input type="file" name="leapfile" class="formfld file" id="leapfile" /> <input type="file" name="leapfile" class="formfld file" id="leapfile" />
</div> </div>
</td> </td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment