summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dyndns_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-24 12:38:27 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-24 12:38:27 +0545
commit9c12c13069588d2d4df524db6e70819654f7f400 (patch)
treeb3e884b770750d250d3d9315d9d24805e4678181 /usr/local/www/services_dyndns_edit.php
parent88cbd0049b78bd731648be68c13e08161e5e943c (diff)
downloadpfsense-9c12c13069588d2d4df524db6e70819654f7f400.zip
pfsense-9c12c13069588d2d4df524db6e70819654f7f400.tar.gz
Code style services dyndns
Diffstat (limited to 'usr/local/www/services_dyndns_edit.php')
-rw-r--r--usr/local/www/services_dyndns_edit.php453
1 files changed, 239 insertions, 214 deletions
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index aa2bf43..0387dcf 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -42,13 +42,15 @@
/* returns true if $uname is a valid DynDNS username */
function is_dyndns_username($uname) {
- if (!is_string($uname))
- return false;
-
- if (preg_match("/[^a-z0-9\-\+.@_:]/i", $uname))
- return false;
- else
- return true;
+ if (!is_string($uname)) {
+ return false;
+ }
+
+ if (preg_match("/[^a-z0-9\-\+.@_:]/i", $uname)) {
+ return false;
+ } else {
+ return true;
+ }
}
require("guiconfig.inc");
@@ -59,10 +61,12 @@ if (!is_array($config['dyndnses']['dyndns'])) {
$a_dyndns = &$config['dyndnses']['dyndns'];
-if (is_numericint($_GET['id']))
+if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
-if (isset($_POST['id']) && is_numericint($_POST['id']))
+}
+if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
+}
if (isset($id) && isset($a_dyndns[$id])) {
$pconfig['username'] = $a_dyndns[$id]['username'];
@@ -88,9 +92,10 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
-
- if(($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "")
- $_POST['username'] = "none";
+
+ if (($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "") {
+ $_POST['username'] = "none";
+ }
/* input validation */
$reqdfields = array();
@@ -102,32 +107,37 @@ if ($_POST) {
$reqdfieldsn[] = gettext("Hostname");
$reqdfields[] = "passwordfld";
$reqdfieldsn[] = gettext("Password");
- $reqdfields[] = "username";
- $reqdfieldsn[] = gettext("Username");
- }else{
+ $reqdfields[] = "username";
+ $reqdfieldsn[] = gettext("Username");
+ } else {
$reqdfields[] = "updateurl";
$reqdfieldsn[] = gettext("Update URL");
- }
+ }
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (isset($_POST['host']) && in_array("host", $reqdfields)) {
/* Namecheap can have a @. in hostname */
- if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.')
+ if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.') {
$host_to_check = substr($_POST['host'], 2);
- else
+ } else {
$host_to_check = $_POST['host'];
+ }
- if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6")
- if (!is_domain($host_to_check))
+ if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
+ if (!is_domain($host_to_check)) {
$input_errors[] = gettext("The hostname contains invalid characters.");
+ }
+ }
unset($host_to_check);
}
- if (($_POST['mx'] && !is_domain($_POST['mx'])))
+ if (($_POST['mx'] && !is_domain($_POST['mx']))) {
$input_errors[] = gettext("The MX contains invalid characters.");
- if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == "")))
- $input_errors[] = gettext("The username contains invalid characters.");
+ }
+ if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == ""))) {
+ $input_errors[] = gettext("The username contains invalid characters.");
+ }
if (!$input_errors) {
$dyndns = array();
@@ -141,10 +151,11 @@ if ($_POST) {
$dyndns['curl_ipresolve_v4'] = $_POST['curl_ipresolve_v4'] ? true : false;
$dyndns['curl_ssl_verifypeer'] = $_POST['curl_ssl_verifypeer'] ? true : false;
/* In this place enable means disabled */
- if ($_POST['enable'])
+ if ($_POST['enable']) {
unset($dyndns['enable']);
- else
+ } else {
$dyndns['enable'] = true;
+ }
$dyndns['interface'] = $_POST['interface'];
$dyndns['zoneid'] = $_POST['zoneid'];
$dyndns['ttl'] = $_POST['ttl'];
@@ -154,20 +165,21 @@ if ($_POST) {
($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
$dyndns['descr'] = $_POST['descr'];
$dyndns['force'] = isset($_POST['force']);
-
- if($dyndns['username'] == "none")
+
+ if ($dyndns['username'] == "none") {
$dyndns['username'] = "";
+ }
- if (isset($id) && $a_dyndns[$id])
+ if (isset($id) && $a_dyndns[$id]) {
$a_dyndns[$id] = $dyndns;
- else {
- $a_dyndns[] = $dyndns;
+ } else {
+ $a_dyndns[] = $dyndns;
$id = count($a_dyndns) - 1;
}
$dyndns['id'] = $id;
//Probably overkill, but its better to be safe
- for($i = 0; $i < count($a_dyndns); $i++) {
+ for ($i = 0; $i < count($a_dyndns); $i++) {
$a_dyndns[$i]['id'] = $i;
}
@@ -180,7 +192,7 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client"));
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS client"));
include("head.inc");
?>
@@ -191,8 +203,8 @@ include("head.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<script type="text/javascript">
//<![CDATA[
-function _onTypeChange(type){
- switch(type) {
+function _onTypeChange(type) {
+ switch (type) {
case "custom":
case "custom-v6":
document.getElementById("_resulttr").style.display = '';
@@ -232,220 +244,233 @@ function _onTypeChange(type){
//]]>
</script>
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit">
- <tr>
- <td colspan="2" valign="top" class="optsect_t">
- <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
- <tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
- <td width="78%" class="vtable">
- <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
- <td width="78%" class="vtable">
- <select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);">
- <?php
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit">
+ <tr>
+ <td colspan="2" valign="top" class="optsect_t">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
+ <tr>
+ <td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
+ <td width="78%" class="vtable">
+ <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> />
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
+ <td width="78%" class="vtable">
+ <select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);">
+ <?php
$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS);
$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
- $j = 0; for ($j = 0; $j < count($vals); $j++): ?>
- <option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>>
- <?=htmlspecialchars($types[$j]);?>
- </option>
- <?php endfor; ?>
- </select></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
- <td width="78%" class="vtable">
- <select name="interface" class="formselect" id="interface">
+ $j = 0;
+ for ($j = 0; $j < count($vals); $j++):
+ ?>
+ <option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>>
+ <?=htmlspecialchars($types[$j]);?>
+ </option>
+ <?php
+ endfor;
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
+ <td width="78%" class="vtable">
+ <select name="interface" class="formselect" id="interface">
<?php
- $iflist = get_configured_interface_with_descr();
- foreach ($iflist as $if => $ifdesc) {
+ $iflist = get_configured_interface_with_descr();
+ foreach ($iflist as $if => $ifdesc) {
echo "<option value=\"{$if}\"";
- if ($pconfig['interface'] == $if)
+ if ($pconfig['interface'] == $if) {
echo "selected=\"selected\"";
+ }
echo ">{$ifdesc}</option>\n";
}
unset($iflist);
$grouplist = return_gateway_groups_array();
- foreach ($grouplist as $name => $group) {
+ foreach ($grouplist as $name => $group) {
echo "<option value=\"{$name}\"";
- if ($pconfig['interface'] == $name)
+ if ($pconfig['interface'] == $name) {
echo "selected=\"selected\"";
+ }
echo ">GW Group {$name}</option>\n";
}
unset($grouplist);
?>
- </select>
- </td>
- </tr>
- <tr id="_requestiftr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
- <td width="78%" class="vtable">
- <select name="requestif" class="formselect" id="requestif">
+ </select>
+ </td>
+ </tr>
+ <tr id="_requestiftr">
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
+ <td width="78%" class="vtable">
+ <select name="requestif" class="formselect" id="requestif">
<?php
- $iflist = get_configured_interface_with_descr();
+ $iflist = get_configured_interface_with_descr();
foreach ($iflist as $if => $ifdesc) {
echo "<option value=\"{$if}\"";
- if ($pconfig['requestif'] == $if)
+ if ($pconfig['requestif'] == $if) {
echo "selected=\"selected\"";
+ }
echo ">{$ifdesc}</option>\n";
}
unset($iflist);
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
echo "<option value=\"{$name}\"";
- if ($pconfig['requestif'] == $name)
+ if ($pconfig['requestif'] == $name) {
echo "selected=\"selected\"";
+ }
echo ">GW Group {$name}</option>\n";
}
unset($grouplist);
?>
- </select>
- <br /><?= gettext("Note: This is almost always the same as the Interface to Monitor.");?>
- </td>
- </tr>
- <tr id="_hostnametr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
- <td width="78%" class="vtable">
- <input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" />
- <br />
- <span class="vexpl">
- <span class="red"><strong><?=gettext("Note:");?><br /></strong>
- </span>
+ </select>
+ <br /><?=gettext("Note: This is almost always the same as the Interface to Monitor.");?>
+ </td>
+ </tr>
+ <tr id="_hostnametr">
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
+ <td width="78%" class="vtable">
+ <input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" />
+ <br />
+ <span class="vexpl">
+ <span class="red">
+ <strong><?=gettext("Note:");?><br /></strong>
+ </span>
<?=gettext("Enter the complete host/domain name. example: myhost.dyndns.org");?><br />
<?=gettext("he.net tunnelbroker: Enter your tunnel ID");?><br />
<?=gettext("GleSYS: Enter your record ID");?><br />
- <?= gettext("DNSimple: Enter only the domain name.");?>
- </span>
- </td>
- </tr>
- <tr id="_mxtr">
- <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
- <td width="78%" class="vtable">
- <input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
- <br />
- <?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
- <br />
- <?=gettext("Set this option only if you need a special MX record. Not".
- " all services support this.");?></td>
- </tr>
- <tr id="_wildcardtr">
- <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
- <td width="78%" class="vtable">
- <input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
- <?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
- </tr>
- <tr id="_verboselogtr">
- <td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
- <td width="78%" class="vtable">
- <input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
- <?=gettext("Enable ");?><?=gettext("verbose logging"); ?></td>
- </tr>
- <tr id="_curloptions">
- <td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
- <td width="78%" class="vtable">
- <input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
- <?=gettext("Force IPv4 resolving"); ?><br />
- <input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
- <?=gettext("Verify SSL peer"); ?>
- </td>
- </tr>
- <tr id="_usernametr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
- <td width="78%" class="vtable">
- <input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
- <br /><?= gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
- <br /><?= gettext("Route 53: Enter your Access Key ID.");?>
- <br /><?= gettext("GleSYS: Enter your API user.");?>
- <br /><?= gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
- <td width="78%" class="vtable">
- <input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
- <br />
- <?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
- <br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
- <br /><?= gettext("GleSYS: Enter your API key.");?>
- <br /><?= gettext("DNSimple: Enter your API token.");?>
- </td>
- </tr>
-
- <tr id="r53_zoneid" style="display:none">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
- <td width="78%" class="vtable">
- <input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
- <br /><?= gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
- <br /><?= gettext("DNSimple: Enter the Record ID of record to update.");?>
- </td>
- </tr>
- <tr id="_urltr">
- <td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
- <td width="78%" class="vtable">
- <input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
- <br /><?= gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
- <br />
- <?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
- </td>
- </tr>
+ <?=gettext("DNSimple: Enter only the domain name.");?>
+ </span>
+ </td>
+ </tr>
+ <tr id="_mxtr">
+ <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
+ <br />
+ <?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
+ <br />
+ <?=gettext("Set this option only if you need a special MX record. Not all services support this.");?>
+ </td>
+ </tr>
+ <tr id="_wildcardtr">
+ <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
+ <?=gettext("Enable ");?><?=gettext("Wildcard"); ?>
+ </td>
+ </tr>
+ <tr id="_verboselogtr">
+ <td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
+ <?=gettext("Enable ");?><?=gettext("verbose logging"); ?>
+ </td>
+ </tr>
+ <tr id="_curloptions">
+ <td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
+ <?=gettext("Force IPv4 resolving"); ?><br />
+ <input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
+ <?=gettext("Verify SSL peer"); ?>
+ </td>
+ </tr>
+ <tr id="_usernametr">
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
+ <td width="78%" class="vtable">
+ <input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
+ <br /><?=gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
+ <br /><?=gettext("Route 53: Enter your Access Key ID.");?>
+ <br /><?=gettext("GleSYS: Enter your API user.");?>
+ <br /><?=gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
+ <td width="78%" class="vtable">
+ <input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
+ <br />
+ <?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
+ <br /><?=gettext("Route 53: Enter your Secret Access Key.");?>
+ <br /><?=gettext("GleSYS: Enter your API key.");?>
+ <br /><?=gettext("DNSimple: Enter your API token.");?>
+ </td>
+ </tr>
+ <tr id="r53_zoneid" style="display:none">
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
+ <td width="78%" class="vtable">
+ <input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
+ <br /><?=gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
+ <br /><?=gettext("DNSimple: Enter the Record ID of record to update.");?>
+ </td>
+ </tr>
+ <tr id="_urltr">
+ <td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
+ <td width="78%" class="vtable">
+ <input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
+ <br /><?=gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
+ <br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
+ </td>
+ </tr>
<tr id="_resulttr">
- <td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td>
- <td width="78%" class="vtable">
- <textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea>
- <br /><?= gettext("This field is only used by Custom Dynamic DNS Entries.");?>
- <br />
- <?= gettext("This field should be identical to what your DDNS Provider will return if the update succeeds, leave it blank to disable checking of returned results.");?>
- <br />
- <?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
- <br />
- <?= gettext("If you need to include multiple possible values, separate them with a |. If your provider includes a |, escape it with \\|");?>
- <br />
- <?= gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?>
- </td>
- </tr>
-
- <tr id="r53_ttl" style="display:none">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td>
- <td width="78%" class="vtable">
- <input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" />
- <br /><?= gettext("Choose TTL for your dns record.");?>
- </td>
- </tr>
-
-
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
- <td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
- <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
- <?php if (isset($id) && $a_dyndns[$id]): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
- <input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" />
- <?php endif; ?>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
- </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem:
- General setup%s or allow the DNS server list to be overridden
- by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td>
- </tr>
- </table>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td>
+ <td width="78%" class="vtable">
+ <textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea>
+ <br /><?=gettext("This field is only used by Custom Dynamic DNS Entries.");?>
+ <br /><?=gettext("This field should be identical to what your DDNS Provider will return if the update succeeds, leave it blank to disable checking of returned results.");?>
+ <br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
+ <br /><?=gettext("If you need to include multiple possible values, separate them with a |. If your provider includes a |, escape it with \\|");?>
+ <br /><?=gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?>
+ </td>
+ </tr>
+ <tr id="r53_ttl" style="display:none">
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td>
+ <td width="78%" class="vtable">
+ <input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" />
+ <br /><?=gettext("Choose TTL for your dns record.");?>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
+ <td width="78%" class="vtable">
+ <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
+ <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
+ <?php if (isset($id) && $a_dyndns[$id]): ?>
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
+ <input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" />
+ <?php endif; ?>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <span class="vexpl">
+ <span class="red">
+ <strong>
+ <?=gettext("Note:");?><br />
+ </strong>
+ </span>
+ <?php printf(gettext("You must configure a DNS server in %sSystem:
+ General setup%s or allow the DNS server list to be overridden
+ by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?>
+ </span>
+ </td>
+ </tr>
+ </table>
</form>
<?php include("fend.inc"); ?>
OpenPOWER on IntegriCloud