Commit 85669dbd authored by Ad Schellevis's avatar Ad Schellevis

(legacy) refactor system_hasync.php

parent 86d50f87
...@@ -30,34 +30,38 @@ ...@@ -30,34 +30,38 @@
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php');
if (!isset($config['hasync']) || !is_array($config['hasync'])) { if (!isset($config['hasync']) || !is_array($config['hasync'])) {
$config['hasync'] = array(); $config['hasync'] = array();
} }
$a_hasync = &$config['hasync']; $a_hasync = &$config['hasync'];
$checkbox_names = array( $checkbox_names = array('pfsyncenabled', 'synchronizeusers', 'synchronizeauthservers', 'synchronizecerts',
'pfsyncenabled', 'synchronizerules', 'synchronizeschedules', 'synchronizealiases', 'synchronizenat',
'synchronizeusers', 'synchronizeipsec', 'synchronizeopenvpn', 'synchronizedhcpd', 'synchronizewol',
'synchronizeauthservers', 'synchronizestaticroutes', 'synchronizelb', 'synchronizevirtualip',
'synchronizecerts',
'synchronizerules',
'synchronizeschedules',
'synchronizealiases',
'synchronizenat',
'synchronizeipsec',
'synchronizeopenvpn',
'synchronizedhcpd',
'synchronizewol',
'synchronizestaticroutes',
'synchronizelb',
'synchronizevirtualip',
'synchronizednsforwarder', 'synchronizednsforwarder',
); );
if ($_POST) {
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array();
foreach ($checkbox_names as $name) {
if (isset($a_hasync[$name])) {
$pconfig[$name] = $a_hasync[$name];
} else {
$pconfig[$name] = null;
}
}
foreach (array('pfsyncpeerip','pfsyncinterface','synchronizetoip','username','password') as $tag) {
if (isset($a_hasync[$tag])) {
$pconfig[$tag] = $a_hasync[$tag];
} else {
$pconfig[$tag] = null;
}
}
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
foreach ($checkbox_names as $name) { foreach ($checkbox_names as $name) {
if (isset($pconfig[$name])) { if (isset($pconfig[$name])) {
...@@ -77,77 +81,56 @@ if ($_POST) { ...@@ -77,77 +81,56 @@ if ($_POST) {
exit(); exit();
} }
foreach ($checkbox_names as $name) { legacy_html_escape_form_data($pconfig);
if (isset($a_hasync[$name])) {
$pconfig[$name] = $a_hasync[$name];
} else {
$pconfig[$name] = null;
}
}
foreach (array('pfsyncpeerip','pfsyncinterface','synchronizetoip','username','password') as $tag) {
if (isset($a_hasync[$tag])) {
$pconfig[$tag] = $a_hasync[$tag];
} else {
$pconfig[$tag] = null;
}
}
$ifaces = get_configured_interface_with_descr();
$ifaces["lo0"] = "loopback";
include("head.inc"); include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<!-- row -->
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
<div class="table-responsive"> <div class="table-responsive">
<form action="system_hasync.php" method="post">
<form action="system_hasync.php" method="post" name="iform" id="iform"> <table class="table table-striped">
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<thead>
<tr> <tr>
<th colspan="2" class="listtopic"><?=gettext('State Synchronization Settings (pfsync)') ?></th> <td width="22%"><strong><?=gettext('State Synchronization') ?></strong></td>
<td width="78%" align="right">
<small><?=gettext("full help"); ?> </small>
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
</td>
</tr> </tr>
</thead> <tr>
<tbody> <td><a id="help_for_pfsyncenabled" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize States') ?></td>
<tr valign="top"> <td>
<td width="22%" class="vncell"><?=gettext('Synchronize States') ?></td> <input type="checkbox" name="pfsyncenabled" value="on" <?= !empty($pconfig['pfsyncenabled']) ? "checked=\"checked\"" : "";?> />
<td class="vtable"> <div class="hidden" for="help_for_pfsyncenabled">
<input id='pfsyncenabled' type='checkbox' name='pfsyncenabled' value='on' <?php if ($pconfig['pfsyncenabled'] === "on") {
echo "checked='checked'";
} ?> />
<?= sprintf(gettext('pfsync transfers state insertion, update, and deletion messages between firewalls.%s' . <?= sprintf(gettext('pfsync transfers state insertion, update, and deletion messages between firewalls.%s' .
'Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (%sIP Protocol 240%s).%s' . 'Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (%sIP Protocol 240%s).%s' .
'It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.%s' . 'It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.%s' .
'This setting should be enabled on all members of a failover group.'), '<br/>','<a href="http://www.openbsd.org/faq/pf/carp.html" target="_blank">','</a>','<br/>','<br/>') ?> 'This setting should be enabled on all members of a failover group.'), '<br/>','<a href="http://www.openbsd.org/faq/pf/carp.html" target="_blank">','</a>','<br/>','<br/>') ?>
<div class="well well-sm" ><b><?=gettext('Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)') ?></b></div> <div class="well well-sm" ><b><?=gettext('Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)') ?></b></div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Interface') ?></td> <td><a id="help_for_pfsyncinterface" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Interface') ?></td>
<td class="vtable"> <td>
<select id='pfsyncinterface' name="pfsyncinterface" class="selectpicker" data-style="btn-default" data-live-search="true" data-width="auto"> <select name="pfsyncinterface" class="selectpicker" data-style="btn-default" data-live-search="true" data-width="auto">
<?php foreach ($ifaces as $ifname => $iface) { <?php
$ifaces = get_configured_interface_with_descr();
$ifaces["lo0"] = gettext("loopback");
foreach ($ifaces as $ifname => $iface):
?> ?>
<?php $selected = ($pconfig['pfsyncinterface'] === $ifname) ? 'selected="selected"' : ''; ?> <option value="<?=htmlentities($ifname);?>" <?= ($pconfig['pfsyncinterface'] === $ifname) ? 'selected="selected"' : ''; ?>>
<option value="<?= htmlentities($ifname); <?= htmlentities($iface); ?>
?>" <?= $selected ?>><?= htmlentities($iface); ?></option> </option>
<?php <?php
} ?> endforeach; ?>
</select> </select>
<div class="hidden" for="help_for_pfsyncinterface">
<?=gettext('If Synchronize States is enabled, it will utilize this interface for communication.') ?><br/><br/> <?=gettext('If Synchronize States is enabled, it will utilize this interface for communication.') ?><br/><br/>
<div class="well"> <div class="well">
<lu> <lu>
...@@ -156,33 +139,26 @@ include("head.inc"); ...@@ -156,33 +139,26 @@ include("head.inc");
<li><?=gettext('You must have an IP assigned to the interface on any participating sync nodes.') ?></li> <li><?=gettext('You must have an IP assigned to the interface on any participating sync nodes.') ?></li>
</lu> </lu>
</div> </div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('pfsync Synchronize Peer IP') ?></td> <td><a id="help_for_pfsyncpeerip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Peer IP') ?></td>
<td class="vtable"> <td>
<input id='pfsyncpeerip' name='pfsyncpeerip' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['pfsyncpeerip']); ?>' /> <input name="pfsyncpeerip" type="text" value="<?=$pconfig['pfsyncpeerip']; ?>" />
<div class="hidden" for="help_for_pfsyncpeerip">
<?=gettext('Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.') ?> <?=gettext('Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast.') ?>
</div>
</td> </td>
</tr> </tr>
<tr>
<td></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<table class="table table-primary table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<thead>
<tr> <tr>
<th colspan="2" class="listtopic"><?=gettext('Configuration Synchronization Settings (XMLRPC Sync)') ?></th> <th colspan="2" class="listtopic"><?=gettext('Configuration Synchronization Settings (XMLRPC Sync)') ?></th>
</tr> </tr>
</thead> <tr>
<tbody> <td><a id="help_for_synchronizetoip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Synchronize Config to IP') ?></td>
<tr valign="top"> <td>
<td width="22%" class="vncell"><?=gettext('Synchronize Config to IP') ?></td> <input name="synchronizetoip" type="text" value="<?=$pconfig['synchronizetoip']; ?>" />
<td class="vtable"> <div class="hidden" for="help_for_synchronizetoip">
<input id='synchronizetoip' name='synchronizetoip' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['synchronizetoip']); ?>' />
<?=gettext('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.') ?><br /> <?=gettext('Enter the IP address of the firewall to which the selected configuration sections should be synchronized.') ?><br />
<div class="well"> <div class="well">
<lu> <lu>
...@@ -190,186 +166,182 @@ include("head.inc"); ...@@ -190,186 +166,182 @@ include("head.inc");
<li><b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b></li> <li><b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b></li>
</lu> </lu>
</div> </div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Remote System Username') ?></td> <td><a id="help_for_username" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Remote System Username') ?></td>
<td class="vtable"> <td>
<input id='username' name='username' type='text' class='formfld unknown' value='<?= htmlentities($pconfig['username']); ?>' /> <input name="username" type="text" value="<?=$pconfig['username'];?>" />
<br /> <div class="hidden" for="help_for_username">
<?=gettext('Enter the webConfigurator username of the system entered above for synchronizing your configuration.') ?><br /> <?=gettext('Enter the webConfigurator username of the system entered above for synchronizing your configuration.') ?><br />
<div class="well well-sm"> <div class="well well-sm">
<b><?=gettext('Do not use the Synchronize Config to IP and username option on backup cluster members!') ?></b> <b><?=gettext('Do not use the Synchronize Config to IP and username option on backup cluster members!') ?></b>
</div> </div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Remote System Password') ?></td> <td><a id="help_for_password" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Remote System Password') ?></td>
<td class="vtable"> <td>
<input id='password' type='password' name='password' class='formfld pwd' value='<?= htmlentities($pconfig['password']); ?>' /> <input type="password" name="password" value="<?=$pconfig['password']; ?>" />
<br /> <div class="hidden" for="help_for_password">
<?=gettext('Enter the webConfigurator password of the system entered above for synchronizing your configuration.') ?><br /> <?=gettext('Enter the webConfigurator password of the system entered above for synchronizing your configuration.') ?><br />
<div class="well well-sm"> <div class="well well-sm">
<b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b> <b><?=gettext('Do not use the Synchronize Config to IP and password option on backup cluster members!') ?></b>
</div> </div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Users and Groups') ?></td> <td><a id="help_for_synchronizeusers" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Users and Groups') ?></td>
<td class="vtable"> <td>
<input id='synchronizeusers' type='checkbox' name='synchronizeusers' value='on' <?php if ($pconfig['synchronizeusers'] === "on") { <input type="checkbox" name="synchronizeusers" value="on" <?=!empty($pconfig['synchronizeusers']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizeusers">
} ?> />
<?=gettext('Automatically sync the users and groups over to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the users and groups over to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Auth Servers') ?></td> <td><a id="help_for_synchronizeauthservers" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Auth Servers') ?></td>
<td class="vtable"> <td>
<input id='synchronizeauthservers' type='checkbox' name='synchronizeauthservers' value='on' <?php if ($pconfig['synchronizeauthservers'] === "on") { <input type="checkbox" name='synchronizeauthservers' value="on" <?=!empty($pconfig['synchronizeauthservers']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizeauthservers">
} ?> />
<?=gettext('Automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Certificates') ?></td> <td><a id="help_for_synchronizecerts" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Certificates') ?></td>
<td class="vtable"> <td>
<input id='synchronizecerts' type='checkbox' name='synchronizecerts' value='on' <?php if ($pconfig['synchronizecerts'] === "on") { <input type="checkbox" name="synchronizecerts" value="on" <?=!empty($pconfig['synchronizecerts']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizecerts">
} ?> />
<?=gettext('Automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize rules') ?></td> <td><a id="help_for_synchronizerules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Firewall Rules') ?></td>
<td class="vtable"> <td>
<input id='synchronizerules' type='checkbox' name='synchronizerules' value='on' <?php if ($pconfig['synchronizerules'] === "on") { <input type="checkbox" name="synchronizerules" value="on" <?=!empty($pconfig['synchronizerules']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizerules">
} ?> />
<?=gettext('Automatically sync the firewall rules to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the firewall rules to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Firewall Schedules') ?></td> <td><a id="help_for_synchronizeschedules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Firewall Schedules') ?></td>
<td class="vtable"> <td>
<input id='synchronizeschedules' type='checkbox' name='synchronizeschedules' value='on' <?php if ($pconfig['synchronizeschedules'] === "on") { <input type="checkbox" name="synchronizeschedules" value="on" <?=!empty($pconfig['synchronizeschedules']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizeschedules">
} ?> />
<?=gettext('Automatically sync the firewall schedules to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the firewall schedules to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize aliases') ?></td> <td><a id="help_for_synchronizealiases" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Aliases') ?></td>
<td class="vtable"> <td>
<input id='synchronizealiases' type='checkbox' name='synchronizealiases' value='on' <?php if ($pconfig['synchronizealiases'] === "on") { <input type="checkbox" name="synchronizealiases" value="on" <?=!empty($pconfig['synchronizealiases']) ? "checked=\"checked\"" : "";?>/>
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizealiases">
} ?> />
<?=gettext('Automatically sync the aliases over to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the aliases over to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize NAT') ?></td> <td><a id="help_for_synchronizenat" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('NAT') ?></td>
<td class="vtable"> <td>
<input id='synchronizenat' type='checkbox' name='synchronizenat' value='on' <?php if ($pconfig['synchronizenat'] === "on") { <input type="checkbox" name="synchronizenat" value="on" <?=!empty($pconfig['synchronizenat']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizenat">
} ?> />
<?=gettext('Automatically sync the NAT rules over to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the NAT rules over to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize IPsec') ?></td> <td><a id="help_for_synchronizeipsec" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('IPsec') ?></td>
<td class="vtable"> <td>
<input id='synchronizeipsec' type='checkbox' name='synchronizeipsec' value='on' <?php if ($pconfig['synchronizeipsec'] === "on") { <input type="checkbox" name="synchronizeipsec" value="on" <?=!empty($pconfig['synchronizeipsec']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizeipsec">
} ?> />
<?=gettext('Automatically sync the IPsec configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the IPsec configuration to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize OpenVPN') ?></td> <td><a id="help_for_synchronizeopenvpn" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('OpenVPN') ?></td>
<td class="vtable"> <td>
<input id='synchronizeopenvpn' type='checkbox' name='synchronizeopenvpn' value='on' <?php if ($pconfig['synchronizeopenvpn'] === "on") { <input type="checkbox" name="synchronizeopenvpn" value="on" <?=!empty($pconfig['synchronizeopenvpn']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizeopenvpn">
} ?> />
<?=gettext('Automatically sync the OpenVPN configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the OpenVPN configuration to the other HA host when changes are made.') ?>
<div class="well well-sm"><b><?=gettext('Using this option implies "Synchronize Certificates" as they are required for OpenVPN.') ?></b></div> <div class="well well-sm"><b><?=gettext('Using this option implies "Synchronize Certificates" as they are required for OpenVPN.') ?></b></div>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize DHCPD') ?></td> <td><a id="help_for_synchronizedhcpd" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('DHCPD') ?></td>
<td class="vtable"> <td>
<input id='synchronizedhcpd' type='checkbox' name='synchronizedhcpd' value='on' <?php if ($pconfig['synchronizedhcpd'] === "on") { <input type="checkbox" name="synchronizedhcpd" value="on" <?=!empty($pconfig['synchronizedhcpd']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizedhcpd">
} ?> />
<?=gettext('Automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4.') ?> <?=gettext('Automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Wake on LAN') ?></td> <td><a id="help_for_synchronizewol" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Wake on LAN') ?></td>
<td class="vtable"> <td>
<input id='synchronizewol' type='checkbox' name='synchronizewol' value='on' <?php if ($pconfig['synchronizewol'] === "on") { <input type="checkbox" name="synchronizewol" value="on" <?=!empty($pconfig['synchronizewol']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizewol">
} ?> />
<?=gettext('Automatically sync the WoL configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the WoL configuration to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Static Routes') ?></td> <td><a id="help_for_synchronizestaticroutes" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Static Routes') ?></td>
<td class="vtable"> <td>
<input id='synchronizestaticroutes' type='checkbox' name='synchronizestaticroutes' value='on' <?php if ($pconfig['synchronizestaticroutes'] === "on") { <input type="checkbox" name="synchronizestaticroutes" value="on" <?=!empty($pconfig['synchronizestaticroutes']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizestaticroutes">
} ?> />
<?=gettext('Automatically sync the Static Route configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the Static Route configuration to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Load Balancer') ?></td> <td><a id="help_for_synchronizelb" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Load Balancer') ?></td>
<td class="vtable"> <td>
<input id='synchronizelb' type='checkbox' name='synchronizelb' value='on' <?php if ($pconfig['synchronizelb'] === "on") { <input type="checkbox" name="synchronizelb" value="on" <?=!empty($pconfig['synchronizelb']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizelb">
} ?> />
<?=gettext('Automatically sync the Load Balancer configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the Load Balancer configuration to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize Virtual IPs') ?></td> <td><a id="help_for_synchronizevirtualip" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Virtual IPs') ?></td>
<td class="vtable"> <td>
<input id='synchronizevirtualip' type='checkbox' name='synchronizevirtualip' value='on' <?php if ($pconfig['synchronizevirtualip'] === "on") { <input type="checkbox" name="synchronizevirtualip" value="on" <?=!empty($pconfig['synchronizevirtualip']) ? "checked=\"checked\"" : "";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizevirtualip">
} ?> />
<?=gettext('Automatically sync the CARP Virtual IPs to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the CARP Virtual IPs to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr>
<td width="22%" class="vncell"><?=gettext('Synchronize DNS Forwarder') ?></td> <td><a id="help_for_synchronizednsforwarder" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('DNS Forwarder') ?></td>
<td class="vtable"> <td>
<input id='synchronizednsforwarder' type='checkbox' name='synchronizednsforwarder' value='on' <?php if ($pconfig['synchronizednsforwarder'] === "on") { <input type="checkbox" name="synchronizednsforwarder" value="on" <?=!empty($pconfig['synchronizednsforwarder']) ? "checked=\"checked\"" :"";?> />
echo "checked='checked'"; <div class="hidden" for="help_for_synchronizednsforwarder">
} ?> />
<?=gettext('Automatically sync the DNS Forwarder configuration to the other HA host when changes are made.') ?> <?=gettext('Automatically sync the DNS Forwarder configuration to the other HA host when changes are made.') ?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td></td>
<td width="78%"> <td>
<input name="id" type="hidden" value="0" />
<input name="Submit" type="submit" class="btn btn-primary" value="Save" /> <input name="Submit" type="submit" class="btn btn-primary" value="Save" />
<input type="button" class="btn btn-default" value="<?=gettext("Cancel"); <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php');?>'" />
?>" onclick="window.location.href='<?=$referer;?>'" />
</td> </td>
</tr> </tr>
</tbody>
</table> </table>
</form> </form>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
......
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