Project

General

Profile

Download (20.2 KB) Statistics
| Branch: | Tag: | Revision:
1 f1f60c92 Ermal Luçi
<?php
2
/* $Id$ */
3
/*
4 6317d31d Phil Davis
	services_dyndns_edit.php
5
6 7a5fe50d Phil Davis
	Copyright (C) 2008 Ermal Luçi
7 6317d31d 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 1b2af007 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 cdcf197b 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 1b2af007 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
		case "route53":
209
			document.getElementById("_resulttr").style.display = 'none';
210
			document.getElementById("_urltr").style.display = 'none';
211
			document.getElementById("_requestiftr").style.display = 'none';
212 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
213 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
214
			document.getElementById("_mxtr").style.display = '';
215
			document.getElementById("_wildcardtr").style.display = '';
216
			document.getElementById("r53_zoneid").style.display='';
217
			document.getElementById("r53_ttl").style.display='';
218
			break;
219
		default:
220
			document.getElementById("_resulttr").style.display = 'none';
221
			document.getElementById("_urltr").style.display = 'none';
222
			document.getElementById("_requestiftr").style.display = 'none';
223 aa79f351 Sebastian Chrostek
			document.getElementById("_curloptions").style.display = 'none';
224 37f3e704 Matt Corallo
			document.getElementById("_hostnametr").style.display = '';
225
			document.getElementById("_mxtr").style.display = '';
226
			document.getElementById("_wildcardtr").style.display = '';
227
			document.getElementById("r53_zoneid").style.display='none';
228
			document.getElementById("r53_ttl").style.display='none';
229
	}
230
}
231 f9f467e2 Colin Fleming
//]]>
232 37f3e704 Matt Corallo
</script>
233 f1f60c92 Ermal Luçi
<form action="services_dyndns_edit.php" method="post" name="iform" id="iform">
234 f9f467e2 Colin Fleming
              <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dynamic dns edit">
235 f1f60c92 Ermal Luçi
                <tr>
236
                  <td colspan="2" valign="top" class="optsect_t">
237 f9f467e2 Colin Fleming
				  <table border="0" cellspacing="0" cellpadding="0" width="100%" summary="title">
238 2b2a7984 Rafael Lucas
				  <tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr>
239 f1f60c92 Ermal Luçi
				  </table>
240
				  </td>
241
                </tr>
242
                <tr>
243 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
244 f1f60c92 Ermal Luçi
				  <td width="78%" class="vtable">
245 f9f467e2 Colin Fleming
				    <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> />
246 f1f60c92 Ermal Luçi
				  </td>
247
                </tr>
248
                <tr>
249 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
250 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
251 37f3e704 Matt Corallo
			<select name="type" class="formselect" id="type" onchange="_onTypeChange(this.options[this.selectedIndex].value);">
252 f1f60c92 Ermal Luçi
                      <?php
253 7a5fe50d Phil Davis
						$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS);
254
						$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
255 f1f60c92 Ermal Luçi
						$j = 0; for ($j = 0; $j < count($vals); $j++): ?>
256 f9f467e2 Colin Fleming
                      <option value="<?=$vals[$j];?>" <?php if ($vals[$j] == $pconfig['type']) echo "selected=\"selected\"";?>>
257 f1f60c92 Ermal Luçi
                      <?=htmlspecialchars($types[$j]);?>
258
                      </option>
259
                      <?php endfor; ?>
260
                    </select></td>
261
				</tr>
262
				<tr>
263 2b2a7984 Rafael Lucas
				   <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>  
264 f1f60c92 Ermal Luçi
				   <td width="78%" class="vtable">
265
				   <select name="interface" class="formselect" id="interface">
266 3e1eec58 smos
				<?php
267
					$iflist = get_configured_interface_with_descr();					
268
				   	foreach ($iflist as $if => $ifdesc) {
269
						echo "<option value=\"{$if}\"";
270
						if ($pconfig['interface'] == $if)
271 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
272 3e1eec58 smos
						echo ">{$ifdesc}</option>\n";
273
					}
274 8f56dd27 phildd
					unset($iflist);
275 3e1eec58 smos
					$grouplist = return_gateway_groups_array();
276
				   	foreach ($grouplist as $name => $group) {
277
						echo "<option value=\"{$name}\"";
278
						if ($pconfig['interface'] == $name)
279 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
280 3e1eec58 smos
						echo ">GW Group {$name}</option>\n";
281
					}
282 8f56dd27 phildd
					unset($grouplist);
283 3e1eec58 smos
				?>
284 f1f60c92 Ermal Luçi
					</select>
285
					</td>
286
				</tr>	
287 37f3e704 Matt Corallo
				<tr id="_requestiftr">
288 31300a95 phildd
					<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to send update from");?></td>  
289
					<td width="78%" class="vtable">
290
					<select name="requestif" class="formselect" id="requestif">
291
				<?php
292
					$iflist = get_configured_interface_with_descr();					
293
					foreach ($iflist as $if => $ifdesc) {
294
						echo "<option value=\"{$if}\"";
295
						if ($pconfig['requestif'] == $if)
296 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
297 31300a95 phildd
						echo ">{$ifdesc}</option>\n";
298
					}
299 8f56dd27 phildd
					unset($iflist);
300 31300a95 phildd
					$grouplist = return_gateway_groups_array();
301
					foreach ($grouplist as $name => $group) {
302
						echo "<option value=\"{$name}\"";
303
						if ($pconfig['requestif'] == $name)
304 f9f467e2 Colin Fleming
							echo "selected=\"selected\"";
305 31300a95 phildd
						echo ">GW Group {$name}</option>\n";
306
					}
307 8f56dd27 phildd
					unset($grouplist);
308 31300a95 phildd
				?>
309 37f3e704 Matt Corallo
					</select>
310 8cd558b6 ayvis
					<br /><?= gettext("Note: This is almost always the same as the Interface to Monitor.");?>
311 37f3e704 Matt Corallo
					</td>
312
				</tr>
313
                <tr id="_hostnametr">
314 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
315 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
316 f9f467e2 Colin Fleming
                    <input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>" />
317 8cd558b6 ayvis
                    <br />
318 f1f60c92 Ermal Luçi
				    <span class="vexpl">
319 8cd558b6 ayvis
				    <span class="red"><strong><?=gettext("Note:");?><br /></strong>
320 f1f60c92 Ermal Luçi
				    </span>
321 8cd558b6 ayvis
					<?=gettext("Enter the complete host/domain name.  example:  myhost.dyndns.org");?><br />
322 38a481ad jim-p
					<?=gettext("For he.net tunnelbroker, enter your tunnel ID");?>
323 f1f60c92 Ermal Luçi
				    </span>
324
		          </td>
325
				</tr>
326 37f3e704 Matt Corallo
                <tr id="_mxtr">
327 50bfcec0 Carlos Eduardo Ramos
                  <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
328 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
329 f9f467e2 Colin Fleming
                    <input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>" />
330 8cd558b6 ayvis
                    <br />
331 2b2a7984 Rafael Lucas
					<?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
332 8cd558b6 ayvis
					<br />
333 2b2a7984 Rafael Lucas
                    <?=gettext("Set this option only if you need a special MX record. Not".
334
                   " all services support this.");?></td>
335 f1f60c92 Ermal Luçi
				</tr>
336 37f3e704 Matt Corallo
                <tr id="_wildcardtr">
337 50bfcec0 Carlos Eduardo Ramos
                  <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
338 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
339 f9f467e2 Colin Fleming
                    <input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked=\"checked\""; ?> />
340 50bfcec0 Carlos Eduardo Ramos
                    <?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
341 f1f60c92 Ermal Luçi
				</tr>
342 c8c90b81 Phil Davis
                <tr id="_verboselogtr">
343
                  <td width="22%" valign="top" class="vncell"><?=gettext("Verbose logging"); ?></td>
344
                  <td width="78%" class="vtable">
345 f9f467e2 Colin Fleming
                    <input name="verboselog" type="checkbox" id="verboselog" value="yes" <?php if ($pconfig['verboselog']) echo "checked=\"checked\""; ?> />
346 c8c90b81 Phil Davis
                    <?=gettext("Enable ");?><?=gettext("verbose logging"); ?></td>
347
				</tr>
348 aa79f351 Sebastian Chrostek
				<tr id="_curloptions">
349
                  <td width="22%" valign="top" class="vncell"><?=gettext("CURL options"); ?></td>
350
                  <td width="78%" class="vtable">
351 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\""; ?> />
352 8cd558b6 ayvis
                    <?=gettext("Force IPv4 resolving"); ?><br />
353 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\""; ?> />
354 aa79f351 Sebastian Chrostek
                    <?=gettext("Verify SSL peer"); ?>
355
				  </td>
356
				</tr>
357 37f3e704 Matt Corallo
                <tr id="_usernametr">
358 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
359 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
360 f9f467e2 Colin Fleming
                    <input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
361 8cd558b6 ayvis
                    <br /><?= gettext("Username is required for all types except Namecheap, FreeDNS and Custom Entries.");?>
362
		    <br /><?= gettext("Route 53: Enter your Access Key ID.");?>
363
		    <br /><?= gettext("For Custom Entries, Username and Password represent HTTP Authentication username and passwords.");?>
364 f1f60c92 Ermal Luçi
                  </td>
365
                </tr>
366
                <tr>
367 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
368 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
369 1b2af007 Phil Davis
                    <input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
370 8cd558b6 ayvis
                    <br />
371 d9cc4b24 gnhb
                    <?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
372 8cd558b6 ayvis
		    <br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
373 cd132e86 Edson Brandi
                  </td>
374
                </tr>
375
376
                <tr id="r53_zoneid" style="display:none">
377
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Zone ID");?></td>
378
                  <td width="78%" class="vtable">
379 f9f467e2 Colin Fleming
                    <input name="zoneid" type="text" class="formfld user" id="zoneid" size="20" value="<?=htmlspecialchars($pconfig['zoneid']);?>" />
380 8cd558b6 ayvis
                    <br /><?= gettext("Enter Zone ID that you received when you created your domain in Route 53.");?>
381 f1f60c92 Ermal Luçi
                  </td>
382
                </tr>
383 37f3e704 Matt Corallo
                <tr id="_urltr">
384
                  <td width="22%" valign="top" class="vncell"><?=gettext("Update URL");?></td>
385
                  <td width="78%" class="vtable">
386 f9f467e2 Colin Fleming
                    <input name="updateurl" type="text" class="formfld unknown" id="updateurl" size="60" value="<?=htmlspecialchars($pconfig['updateurl']);?>" />
387 8cd558b6 ayvis
                    <br /><?= gettext("This is the only field required by for Custom Dynamic DNS, and is only used by Custom Entries.");?>
388
			<br />
389 37f3e704 Matt Corallo
			<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
390
                  </td>
391
                </tr>
392
		<tr id="_resulttr">
393
                  <td width="22%" valign="top" class="vncell"><?=gettext("Result Match");?></td>
394
                  <td width="78%" class="vtable">
395
                    <textarea name="resultmatch" class="formpre" id="resultmatch" cols="65" rows="7"><?=htmlspecialchars($pconfig['resultmatch']);?></textarea>
396 8cd558b6 ayvis
                    <br /><?= gettext("This field is only used by Custom Dynamic DNS Entries.");?>
397
			<br />
398 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.");?>
399 8cd558b6 ayvis
			<br />
400 37f3e704 Matt Corallo
			<?= gettext("If you need the new IP to be included in the request, put %IP% in its place.");?>
401 8cd558b6 ayvis
			<br />
402 9eee0a15 N0YB
			<?= gettext("If you need to include multiple possible values, separate them with a |.  If your provider includes a |, escape it with \\|");?>
403 8cd558b6 ayvis
			<br />
404 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.");?>
405
                  </td>
406
                </tr>
407 cd132e86 Edson Brandi
408
                <tr id="r53_ttl" style="display:none">
409
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("TTL");?></td>
410
                  <td width="78%" class="vtable">
411 f9f467e2 Colin Fleming
                    <input name="ttl" type="text" class="formfld user" id="ttl" size="20" value="<?=htmlspecialchars($pconfig['ttl']);?>" />
412 8cd558b6 ayvis
                    <br /><?= gettext("Choose TTL for your dns record.");?>
413 cd132e86 Edson Brandi
                  </td>
414
                </tr>
415
416
417 f1f60c92 Ermal Luçi
                <tr>
418 2b2a7984 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
419 f1f60c92 Ermal Luçi
                  <td width="78%" class="vtable">
420 f9f467e2 Colin Fleming
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" />
421 f1f60c92 Ermal Luçi
                  </td>
422
                </tr>
423
                <tr>
424
                  <td width="22%" valign="top">&nbsp;</td>
425
                  <td width="78%">
426 f9f467e2 Colin Fleming
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
427
					<a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
428 f1f60c92 Ermal Luçi
					<?php if (isset($id) && $a_dyndns[$id]): ?>
429 f9f467e2 Colin Fleming
						<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
430
						<input name="force" type="submit" class="formbtn" value="<?=gettext("Save & Force Update");?>" onclick="enable_change(true)" />
431 f1f60c92 Ermal Luçi
					<?php endif; ?>
432
                  </td>
433
                </tr>
434
                <tr>
435
                  <td width="22%" valign="top">&nbsp;</td>
436 8cd558b6 ayvis
                  <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
437 2b2a7984 Rafael Lucas
                    </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem:
438
                    General setup%s or allow the DNS server list to be overridden
439
                    by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td>
440 f1f60c92 Ermal Luçi
                </tr>
441
              </table>
442
</form>
443 9e9b596f Ermal Luçi
<?php include("fend.inc"); ?>
444 cd132e86 Edson Brandi
445
<script type="text/javascript">
446 f9f467e2 Colin Fleming
//<![CDATA[
447 37f3e704 Matt Corallo
_onTypeChange("<?php echo $pconfig['type']; ?>");
448 f9f467e2 Colin Fleming
//]]>
449 cd132e86 Edson Brandi
</script>
450
451 f1f60c92 Ermal Luçi
</body>
452
</html>