Revision 9c12c130
Added by Phil Davis over 10 years ago
usr/local/www/services_dyndns_edit.php | ||
---|---|---|
42 | 42 |
|
43 | 43 |
/* returns true if $uname is a valid DynDNS username */ |
44 | 44 |
function is_dyndns_username($uname) { |
45 |
if (!is_string($uname)) |
|
46 |
return false; |
|
47 |
|
|
48 |
if (preg_match("/[^a-z0-9\-\+.@_:]/i", $uname)) |
|
49 |
return false; |
|
50 |
else |
|
51 |
return true; |
|
45 |
if (!is_string($uname)) { |
|
46 |
return false; |
|
47 |
} |
|
48 |
|
|
49 |
if (preg_match("/[^a-z0-9\-\+.@_:]/i", $uname)) { |
|
50 |
return false; |
|
51 |
} else { |
|
52 |
return true; |
|
53 |
} |
|
52 | 54 |
} |
53 | 55 |
|
54 | 56 |
require("guiconfig.inc"); |
... | ... | |
59 | 61 |
|
60 | 62 |
$a_dyndns = &$config['dyndnses']['dyndns']; |
61 | 63 |
|
62 |
if (is_numericint($_GET['id'])) |
|
64 |
if (is_numericint($_GET['id'])) {
|
|
63 | 65 |
$id = $_GET['id']; |
64 |
if (isset($_POST['id']) && is_numericint($_POST['id'])) |
|
66 |
} |
|
67 |
if (isset($_POST['id']) && is_numericint($_POST['id'])) { |
|
65 | 68 |
$id = $_POST['id']; |
69 |
} |
|
66 | 70 |
|
67 | 71 |
if (isset($id) && isset($a_dyndns[$id])) { |
68 | 72 |
$pconfig['username'] = $a_dyndns[$id]['username']; |
... | ... | |
88 | 92 |
|
89 | 93 |
unset($input_errors); |
90 | 94 |
$pconfig = $_POST; |
91 |
|
|
92 |
if(($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "") |
|
93 |
$_POST['username'] = "none"; |
|
95 |
|
|
96 |
if (($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "") { |
|
97 |
$_POST['username'] = "none"; |
|
98 |
} |
|
94 | 99 |
|
95 | 100 |
/* input validation */ |
96 | 101 |
$reqdfields = array(); |
... | ... | |
102 | 107 |
$reqdfieldsn[] = gettext("Hostname"); |
103 | 108 |
$reqdfields[] = "passwordfld"; |
104 | 109 |
$reqdfieldsn[] = gettext("Password"); |
105 |
$reqdfields[] = "username";
|
|
106 |
$reqdfieldsn[] = gettext("Username");
|
|
107 |
}else{
|
|
110 |
$reqdfields[] = "username"; |
|
111 |
$reqdfieldsn[] = gettext("Username"); |
|
112 |
} else {
|
|
108 | 113 |
$reqdfields[] = "updateurl"; |
109 | 114 |
$reqdfieldsn[] = gettext("Update URL"); |
110 |
}
|
|
115 |
} |
|
111 | 116 |
|
112 | 117 |
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); |
113 | 118 |
|
114 | 119 |
if (isset($_POST['host']) && in_array("host", $reqdfields)) { |
115 | 120 |
/* Namecheap can have a @. in hostname */ |
116 |
if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.') |
|
121 |
if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.') {
|
|
117 | 122 |
$host_to_check = substr($_POST['host'], 2); |
118 |
else
|
|
123 |
} else {
|
|
119 | 124 |
$host_to_check = $_POST['host']; |
125 |
} |
|
120 | 126 |
|
121 |
if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") |
|
122 |
if (!is_domain($host_to_check)) |
|
127 |
if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
|
|
128 |
if (!is_domain($host_to_check)) {
|
|
123 | 129 |
$input_errors[] = gettext("The hostname contains invalid characters."); |
130 |
} |
|
131 |
} |
|
124 | 132 |
|
125 | 133 |
unset($host_to_check); |
126 | 134 |
} |
127 |
if (($_POST['mx'] && !is_domain($_POST['mx']))) |
|
135 |
if (($_POST['mx'] && !is_domain($_POST['mx']))) {
|
|
128 | 136 |
$input_errors[] = gettext("The MX contains invalid characters."); |
129 |
if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == ""))) |
|
130 |
$input_errors[] = gettext("The username contains invalid characters."); |
|
137 |
} |
|
138 |
if ((in_array("username", $reqdfields) && $_POST['username'] && !is_dyndns_username($_POST['username'])) || ((in_array("username", $reqdfields)) && ($_POST['username'] == ""))) { |
|
139 |
$input_errors[] = gettext("The username contains invalid characters."); |
|
140 |
} |
|
131 | 141 |
|
132 | 142 |
if (!$input_errors) { |
133 | 143 |
$dyndns = array(); |
... | ... | |
141 | 151 |
$dyndns['curl_ipresolve_v4'] = $_POST['curl_ipresolve_v4'] ? true : false; |
142 | 152 |
$dyndns['curl_ssl_verifypeer'] = $_POST['curl_ssl_verifypeer'] ? true : false; |
143 | 153 |
/* In this place enable means disabled */ |
144 |
if ($_POST['enable']) |
|
154 |
if ($_POST['enable']) {
|
|
145 | 155 |
unset($dyndns['enable']); |
146 |
else
|
|
156 |
} else {
|
|
147 | 157 |
$dyndns['enable'] = true; |
158 |
} |
|
148 | 159 |
$dyndns['interface'] = $_POST['interface']; |
149 | 160 |
$dyndns['zoneid'] = $_POST['zoneid']; |
150 | 161 |
$dyndns['ttl'] = $_POST['ttl']; |
... | ... | |
154 | 165 |
($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface']; |
155 | 166 |
$dyndns['descr'] = $_POST['descr']; |
156 | 167 |
$dyndns['force'] = isset($_POST['force']); |
157 |
|
|
158 |
if($dyndns['username'] == "none")
|
|
168 |
|
|
169 |
if ($dyndns['username'] == "none") {
|
|
159 | 170 |
$dyndns['username'] = ""; |
171 |
} |
|
160 | 172 |
|
161 |
if (isset($id) && $a_dyndns[$id]) |
|
173 |
if (isset($id) && $a_dyndns[$id]) {
|
|
162 | 174 |
$a_dyndns[$id] = $dyndns; |
163 |
else { |
|
164 |
$a_dyndns[] = $dyndns;
|
|
175 |
} else {
|
|
176 |
$a_dyndns[] = $dyndns; |
|
165 | 177 |
$id = count($a_dyndns) - 1; |
166 | 178 |
} |
167 | 179 |
|
168 | 180 |
$dyndns['id'] = $id; |
169 | 181 |
//Probably overkill, but its better to be safe |
170 |
for($i = 0; $i < count($a_dyndns); $i++) { |
|
182 |
for ($i = 0; $i < count($a_dyndns); $i++) {
|
|
171 | 183 |
$a_dyndns[$i]['id'] = $i; |
172 | 184 |
} |
173 | 185 |
|
... | ... | |
180 | 192 |
} |
181 | 193 |
} |
182 | 194 |
|
183 |
$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client")); |
|
195 |
$pgtitle = array(gettext("Services"), gettext("Dynamic DNS client"));
|
|
184 | 196 |
include("head.inc"); |
185 | 197 |
|
186 | 198 |
?> |
... | ... | |
191 | 203 |
<?php if ($savemsg) print_info_box($savemsg); ?> |
192 | 204 |
<script type="text/javascript"> |
193 | 205 |
//<![CDATA[ |
194 |
function _onTypeChange(type){
|
|
195 |
switch(type) { |
|
206 |
function _onTypeChange(type) {
|
|
207 |
switch (type) {
|
|
196 | 208 |
case "custom": |
197 | 209 |
case "custom-v6": |
198 | 210 |
document.getElementById("_resulttr").style.display = ''; |
... | ... | |
232 | 244 |
//]]> |
233 | 245 |
</script> |
234 | 246 |
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform"> |
235 |
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit"> |
|
236 |
<tr> |
|
237 |
<td colspan="2" valign="top" class="optsect_t"> |
|
238 |
<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title"> |
|
239 |
<tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr> |
|
240 |
</table> |
|
241 |
</td> |
|
242 |
</tr> |
|
243 |
<tr> |
|
244 |
<td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td> |
|
245 |
<td width="78%" class="vtable"> |
|
246 |
<input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> /> |
|
247 |
</td> |
|
248 |
</tr> |
|
249 |
<tr> |
|
250 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td> |
|
251 |
<td width="78%" class="vtable"> |
|
252 |
<select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);"> |
|
253 |
<?php |
|
247 |
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit"> |
|
248 |
<tr> |
|
249 |
<td colspan="2" valign="top" class="optsect_t"> |
|
250 |
<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title"> |
|
251 |
<tr> |
|
252 |
<td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td> |
|
253 |
</tr> |
|
254 |
</table> |
|
255 |
</td> |
|
256 |
</tr> |
|
257 |
<tr> |
|
258 |
<td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td> |
|
259 |
<td width="78%" class="vtable"> |
|
260 |
<input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> /> |
|
261 |
</td> |
|
262 |
</tr> |
|
263 |
<tr> |
|
264 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td> |
|
265 |
<td width="78%" class="vtable"> |
|
266 |
<select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);"> |
|
267 |
<?php |
|
254 | 268 |
$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS); |
255 | 269 |
$vals = explode(" ", DYNDNS_PROVIDER_VALUES); |
256 |
$j = 0; for ($j = 0; $j < count($vals); $j++): ?> |
|
257 |
<option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>> |
|
258 |
<?=htmlspecialchars($types[$j]);?> |
|
259 |
</option> |
|
260 |
<?php endfor; ?> |
|
261 |
</select></td> |
|
262 |
</tr> |
|
263 |
<tr> |
|
264 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td> |
|
265 |
<td width="78%" class="vtable"> |
|
266 |
<select name="interface" class="formselect" id="interface"> |
|
270 |
$j = 0; |
|
271 |
for ($j = 0; $j < count($vals); $j++): |
|
272 |
?> |
|
273 |
<option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>> |
|
274 |
<?=htmlspecialchars($types[$j]);?> |
|
275 |
</option> |
|
276 |
<?php |
|
277 |
endfor; |
|
278 |
?> |
|
279 |
</select> |
|
280 |
</td> |
|
281 |
</tr> |
|
282 |
<tr> |
|
283 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td> |
|
284 |
<td width="78%" class="vtable"> |
|
285 |
<select name="interface" class="formselect" id="interface"> |
|
267 | 286 |
<?php |
268 |
$iflist = get_configured_interface_with_descr();
|
|
269 |
foreach ($iflist as $if => $ifdesc) {
|
|
287 |
$iflist = get_configured_interface_with_descr(); |
|
288 |
foreach ($iflist as $if => $ifdesc) { |
|
270 | 289 |
echo "<option value=\"{$if}\""; |
271 |
if ($pconfig['interface'] == $if) |
|
290 |
if ($pconfig['interface'] == $if) {
|
|
272 | 291 |
echo "selected=\"selected\""; |
292 |
} |
|
273 | 293 |
echo ">{$ifdesc}</option>\n"; |
274 | 294 |
} |
275 | 295 |
unset($iflist); |
276 | 296 |
$grouplist = return_gateway_groups_array(); |
277 |
foreach ($grouplist as $name => $group) {
|
|
297 |
foreach ($grouplist as $name => $group) { |
|
278 | 298 |
echo "<option value=\"{$name}\""; |
279 |
if ($pconfig['interface'] == $name) |
|
299 |
if ($pconfig['interface'] == $name) {
|
|
280 | 300 |
echo "selected=\"selected\""; |
301 |
} |
|
281 | 302 |
echo ">GW Group {$name}</option>\n"; |
282 | 303 |
} |
283 | 304 |
unset($grouplist); |
284 | 305 |
?> |
285 |
</select>
|
|
286 |
</td>
|
|
287 |
</tr>
|
|
288 |
<tr id="_requestiftr">
|
|
289 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
|
|
290 |
<td width="78%" class="vtable">
|
|
291 |
<select name="requestif" class="formselect" id="requestif">
|
|
306 |
</select> |
|
307 |
</td> |
|
308 |
</tr>
|
|
309 |
<tr id="_requestiftr"> |
|
310 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>
|
|
311 |
<td width="78%" class="vtable"> |
|
312 |
<select name="requestif" class="formselect" id="requestif"> |
|
292 | 313 |
<?php |
293 |
$iflist = get_configured_interface_with_descr();
|
|
314 |
$iflist = get_configured_interface_with_descr(); |
|
294 | 315 |
foreach ($iflist as $if => $ifdesc) { |
295 | 316 |
echo "<option value=\"{$if}\""; |
296 |
if ($pconfig['requestif'] == $if) |
|
317 |
if ($pconfig['requestif'] == $if) {
|
|
297 | 318 |
echo "selected=\"selected\""; |
319 |
} |
|
298 | 320 |
echo ">{$ifdesc}</option>\n"; |
299 | 321 |
} |
300 | 322 |
unset($iflist); |
301 | 323 |
$grouplist = return_gateway_groups_array(); |
302 | 324 |
foreach ($grouplist as $name => $group) { |
303 | 325 |
echo "<option value=\"{$name}\""; |
304 |
if ($pconfig['requestif'] == $name) |
|
326 |
if ($pconfig['requestif'] == $name) {
|
|
305 | 327 |
echo "selected=\"selected\""; |
328 |
} |
|
306 | 329 |
echo ">GW Group {$name}</option>\n"; |
307 | 330 |
} |
308 | 331 |
unset($grouplist); |
309 | 332 |
?> |
310 |
</select> |
|
311 |
<br /><?= gettext("Note: This is almost always the same as the Interface to Monitor.");?> |
|
312 |
</td> |
|
313 |
</tr> |
|
314 |
<tr id="_hostnametr"> |
|
315 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td> |
|
316 |
<td width="78%" class="vtable"> |
|
317 |
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" /> |
|
318 |
<br /> |
|
319 |
<span class="vexpl"> |
|
320 |
<span class="red"><strong><?=gettext("Note:");?><br /></strong> |
|
321 |
</span> |
|
333 |
</select> |
|
334 |
<br /><?=gettext("Note: This is almost always the same as the Interface to Monitor.");?> |
|
335 |
</td> |
|
336 |
</tr> |
|
337 |
<tr id="_hostnametr"> |
|
338 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td> |
|
339 |
<td width="78%" class="vtable"> |
|
340 |
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" /> |
|
341 |
<br /> |
|
342 |
<span class="vexpl"> |
|
343 |
<span class="red"> |
|
344 |
<strong><?=gettext("Note:");?><br /></strong> |
|
345 |
</span> |
|
322 | 346 |
<?=gettext("Enter the complete host/domain name. example: myhost.dyndns.org");?><br /> |
323 | 347 |
<?=gettext("he.net tunnelbroker: Enter your tunnel ID");?><br /> |
324 | 348 |
<?=gettext("GleSYS: Enter your record ID");?><br /> |
325 |
<?= gettext("DNSimple: Enter only the domain name.");?>
|
|
326 |
</span>
|
|
327 |
</td>
|
|
328 |
</tr>
|
|
329 |
<tr id="_mxtr">
|
|
330 |
<td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
|
|
331 |
<td width="78%" class="vtable">
|
|
332 |
<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
|
|
333 |
<br />
|
|
334 |
<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
|
|
335 |
<br />
|
|
336 |
<?=gettext("Set this option only if you need a special MX record. Not".
|
|
337 |
" all services support this.");?></td>
|
|
338 |
</tr>
|
|
339 |
<tr id="_wildcardtr">
|
|
340 |
<td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
|
|
341 |
<td width="78%" class="vtable">
|
|
342 |
<input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
|
|
343 |
<?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
|
|
344 |
</tr>
|
|
345 |
<tr id="_verboselogtr">
|
|
346 |
<td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
|
|
347 |
<td width="78%" class="vtable">
|
|
348 |
<input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
|
|
349 |
<?=gettext("Enable ");?><?=gettext("verbose logging"); ?></td>
|
|
350 |
</tr>
|
|
351 |
<tr id="_curloptions">
|
|
352 |
<td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
|
|
353 |
<td width="78%" class="vtable">
|
|
354 |
<input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
|
|
355 |
<?=gettext("Force IPv4 resolving"); ?><br />
|
|
356 |
<input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
|
|
357 |
<?=gettext("Verify SSL peer"); ?>
|
|
358 |
</td>
|
|
359 |
</tr>
|
|
360 |
<tr id="_usernametr">
|
|
361 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
|
|
362 |
<td width="78%" class="vtable">
|
|
363 |
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
|
|
364 |
<br /><?= gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
|
|
365 |
<br /><?= gettext("Route 53: Enter your Access Key ID.");?>
|
|
366 |
<br /><?= gettext("GleSYS: Enter your API user.");?>
|
|
367 |
<br /><?= gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
|
|
368 |
</td>
|
|
369 |
</tr>
|
|
370 |
<tr>
|
|
371 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
|
|
372 |
<td width="78%" class="vtable">
|
|
373 |
<input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
|
374 |
<br />
|
|
375 |
<?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
|
|
376 |
<br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
|
|
377 |
<br /><?= gettext("GleSYS: Enter your API key.");?>
|
|
378 |
<br /><?= gettext("DNSimple: Enter your API token.");?>
|
|
379 |
</td>
|
|
380 |
</tr>
|
|
381 |
|
|
382 |
<tr id="r53_zoneid" style="display:none">
|
|
383 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
|
|
384 |
<td width="78%" class="vtable">
|
|
385 |
<input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
|
|
386 |
<br /><?= gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
|
|
387 |
<br /><?= gettext("DNSimple: Enter the Record ID of record to update.");?>
|
|
388 |
</td>
|
|
389 |
</tr>
|
|
390 |
<tr id="_urltr">
|
|
391 |
<td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
|
|
392 |
<td width="78%" class="vtable">
|
|
393 |
<input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
|
|
394 |
<br /><?= gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
|
|
395 |
<br />
|
|
396 |
<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
|
|
397 |
</td>
|
|
398 |
</tr>
|
|
349 |
<?=gettext("DNSimple: Enter only the domain name.");?> |
|
350 |
</span> |
|
351 |
</td>
|
|
352 |
</tr> |
|
353 |
<tr id="_mxtr">
|
|
354 |
<td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
|
|
355 |
<td width="78%" class="vtable">
|
|
356 |
<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
|
|
357 |
<br />
|
|
358 |
<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?> |
|
359 |
<br /> |
|
360 |
<?=gettext("Set this option only if you need a special MX record. Not all services support this.");?>
|
|
361 |
</td>
|
|
362 |
</tr> |
|
363 |
<tr id="_wildcardtr">
|
|
364 |
<td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
|
|
365 |
<td width="78%" class="vtable">
|
|
366 |
<input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
|
|
367 |
<?=gettext("Enable ");?><?=gettext("Wildcard"); ?>
|
|
368 |
</td>
|
|
369 |
</tr>
|
|
370 |
<tr id="_verboselogtr">
|
|
371 |
<td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
|
|
372 |
<td width="78%" class="vtable">
|
|
373 |
<input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
|
|
374 |
<?=gettext("Enable ");?><?=gettext("verbose logging"); ?>
|
|
375 |
</td>
|
|
376 |
</tr>
|
|
377 |
<tr id="_curloptions">
|
|
378 |
<td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
|
|
379 |
<td width="78%" class="vtable">
|
|
380 |
<input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
|
|
381 |
<?=gettext("Force IPv4 resolving"); ?><br />
|
|
382 |
<input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
|
|
383 |
<?=gettext("Verify SSL peer"); ?>
|
|
384 |
</td>
|
|
385 |
</tr>
|
|
386 |
<tr id="_usernametr">
|
|
387 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
|
|
388 |
<td width="78%" class="vtable">
|
|
389 |
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
|
|
390 |
<br /><?=gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
|
|
391 |
<br /><?=gettext("Route 53: Enter your Access Key ID.");?>
|
|
392 |
<br /><?=gettext("GleSYS: Enter your API user.");?>
|
|
393 |
<br /><?=gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
|
|
394 |
</td>
|
|
395 |
</tr>
|
|
396 |
<tr>
|
|
397 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
|
|
398 |
<td width="78%" class="vtable">
|
|
399 |
<input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
|
400 |
<br />
|
|
401 |
<?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
|
|
402 |
<br /><?=gettext("Route 53: Enter your Secret Access Key.");?>
|
|
403 |
<br /><?=gettext("GleSYS: Enter your API key.");?>
|
|
404 |
<br /><?=gettext("DNSimple: Enter your API token.");?>
|
|
405 |
</td> |
|
406 |
</tr>
|
|
407 |
<tr id="r53_zoneid" style="display:none">
|
|
408 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
|
|
409 |
<td width="78%" class="vtable">
|
|
410 |
<input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
|
|
411 |
<br /><?=gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
|
|
412 |
<br /><?=gettext("DNSimple: Enter the Record ID of record to update.");?>
|
|
413 |
</td>
|
|
414 |
</tr>
|
|
415 |
<tr id="_urltr">
|
|
416 |
<td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
|
|
417 |
<td width="78%" class="vtable">
|
|
418 |
<input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
|
|
419 |
<br /><?=gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
|
|
420 |
<br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
|
|
421 |
</td>
|
|
422 |
</tr>
|
|
399 | 423 |
<tr id="_resulttr"> |
400 |
<td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td> |
|
401 |
<td width="78%" class="vtable"> |
|
402 |
<textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea> |
|
403 |
<br /><?= gettext("This field is only used by Custom Dynamic DNS Entries.");?> |
|
404 |
<br /> |
|
405 |
<?= 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.");?> |
|
406 |
<br /> |
|
407 |
<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?> |
|
408 |
<br /> |
|
409 |
<?= gettext("If you need to include multiple possible values, separate them with a |. If your provider includes a |, escape it with \\|");?> |
|
410 |
<br /> |
|
411 |
<?= gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?> |
|
412 |
</td> |
|
413 |
</tr> |
|
414 |
|
|
415 |
<tr id="r53_ttl" style="display:none"> |
|
416 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td> |
|
417 |
<td width="78%" class="vtable"> |
|
418 |
<input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" /> |
|
419 |
<br /><?= gettext("Choose TTL for your dns record.");?> |
|
420 |
</td> |
|
421 |
</tr> |
|
422 |
|
|
423 |
|
|
424 |
<tr> |
|
425 |
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td> |
|
426 |
<td width="78%" class="vtable"> |
|
427 |
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" /> |
|
428 |
</td> |
|
429 |
</tr> |
|
430 |
<tr> |
|
431 |
<td width="22%" valign="top"> </td> |
|
432 |
<td width="78%"> |
|
433 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" /> |
|
434 |
<a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a> |
|
435 |
<?php if (isset($id) && $a_dyndns[$id]): ?> |
|
436 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
|
437 |
<input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" /> |
|
438 |
<?php endif; ?> |
|
439 |
</td> |
|
440 |
</tr> |
|
441 |
<tr> |
|
442 |
<td width="22%" valign="top"> </td> |
|
443 |
<td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br /> |
|
444 |
</strong></span><?php printf(gettext("You must configure a DNS server in %sSystem: |
|
445 |
General setup%s or allow the DNS server list to be overridden |
|
446 |
by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td> |
|
447 |
</tr> |
|
448 |
</table> |
|
424 |
<td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td> |
|
425 |
<td width="78%" class="vtable"> |
|
426 |
<textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea> |
|
427 |
<br /><?=gettext("This field is only used by Custom Dynamic DNS Entries.");?> |
|
428 |
<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.");?> |
|
429 |
<br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?> |
|
430 |
<br /><?=gettext("If you need to include multiple possible values, separate them with a |. If your provider includes a |, escape it with \\|");?> |
|
431 |
<br /><?=gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?> |
|
432 |
</td> |
|
433 |
</tr> |
|
434 |
<tr id="r53_ttl" style="display:none"> |
|
435 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td> |
|
436 |
<td width="78%" class="vtable"> |
|
437 |
<input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" /> |
|
438 |
<br /><?=gettext("Choose TTL for your dns record.");?> |
|
439 |
</td> |
|
440 |
</tr> |
|
441 |
<tr> |
|
442 |
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td> |
|
443 |
<td width="78%" class="vtable"> |
|
444 |
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" /> |
|
445 |
</td> |
|
446 |
</tr> |
|
447 |
<tr> |
|
448 |
<td width="22%" valign="top"> </td> |
|
449 |
<td width="78%"> |
|
450 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" /> |
|
451 |
<a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a> |
|
452 |
<?php if (isset($id) && $a_dyndns[$id]): ?> |
|
453 |
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> |
|
454 |
<input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" /> |
|
455 |
<?php endif; ?> |
|
456 |
</td> |
|
457 |
</tr> |
|
458 |
<tr> |
|
459 |
<td width="22%" valign="top"> </td> |
|
460 |
<td width="78%"> |
|
461 |
<span class="vexpl"> |
|
462 |
<span class="red"> |
|
463 |
<strong> |
|
464 |
<?=gettext("Note:");?><br /> |
|
465 |
</strong> |
|
466 |
</span> |
|
467 |
<?php printf(gettext("You must configure a DNS server in %sSystem: |
|
468 |
General setup%s or allow the DNS server list to be overridden |
|
469 |
by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?> |
|
470 |
</span> |
|
471 |
</td> |
|
472 |
</tr> |
|
473 |
</table> |
|
449 | 474 |
</form> |
450 | 475 |
<?php include("fend.inc"); ?> |
451 | 476 |
|
Also available in: Unified diff
Code style services dyndns