Project

General

Profile

Download (19.1 KB) Statistics
| Branch: | Tag: | Revision:
1 f1f60c92 Ermal Luçi
<?php
2
/* $Id$ */
3
/*
4 ce77a9c4 Phil Davis
	services_dyndns_edit.php
5
6 7a5fe50d Phil Davis
	Copyright (C) 2008 Ermal Luçi
7 ce77a9c4 Phil Davis
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
8 f1f60c92 Ermal Luçi
	All rights reserved.
9
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31 1d333258 Scott Ullrich
/*
32
	pfSense_BUILDER_BINARIES:	/bin/rm
33
	pfSense_MODULE:	dyndns
34
*/
35 f1f60c92 Ermal Luçi
36 6b07c15a Matthew Grooms
##|+PRIV
37
##|*IDENT=page-services-dynamicdnsclient
38
##|*NAME=Services: Dynamic DNS client page
39
##|*DESCR=Allow access to the 'Services: Dynamic DNS client' page.
40
##|*MATCH=services_dyndns_edit.php*
41
##|-PRIV
42
43 ee2db55f Ermal Lu?i
/* returns true if $uname is a valid DynDNS username */
44
function is_dyndns_username($uname) {
45 9c12c130 Phil Davis
	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
	}
54 ee2db55f Ermal Lu?i
}
55
56 f1f60c92 Ermal Luçi
require("guiconfig.inc");
57
58
if (!is_array($config['dyndnses']['dyndns'])) {
59
	$config['dyndnses']['dyndns'] = array();
60
}
61
62
$a_dyndns = &$config['dyndnses']['dyndns'];
63
64 9c12c130 Phil Davis
if (is_numericint($_GET['id'])) {
65 e41ec584 Renato Botelho
	$id = $_GET['id'];
66 9c12c130 Phil Davis
}
67
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
68 f1f60c92 Ermal Luçi
	$id = $_POST['id'];
69 9c12c130 Phil Davis
}
70 f1f60c92 Ermal Luçi
71
if (isset($id) && isset($a_dyndns[$id])) {
72
	$pconfig['username'] = $a_dyndns[$id]['username'];
73
	$pconfig['password'] = $a_dyndns[$id]['password'];
74
	$pconfig['host'] = $a_dyndns[$id]['host'];
75
	$pconfig['mx'] = $a_dyndns[$id]['mx'];
76
	$pconfig['type'] = $a_dyndns[$id]['type'];
77 acdfc164 Ermal Luçi
	$pconfig['enable'] = !isset($a_dyndns[$id]['enable']);
78 f1f60c92 Ermal Luçi
	$pconfig['interface'] = $a_dyndns[$id]['interface'];
79
	$pconfig['wildcard'] = isset($a_dyndns[$id]['wildcard']);
80 c8c90b81 Phil Davis
	$pconfig['verboselog'] = isset($a_dyndns[$id]['verboselog']);
81 aa79f351 Sebastian Chrostek
	$pconfig['curl_ipresolve_v4'] = isset($a_dyndns[$id]['curl_ipresolve_v4']);
82
	$pconfig['curl_ssl_verifypeer'] = isset($a_dyndns[$id]['curl_ssl_verifypeer']);
83 cd132e86 Edson Brandi
	$pconfig['zoneid'] = $a_dyndns[$id]['zoneid'];
84 91dad6c6 N0YB
	$pconfig['ttl'] = $a_dyndns[$id]['ttl'];
85 37f3e704 Matt Corallo
	$pconfig['updateurl'] = $a_dyndns[$id]['updateurl'];
86
	$pconfig['resultmatch'] = $a_dyndns[$id]['resultmatch'];
87
	$pconfig['requestif'] = $a_dyndns[$id]['requestif'];
88 f1f60c92 Ermal Luçi
	$pconfig['descr'] = $a_dyndns[$id]['descr'];
89
}
90
91
if ($_POST) {
92
93
	unset($input_errors);
94
	$pconfig = $_POST;
95 9c12c130 Phil Davis
96
	if (($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "") {
97
		$_POST['username'] = "none";
98
	}
99 f1f60c92 Ermal Luçi
100
	/* input validation */
101
	$reqdfields = array();
102
	$reqdfieldsn = array();
103 37f3e704 Matt Corallo
	$reqdfields = array("type");
104
	$reqdfieldsn = array(gettext("Service type"));
105 e4a62f32 Daniel Becker
	if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
106 37f3e704 Matt Corallo
		$reqdfields[] = "host";
107
		$reqdfieldsn[] = gettext("Hostname");
108 67877234 Phil Davis
		$reqdfields[] = "passwordfld";
109 37f3e704 Matt Corallo
		$reqdfieldsn[] = gettext("Password");
110 9c12c130 Phil Davis
		$reqdfields[] = "username";
111
		$reqdfieldsn[] = gettext("Username");
112
	} else {
113 37f3e704 Matt Corallo
		$reqdfields[] = "updateurl";
114
		$reqdfieldsn[] = gettext("Update URL");
115 9c12c130 Phil Davis
	}
116 f1f60c92 Ermal Luçi
117 1e9b4611 Renato Botelho
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
118 f1f60c92 Ermal Luçi
119 f2b769d0 Tuyan Ozipek
	if (isset($_POST['host']) && in_array("host", $reqdfields)) {
120 de29dadc Renato Botelho
		/* Namecheap can have a @. in hostname */
121 9c12c130 Phil Davis
		if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.') {
122 de29dadc Renato Botelho
			$host_to_check = substr($_POST['host'], 2);
123 9c12c130 Phil Davis
		} else {
124 de29dadc Renato Botelho
			$host_to_check = $_POST['host'];
125 9c12c130 Phil Davis
		}
126 de29dadc Renato Botelho
127 9c12c130 Phil Davis
		if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
128
			if (!is_domain($host_to_check)) {
129 5b506a49 Chris Buechler
				$input_errors[] = gettext("The hostname contains invalid characters.");
130 9c12c130 Phil Davis
			}
131
		}
132 de29dadc Renato Botelho
133
		unset($host_to_check);
134
	}
135 9c12c130 Phil Davis
	if (($_POST['mx'] && !is_domain($_POST['mx']))) {
136 2b2a7984 Rafael Lucas
		$input_errors[] = gettext("The MX contains invalid characters.");
137 9c12c130 Phil Davis
	}
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
	}
141 f1f60c92 Ermal Luçi
142
	if (!$input_errors) {
143
		$dyndns = array();
144
		$dyndns['type'] = $_POST['type'];
145
		$dyndns['username'] = $_POST['username'];
146 67877234 Phil Davis
		$dyndns['password'] = $_POST['passwordfld'];
147 f1f60c92 Ermal Luçi
		$dyndns['host'] = $_POST['host'];
148
		$dyndns['mx'] = $_POST['mx'];
149
		$dyndns['wildcard'] = $_POST['wildcard'] ? true : false;
150 c8c90b81 Phil Davis
		$dyndns['verboselog'] = $_POST['verboselog'] ? true : false;
151 aa79f351 Sebastian Chrostek
		$dyndns['curl_ipresolve_v4'] = $_POST['curl_ipresolve_v4'] ? true : false;
152
		$dyndns['curl_ssl_verifypeer'] = $_POST['curl_ssl_verifypeer'] ? true : false;
153 d348160e Renato Botelho
		/* In this place enable means disabled */
154 9c12c130 Phil Davis
		if ($_POST['enable']) {
155 d348160e Renato Botelho
			unset($dyndns['enable']);
156 9c12c130 Phil Davis
		} else {
157 d348160e Renato Botelho
			$dyndns['enable'] = true;
158 9c12c130 Phil Davis
		}
159 f1f60c92 Ermal Luçi
		$dyndns['interface'] = $_POST['interface'];
160 cd132e86 Edson Brandi
		$dyndns['zoneid'] = $_POST['zoneid'];
161
		$dyndns['ttl'] = $_POST['ttl'];
162 37f3e704 Matt Corallo
		$dyndns['updateurl'] = $_POST['updateurl'];
163
		// Trim hard-to-type but sometimes returned characters
164
		$dyndns['resultmatch'] = trim($_POST['resultmatch'], "\t\n\r");
165 e4a62f32 Daniel Becker
		($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
166 f1f60c92 Ermal Luçi
		$dyndns['descr'] = $_POST['descr'];
167 f3b2b2a4 Yehuda Katz
		$dyndns['force'] = isset($_POST['force']);
168 9c12c130 Phil Davis
169
		if ($dyndns['username'] == "none") {
170 0030036f gnhb
			$dyndns['username'] = "";
171 9c12c130 Phil Davis
		}
172 f1f60c92 Ermal Luçi
173 9c12c130 Phil Davis
		if (isset($id) && $a_dyndns[$id]) {
174 f1f60c92 Ermal Luçi
			$a_dyndns[$id] = $dyndns;
175 9c12c130 Phil Davis
		} else {
176
			$a_dyndns[] = $dyndns;
177 37f3e704 Matt Corallo
			$id = count($a_dyndns) - 1;
178
		}
179
180
		$dyndns['id'] = $id;
181
		//Probably overkill, but its better to be safe
182 9c12c130 Phil Davis
		for ($i = 0; $i < count($a_dyndns); $i++) {
183 37f3e704 Matt Corallo
			$a_dyndns[$i]['id'] = $i;
184
		}
185 f1f60c92 Ermal Luçi
186
		write_config();
187
188 f3b2b2a4 Yehuda Katz
		services_dyndns_configure_client($dyndns);
189 9c38bcea sullrich
190 07cdb9a2 Ermal Luçi
		header("Location: services_dyndns.php");
191
		exit;
192 f1f60c92 Ermal Luçi
	}
193
}
194
195 9c12c130 Phil Davis
$pgtitle = array(gettext("Services"), gettext("Dynamic DNS client"));
196 f1f60c92 Ermal Luçi
include("head.inc");
197
198
?>
199
200
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
201
<?php include("fbegin.inc"); ?>
202
<?php if ($input_errors) print_input_errors($input_errors); ?>
203
<?php if ($savemsg) print_info_box($savemsg); ?>
204 37f3e704 Matt Corallo
<script type="text/javascript">
205 f9f467e2 Colin Fleming
//<![CDATA[
206 9c12c130 Phil Davis
function _onTypeChange(type) {
207
	switch (type) {
208 37f3e704 Matt Corallo
		case "custom":
209 e4a62f32 Daniel Becker
		case "custom-v6":
210 37f3e704 Matt Corallo
			document.getElementById("_resulttr").style.display = '';
211
			document.getElementById("_urltr").style.display = '';
212
			document.getElementById("_requestiftr").style.display = '';
213 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = '';
214 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = 'none';
215
			document.getElementById("_mxtr").style.display = 'none';
216
			document.getElementById("_wildcardtr").style.display = 'none';
217
			document.getElementById("r53_zoneid").style.display='none';
218
			document.getElementById("r53_ttl").style.display='none';
219
			break;
220 a39b78b5 surrural
		case "dnsimple":
221 37f3e704 Matt Corallo
		case "route53":
222
			document.getElementById("_resulttr").style.display = 'none';
223
			document.getElementById("_urltr").style.display = 'none';
224
			document.getElementById("_requestiftr").style.display = 'none';
225 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
226 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
227
			document.getElementById("_mxtr").style.display = '';
228
			document.getElementById("_wildcardtr").style.display = '';
229
			document.getElementById("r53_zoneid").style.display='';
230
			document.getElementById("r53_ttl").style.display='';
231
			break;
232
		default:
233
			document.getElementById("_resulttr").style.display = 'none';
234
			document.getElementById("_urltr").style.display = 'none';
235
			document.getElementById("_requestiftr").style.display = 'none';
236 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
237 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
238
			document.getElementById("_mxtr").style.display = '';
239
			document.getElementById("_wildcardtr").style.display = '';
240
			document.getElementById("r53_zoneid").style.display='none';
241
			document.getElementById("r53_ttl").style.display='none';
242
	}
243
}
244 f9f467e2 Colin Fleming
//]]>
245 37f3e704 Matt Corallo
</script>
246 f1f60c92 Ermal Luçi
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
247 9c12c130 Phil Davis
	<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
268 7a5fe50d Phil Davis
						$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS);
269
						$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
270 9c12c130 Phil Davis
						$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">
286 3e1eec58 smos
				<?php
287 9c12c130 Phil Davis
					$iflist = get_configured_interface_with_descr();
288
					foreach ($iflist as $if => $ifdesc) {
289 3e1eec58 smos
						echo "<option value=\"{$if}\"";
290 9c12c130 Phil Davis
						if ($pconfig['interface'] == $if) {
291 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
292 9c12c130 Phil Davis
						}
293 3e1eec58 smos
						echo ">{$ifdesc}</option>\n";
294
					}
295 8f56dd27 phildd
					unset($iflist);
296 3e1eec58 smos
					$grouplist = return_gateway_groups_array();
297 9c12c130 Phil Davis
					foreach ($grouplist as $name => $group) {
298 3e1eec58 smos
						echo "<option value=\"{$name}\"";
299 9c12c130 Phil Davis
						if ($pconfig['interface'] == $name) {
300 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
301 9c12c130 Phil Davis
						}
302 3e1eec58 smos
						echo ">GW Group {$name}</option>\n";
303
					}
304 8f56dd27 phildd
					unset($grouplist);
305 3e1eec58 smos
				?>
306 9c12c130 Phil Davis
				</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">
313 31300a95 phildd
				<?php
314 9c12c130 Phil Davis
					$iflist = get_configured_interface_with_descr();
315 31300a95 phildd
					foreach ($iflist as $if => $ifdesc) {
316
						echo "<option value=\"{$if}\"";
317 9c12c130 Phil Davis
						if ($pconfig['requestif'] == $if) {
318 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
319 9c12c130 Phil Davis
						}
320 31300a95 phildd
						echo ">{$ifdesc}</option>\n";
321
					}
322 8f56dd27 phildd
					unset($iflist);
323 31300a95 phildd
					$grouplist = return_gateway_groups_array();
324
					foreach ($grouplist as $name => $group) {
325
						echo "<option value=\"{$name}\"";
326 9c12c130 Phil Davis
						if ($pconfig['requestif'] == $name) {
327 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
328 9c12c130 Phil Davis
						}
329 31300a95 phildd
						echo ">GW Group {$name}</option>\n";
330
					}
331 8f56dd27 phildd
					unset($grouplist);
332 31300a95 phildd
				?>
333 9c12c130 Phil Davis
				</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>
346 8cd558b6 ayvis
					<?=gettext("Enter the complete host/domain name.  example:  myhost.dyndns.org");?><br />
347 197cf433 McB
					<?=gettext("he.net tunnelbroker: Enter your tunnel ID");?><br />
348 a39b78b5 surrural
					<?=gettext("GleSYS: Enter your record ID");?><br />
349 c5ecdc25 Jose Luis Duran
					<?=gettext("DNSimple: Enter only the domain name");?><br />
350
					<?=gettext("DNS Made Easy: Enter your record ID separated by commas if more than one at a time");?>
351 9c12c130 Phil Davis
				</span>
352
			</td>
353
		</tr>
354
		<tr id="_mxtr">
355
			<td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
356
			<td width="78%" class="vtable">
357
				<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
358
				<br />
359
				<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
360
				<br />
361
				<?=gettext("Set this option only if you need a special MX record. Not all services support this.");?>
362
			</td>
363
		</tr>
364
		<tr id="_wildcardtr">
365
			<td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
366
			<td width="78%" class="vtable">
367
				<input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
368
				<?=gettext("Enable ");?><?=gettext("Wildcard"); ?>
369
			</td>
370
		</tr>
371
		<tr id="_verboselogtr">
372
			<td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
373
			<td width="78%" class="vtable">
374
				<input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
375
				<?=gettext("Enable ");?><?=gettext("verbose logging"); ?>
376
			</td>
377
		</tr>
378
		<tr id="_curloptions">
379
			<td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
380
			<td width="78%" class="vtable">
381
				<input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
382
				<?=gettext("Force IPv4 resolving"); ?><br />
383
				<input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
384
				<?=gettext("Verify SSL peer"); ?>
385
			</td>
386
		</tr>
387 c5ecdc25 Jose Luis Duran
		<tr id="_usernametr">
388 9c12c130 Phil Davis
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
389
			<td width="78%" class="vtable">
390
				<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
391
				<br /><?=gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
392
				<br /><?=gettext("Route 53: Enter your Access Key ID.");?>
393
				<br /><?=gettext("GleSYS: Enter your API user.");?>
394
				<br /><?=gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
395
			</td>
396
		</tr>
397
		<tr>
398
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
399
			<td width="78%" class="vtable">
400
				<input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
401
				<br />
402
				<?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
403
				<br /><?=gettext("Route 53: Enter your Secret Access Key.");?>
404
				<br /><?=gettext("GleSYS: Enter your API key.");?>
405
				<br /><?=gettext("DNSimple: Enter your API token.");?>
406
			</td>
407
		</tr>
408
		<tr id="r53_zoneid" style="display:none">
409
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
410
			<td width="78%" class="vtable">
411
				<input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
412
				<br /><?=gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
413
				<br /><?=gettext("DNSimple: Enter the Record ID of record to update.");?>
414
			</td>
415
		</tr>
416
		<tr id="_urltr">
417
			<td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
418
			<td width="78%" class="vtable">
419
				<input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
420
				<br /><?=gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
421
				<br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
422
			</td>
423
		</tr>
424 37f3e704 Matt Corallo
		<tr id="_resulttr">
425 9c12c130 Phil Davis
			<td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td>
426
			<td width="78%" class="vtable">
427
				<textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea>
428
				<br /><?=gettext("This field is only used by Custom Dynamic DNS Entries.");?>
429
				<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.");?>
430
				<br /><?=gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
431
				<br /><?=gettext("If you need to include multiple possible values, separate them with a |.  If your provider includes a |, escape it with \\|");?>
432
				<br /><?=gettext("Tabs (\\t), newlines (\\n) and carriage returns (\\r) at the beginning or end of the returned results are removed before comparison.");?>
433
			</td>
434
		</tr>
435
		<tr id="r53_ttl" style="display:none">
436
			<td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td>
437
			<td width="78%" class="vtable">
438
				<input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" />
439
				<br /><?=gettext("Choose TTL for your dns record.");?>
440
			</td>
441
		</tr>
442
		<tr>
443
			<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
444
			<td width="78%" class="vtable">
445
				<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
446
			</td>
447
		</tr>
448
		<tr>
449
			<td width="22%" valign="top">&nbsp;</td>
450
			<td width="78%">
451
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
452
				<a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
453
				<?php if (isset($id) && $a_dyndns[$id]): ?>
454
				<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
455
				<input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" />
456
				<?php endif; ?>
457
			</td>
458
		</tr>
459
		<tr>
460
			<td width="22%" valign="top">&nbsp;</td>
461
			<td width="78%">
462
				<span class="vexpl">
463
					<span class="red">
464
						<strong>
465
							<?=gettext("Note:");?><br />
466
						</strong>
467
					</span>
468
					<?php printf(gettext("You must configure a DNS server in %sSystem:
469
						General setup%s or allow the DNS server list to be overridden
470 6c07db48 Phil Davis
						by DHCP/PPP on WAN for dynamic DNS updates to work."), '<a href="system.php">', '</a>');?>
471 9c12c130 Phil Davis
				</span>
472
			</td>
473
		</tr>
474
	</table>
475 f1f60c92 Ermal Luçi
</form>
476 9e9b596f Ermal Luçi
<?php include("fend.inc"); ?>
477 cd132e86 Edson Brandi
478
<script type="text/javascript">
479 f9f467e2 Colin Fleming
//<![CDATA[
480 37f3e704 Matt Corallo
_onTypeChange("<?php echo $pconfig['type']; ?>");
481 f9f467e2 Colin Fleming
//]]>
482 cd132e86 Edson Brandi
</script>
483
484 f1f60c92 Ermal Luçi
</body>
485
</html>