Project

General

Profile

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