Project

General

Profile

Download (20.7 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
        if (!is_string($uname))
46
                return false;
47
        
48 9b86d3fe Chris Buechler
        if (preg_match("/[^a-z0-9\-\+.@_:]/i", $uname))
49 ee2db55f Ermal Lu?i
                return false;
50
        else
51
                return true;
52
}
53
54 f1f60c92 Ermal Luçi
require("guiconfig.inc");
55
56
if (!is_array($config['dyndnses']['dyndns'])) {
57
	$config['dyndnses']['dyndns'] = array();
58
}
59
60
$a_dyndns = &$config['dyndnses']['dyndns'];
61
62 e41ec584 Renato Botelho
if (is_numericint($_GET['id']))
63
	$id = $_GET['id'];
64
if (isset($_POST['id']) && is_numericint($_POST['id']))
65 f1f60c92 Ermal Luçi
	$id = $_POST['id'];
66
67
if (isset($id) && isset($a_dyndns[$id])) {
68
	$pconfig['username'] = $a_dyndns[$id]['username'];
69
	$pconfig['password'] = $a_dyndns[$id]['password'];
70
	$pconfig['host'] = $a_dyndns[$id]['host'];
71
	$pconfig['mx'] = $a_dyndns[$id]['mx'];
72
	$pconfig['type'] = $a_dyndns[$id]['type'];
73 acdfc164 Ermal Luçi
	$pconfig['enable'] = !isset($a_dyndns[$id]['enable']);
74 f1f60c92 Ermal Luçi
	$pconfig['interface'] = $a_dyndns[$id]['interface'];
75
	$pconfig['wildcard'] = isset($a_dyndns[$id]['wildcard']);
76 c8c90b81 Phil Davis
	$pconfig['verboselog'] = isset($a_dyndns[$id]['verboselog']);
77 aa79f351 Sebastian Chrostek
	$pconfig['curl_ipresolve_v4'] = isset($a_dyndns[$id]['curl_ipresolve_v4']);
78
	$pconfig['curl_ssl_verifypeer'] = isset($a_dyndns[$id]['curl_ssl_verifypeer']);
79 cd132e86 Edson Brandi
	$pconfig['zoneid'] = $a_dyndns[$id]['zoneid'];
80 91dad6c6 N0YB
	$pconfig['ttl'] = $a_dyndns[$id]['ttl'];
81 37f3e704 Matt Corallo
	$pconfig['updateurl'] = $a_dyndns[$id]['updateurl'];
82
	$pconfig['resultmatch'] = $a_dyndns[$id]['resultmatch'];
83
	$pconfig['requestif'] = $a_dyndns[$id]['requestif'];
84 f1f60c92 Ermal Luçi
	$pconfig['descr'] = $a_dyndns[$id]['descr'];
85
}
86
87
if ($_POST) {
88
89
	unset($input_errors);
90
	$pconfig = $_POST;
91 d9cc4b24 gnhb
	
92 0030036f gnhb
	if(($pconfig['type'] == "freedns" || $pconfig['type'] == "namecheap") && $_POST['username'] == "")
93
		$_POST['username'] = "none"; 
94 f1f60c92 Ermal Luçi
95
	/* input validation */
96
	$reqdfields = array();
97
	$reqdfieldsn = array();
98 37f3e704 Matt Corallo
	$reqdfields = array("type");
99
	$reqdfieldsn = array(gettext("Service type"));
100 e4a62f32 Daniel Becker
	if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
101 37f3e704 Matt Corallo
		$reqdfields[] = "host";
102
		$reqdfieldsn[] = gettext("Hostname");
103 67877234 Phil Davis
		$reqdfields[] = "passwordfld";
104 37f3e704 Matt Corallo
		$reqdfieldsn[] = gettext("Password");
105
 		$reqdfields[] = "username";
106
 		$reqdfieldsn[] = gettext("Username");
107
	}else{
108
		$reqdfields[] = "updateurl";
109
		$reqdfieldsn[] = gettext("Update URL");
110
 	}
111 f1f60c92 Ermal Luçi
112 1e9b4611 Renato Botelho
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
113 f1f60c92 Ermal Luçi
114 f2b769d0 Tuyan Ozipek
	if (isset($_POST['host']) && in_array("host", $reqdfields)) {
115 de29dadc Renato Botelho
		/* Namecheap can have a @. in hostname */
116
		if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.')
117
			$host_to_check = substr($_POST['host'], 2);
118
		else
119
			$host_to_check = $_POST['host'];
120
121 5b506a49 Chris Buechler
		if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6")
122
			if (!is_domain($host_to_check))
123
				$input_errors[] = gettext("The hostname contains invalid characters.");
124 de29dadc Renato Botelho
125
		unset($host_to_check);
126
	}
127 f1f60c92 Ermal Luçi
	if (($_POST['mx'] && !is_domain($_POST['mx']))) 
128 2b2a7984 Rafael Lucas
		$input_errors[] = gettext("The MX contains invalid characters.");
129 37f3e704 Matt Corallo
	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.");
131 f1f60c92 Ermal Luçi
132
	if (!$input_errors) {
133
		$dyndns = array();
134
		$dyndns['type'] = $_POST['type'];
135
		$dyndns['username'] = $_POST['username'];
136 67877234 Phil Davis
		$dyndns['password'] = $_POST['passwordfld'];
137 f1f60c92 Ermal Luçi
		$dyndns['host'] = $_POST['host'];
138
		$dyndns['mx'] = $_POST['mx'];
139
		$dyndns['wildcard'] = $_POST['wildcard'] ? true : false;
140 c8c90b81 Phil Davis
		$dyndns['verboselog'] = $_POST['verboselog'] ? true : false;
141 aa79f351 Sebastian Chrostek
		$dyndns['curl_ipresolve_v4'] = $_POST['curl_ipresolve_v4'] ? true : false;
142
		$dyndns['curl_ssl_verifypeer'] = $_POST['curl_ssl_verifypeer'] ? true : false;
143 d348160e Renato Botelho
		/* In this place enable means disabled */
144
		if ($_POST['enable'])
145
			unset($dyndns['enable']);
146
		else
147
			$dyndns['enable'] = true;
148 f1f60c92 Ermal Luçi
		$dyndns['interface'] = $_POST['interface'];
149 cd132e86 Edson Brandi
		$dyndns['zoneid'] = $_POST['zoneid'];
150
		$dyndns['ttl'] = $_POST['ttl'];
151 37f3e704 Matt Corallo
		$dyndns['updateurl'] = $_POST['updateurl'];
152
		// Trim hard-to-type but sometimes returned characters
153
		$dyndns['resultmatch'] = trim($_POST['resultmatch'], "\t\n\r");
154 e4a62f32 Daniel Becker
		($dyndns['type'] == "custom" || $dyndns['type'] == "custom-v6") ? $dyndns['requestif'] = $_POST['requestif'] : $dyndns['requestif'] = $_POST['interface'];
155 f1f60c92 Ermal Luçi
		$dyndns['descr'] = $_POST['descr'];
156 f3b2b2a4 Yehuda Katz
		$dyndns['force'] = isset($_POST['force']);
157 0030036f gnhb
		
158
		if($dyndns['username'] == "none")
159
			$dyndns['username'] = "";
160 f1f60c92 Ermal Luçi
161
		if (isset($id) && $a_dyndns[$id])
162
			$a_dyndns[$id] = $dyndns;
163 37f3e704 Matt Corallo
		else {
164
 			$a_dyndns[] = $dyndns;
165
			$id = count($a_dyndns) - 1;
166
		}
167
168
		$dyndns['id'] = $id;
169
		//Probably overkill, but its better to be safe
170
		for($i = 0; $i < count($a_dyndns); $i++) {
171
			$a_dyndns[$i]['id'] = $i;
172
		}
173 f1f60c92 Ermal Luçi
174
		write_config();
175
176 f3b2b2a4 Yehuda Katz
		services_dyndns_configure_client($dyndns);
177 9c38bcea sullrich
178 07cdb9a2 Ermal Luçi
		header("Location: services_dyndns.php");
179
		exit;
180 f1f60c92 Ermal Luçi
	}
181
}
182
183 2b2a7984 Rafael Lucas
$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client"));
184 f1f60c92 Ermal Luçi
include("head.inc");
185
186
?>
187
188
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
189
<?php include("fbegin.inc"); ?>
190
<?php if ($input_errors) print_input_errors($input_errors); ?>
191
<?php if ($savemsg) print_info_box($savemsg); ?>
192 37f3e704 Matt Corallo
<script type="text/javascript">
193 f9f467e2 Colin Fleming
//<![CDATA[
194 37f3e704 Matt Corallo
function _onTypeChange(type){ 
195
	switch(type) {
196
		case "custom":
197 e4a62f32 Daniel Becker
		case "custom-v6":
198 37f3e704 Matt Corallo
			document.getElementById("_resulttr").style.display = '';
199
			document.getElementById("_urltr").style.display = '';
200
			document.getElementById("_requestiftr").style.display = '';
201 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = '';
202 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = 'none';
203
			document.getElementById("_mxtr").style.display = 'none';
204
			document.getElementById("_wildcardtr").style.display = 'none';
205
			document.getElementById("r53_zoneid").style.display='none';
206
			document.getElementById("r53_ttl").style.display='none';
207
			break;
208 a39b78b5 surrural
		case "dnsimple":
209 37f3e704 Matt Corallo
		case "route53":
210
			document.getElementById("_resulttr").style.display = 'none';
211
			document.getElementById("_urltr").style.display = 'none';
212
			document.getElementById("_requestiftr").style.display = 'none';
213 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
214 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
215
			document.getElementById("_mxtr").style.display = '';
216
			document.getElementById("_wildcardtr").style.display = '';
217
			document.getElementById("r53_zoneid").style.display='';
218
			document.getElementById("r53_ttl").style.display='';
219
			break;
220
		default:
221
			document.getElementById("_resulttr").style.display = 'none';
222
			document.getElementById("_urltr").style.display = 'none';
223
			document.getElementById("_requestiftr").style.display = 'none';
224 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
225 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
226
			document.getElementById("_mxtr").style.display = '';
227
			document.getElementById("_wildcardtr").style.display = '';
228
			document.getElementById("r53_zoneid").style.display='none';
229
			document.getElementById("r53_ttl").style.display='none';
230
	}
231
}
232 f9f467e2 Colin Fleming
//]]>
233 37f3e704 Matt Corallo
</script>
234 f1f60c92 Ermal Luçi
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
235 f9f467e2 Colin Fleming
              <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit">
236 f1f60c92 Ermal Luçi
                <tr>
237
                  <td colspan="2" valign="top" class="optsect_t">
238 f9f467e2 Colin Fleming
				  <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
239 2b2a7984 Rafael Lucas
				  <tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr>
240 f1f60c92 Ermal Luçi
				  </table>
241
				  </td>
242
                </tr>
243
                <tr>
244 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
245 f1f60c92 Ermal Luçi
				  <td width="78%" class="vtable">
246 f9f467e2 Colin Fleming
				    <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> />
247 f1f60c92 Ermal Luçi
				  </td>
248
                </tr>
249
                <tr>
250 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
251 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
252 37f3e704 Matt Corallo
			<select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);">
253 f1f60c92 Ermal Luçi
                      <?php
254 7a5fe50d Phil Davis
						$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS);
255
						$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
256 f1f60c92 Ermal Luçi
						$j = 0; for ($j = 0; $j < count($vals); $j++): ?>
257 f9f467e2 Colin Fleming
                      <option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>>
258 f1f60c92 Ermal Luçi
                      <?=htmlspecialchars($types[$j]);?>
259
                      </option>
260
                      <?php endfor; ?>
261
                    </select></td>
262
				</tr>
263
				<tr>
264 2b2a7984 Rafael Lucas
				   <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>  
265 f1f60c92 Ermal Luçi
				   <td width="78%" class="vtable">
266
				   <select name="interface" class="formselect" id="interface">
267 3e1eec58 smos
				<?php
268
					$iflist = get_configured_interface_with_descr();					
269
				   	foreach ($iflist as $if => $ifdesc) {
270
						echo "<option value=\"{$if}\"";
271
						if ($pconfig['interface'] == $if)
272 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
273 3e1eec58 smos
						echo ">{$ifdesc}</option>\n";
274
					}
275 8f56dd27 phildd
					unset($iflist);
276 3e1eec58 smos
					$grouplist = return_gateway_groups_array();
277
				   	foreach ($grouplist as $name => $group) {
278
						echo "<option value=\"{$name}\"";
279
						if ($pconfig['interface'] == $name)
280 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
281 3e1eec58 smos
						echo ">GW Group {$name}</option>\n";
282
					}
283 8f56dd27 phildd
					unset($grouplist);
284 3e1eec58 smos
				?>
285 f1f60c92 Ermal Luçi
					</select>
286
					</td>
287
				</tr>	
288 37f3e704 Matt Corallo
				<tr id="_requestiftr">
289 31300a95 phildd
					<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">
292
				<?php
293
					$iflist = get_configured_interface_with_descr();					
294
					foreach ($iflist as $if => $ifdesc) {
295
						echo "<option value=\"{$if}\"";
296
						if ($pconfig['requestif'] == $if)
297 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
298 31300a95 phildd
						echo ">{$ifdesc}</option>\n";
299
					}
300 8f56dd27 phildd
					unset($iflist);
301 31300a95 phildd
					$grouplist = return_gateway_groups_array();
302
					foreach ($grouplist as $name => $group) {
303
						echo "<option value=\"{$name}\"";
304
						if ($pconfig['requestif'] == $name)
305 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
306 31300a95 phildd
						echo ">GW Group {$name}</option>\n";
307
					}
308 8f56dd27 phildd
					unset($grouplist);
309 31300a95 phildd
				?>
310 37f3e704 Matt Corallo
					</select>
311 8cd558b6 ayvis
					<br /><?= gettext("Note: This is almost always the same as the Interface to Monitor.");?>
312 37f3e704 Matt Corallo
					</td>
313
				</tr>
314
                <tr id="_hostnametr">
315 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
316 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
317 f9f467e2 Colin Fleming
                    <input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" />
318 8cd558b6 ayvis
                    <br />
319 f1f60c92 Ermal Luçi
				    <span class="vexpl">
320 8cd558b6 ayvis
				    <span class="red"><strong><?=gettext("Note:");?><br /></strong>
321 f1f60c92 Ermal Luçi
				    </span>
322 8cd558b6 ayvis
					<?=gettext("Enter the complete host/domain name.  example:  myhost.dyndns.org");?><br />
323 197cf433 McB
					<?=gettext("he.net tunnelbroker: Enter your tunnel ID");?><br />
324 a39b78b5 surrural
					<?=gettext("GleSYS: Enter your record ID");?><br />
325
					<?= gettext("DNSimple: Enter only the domain name.");?>
326 f1f60c92 Ermal Luçi
				    </span>
327
		          </td>
328
				</tr>
329 37f3e704 Matt Corallo
                <tr id="_mxtr">
330 50bfcec0 Carlos Eduardo Ramos
                  <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
331 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
332 f9f467e2 Colin Fleming
                    <input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
333 8cd558b6 ayvis
                    <br />
334 2b2a7984 Rafael Lucas
					<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
335 8cd558b6 ayvis
					<br />
336 2b2a7984 Rafael Lucas
                    <?=gettext("Set this option only if you need a special MX record. Not".
337
                   " all services support this.");?></td>
338 f1f60c92 Ermal Luçi
				</tr>
339 37f3e704 Matt Corallo
                <tr id="_wildcardtr">
340 50bfcec0 Carlos Eduardo Ramos
                  <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
341 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
342 f9f467e2 Colin Fleming
                    <input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
343 50bfcec0 Carlos Eduardo Ramos
                    <?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
344 f1f60c92 Ermal Luçi
				</tr>
345 c8c90b81 Phil Davis
                <tr id="_verboselogtr">
346
                  <td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
347
                  <td width="78%" class="vtable">
348 f9f467e2 Colin Fleming
                    <input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
349 c8c90b81 Phil Davis
                    <?=gettext("Enable ");?><?=gettext("verbose logging"); ?></td>
350
				</tr>
351 aa79f351 Sebastian Chrostek
				<tr id="_curloptions">
352
                  <td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
353
                  <td width="78%" class="vtable">
354 f9f467e2 Colin Fleming
                    <input name="curl_ipresolve_v4" type="checkbox" id="curl_ipresolve_v4" value="yes" <?php if ($pconfig['curl_ipresolve_v4']) echo "checked=\"checked\""; ?> />
355 8cd558b6 ayvis
                    <?=gettext("Force IPv4 resolving"); ?><br />
356 f9f467e2 Colin Fleming
					<input name="curl_ssl_verifypeer" type="checkbox" id="curl_ssl_verifypeer" value="yes" <?php if ($pconfig['curl_ssl_verifypeer']) echo "checked=\"checked\""; ?> />
357 aa79f351 Sebastian Chrostek
                    <?=gettext("Verify SSL peer"); ?>
358
				  </td>
359
				</tr>
360 37f3e704 Matt Corallo
                <tr id="_usernametr">
361 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
362 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
363 f9f467e2 Colin Fleming
                    <input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
364 8cd558b6 ayvis
                    <br /><?= gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
365 68fde79c McB
                    <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 f1f60c92 Ermal Luçi
                  </td>
369
                </tr>
370
                <tr>
371 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
372 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
373 67877234 Phil Davis
                    <input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
374 8cd558b6 ayvis
                    <br />
375 d9cc4b24 gnhb
                    <?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
376 68fde79c McB
                    <br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
377
                    <br /><?= gettext("GleSYS: Enter your API key.");?>
378 a39b78b5 surrural
                    <br /><?= gettext("DNSimple: Enter your API token.");?>
379 cd132e86 Edson Brandi
                  </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 f9f467e2 Colin Fleming
                    <input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
386 8cd558b6 ayvis
                    <br /><?= gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
387 a39b78b5 surrural
                    <br /><?= gettext("DNSimple: Enter the Record ID of record to update.");?>
388 f1f60c92 Ermal Luçi
                  </td>
389
                </tr>
390 37f3e704 Matt Corallo
                <tr id="_urltr">
391
                  <td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
392
                  <td width="78%" class="vtable">
393 f9f467e2 Colin Fleming
                    <input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
394 8cd558b6 ayvis
                    <br /><?= gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
395
			<br />
396 37f3e704 Matt Corallo
			<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
397
                  </td>
398
                </tr>
399
		<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 8cd558b6 ayvis
                    <br /><?= gettext("This field is only used by Custom Dynamic DNS Entries.");?>
404
			<br />
405 37f3e704 Matt Corallo
			<?= 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 8cd558b6 ayvis
			<br />
407 37f3e704 Matt Corallo
			<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
408 8cd558b6 ayvis
			<br />
409 9eee0a15 N0YB
			<?= gettext("If you need to include multiple possible values, separate them with a |.  If your provider includes a |, escape it with \\|");?>
410 8cd558b6 ayvis
			<br />
411 37f3e704 Matt Corallo
			<?= 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 cd132e86 Edson Brandi
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 f9f467e2 Colin Fleming
                    <input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" />
419 8cd558b6 ayvis
                    <br /><?= gettext("Choose TTL for your dns record.");?>
420 cd132e86 Edson Brandi
                  </td>
421
                </tr>
422
423
424 f1f60c92 Ermal Luçi
                <tr>
425 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
426 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
427 f9f467e2 Colin Fleming
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
428 f1f60c92 Ermal Luçi
                  </td>
429
                </tr>
430
                <tr>
431
                  <td width="22%" valign="top">&nbsp;</td>
432
                  <td width="78%">
433 f9f467e2 Colin Fleming
                    <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 f1f60c92 Ermal Luçi
					<?php if (isset($id) && $a_dyndns[$id]): ?>
436 f9f467e2 Colin Fleming
						<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 f1f60c92 Ermal Luçi
					<?php endif; ?>
439
                  </td>
440
                </tr>
441
                <tr>
442
                  <td width="22%" valign="top">&nbsp;</td>
443 8cd558b6 ayvis
                  <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
444 2b2a7984 Rafael Lucas
                    </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 f1f60c92 Ermal Luçi
                </tr>
448
              </table>
449
</form>
450 9e9b596f Ermal Luçi
<?php include("fend.inc"); ?>
451 cd132e86 Edson Brandi
452
<script type="text/javascript">
453 f9f467e2 Colin Fleming
//<![CDATA[
454 37f3e704 Matt Corallo
_onTypeChange("<?php echo $pconfig['type']; ?>");
455 f9f467e2 Colin Fleming
//]]>
456 cd132e86 Edson Brandi
</script>
457
458 f1f60c92 Ermal Luçi
</body>
459
</html>