Commit 99d02e9a authored by Franco Fichtner's avatar Franco Fichtner

load_balancer: apply whitespace cleanups

parent 78935e17
...@@ -100,18 +100,18 @@ $main_buttons = array( ...@@ -100,18 +100,18 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/> <?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /> <?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php"); $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
...@@ -119,12 +119,12 @@ $main_buttons = array( ...@@ -119,12 +119,12 @@ $main_buttons = array(
$tab_array[] = array(gettext("Monitors"), true, "load_balancer_monitor.php"); $tab_array[] = array(gettext("Monitors"), true, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php"); $tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array); 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="load_balancer_monitor.php" method="post" name="iform" id="iform"> <form action="load_balancer_monitor.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
...@@ -142,12 +142,12 @@ $main_buttons = array( ...@@ -142,12 +142,12 @@ $main_buttons = array(
$t->display(); $t->display();
?> ?>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -145,7 +145,7 @@ if ($_POST) { ...@@ -145,7 +145,7 @@ if ($_POST) {
$monent = $a_monitor[$id]; $monent = $a_monitor[$id];
if($monent['name'] != "") if($monent['name'] != "")
$changedesc .= " " . sprintf(gettext("modified '%s' monitor:"), $monent['name']); $changedesc .= " " . sprintf(gettext("modified '%s' monitor:"), $monent['name']);
update_if_changed("name", $monent['name'], $pconfig['name']); update_if_changed("name", $monent['name'], $pconfig['name']);
update_if_changed("type", $monent['type'], $pconfig['type']); update_if_changed("type", $monent['type'], $pconfig['type']);
update_if_changed("description", $monent['descr'], $pconfig['descr']); update_if_changed("description", $monent['descr'], $pconfig['descr']);
...@@ -180,7 +180,7 @@ if ($_POST) { ...@@ -180,7 +180,7 @@ if ($_POST) {
$a_monitor[$id] = $monent; $a_monitor[$id] = $monent;
} else } else
$a_monitor[] = $monent; $a_monitor[] = $monent;
if ($changecount > 0) { if ($changecount > 0) {
/* Mark config dirty */ /* Mark config dirty */
mark_subsystem_dirty('loadbalancer'); mark_subsystem_dirty('loadbalancer');
...@@ -203,7 +203,7 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get ...@@ -203,7 +203,7 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function updateType(t){ function updateType(t){
...@@ -230,20 +230,20 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get ...@@ -230,20 +230,20 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform"> <form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform">
<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 colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Monitor entry"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Monitor entry"); ?></td>
</tr> </tr>
<tr align="left"> <tr align="left">
...@@ -335,7 +335,7 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get ...@@ -335,7 +335,7 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
</td> </td>
</tr> </tr>
<!-- BILLM: XXX not supported digest checking just yet <!-- BILLM: XXX not supported digest checking just yet
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq">MD5 Page Digest</td> <td width="22%" valign="top" class="vncellreq">MD5 Page Digest</td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
...@@ -376,12 +376,12 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get ...@@ -376,12 +376,12 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -110,19 +110,19 @@ $main_buttons = array( ...@@ -110,19 +110,19 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/> <?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?><br /> <?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?><br />
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Pools"), true, "load_balancer_pool.php"); $tab_array[] = array(gettext("Pools"), true, "load_balancer_pool.php");
...@@ -130,15 +130,15 @@ $main_buttons = array( ...@@ -130,15 +130,15 @@ $main_buttons = array(
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php"); $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php"); $tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array); 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="load_balancer_pool.php" method="post" name="iform" id="iform"> <form action="load_balancer_pool.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<?php <?php
$t = new MainTable(); $t = new MainTable();
$t->edit_uri('load_balancer_pool_edit.php'); $t->edit_uri('load_balancer_pool_edit.php');
...@@ -161,12 +161,12 @@ $main_buttons = array( ...@@ -161,12 +161,12 @@ $main_buttons = array(
<?= sprintf(gettext("The Load Balancer in %s is for server load balancing, not Multi-WAN. For load balancing or failover for multiple WANs, use "), $g['product_name']);?> <?= sprintf(gettext("The Load Balancer in %s is for server load balancing, not Multi-WAN. For load balancing or failover for multiple WANs, use "), $g['product_name']);?>
<a href="/system_gateway_groups.php"><?= gettext("Gateway Groups"); ?></a> <a href="/system_gateway_groups.php"><?= gettext("Gateway Groups"); ?></a>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -135,7 +135,7 @@ if ($_POST) { ...@@ -135,7 +135,7 @@ if ($_POST) {
$poolent = $a_pool[$id]; $poolent = $a_pool[$id];
if($poolent['name'] != "") if($poolent['name'] != "")
$changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']); $changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']);
update_if_changed("name", $poolent['name'], $_POST['name']); update_if_changed("name", $poolent['name'], $_POST['name']);
update_if_changed("mode", $poolent['mode'], $_POST['mode']); update_if_changed("mode", $poolent['mode'], $_POST['mode']);
update_if_changed("description", $poolent['descr'], $_POST['descr']); update_if_changed("description", $poolent['descr'], $_POST['descr']);
...@@ -154,7 +154,7 @@ if ($_POST) { ...@@ -154,7 +154,7 @@ if ($_POST) {
$a_pool[$id] = $poolent; $a_pool[$id] = $poolent;
} else } else
$a_pool[] = $poolent; $a_pool[] = $poolent;
if ($changecount > 0) { if ($changecount > 0) {
/* Mark pool dirty */ /* Mark pool dirty */
mark_subsystem_dirty('loadbalancer'); mark_subsystem_dirty('loadbalancer');
...@@ -186,26 +186,26 @@ include("head.inc"); ...@@ -186,26 +186,26 @@ include("head.inc");
} }
//]]> //]]>
</script> </script>
<script type="text/javascript" src="/javascript/autosuggest.js"></script> <script type="text/javascript" src="/javascript/autosuggest.js"></script>
<script type="text/javascript" src="/javascript/suggestions.js"></script> <script type="text/javascript" src="/javascript/suggestions.js"></script>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<form action="load_balancer_pool_edit.php" method="post" name="iform" id="iform"> <form action="load_balancer_pool_edit.php" method="post" name="iform" id="iform">
<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 colspan="2" valign="top" class="listtopic"><?=gettext("Add/edit Load Balancer - Pool entry"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Add/edit Load Balancer - Pool entry"); ?></td>
</tr> </tr>
...@@ -230,7 +230,7 @@ include("head.inc"); ...@@ -230,7 +230,7 @@ include("head.inc");
<input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"{$pconfig['descr']}\"";?> size="64" /> <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"{$pconfig['descr']}\"";?> size="64" />
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" id="monitorport_text" class="vncellreq"><?=gettext("Port"); ?></td> <td width="22%" valign="top" id="monitorport_text" class="vncellreq"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
...@@ -284,7 +284,7 @@ include("head.inc"); ...@@ -284,7 +284,7 @@ include("head.inc");
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Server IP Address"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Server IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" size="16" style="float: left;" /> <input name="ipaddr" type="text" size="16" style="float: left;" />
<input class="btn btn-default" type="button" name="button1" value="<?=gettext("Add to pool"); ?>" onclick="AddServerToPool(document.iform); enforceFailover(); checkPoolControls();" /><br /> <input class="btn btn-default" type="button" name="button1" value="<?=gettext("Add to pool"); ?>" onclick="AddServerToPool(document.iform); enforceFailover(); checkPoolControls();" /><br />
</td> </td>
</tr> </tr>
...@@ -314,12 +314,12 @@ include("head.inc"); ...@@ -314,12 +314,12 @@ include("head.inc");
</select> </select>
<input class="btn btn-default" type="button" name="removeDisabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" /> <input class="btn btn-default" type="button" name="removeDisabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />
</td> </td>
<td valign="middle" align="center"> <td valign="middle" align="center">
<button class="btn btn-default btn-xs" id="moveToEnabled" name="moveToEnabled" onclick="moveOptions(document.iform.serversDisabledSelect, document.iform.serversSelect); checkPoolControls();"><span class="glyphicon glyphicon-arrow-left"></span></button><br /> <button class="btn btn-default btn-xs" id="moveToEnabled" name="moveToEnabled" onclick="moveOptions(document.iform.serversDisabledSelect, document.iform.serversSelect); checkPoolControls();"><span class="glyphicon glyphicon-arrow-left"></span></button><br />
<button class="btn btn-default btn-xs" id="moveToDisabled" name="moveToDisabled" onclick="moveOptions(document.iform.serversSelect, document.iform.serversDisabledSelect); checkPoolControls();"><span class="glyphicon glyphicon-arrow-right"></span></button> <button class="btn btn-default btn-xs" id="moveToDisabled" name="moveToDisabled" onclick="moveOptions(document.iform.serversSelect, document.iform.serversDisabledSelect); checkPoolControls();"><span class="glyphicon glyphicon-arrow-right"></span></button>
</td> </td>
<td align="center"> <td align="center">
<b><?=gettext("Enabled (default)"); ?></b> <b><?=gettext("Enabled (default)"); ?></b>
<br/> <br/>
...@@ -343,7 +343,7 @@ include("head.inc"); ...@@ -343,7 +343,7 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
<td width="78%"> <td width="78%">
<br /> <br />
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" onclick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);" /> <input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" onclick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);" />
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
<?php if (isset($id) && $a_pool[$id] && $_GET['act'] != 'dup'): ?> <?php if (isset($id) && $a_pool[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
...@@ -351,12 +351,12 @@ include("head.inc"); ...@@ -351,12 +351,12 @@ include("head.inc");
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -92,7 +92,7 @@ if ($_GET['act'] == "del") { ...@@ -92,7 +92,7 @@ if ($_GET['act'] == "del") {
/* Index lbpool array for easy hyperlinking */ /* Index lbpool array for easy hyperlinking */
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) { /* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) { for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = " $a_vs[$i]['options'][$o] = "
$a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>"; $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') { if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>"; $a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
...@@ -114,19 +114,19 @@ include("head.inc"); ...@@ -114,19 +114,19 @@ include("head.inc");
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p> <?php if (is_subsystem_dirty('loadbalancer')): ?><p>
<?php print_info_box_np(gettext("The load balancer configuration has been changed.<br />You must apply the changes in order for them to take effect."));?><br /> <?php print_info_box_np(gettext("The load balancer 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"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php"); $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
...@@ -136,11 +136,11 @@ include("head.inc"); ...@@ -136,11 +136,11 @@ include("head.inc");
$tab_array[] = array(gettext("Relay Protocols"), false, "load_balancer_relay_protocol.php"); $tab_array[] = array(gettext("Relay Protocols"), false, "load_balancer_relay_protocol.php");
display_top_tabs($tab_array); display_top_tabs($tab_array);
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid"> <div class="container-fluid">
<form action="load_balancer_relay_action.php" method="post" name="iform" id="iform"> <form action="load_balancer_relay_action.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<? <?
...@@ -158,13 +158,13 @@ include("head.inc"); ...@@ -158,13 +158,13 @@ include("head.inc");
$t->display(); $t->display();
?> ?>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?>
\ No newline at end of file <?php include("foot.inc"); ?>
...@@ -61,7 +61,7 @@ if (isset($id) && $a_action[$id]) { ...@@ -61,7 +61,7 @@ if (isset($id) && $a_action[$id]) {
/* Some sane page defaults */ /* Some sane page defaults */
$pconfig['protocol'] = 'http'; $pconfig['protocol'] = 'http';
$pconfig['direction'] = 'request'; $pconfig['direction'] = 'request';
$pconfig['type'] = 'cookie'; $pconfig['type'] = 'cookie';
$pconfig['action'] = 'change'; $pconfig['action'] = 'change';
} }
...@@ -135,7 +135,7 @@ if ($_POST) { ...@@ -135,7 +135,7 @@ if ($_POST) {
$actent = $a_action[$id]; $actent = $a_action[$id];
if($actent['name'] != "") if($actent['name'] != "")
$changedesc .= " " . sprintf(gettext("modified '%s' action:"), $actent['name']); $changedesc .= " " . sprintf(gettext("modified '%s' action:"), $actent['name']);
update_if_changed("name", $actent['name'], $pconfig['name']); update_if_changed("name", $actent['name'], $pconfig['name']);
update_if_changed("protocol", $actent['protocol'], $pconfig['protocol']); update_if_changed("protocol", $actent['protocol'], $pconfig['protocol']);
update_if_changed("type", $actent['type'], $pconfig['type']); update_if_changed("type", $actent['type'], $pconfig['type']);
...@@ -149,7 +149,7 @@ if ($_POST) { ...@@ -149,7 +149,7 @@ if ($_POST) {
case "filter": { case "filter": {
update_if_changed("value", $actent['options']['value'], $pconfig['option_action_value']); update_if_changed("value", $actent['options']['value'], $pconfig['option_action_value']);
update_if_changed("key", $actent['options']['akey'], $pconfig['option_action_key']); update_if_changed("key", $actent['options']['akey'], $pconfig['option_action_key']);
break; break;
} }
case "hash": case "hash":
case "log": { case "log": {
...@@ -157,7 +157,7 @@ if ($_POST) { ...@@ -157,7 +157,7 @@ if ($_POST) {
break; break;
} }
} }
if (isset($id) && $a_action[$id]) { if (isset($id) && $a_action[$id]) {
// XXX - TODO // XXX - TODO
/* modify all virtual servers with this name */ /* modify all virtual servers with this name */
...@@ -238,7 +238,7 @@ function updateProtocol(m) { ...@@ -238,7 +238,7 @@ function updateProtocol(m) {
foreach ($actions['direction'][$ddir][$type] as $action => $av ) { foreach ($actions['direction'][$ddir][$type] as $action => $av ) {
if($dtype == $type) { if($dtype == $type) {
echo "jQuery('#{$ddir}_{$type}_{$action}').show();"; echo "jQuery('#{$ddir}_{$type}_{$action}').show();";
} }
} }
} }
?> ?>
...@@ -392,10 +392,10 @@ function num_options() { ...@@ -392,10 +392,10 @@ function num_options() {
jQuery(document).ready(function() { jQuery(document).ready(function() {
updateProtocol('<?=htmlspecialchars($pconfig['protocol'])?>'); updateProtocol('<?=htmlspecialchars($pconfig['protocol'])?>');
updateDirection('<?=htmlspecialchars($pconfig['direction'])?>'); updateDirection('<?=htmlspecialchars($pconfig['direction'])?>');
updateType('<?=htmlspecialchars($pconfig['type'])?>'); updateType('<?=htmlspecialchars($pconfig['type'])?>');
updateAction('<?=htmlspecialchars($pconfig['action'])?>'); updateAction('<?=htmlspecialchars($pconfig['action'])?>');
}); });
</script> </script>
...@@ -406,18 +406,18 @@ jQuery(document).ready(function() { ...@@ -406,18 +406,18 @@ jQuery(document).ready(function() {
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<form action="load_balancer_relay_action_edit.php" method="post" name="iform" id="iform"> <form action="load_balancer_relay_action_edit.php" method="post" name="iform" id="iform">
<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 colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Action entry"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Action entry"); ?></td>
</tr> </tr>
...@@ -451,7 +451,7 @@ jQuery(document).ready(function() { ...@@ -451,7 +451,7 @@ jQuery(document).ready(function() {
</select> </select>
</td> </td>
</tr> </tr>
<!-- Direction --> <!-- Direction -->
<tr align="left" id="direction_row"> <tr align="left" id="direction_row">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
...@@ -468,10 +468,10 @@ jQuery(document).ready(function() { ...@@ -468,10 +468,10 @@ jQuery(document).ready(function() {
} }
?> ?>
</select> </select>
</td> </td>
</tr> </tr>
<!-- Type --> <!-- Type -->
<tr align="left" id="type_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>> <tr align="left" id="type_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
...@@ -492,7 +492,7 @@ jQuery(document).ready(function() { ...@@ -492,7 +492,7 @@ jQuery(document).ready(function() {
</select> </select>
</td> </td>
</tr> </tr>
<!-- Action --> <!-- Action -->
<tr align="left" id="action_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>> <tr align="left" id="action_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Action"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Action"); ?></td>
...@@ -505,9 +505,9 @@ jQuery(document).ready(function() { ...@@ -505,9 +505,9 @@ jQuery(document).ready(function() {
if(isset($pconfig['action']) && $pconfig['action'] == $action) { if(isset($pconfig['action']) && $pconfig['action'] == $action) {
$selected = " selected"; $selected = " selected";
} else if ($action == "change" ){ } else if ($action == "change" ){
$selected = " selected"; $selected = " selected";
} else { } else {
$selected = ""; $selected = "";
} }
echo "<option id=\"{$dir}_{$type}_{$action}\" value=\"{$dir}_{$type}_{$action}\" onClick=\"updateAction('$action');\" style=\"display: none;\"{$selected}>{$action}</option>\n"; echo "<option id=\"{$dir}_{$type}_{$action}\" value=\"{$dir}_{$type}_{$action}\" onClick=\"updateAction('$action');\" style=\"display: none;\"{$selected}>{$action}</option>\n";
} }
...@@ -585,4 +585,4 @@ jQuery(document).ready(function() { ...@@ -585,4 +585,4 @@ jQuery(document).ready(function() {
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -88,7 +88,7 @@ if ($_GET['act'] == "del") { ...@@ -88,7 +88,7 @@ if ($_GET['act'] == "del") {
/* Index lbpool array for easy hyperlinking */ /* Index lbpool array for easy hyperlinking */
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) { /* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) { for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = " $a_vs[$i]['options'][$o] = "
$a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>"; $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') { if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>"; $a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
...@@ -109,18 +109,18 @@ include("head.inc"); ...@@ -109,18 +109,18 @@ include("head.inc");
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p> <?php if (is_subsystem_dirty('loadbalancer')): ?><p>
<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /> <?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php"); $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
...@@ -130,11 +130,11 @@ include("head.inc"); ...@@ -130,11 +130,11 @@ include("head.inc");
$tab_array[] = array(gettext("Relay Protocols"), true, "load_balancer_relay_protocol.php"); $tab_array[] = array(gettext("Relay Protocols"), true, "load_balancer_relay_protocol.php");
display_top_tabs($tab_array); display_top_tabs($tab_array);
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid"> <div class="container-fluid">
<form action="load_balancer_relay_protocol.php" method="post" name="iform" id="iform"> <form action="load_balancer_relay_protocol.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<? <?
...@@ -152,12 +152,12 @@ include("head.inc"); ...@@ -152,12 +152,12 @@ include("head.inc");
$t->display(); $t->display();
?> ?>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -105,7 +105,7 @@ if ($_POST) { ...@@ -105,7 +105,7 @@ if ($_POST) {
$protent = $a_protocol[$id]; $protent = $a_protocol[$id];
if($protent['name'] != "") if($protent['name'] != "")
$changedesc .= " " . sprintf(gettext("modified '%s' load balancing protocol:"), $protent['name']); $changedesc .= " " . sprintf(gettext("modified '%s' load balancing protocol:"), $protent['name']);
update_if_changed(gettext("name"), $protent['name'], $pconfig['name']); update_if_changed(gettext("name"), $protent['name'], $pconfig['name']);
update_if_changed(gettext("type"), $protent['type'], $pconfig['type']); update_if_changed(gettext("type"), $protent['type'], $pconfig['type']);
update_if_changed(gettext("description"), $protent['descr'], $pconfig['descr']); update_if_changed(gettext("description"), $protent['descr'], $pconfig['descr']);
...@@ -119,12 +119,12 @@ if ($_POST) { ...@@ -119,12 +119,12 @@ if ($_POST) {
if ($config['load_balancer']['virtual_server'][$i]['protocol'] == $a_protocol[$id]['name']) if ($config['load_balancer']['virtual_server'][$i]['protocol'] == $a_protocol[$id]['name'])
$config['load_balancer']['virtual_server'][$i]['protocol'] = $protent['name']; $config['load_balancer']['virtual_server'][$i]['protocol'] = $protent['name'];
} }
*/ */
$a_protocol[$id] = $protent; $a_protocol[$id] = $protent;
} else { } else {
$a_protocol[] = $protent; $a_protocol[] = $protent;
} }
if ($changecount > 0) { if ($changecount > 0) {
/* Mark config dirty */ /* Mark config dirty */
mark_subsystem_dirty('loadbalancer'); mark_subsystem_dirty('loadbalancer');
...@@ -189,18 +189,18 @@ jQuery(document).ready(function(){ ...@@ -189,18 +189,18 @@ jQuery(document).ready(function(){
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<form action="load_balancer_relay_protocol_edit.php" method="post" name="iform" id="iform"> <form action="load_balancer_relay_protocol_edit.php" method="post" name="iform" id="iform">
<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 colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Protocol entry"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Protocol entry"); ?></td>
...@@ -267,7 +267,7 @@ jQuery(document).ready(function(){ ...@@ -267,7 +267,7 @@ jQuery(document).ready(function(){
<input class="formbtn" type="button" name="removeFromEnabled" value="<?=gettext("Remove"); ?>" onclick="deleteOption($('lbaction'));" /> <input class="formbtn" type="button" name="removeFromEnabled" value="<?=gettext("Remove"); ?>" onclick="deleteOption($('lbaction'));" />
</center> </center>
</td> </td>
<td> <td>
<center> <center>
<b><?=gettext("Enabled Actions"); ?></b> <b><?=gettext("Enabled Actions"); ?></b>
...@@ -308,4 +308,4 @@ jQuery(document).ready(function(){ ...@@ -308,4 +308,4 @@ jQuery(document).ready(function(){
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -57,13 +57,13 @@ if ($_POST) { ...@@ -57,13 +57,13 @@ if ($_POST) {
$retval = 0; $retval = 0;
$retval |= filter_configure(); $retval |= filter_configure();
$retval |= relayd_configure(); $retval |= relayd_configure();
$savemsg = get_std_save_message($retval); $savemsg = get_std_save_message($retval);
clear_subsystem_dirty('loadbalancer'); clear_subsystem_dirty('loadbalancer');
} else { } else {
unset($input_errors); unset($input_errors);
$pconfig = $_POST; $pconfig = $_POST;
/* input validation */ /* input validation */
if ($_POST['timeout'] && !is_numeric($_POST['timeout'])) { if ($_POST['timeout'] && !is_numeric($_POST['timeout'])) {
$input_errors[] = gettext("Timeout must be a numeric value"); $input_errors[] = gettext("Timeout must be a numeric value");
...@@ -73,7 +73,7 @@ if ($_POST) { ...@@ -73,7 +73,7 @@ if ($_POST) {
$input_errors[] = gettext("Interval must be a numeric value"); $input_errors[] = gettext("Interval must be a numeric value");
} }
if ($_POST['prefork']) { if ($_POST['prefork']) {
if (!is_numeric($_POST['prefork'])) { if (!is_numeric($_POST['prefork'])) {
$input_errors[] = gettext("Prefork must be a numeric value"); $input_errors[] = gettext("Prefork must be a numeric value");
} else { } else {
...@@ -89,8 +89,8 @@ if ($_POST) { ...@@ -89,8 +89,8 @@ if ($_POST) {
$lbsetting['interval'] = $_POST['interval']; $lbsetting['interval'] = $_POST['interval'];
$lbsetting['prefork'] = $_POST['prefork']; $lbsetting['prefork'] = $_POST['prefork'];
write_config(); write_config();
mark_subsystem_dirty('loadbalancer'); mark_subsystem_dirty('loadbalancer');
} }
} }
} }
...@@ -106,18 +106,18 @@ include("head.inc"); ...@@ -106,18 +106,18 @@ include("head.inc");
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/> <?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /> <?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php"); $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
...@@ -126,13 +126,13 @@ include("head.inc"); ...@@ -126,13 +126,13 @@ include("head.inc");
$tab_array[] = array(gettext("Settings"), true, "load_balancer_setting.php"); $tab_array[] = array(gettext("Settings"), true, "load_balancer_setting.php");
display_top_tabs($tab_array); display_top_tabs($tab_array);
?> ?>
<div class="tab-content content-box col-xs-12">
<form action="load_balancer_setting.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="tab-content content-box col-xs-12">
<form action="load_balancer_setting.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> <tr>
...@@ -170,12 +170,12 @@ include("head.inc"); ...@@ -170,12 +170,12 @@ include("head.inc");
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -110,18 +110,18 @@ $main_buttons = array( ...@@ -110,18 +110,18 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><br/> <?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
<?php print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br /> <?php print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<?php <?php
/* active tabs */ /* active tabs */
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php"); $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
...@@ -129,10 +129,10 @@ $main_buttons = array( ...@@ -129,10 +129,10 @@ $main_buttons = array(
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php"); $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php"); $tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array); 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="load_balancer_virtual_server.php" method="post" name="iform" id="iform"> <form action="load_balancer_virtual_server.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
...@@ -154,11 +154,11 @@ $main_buttons = array( ...@@ -154,11 +154,11 @@ $main_buttons = array(
$t->display(); $t->display();
?> ?>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
...@@ -70,13 +70,13 @@ if ($_POST) { ...@@ -70,13 +70,13 @@ if ($_POST) {
/* input validation */ /* input validation */
switch($pconfig['mode']) { switch($pconfig['mode']) {
case "redirect": { case "redirect": {
$reqdfields = explode(" ", "ipaddr name mode"); $reqdfields = explode(" ", "ipaddr name mode");
$reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Mode")); $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Mode"));
break; break;
} }
case "relay": { case "relay": {
$reqdfields = explode(" ", "ipaddr name mode relay_protocol"); $reqdfields = explode(" ", "ipaddr name mode relay_protocol");
$reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Relay Protocol")); $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Relay Protocol"));
break; break;
} }
} }
...@@ -152,44 +152,44 @@ include("head.inc"); ...@@ -152,44 +152,44 @@ include("head.inc");
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/autosuggest.js"></script> <script type="text/javascript" src="/javascript/autosuggest.js"></script>
<script type="text/javascript" src="/javascript/suggestions.js"></script> <script type="text/javascript" src="/javascript/suggestions.js"></script>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <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"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform"> <form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform">
<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 colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td> <td colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="32" maxlength="32" /> <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="32" maxlength="32" />
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?> size="64" /> <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?> size="64" />
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39" /> <input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39" />
<br /><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster."); ?> <br /><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster."); ?>
...@@ -203,7 +203,7 @@ include("head.inc"); ...@@ -203,7 +203,7 @@ include("head.inc");
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Port"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16" /> <input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16" />
<br /><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster."); ?> <br /><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster."); ?>
...@@ -218,7 +218,7 @@ include("head.inc"); ...@@ -218,7 +218,7 @@ include("head.inc");
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Virtual Server Pool"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Virtual Server Pool"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?> <?php if(count($config['load_balancer']['lbpool']) == 0): ?>
<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?> <b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
...@@ -237,22 +237,22 @@ include("head.inc"); ...@@ -237,22 +237,22 @@ include("head.inc");
</td> </td>
</tr> </tr>
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Fall Back Pool"); ?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Fall Back Pool"); ?></td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?> <?php if(count($config['load_balancer']['lbpool']) == 0): ?>
<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?> <b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
<?php else: ?> <?php else: ?>
<select id="sitedown" name="sitedown"> <select id="sitedown" name="sitedown">
<option value=""<?=htmlspecialchars($pconfig['sitedown']) == '' ? ' selected' : ''?>><?=gettext("none"); ?></option> <option value=""<?=htmlspecialchars($pconfig['sitedown']) == '' ? ' selected' : ''?>><?=gettext("none"); ?></option>
<?php <?php
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = ""; $selected = "";
if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['sitedown'] ) if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['sitedown'] )
$selected = " selected=\"selected\""; $selected = " selected=\"selected\"";
echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>"; echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
} }
?> ?>
</select> </select>
<br /><?=gettext("The server pool to which clients will be redirected if *ALL* servers in the Virtual Server Pool are offline."); ?> <br /><?=gettext("The server pool to which clients will be redirected if *ALL* servers in the Virtual Server Pool are offline."); ?>
<br /><?=gettext("This option is NOT compatible with the DNS relay protocol."); ?> <br /><?=gettext("This option is NOT compatible with the DNS relay protocol."); ?>
<?php endif; ?> <?php endif; ?>
...@@ -261,11 +261,11 @@ include("head.inc"); ...@@ -261,11 +261,11 @@ include("head.inc");
<tr style="display:none;"><td><input type="hidden" name="mode" value="redirect_mode" /></td></tr> <tr style="display:none;"><td><input type="hidden" name="mode" value="redirect_mode" /></td></tr>
<!-- <!--
<tr align="left"> <tr align="left">
<td width="22%" valign="top" class="vncellreq">Mode</td> <td width="22%" valign="top" class="vncellreq">Mode</td>
<td width="78%" class="vtable" colspan="2"> <td width="78%" class="vtable" colspan="2">
<input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?> /> Redirect <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?> /> Redirect
<input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?> /> Relay <input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?> /> Relay
<br /> <br />
</td> </td>
</tr> </tr>
...@@ -295,18 +295,18 @@ include("head.inc"); ...@@ -295,18 +295,18 @@ include("head.inc");
<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?> <?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<span class="red"><strong><?=gettext("Note:"); ?></strong></span> <?=gettext("Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up."); ?> <span class="red"><strong><?=gettext("Note:"); ?></strong></span> <?=gettext("Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up."); ?>
</form> </form>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
\ No newline at end of file
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