Commit a939026c authored by Ad Schellevis's avatar Ad Schellevis

Merge branch 'master' of ssh://github.com/opnsense/core

parents 5ba49ee3 4d643d5a
......@@ -444,40 +444,6 @@ include("head.inc");
//]]>
</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"); ?>
......@@ -494,34 +460,75 @@ include("head.inc");
<?php endif; ?>
<section class="col-xs-12">
<? if ($tabscount > 0) display_top_tabs($tab_array); ?>
<?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++;
}
}
}
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">
<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>
<? elseif ($tabscounter == 0): ?>
<? else: ?>
<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 />
<? endforeach; ?></ul><br />-->
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCPv6 Server");?></td>
<td width="78%" class="vtable">
......@@ -652,7 +659,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Time format change"); ?></td>
<td width="78%" class="vtable">
<table summary="time format change">
<table class="table table-striped" summary="time format change">
<tr>
<td>
<input name="dhcpv6leaseinlocaltime" type="checkbox" id="dhcpv6leaseinlocaltime" value="yes" <?php if ($pconfig['dhcpv6leaseinlocaltime']) echo "checked=\"checked\""; ?> />
......@@ -678,7 +685,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<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 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;
......@@ -701,7 +708,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
<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 id="showntp" style="display:none">
<input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="28" value="<?=htmlspecialchars($pconfig['ntp1']);?>" /><br />
......@@ -727,7 +734,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
<td width="78%" class="vtable">
<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 id="showldap" style="display:none">
<input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>" /><br />
......@@ -739,7 +746,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
<td width="78%" class="vtable">
<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 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;
......@@ -754,10 +761,10 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
<td width="78%" class="vtable">
<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 id="shownumbervalue" style="display:none">
<table id="maintable" summary="bootp-dhcp options">
<table class="table table-striped" id="maintable" summary="bootp-dhcp options">
<tbody>
<tr>
<td colspan="3">
......@@ -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);?>" />
</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>
</tr>
<?php $counter++; ?>
<?php endforeach; ?>
</tbody>
</table>
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#" alt="" title="<?=gettext("add another entry");?>">
<span class="glyphicon glyphicon-plus" ></span>
</a>
<script type="text/javascript">
//<![CDATA[
......@@ -813,7 +820,7 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<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>
</tr>
<tr>
......@@ -832,7 +839,7 @@ include("head.inc");
</table>
</div>
<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>
<td colspan="4" valign="top" class="listtopic"><?=gettext("DHCPv6 Static Mappings for this interface.");?></td>
<td>&nbsp;</td>
......@@ -846,7 +853,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr>
<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>
</table>
</td>
......@@ -870,8 +877,8 @@ include("head.inc");
<td valign="middle" class="list nowrap">
<table border="0" cellspacing="0" cellpadding="1" summary="icons">
<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.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_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?");?>')" alt="delete"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr>
</table>
</td>
......@@ -885,14 +892,13 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1" summary="add">
<tr>
<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>
</table>
</td>
</tr>
</table>
</div>
</div>
<? endif; ?>
</form>
</div>
......
......@@ -246,8 +246,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<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;?>'" />
<input name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Save");?>" />
<input type="button" class="formbtn btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
<?php if (isset($id) && $a_maps[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
......
......@@ -175,7 +175,7 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<body>
<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/row_helper.js">
......@@ -202,193 +202,197 @@ include("head.inc");
//]]>
</script>
<form action="services_router_advertisements.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="router advert">
<tr><td>
<?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++;
}
if ($tabscounter == 0) {
echo "</td></tr></table></form>";
include("fend.inc");
echo "</body>";
echo "</html>";
exit;
}
display_top_tabs($tab_array);
?>
</td></tr>
<tr><td class="tabnavtbl">
<?php
$tab_array = 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}");
display_top_tabs($tab_array);
?>
</td></tr>
<tr>
<td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Router Advertisements");?></td>
<td width="78%" class="vtable">
<select name="ramode" id="ramode">
<?php foreach($advertise_modes as $name => $value) { ?>
<option value="<?=$name ?>" <?php if ($pconfig['ramode'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Operating Mode for the Router Advertisement (RA) Daemon."))?></strong>
<?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"));?>
<?php printf(gettext("It is not required to activate this DHCPv6 server when set to \"Managed\", this can be another host on the network")); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Router Priority");?></td>
<td width="78%" class="vtable">
<select name="rapriority" id="rapriority">
<?php foreach($priority_modes as $name => $value) { ?>
<option value="<?=$name ?>" <?php if ($pconfig['rapriority'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Priority for the Router Advertisement (RA) Daemon."))?></strong>
</td>
</tr>
<?php
$carplistif = array();
if(count($carplist) > 0) {
foreach($carplist as $ifname => $vip) {
if((preg_match("/^{$if}_/", $ifname)) && (is_ipaddrv6($vip)))
$carplistif[$ifname] = $vip;
}
}
if(count($carplistif) > 0) {
?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Interface");?></td>
<td width="78%" class="vtable">
<select name="rainterface" id="rainterface">
<?php foreach($carplistif as $ifname => $vip) { ?>
<option value="interface" <?php if ($pconfig['rainterface'] == "interface") echo "selected=\"selected\""; ?> > <?=strtoupper($if); ?></option>
<option value="<?=$ifname ?>" <?php if ($pconfig['rainterface'] == $ifname) echo "selected=\"selected\""; ?> > <?="$ifname - $vip"; ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Interface for the Router Advertisement (RA) Daemon."))?></strong>
</td>
</tr>
<?php } ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Subnet(s)");?></td>
<td width="78%" class="vtable">
<div><?= htmlentities($subnets_help) ?></div>
<table id="maintable" summary="subnets">
<tbody>
<?php
$counter = 0;
foreach ($pconfig['subnets'] as $subnet) {
$address_name = "subnet_address" . $counter;
$bits_name = "subnet_bits" . $counter;
list($address, $subnet) = explode("/", $subnet);
?>
<tr>
<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 ?>">
<option value="">
<?php for ($i = 128; $i >= 0; $i -= 1) { ?>
<option value="<?= $i ?>" <?= ("$subnet" === "$i") ? "selected='selected'" : "" ?>><?= $i ?></option>
<?php } ?>
</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>
</tr>
<?php
$counter += 1;
}
?>
<tr style="display:none"><td></td></tr>
</tbody>
</table>
<script type="text/javascript">
//<![CDATA[
field_counter_js = 2;
totalrows = <?= $counter ?>;
//]]>
</script>
<div id="addrowbutton">
<a onclick="javascript:addRowTo('maintable'); add_alias_control(); return false;" href="#"><!--
--><img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry"); ?>" /></a>
</div>
</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 width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
<input name="radns1" type="text" class="formfld unknown" id="radns1" size="28" value="<?=htmlspecialchars($pconfig['radns1']);?>" /><br />
<input name="radns2" type="text" class="formfld unknown" id="radns2" size="28" value="<?=htmlspecialchars($pconfig['radns2']);?>" /><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.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="radomainsearchlist" type="text" class="formfld unknown" id="radomainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['radomainsearchlist']);?>" /><br />
<?=gettext("The RA server can optionally provide a domain search list. Use the semicolon character as separator");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
<input id="rasamednsasdhcp6" name="rasamednsasdhcp6" type="checkbox" value="yes" <?php if ($pconfig['rasamednsasdhcp6']) { echo "checked='checked'"; } ?> />
<strong><?= gettext("Use same settings as DHCPv6 server"); ?></strong>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>" />
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</form>
<section class="page-content-main">
<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
/* 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++;
}
if ($tabscounter == 0) {
echo "</td></tr></table></form>";
include("fend.inc");
echo "</body>";
echo "</html>";
exit;
}
display_top_tabs($tab_array);
?>
<?php
$tab_array = 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}");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<form action="services_router_advertisements.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Router Advertisements");?></td>
<td width="78%" class="vtable">
<select name="ramode" id="ramode">
<?php foreach($advertise_modes as $name => $value) { ?>
<option value="<?=$name ?>" <?php if ($pconfig['ramode'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Operating Mode for the Router Advertisement (RA) Daemon."))?></strong>
<?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"));?>
<?php printf(gettext("It is not required to activate this DHCPv6 server when set to \"Managed\", this can be another host on the network")); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Router Priority");?></td>
<td width="78%" class="vtable">
<select name="rapriority" id="rapriority">
<?php foreach($priority_modes as $name => $value) { ?>
<option value="<?=$name ?>" <?php if ($pconfig['rapriority'] == $name) echo "selected=\"selected\""; ?> > <?=$value ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Priority for the Router Advertisement (RA) Daemon."))?></strong>
</td>
</tr>
<?php
$carplistif = array();
if(count($carplist) > 0) {
foreach($carplist as $ifname => $vip) {
if((preg_match("/^{$if}_/", $ifname)) && (is_ipaddrv6($vip)))
$carplistif[$ifname] = $vip;
}
}
if(count($carplistif) > 0) {
?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Interface");?></td>
<td width="78%" class="vtable">
<select name="rainterface" id="rainterface">
<?php foreach($carplistif as $ifname => $vip) { ?>
<option value="interface" <?php if ($pconfig['rainterface'] == "interface") echo "selected=\"selected\""; ?> > <?=strtoupper($if); ?></option>
<option value="<?=$ifname ?>" <?php if ($pconfig['rainterface'] == $ifname) echo "selected=\"selected\""; ?> > <?="$ifname - $vip"; ?></option>
<?php } ?>
</select><br />
<strong><?php printf(gettext("Select the Interface for the Router Advertisement (RA) Daemon."))?></strong>
</td>
</tr>
<?php } ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RA Subnet(s)");?></td>
<td width="78%" class="vtable">
<div><?= htmlentities($subnets_help) ?></div>
<table id="maintable" summary="subnets">
<tbody>
<?php
$counter = 0;
foreach ($pconfig['subnets'] as $subnet) {
$address_name = "subnet_address" . $counter;
$bits_name = "subnet_bits" . $counter;
list($address, $subnet) = explode("/", $subnet);
?>
<tr>
<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 ?>">
<option value="">
<?php for ($i = 128; $i >= 0; $i -= 1) { ?>
<option value="<?= $i ?>" <?= ("$subnet" === "$i") ? "selected='selected'" : "" ?>><?= $i ?></option>
<?php } ?>
</select>
</td>
<td>
<a onclick="removeRow(this); return false;" href="#" alt="" title="<?=gettext("remove this entry"); ?>"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
$counter += 1;
}
?>
<tr style="display:none"><td></td></tr>
</tbody>
</table>
<script type="text/javascript">
//<![CDATA[
field_counter_js = 2;
totalrows = <?= $counter ?>;
//]]>
</script>
<div id="addrowbutton">
<a onclick="javascript:addRowTo('maintable'); add_alias_control(); return false;" href="#" alt="" title="<?=gettext("add another entry"); ?>" ><!--
--><span class="glyphicon glyphicon-plus"></span></a>
</div>
</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 width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
<input name="radns1" type="text" class="formfld unknown" id="radns1" size="28" value="<?=htmlspecialchars($pconfig['radns1']);?>" /><br />
<input name="radns2" type="text" class="formfld unknown" id="radns2" size="28" value="<?=htmlspecialchars($pconfig['radns2']);?>" /><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.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="radomainsearchlist" type="text" class="formfld unknown" id="radomainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['radomainsearchlist']);?>" /><br />
<?=gettext("The RA server can optionally provide a domain search list. Use the semicolon character as separator");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
<input id="rasamednsasdhcp6" name="rasamednsasdhcp6" type="checkbox" value="yes" <?php if ($pconfig['rasamednsasdhcp6']) { echo "checked='checked'"; } ?> />
<strong><?= gettext("Use same settings as DHCPv6 server"); ?></strong>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>" />
<input name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext("Save");?>" />
</td>
</tr>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
//<![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