Project

General

Profile

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