Commit 4d643d5a authored by Jos Schellevis's avatar Jos Schellevis

Fix DHCP6 Server GUI pages

parent 837062e2
...@@ -444,40 +444,6 @@ include("head.inc"); ...@@ -444,40 +444,6 @@ include("head.inc");
//]]> //]]>
</script> </script>
<?php
/* active tabs */
$tab_array = array();
$tabscounter = 0;
$i = 0;
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
(!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))))
continue;
if ($ifent == $if)
$active = true;
else
$active = false;
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
}
/* tack on PPPoE or PPtP servers here */
/* pppoe server */
if (is_array($config['pppoes']['pppoe'])) {
foreach($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") {
$ifent = "poes". $pppoe['pppoeid'];
$ifname = strtoupper($ifent);
if ($ifent == $if)
$active = true;
else
$active = false;
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
}
}
}
?>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
...@@ -494,34 +460,75 @@ include("head.inc"); ...@@ -494,34 +460,75 @@ include("head.inc");
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php
<? if ($tabscount > 0) display_top_tabs($tab_array); ?> /* active tabs */
$tab_array = array();
$tabscounter = 0;
$i = 0;
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
(!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))))
continue;
if ($ifent == $if)
$active = true;
else
$active = false;
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
}
/* tack on PPPoE or PPtP servers here */
/* pppoe server */
if (is_array($config['pppoes']['pppoe'])) {
foreach($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") {
$ifent = "poes". $pppoe['pppoeid'];
$ifname = strtoupper($ifent);
if ($ifent == $if)
$active = true;
else
$active = false;
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
}
}
}
if ($tabscounter == 0) {
//echo "</td></tr></table></form>";
//include("fend.inc");
//echo "</body>";
//echo "</html>";
echo "</section>";
echo "</div>";
echo "</div>";
echo "</section>";
include("foot.inc");
exit;
}
display_top_tabs($tab_array);
?>
<?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}");
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_dhcpv6.php" method="post" name="iform" id="iform"> <form action="services_dhcpv6.php" method="post" name="iform" id="iform">
<?php if ($dhcrelay_enabled): ?> <?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> <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: ?> <? else: ?>
<!--<ul class="nav nav-pills" role="tablist"><? foreach ($tab_array as $tab): ?>
<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): ?>
<li role="presentation" <? if ($tab[1]):?>class="active"<? endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li> <li role="presentation" <? if ($tab[1]):?>class="active"<? endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<? endforeach; ?></ul><br /> <? endforeach; ?></ul><br />-->
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCPv6 Server");?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("DHCPv6 Server");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -652,7 +659,7 @@ include("head.inc"); ...@@ -652,7 +659,7 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<table summary="time format change"> <table class="table table-striped" summary="time format change">
<tr> <tr>
<td> <td>
<input name="dhcpv6leaseinlocaltime" type="checkbox" id="dhcpv6leaseinlocaltime" value="yes" <?php if ($pconfig['dhcpv6leaseinlocaltime']) echo "checked=\"checked\""; ?> /> <input name="dhcpv6leaseinlocaltime" type="checkbox" id="dhcpv6leaseinlocaltime" value="yes" <?php if ($pconfig['dhcpv6leaseinlocaltime']) echo "checked=\"checked\""; ?> />
...@@ -678,7 +685,7 @@ include("head.inc"); ...@@ -678,7 +685,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<div id="showddnsbox"> <div id="showddnsbox">
<input type="button" onclick="show_ddns_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Dynamic DNS");?> <input type="button" onclick="show_ddns_config()" value="<?=gettext("Advanced");?>" class="btn btn-xs btn-default"/> - <?=gettext("Show Dynamic DNS");?>
</div> </div>
<div id="showddns" style="display:none"> <div id="showddns" style="display:none">
<input style="vertical-align:middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked=\"checked\""; ?> />&nbsp; <input style="vertical-align:middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked=\"checked\""; ?> />&nbsp;
...@@ -701,7 +708,7 @@ include("head.inc"); ...@@ -701,7 +708,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td> <td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<div id="showntpbox"> <div id="showntpbox">
<input type="button" onclick="show_ntp_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show NTP configuration");?> <input type="button" onclick="show_ntp_config()" value="<?=gettext("Advanced");?>" class="btn btn-xs btn-default"/> - <?=gettext("Show NTP configuration");?>
</div> </div>
<div id="showntp" style="display:none"> <div id="showntp" style="display:none">
<input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="28" value="<?=htmlspecialchars($pconfig['ntp1']);?>" /><br /> <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="28" value="<?=htmlspecialchars($pconfig['ntp1']);?>" /><br />
...@@ -727,7 +734,7 @@ include("head.inc"); ...@@ -727,7 +734,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td> <td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<div id="showldapbox"> <div id="showldapbox">
<input type="button" onclick="show_ldap_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show LDAP configuration");?> <input type="button" onclick="show_ldap_config()" value="<?=gettext("Advanced");?>" class="btn btn-xs btn-default"/> - <?=gettext("Show LDAP configuration");?>
</div> </div>
<div id="showldap" style="display:none"> <div id="showldap" style="display:none">
<input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>" /><br /> <input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>" /><br />
...@@ -739,7 +746,7 @@ include("head.inc"); ...@@ -739,7 +746,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<div id="shownetbootbox"> <div id="shownetbootbox">
<input type="button" onclick="show_netboot_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Network booting");?> <input type="button" onclick="show_netboot_config()" value="<?=gettext("Advanced");?>" class="btn btn-xs btn-default"/> - <?=gettext("Show Network booting");?>
</div> </div>
<div id="shownetboot" style="display:none"> <div id="shownetboot" style="display:none">
<input style="vertical-align:middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked=\"checked\""; ?> />&nbsp; <input style="vertical-align:middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked=\"checked\""; ?> />&nbsp;
...@@ -754,10 +761,10 @@ include("head.inc"); ...@@ -754,10 +761,10 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<div id="shownumbervaluebox"> <div id="shownumbervaluebox">
<input type="button" onclick="show_shownumbervalue()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Additional BOOTP/DHCP Options");?> <input type="button" onclick="show_shownumbervalue()" value="<?=gettext("Advanced");?>" class="btn btn-xs btn-default"/> - <?=gettext("Show Additional BOOTP/DHCP Options");?>
</div> </div>
<div id="shownumbervalue" style="display:none"> <div id="shownumbervalue" style="display:none">
<table id="maintable" summary="bootp-dhcp options"> <table class="table table-striped" id="maintable" summary="bootp-dhcp options">
<tbody> <tbody>
<tr> <tr>
<td colspan="3"> <td colspan="3">
...@@ -787,15 +794,15 @@ include("head.inc"); ...@@ -787,15 +794,15 @@ include("head.inc");
<input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld" id="value<?php echo $counter; ?>" size="55" value="<?=htmlspecialchars($value);?>" /> <input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld" id="value<?php echo $counter; ?>" size="55" value="<?=htmlspecialchars($value);?>" />
</td> </td>
<td> <td>
<input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" /> <butto onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" ><span class="glyphicon glyphicon-remove"></span></button>
</td> </td>
</tr> </tr>
<?php $counter++; ?> <?php $counter++; ?>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#"> <a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#" alt="" title="<?=gettext("add another entry");?>">
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" /> <span class="glyphicon glyphicon-plus" ></span>
</a> </a>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
...@@ -813,7 +820,7 @@ include("head.inc"); ...@@ -813,7 +820,7 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
<td width="78%"> <td width="78%">
<input name="if" type="hidden" value="<?=$if;?>" /> <input name="if" type="hidden" value="<?=$if;?>" />
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" /> <input name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -832,7 +839,7 @@ include("head.inc"); ...@@ -832,7 +839,7 @@ include("head.inc");
</table> </table>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="static mappings"> <table class="tabcont table table-striped" width="100%" border="0" cellpadding="0" cellspacing="0" summary="static mappings">
<tr> <tr>
<td colspan="4" valign="top" class="listtopic"><?=gettext("DHCPv6 Static Mappings for this interface.");?></td> <td colspan="4" valign="top" class="listtopic"><?=gettext("DHCPv6 Static Mappings for this interface.");?></td>
<td>&nbsp;</td> <td>&nbsp;</td>
...@@ -846,7 +853,7 @@ include("head.inc"); ...@@ -846,7 +853,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1" summary="add"> <table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr> <tr>
<td valign="middle" width="17"></td> <td valign="middle" width="17"></td>
<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td> <td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>" alt="add"><span class="glyphicon glyphicon-plus" ></span></a></td>
</tr> </tr>
</table> </table>
</td> </td>
...@@ -870,8 +877,8 @@ include("head.inc"); ...@@ -870,8 +877,8 @@ include("head.inc");
<td valign="middle" class="list nowrap"> <td valign="middle" class="list nowrap">
<table border="0" cellspacing="0" cellpadding="1" summary="icons"> <table border="0" cellspacing="0" cellpadding="1" summary="icons">
<tr> <tr>
<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>&amp;id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" alt="edit" /></a></td> <td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>&amp;id=<?=$i;?>" alt="edit"><span class="glyphicon glyphicon-pencil"></span></a></td>
<td valign="middle"><a href="services_dhcpv6.php?if=<?=$if;?>&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /></a></td> <td valign="middle"><a href="services_dhcpv6.php?if=<?=$if;?>&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')" alt="delete"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr> </tr>
</table> </table>
</td> </td>
...@@ -885,14 +892,13 @@ include("head.inc"); ...@@ -885,14 +892,13 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1" summary="add"> <table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr> <tr>
<td valign="middle" width="17"></td> <td valign="middle" width="17"></td>
<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /></a></td> <td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>" alt="add"><span class="glyphicon glyphicon-plus" ></span></a></td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</div>
<? endif; ?> <? endif; ?>
</form> </form>
</div> </div>
......
...@@ -246,8 +246,8 @@ include("head.inc"); ...@@ -246,8 +246,8 @@ include("head.inc");
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
<td width="78%"> <td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Save");?>" />
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> <input type="button" class="formbtn btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
<?php if (isset($id) && $a_maps[$id]): ?> <?php if (isset($id) && $a_maps[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?> <?php endif; ?>
......
...@@ -175,7 +175,7 @@ include("head.inc"); ...@@ -175,7 +175,7 @@ include("head.inc");
?> ?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/row_helper.js"> <script type="text/javascript" src="/javascript/row_helper.js">
...@@ -202,193 +202,197 @@ include("head.inc"); ...@@ -202,193 +202,197 @@ include("head.inc");
//]]> //]]>
</script> </script>
<form action="services_router_advertisements.php" method="post" name="iform" id="iform"> <section class="page-content-main">
<?php if ($input_errors) print_input_errors($input_errors); ?> <div class="container-fluid">
<?php if ($savemsg) print_info_box($savemsg); ?> <div class="row">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="router advert">
<tr><td> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php <?php if ($savemsg) print_info_box($savemsg); ?>
/* active tabs */
$tab_array = array(); <section class="col-xs-12">
$tabscounter = 0;
$i = 0; <?php
foreach ($iflist as $ifent => $ifname) { /* active tabs */
$oc = $config['interfaces'][$ifent]; $tab_array = array();
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || $tabscounter = 0;
(!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) $i = 0;
continue; foreach ($iflist as $ifent => $ifname) {
if ($ifent == $if) $oc = $config['interfaces'][$ifent];
$active = true; if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
else (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))))
$active = false; continue;
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); if ($ifent == $if)
$tabscounter++; $active = true;
} else
if ($tabscounter == 0) { $active = false;
echo "</td></tr></table></form>"; $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
include("fend.inc"); $tabscounter++;
echo "</body>"; }
echo "</html>"; if ($tabscounter == 0) {
exit; echo "</td></tr></table></form>";
} include("fend.inc");
display_top_tabs($tab_array); echo "</body>";
?> echo "</html>";
</td></tr> exit;
<tr><td class="tabnavtbl"> }
<?php display_top_tabs($tab_array);
$tab_array = array(); ?>
$tab_array[] = array(gettext("DHCPv6 Server"), false, "services_dhcpv6.php?if={$if}"); <?php
$tab_array[] = array(gettext("Router Advertisements"), true, "services_router_advertisements.php?if={$if}"); $tab_array = array();
display_top_tabs($tab_array); $tab_array[] = array(gettext("DHCPv6 Server"), false, "services_dhcpv6.php?if={$if}");
?> $tab_array[] = array(gettext("Router Advertisements"), true, "services_router_advertisements.php?if={$if}");
</td></tr> display_top_tabs($tab_array);
<tr> ?>
<td> <div class="tab-content content-box col-xs-12">
<div id="mainarea"> <form action="services_router_advertisements.php" method="post" name="iform" id="iform">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <div class="table-responsive">
<tr> <table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Router Advertisements");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncellreq"><?=gettext("Router Advertisements");?></td>
<select name="ramode" id="ramode"> <td width="78%" class="vtable">
<?php foreach($advertise_modes as $name => $value) { ?> <select name="ramode" id="ramode">
<option value="<?=$name ?>" <?php if ($pconfig['ramode'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option> <?php foreach($advertise_modes as $name => $value) { ?>
<?php } ?> <option value="<?=$name ?>" <?php if ($pconfig['ramode'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
</select><br /> <?php } ?>
<strong><?php printf(gettext("Select the Operating Mode for the Router Advertisement (RA) Daemon."))?></strong> </select><br />
<?php printf(gettext("Use \"Router Only\" to only advertise this router, \"Unmanaged\" for Router Advertising with Stateless Autoconfig, \"Managed\" for assignment through (a) DHCPv6 Server, \"Assisted\" for DHCPv6 Server assignment combined with Stateless Autoconfig"));?> <strong><?php printf(gettext("Select the Operating Mode for the Router Advertisement (RA) Daemon."))?></strong>
<?php printf(gettext("It is not required to activate this DHCPv6 server when set to \"Managed\", this can be another host on the network")); ?> <?php printf(gettext("Use \"Router Only\" to only advertise this router, \"Unmanaged\" for Router Advertising with Stateless Autoconfig, \"Managed\" for assignment through (a) DHCPv6 Server, \"Assisted\" for DHCPv6 Server assignment combined with Stateless Autoconfig"));?>
</td> <?php printf(gettext("It is not required to activate this DHCPv6 server when set to \"Managed\", this can be another host on the network")); ?>
</tr> </td>
<tr> </tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Router Priority");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell"><?=gettext("Router Priority");?></td>
<select name="rapriority" id="rapriority"> <td width="78%" class="vtable">
<?php foreach($priority_modes as $name => $value) { ?> <select name="rapriority" id="rapriority">
<option value="<?=$name ?>" <?php if ($pconfig['rapriority'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option> <?php foreach($priority_modes as $name => $value) { ?>
<?php } ?> <option value="<?=$name ?>" <?php if ($pconfig['rapriority'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
</select><br /> <?php } ?>
<strong><?php printf(gettext("Select the Priority for the Router Advertisement (RA) Daemon."))?></strong> </select><br />
</td> <strong><?php printf(gettext("Select the Priority for the Router Advertisement (RA) Daemon."))?></strong>
</tr> </td>
<?php </tr>
$carplistif = array(); <?php
if(count($carplist) > 0) { $carplistif = array();
foreach($carplist as $ifname => $vip) { if(count($carplist) > 0) {
if((preg_match("/^{$if}_/", $ifname)) && (is_ipaddrv6($vip))) foreach($carplist as $ifname => $vip) {
$carplistif[$ifname] = $vip; if((preg_match("/^{$if}_/", $ifname)) && (is_ipaddrv6($vip)))
} $carplistif[$ifname] = $vip;
} }
if(count($carplistif) > 0) { }
?> if(count($carplistif) > 0) {
<tr> ?>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Interface");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell"><?=gettext("RA Interface");?></td>
<select name="rainterface" id="rainterface"> <td width="78%" class="vtable">
<?php foreach($carplistif as $ifname => $vip) { ?> <select name="rainterface" id="rainterface">
<option value="interface" <?php if ($pconfig['rainterface'] == "interface") echo "selected=\"selected\""; ?> > <?=strtoupper($if); ?></option> <?php foreach($carplistif as $ifname => $vip) { ?>
<option value="<?=$ifname ?>" <?php if ($pconfig['rainterface'] == $ifname) echo "selected=\"selected\""; ?> > <?="$ifname - $vip"; ?></option> <option value="interface" <?php if ($pconfig['rainterface'] == "interface") echo "selected=\"selected\""; ?> > <?=strtoupper($if); ?></option>
<?php } ?> <option value="<?=$ifname ?>" <?php if ($pconfig['rainterface'] == $ifname) echo "selected=\"selected\""; ?> > <?="$ifname - $vip"; ?></option>
</select><br /> <?php } ?>
<strong><?php printf(gettext("Select the Interface for the Router Advertisement (RA) Daemon."))?></strong> </select><br />
</td> <strong><?php printf(gettext("Select the Interface for the Router Advertisement (RA) Daemon."))?></strong>
</tr> </td>
<?php } ?> </tr>
<?php } ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Subnet(s)");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell"><?=gettext("RA Subnet(s)");?></td>
<div><?= htmlentities($subnets_help) ?></div> <td width="78%" class="vtable">
<table id="maintable" summary="subnets"> <div><?= htmlentities($subnets_help) ?></div>
<tbody> <table id="maintable" summary="subnets">
<?php <tbody>
$counter = 0; <?php
foreach ($pconfig['subnets'] as $subnet) { $counter = 0;
$address_name = "subnet_address" . $counter; foreach ($pconfig['subnets'] as $subnet) {
$bits_name = "subnet_bits" . $counter; $address_name = "subnet_address" . $counter;
list($address, $subnet) = explode("/", $subnet); $bits_name = "subnet_bits" . $counter;
?> list($address, $subnet) = explode("/", $subnet);
<tr> ?>
<td> <tr>
<input autocomplete="off" name="<?= $address_name ?>" type="text" class="formfldalias" id="<?= $address_name ?>" size="30" value="<?= htmlentities($address) ?>" /> <td>
</td> <input autocomplete="off" name="<?= $address_name ?>" type="text" class="formfldalias" id="<?= $address_name ?>" size="30" value="<?= htmlentities($address) ?>" />
<td> </td>
<select name="<?= $bits_name ?>" class="formselect" id="<?= $bits_name ?>"> <td>
<option value=""> <select name="<?= $bits_name ?>" class="formselect" id="<?= $bits_name ?>">
<?php for ($i = 128; $i >= 0; $i -= 1) { ?> <option value="">
<option value="<?= $i ?>" <?= ("$subnet" === "$i") ? "selected='selected'" : "" ?>><?= $i ?></option> <?php for ($i = 128; $i >= 0; $i -= 1) { ?>
<?php } ?> <option value="<?= $i ?>" <?= ("$subnet" === "$i") ? "selected='selected'" : "" ?>><?= $i ?></option>
</select> <?php } ?>
</td> </select>
<td> </td>
<a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" alt="" title="<?=gettext("remove this entry"); ?>" /></a> <td>
</td> <a onclick="removeRow(this); return false;" href="#" alt="" title="<?=gettext("remove this entry"); ?>"><span class="glyphicon glyphicon-remove"></span></a>
</tr> </td>
<?php </tr>
$counter += 1; <?php
} $counter += 1;
?> }
<tr style="display:none"><td></td></tr> ?>
</tbody> <tr style="display:none"><td></td></tr>
</table> </tbody>
<script type="text/javascript"> </table>
//<![CDATA[ <script type="text/javascript">
field_counter_js = 2; //<![CDATA[
totalrows = <?= $counter ?>; field_counter_js = 2;
//]]> totalrows = <?= $counter ?>;
</script> //]]>
<div id="addrowbutton"> </script>
<a onclick="javascript:addRowTo('maintable'); add_alias_control(); return false;" href="#"><!-- <div id="addrowbutton">
--><img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry"); ?>" /></a> <a onclick="javascript:addRowTo('maintable'); add_alias_control(); return false;" href="#" alt="" title="<?=gettext("add another entry"); ?>" ><!--
</div> --><span class="glyphicon glyphicon-plus"></span></a>
</td> </div>
</tr> </td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td> <tr>
</tr> <td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">DNS</td> <tr>
</tr> <td colspan="2" valign="top" class="listtopic">DNS</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<input name="radns1" type="text" class="formfld unknown" id="radns1" size="28" value="<?=htmlspecialchars($pconfig['radns1']);?>" /><br /> <td width="78%" class="vtable">
<input name="radns2" type="text" class="formfld unknown" id="radns2" size="28" value="<?=htmlspecialchars($pconfig['radns2']);?>" /><br /> <input name="radns1" type="text" class="formfld unknown" id="radns1" size="28" value="<?=htmlspecialchars($pconfig['radns1']);?>" /><br />
<?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?> <input name="radns2" type="text" class="formfld unknown" id="radns2" size="28" value="<?=htmlspecialchars($pconfig['radns2']);?>" /><br />
</td> <?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
</tr> </td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<input name="radomainsearchlist" type="text" class="formfld unknown" id="radomainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['radomainsearchlist']);?>" /><br /> <td width="78%" class="vtable">
<?=gettext("The RA server can optionally provide a domain search list. Use the semicolon character as separator");?> <input name="radomainsearchlist" type="text" class="formfld unknown" id="radomainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['radomainsearchlist']);?>" /><br />
</td> <?=gettext("The RA server can optionally provide a domain search list. Use the semicolon character as separator");?>
</tr> </td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">&nbsp;</td> <tr>
<td width="78%" class="vtable"> <td width="22%" valign="top" class="vncell">&nbsp;</td>
<input id="rasamednsasdhcp6" name="rasamednsasdhcp6" type="checkbox" value="yes" <?php if ($pconfig['rasamednsasdhcp6']) { echo "checked='checked'"; } ?> /> <td width="78%" class="vtable">
<strong><?= gettext("Use same settings as DHCPv6 server"); ?></strong> <input id="rasamednsasdhcp6" name="rasamednsasdhcp6" type="checkbox" value="yes" <?php if ($pconfig['rasamednsasdhcp6']) { echo "checked='checked'"; } ?> />
</td> <strong><?= gettext("Use same settings as DHCPv6 server"); ?></strong>
</tr> </td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td> <tr>
<td width="78%"> <td width="22%" valign="top">&nbsp;</td>
<input name="if" type="hidden" value="<?=$if;?>" /> <td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input name="if" type="hidden" value="<?=$if;?>" />
</td> <input name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Save");?>" />
</tr> </td>
</table> </tr>
</div> </table>
</td> </div>
</tr> </form>
</table> </div>
</form> </section>
</div>
</div>
</section>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
......
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