Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?
2
	$self=basename($PHP_SELF);
3
	define ("modul_name", "domain_admin");
4
	define ("tool_name", "dnsadmin");
5
	require_once "../Online-Shop/connect2.php";
6
 
7
	// ###############################################################
8
 
9
	if ($web_rechte[domain_admin][dnsadmin][basedir])
10
	{
11
		$basedir=$web_rechte[domain_admin][dnsadmin][basedir];
12
	}
13
	else
14
	{
15
		echo "<p>&nbsp;&nbsp;&nbsp;FEHLER: Basisverzeichnis nicht eingerichtet.</p>";
16
		exit;
17
	}
18
 
19
	if ($web_rechte[domain_admin][dnsadmin][reseller])
20
	{
21
	}
22
	else
23
	{
24
		echo "<p>&nbsp;&nbsp;&nbsp;FEHLER: Reseller nicht eingerichtet.</p>";
25
		exit;
26
	}
27
 
28
	// ###############################################################
29
 
30
	function get_files($dir)
31
	{
32
		$handle=opendir ($dir);
33
		$files=array();
34
		while ($file = readdir ($handle))
35
		{
36
	    	if ($file != "." && $file != "..")
37
			{
38
				if (!strstr ($file, '.zone'))
39
				{
40
					array_push($files,$file);
41
				}
42
		    }
43
		}
44
		closedir($handle);
45
		sort ($files);
46
		return $files;
47
	}
48
 
49
	if ($go)
50
	{
51
		//Marke setzen, dass Server neu gestartet werden soll. Incl. Zeitstempel
52
		$query="update content_management.dienst_start set starten = '1' where (server ='dns' and reseller = '$site')";
53
		$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");
54
 
55
 
56
		// Dateien erstellen
57
		$header = array(
58
		"; BIND-Editor Version 1.0",
59
		"; Webagentur Niewerth",
60
		);
61
 
62
		$content_SOA=array(
63
		$SOA[Zonename].chr(9).$SOA[standard_TTL][0].$SOA[standard_TTL][1].chr(9)."IN".chr(9)."SOA".chr(9).$SOA[NS]." ".$SOA[admin]." (",
64
		chr(9).chr(9).chr(9).chr(9).date("Ymd")."01",
65
		chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][update][0].$SOA[Zeiten][update][1],
66
		chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][transfer_repeat][0].$SOA[Zeiten][transfer_repeat][1],
67
		chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][timeout][0].$SOA[Zeiten][timeout][1],
68
		chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][standard_TTL][0].$SOA[Zeiten][standard_TTL][1]." )"
69
		);
70
 
71
		$fp = fopen ($basedir."/".substr ($SOA[Zonename], 0, -1), "w+");
72
			foreach($header as $elem)
73
			{
74
				fwrite ($fp, $elem."\n");
75
			}
76
 
77
			foreach($content_SOA as $elem)
78
			{
79
				fwrite ($fp, $elem."\n");
80
			}
81
 
82
			if ($A)
83
			{
84
				foreach($A as $elem)
85
				{
86
					if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }
87
					if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }
88
 
89
					fwrite ($fp,$elem[Domain].chr(9).$elem[TTL][0].$elem[TTL][1].chr(9)."IN".chr(9)."A".chr(9).$elem[IP]."\n");
90
				}
91
			}
92
 
93
			if ($NS)
94
			{
95
				foreach($NS as $elem)
96
				{
97
					if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }
98
					if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }
99
 
100
					fwrite ($fp,$elem[Domain].chr(9).$elem[TTL][0].$elem[TTL][1].chr(9)."IN".chr(9)."NS".chr(9).$elem[Server]."\n");
101
				}
102
			}
103
 
104
			if ($MX)
105
			{
106
				foreach($MX as $elem)
107
				{
108
					if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }
109
					if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }
110
 
111
					fwrite ($fp,$elem[Domain].chr(9).$elem[TTL][0].$elem[TTL][1].chr(9)."IN".chr(9)."MX".chr(9).$elem[Prioritaet]." ".$elem[Server]."\n");
112
				}
113
			}
114
 
115
		fclose ($fp);
116
 
117
		// named.zones neu schreiben wenn NEUEINTRAG
118
		//if ($new)
119
		{
120
			$files=get_files($basedir);
121
			$fp = fopen ("/etc/".$web_rechte[domain_admin][dnsadmin][zonefile], "w+");
122
			foreach($files as $elem)
123
			{
124
				$elem = trim($elem);
125
				fwrite ($fp, "zone \"$elem\" IN {\n");
126
				fwrite ($fp, chr(9)."type master;\n");
127
				fwrite ($fp, chr(9)."file \"$basedir/$elem\";\n");
128
				fwrite ($fp, "};\n\n");
129
			}
130
 
131
			fclose ($fp);
132
		}
133
		// Mail an secondary schicken
134
		if ($new == "")
135
		{
136
			mail("robot@cms-sudhaus.de", "SECDNSROBOT","domain:".substr($SOA[Zonename], 0, -1)."\nreseller:".$web_rechte[domain_admin][dnsadmin][reseller]."\nmaster:195.126.140.57\nFROM:info@weban.de");
137
		}
138
 
139
		unset($action);
140
	}
141
 
142
	if ($erase)
143
	{
144
		foreach($erase as $elem)
145
		{
146
			unlink ($basedir."/".$elem);
147
		}
148
		unset($action);
149
	}
150
 
151
	if (!$action) {$action = "select_edit";}
152
?>
153
<html>
154
<head>
155
<title>Domain - Eintrag</title>
156
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
157
<link rel=stylesheet type="text/css" href="redaktion.css">
158
<meta name="description" content="Redaktionssystem">
159
<meta name="author" content="Webagentur Niewerth">
160
<meta name="robots" content="noindex">
161
<script language="JavaScript">
162
<!--
163
function kill(I)
164
	{
165
		if (confirm("Wollen Sie diesen Eintrag wirklich löschen ?"))
166
		{
167
			document.getElementById(I).parentNode.removeChild(document.getElementById(I));
168
		}
169
	}
170
 
171
	function add(I)
172
	{
173
		if (document.getElementById(I).parentNode.childNodes.length == 2)
174
		{
175
			index = 1;
176
			elem = I.substr(0,I.indexOf("_"));
177
		}
178
		else
179
		{
180
			index = document.getElementById(I).previousSibling.getAttribute("ID");
181
			elem = index.substr(0,index.indexOf("_"));
182
			index = parseInt(index.substr(index.indexOf("_")+1)) + 1;
183
		}
184
 
185
		tr = document.createElement("tr");
186
		tr.setAttribute("id", elem+"_"+index);
187
		// Feinunterscheidung
188
		switch(elem)
189
		{
190
			case "A":
191
				// Zelle Domain
192
				td_Domain = document.createElement("td");
193
					tr.appendChild(td_Domain);
194
						input_Domain = document.createElement("input");
195
							input_Domain.setAttribute("size", "30");
196
							input_Domain.setAttribute("value", "");
197
							input_Domain.setAttribute("type", 'text');
198
							input_Domain.setAttribute("name", "A["+index+"][Domain]");
199
						td_Domain.appendChild(input_Domain);
200
 
201
				// Zelle TTL
202
				td_TTL = document.createElement("td");
203
				td_TTL.setAttribute("align", "center");
204
					tr.appendChild(td_TTL);
205
						Timer_TTL_table = document.createElement("table");
206
						Timer_TTL_table.setAttribute("border", 0);
207
						Timer_TTL_table.setAttribute("cellSpacing", 0);
208
						Timer_TTL_table.setAttribute("cellPadding", 0);
209
							td_TTL.appendChild(Timer_TTL_table);
210
 
211
							Timer_TTL_tbody = document.createElement("tbody");
212
							Timer_TTL_table.appendChild(Timer_TTL_tbody);
213
 
214
							Timer_TTL_tr = document.createElement("tr");
215
								Timer_TTL_tbody.appendChild(Timer_TTL_tr);
216
									Timer_TTL_td1 = document.createElement("td");
217
									Timer_TTL_td2 = document.createElement("td");
218
										Timer_TTL_tr.appendChild(Timer_TTL_td1);
219
										Timer_TTL_tr.appendChild(Timer_TTL_td2);
220
 
221
										Timer_TTL_td1_input = document.createElement("input");
222
											Timer_TTL_td1_input.setAttribute("type", "text");
223
											Timer_TTL_td1_input.setAttribute("name", "A["+index+"][TTL][0]");
224
											Timer_TTL_td1_input.setAttribute("size", 5);
225
										Timer_TTL_td1.appendChild(Timer_TTL_td1_input);
226
 
227
										Timer_TTL_td2_select = document.createElement("select");
228
										Timer_TTL_td2_select.setAttribute("name", "A["+index+"][TTL][1]");
229
 
230
											Timer_TTL_td2_option_1 = document.createElement("option");
231
											Timer_TTL_td2_option_2 = document.createElement("option");
232
											Timer_TTL_td2_option_3 = document.createElement("option");
233
											Timer_TTL_td2_option_4 = document.createElement("option");
234
											Timer_TTL_td2_option_5 = document.createElement("option");
235
											Timer_TTL_td2_option_6 = document.createElement("option");
236
 
237
												Timer_TTL_td2_option_2.setAttribute("value", "S");
238
												Timer_TTL_td2_option_3.setAttribute("value", "M");
239
												Timer_TTL_td2_option_4.setAttribute("value", "H");
240
												Timer_TTL_td2_option_5.setAttribute("value", "D");
241
												Timer_TTL_td2_option_6.setAttribute("value", "W");
242
 
243
												Timer_TTL_td2_option_1_text=document.createTextNode("Standard");
244
												Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");
245
												Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");
246
												Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");
247
												Timer_TTL_td2_option_5_text=document.createTextNode("Tage");
248
												Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");
249
 
250
											Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);
251
											Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);
252
											Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);
253
											Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);
254
											Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);
255
											Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);
256
 
257
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);
258
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);
259
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);
260
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);
261
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);
262
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);
263
 
264
										Timer_TTL_td2.appendChild(Timer_TTL_td2_select);
265
 
266
 
267
				// Zelle IP
268
				td_IP = document.createElement("td");
269
					tr.appendChild(td_IP);
270
						input_IP = document.createElement("input");
271
							input_IP.setAttribute("size", "15");
272
							input_IP.setAttribute("value", "");
273
							input_IP.setAttribute("type", "text");
274
							input_IP.setAttribute("name", "A["+index+"][IP]");
275
						td_IP.appendChild(input_IP);
276
			break;
277
			case "MX":
278
				// Zelle Domain
279
				td_Domain = document.createElement("td");
280
					tr.appendChild(td_Domain);
281
						input_Domain = document.createElement("input");
282
							input_Domain.setAttribute("size", "30");
283
							input_Domain.setAttribute("value", "");
284
							input_Domain.setAttribute("type", "text");
285
							input_Domain.setAttribute("name", "MX["+index+"][Domain]");
286
						td_Domain.appendChild(input_Domain);
287
 
288
				// Zelle TTL
289
				td_TTL = document.createElement("td");
290
				td_TTL.setAttribute("align", "center");
291
					tr.appendChild(td_TTL);
292
						Timer_TTL_table = document.createElement("table");
293
						Timer_TTL_table.setAttribute("border", 0);
294
						Timer_TTL_table.setAttribute("cellSpacing", 0);
295
						Timer_TTL_table.setAttribute("cellPadding", 0);
296
							td_TTL.appendChild(Timer_TTL_table);
297
 
298
							Timer_TTL_tbody = document.createElement("tbody");
299
							Timer_TTL_table.appendChild(Timer_TTL_tbody);
300
 
301
							Timer_TTL_tr = document.createElement("tr");
302
								Timer_TTL_tbody.appendChild(Timer_TTL_tr);
303
									Timer_TTL_td1 = document.createElement("td");
304
									Timer_TTL_td2 = document.createElement("td");
305
										Timer_TTL_tr.appendChild(Timer_TTL_td1);
306
										Timer_TTL_tr.appendChild(Timer_TTL_td2);
307
 
308
										Timer_TTL_td1_input = document.createElement("input");
309
											Timer_TTL_td1_input.setAttribute("type", "text");
310
											Timer_TTL_td1_input.setAttribute("name", "MX["+index+"][TTL][0]");
311
											Timer_TTL_td1_input.setAttribute("size", 5);
312
										Timer_TTL_td1.appendChild(Timer_TTL_td1_input);
313
 
314
										Timer_TTL_td2_select = document.createElement("select");
315
										Timer_TTL_td2_select.setAttribute("name", "MX["+index+"][TTL][1]");
316
 
317
											Timer_TTL_td2_option_1 = document.createElement("option");
318
											Timer_TTL_td2_option_2 = document.createElement("option");
319
											Timer_TTL_td2_option_3 = document.createElement("option");
320
											Timer_TTL_td2_option_4 = document.createElement("option");
321
											Timer_TTL_td2_option_5 = document.createElement("option");
322
											Timer_TTL_td2_option_6 = document.createElement("option");
323
 
324
												Timer_TTL_td2_option_2.setAttribute("value", "S");
325
												Timer_TTL_td2_option_3.setAttribute("value", "M");
326
												Timer_TTL_td2_option_4.setAttribute("value", "H");
327
												Timer_TTL_td2_option_5.setAttribute("value", "D");
328
												Timer_TTL_td2_option_6.setAttribute("value", "W");
329
 
330
												Timer_TTL_td2_option_1_text=document.createTextNode("Standard");
331
												Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");
332
												Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");
333
												Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");
334
												Timer_TTL_td2_option_5_text=document.createTextNode("Tage");
335
												Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");
336
 
337
											Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);
338
											Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);
339
											Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);
340
											Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);
341
											Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);
342
											Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);
343
 
344
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);
345
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);
346
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);
347
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);
348
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);
349
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);
350
 
351
										Timer_TTL_td2.appendChild(Timer_TTL_td2_select);
352
 
353
 
354
				// Zelle Server
355
				td_Server = document.createElement("td");
356
					td_Server_table = document.createElement("table");
357
						td_Server_tbody = document.createElement("tbody");
358
							td_Server_table_tr = document.createElement("tr");
359
								td_Server_table_tr_td1 = document.createElement("td");
360
								td_Server_table_tr_td2 = document.createElement("td");
361
 
362
				tr.appendChild(td_Server);
363
				td_Server.appendChild(td_Server_table);
364
				td_Server_table.appendChild(td_Server_tbody);
365
				td_Server_tbody.appendChild(td_Server_table_tr);
366
				td_Server_table_tr.appendChild(td_Server_table_tr_td1);
367
				td_Server_table_tr.appendChild(td_Server_table_tr_td2);
368
 
369
				td_Server_table.setAttribute("border", 0);
370
				td_Server_table.setAttribute("cellSpacing", 0);
371
				td_Server_table.setAttribute("cellPadding", 0);
372
 
373
						input_Server = document.createElement("input");
374
							input_Server.setAttribute("size", "3");
375
							input_Server.setAttribute("value", "");
376
							input_Server.setAttribute("type", "text");
377
							input_Server.setAttribute("name", "MX["+index+"][Prioritaet]");
378
						td_Server_table_tr_td1.appendChild(input_Server);
379
 
380
						input_Prioritaet = document.createElement("input");
381
							input_Prioritaet.setAttribute("size", "20");
382
							input_Prioritaet.setAttribute("value", "");
383
							input_Prioritaet.setAttribute("type", "text");
384
							input_Prioritaet.setAttribute("name", "MX["+index+"][Server]");
385
						td_Server_table_tr_td2.appendChild(input_Prioritaet);
386
 
387
			break;
388
			case "NS":
389
				// Zelle Domain
390
				td_Domain = document.createElement("td");
391
					tr.appendChild(td_Domain);
392
						input_Domain = document.createElement("input");
393
							input_Domain.setAttribute("size", "30");
394
							input_Domain.setAttribute("value", "");
395
							input_Domain.setAttribute("type", "text");
396
							input_Domain.setAttribute("name", "NS["+index+"][Domain]");
397
						td_Domain.appendChild(input_Domain);
398
 
399
				// Zelle TTL
400
				td_TTL = document.createElement("td");
401
				td_TTL.setAttribute("align", "center");
402
					tr.appendChild(td_TTL);
403
						Timer_TTL_table = document.createElement("table");
404
						Timer_TTL_table.setAttribute("border", 0);
405
						Timer_TTL_table.setAttribute("cellSpacing", 0);
406
						Timer_TTL_table.setAttribute("cellPadding", 0);
407
							td_TTL.appendChild(Timer_TTL_table);
408
 
409
							Timer_TTL_tbody = document.createElement("tbody");
410
							Timer_TTL_table.appendChild(Timer_TTL_tbody);
411
 
412
							Timer_TTL_tr = document.createElement("tr");
413
								Timer_TTL_tbody.appendChild(Timer_TTL_tr);
414
									Timer_TTL_td1 = document.createElement("td");
415
									Timer_TTL_td2 = document.createElement("td");
416
										Timer_TTL_tr.appendChild(Timer_TTL_td1);
417
										Timer_TTL_tr.appendChild(Timer_TTL_td2);
418
 
419
										Timer_TTL_td1_input = document.createElement("input");
420
											Timer_TTL_td1_input.setAttribute("type", "text");
421
											Timer_TTL_td1_input.setAttribute("name", "NS["+index+"][TTL][0]");
422
											Timer_TTL_td1_input.setAttribute("size", 5);
423
										Timer_TTL_td1.appendChild(Timer_TTL_td1_input);
424
 
425
										Timer_TTL_td2_select = document.createElement("select");
426
										Timer_TTL_td2_select.setAttribute("name", "NS["+index+"][TTL][1]");
427
 
428
											Timer_TTL_td2_option_1 = document.createElement("option");
429
											Timer_TTL_td2_option_2 = document.createElement("option");
430
											Timer_TTL_td2_option_3 = document.createElement("option");
431
											Timer_TTL_td2_option_4 = document.createElement("option");
432
											Timer_TTL_td2_option_5 = document.createElement("option");
433
											Timer_TTL_td2_option_6 = document.createElement("option");
434
 
435
												Timer_TTL_td2_option_2.setAttribute("value", "S");
436
												Timer_TTL_td2_option_3.setAttribute("value", "M");
437
												Timer_TTL_td2_option_4.setAttribute("value", "H");
438
												Timer_TTL_td2_option_5.setAttribute("value", "D");
439
												Timer_TTL_td2_option_6.setAttribute("value", "W");
440
 
441
												Timer_TTL_td2_option_1_text=document.createTextNode("Standard");
442
												Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");
443
												Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");
444
												Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");
445
												Timer_TTL_td2_option_5_text=document.createTextNode("Tage");
446
												Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");
447
 
448
											Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);
449
											Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);
450
											Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);
451
											Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);
452
											Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);
453
											Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);
454
 
455
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);
456
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);
457
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);
458
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);
459
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);
460
											Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);
461
 
462
										Timer_TTL_td2.appendChild(Timer_TTL_td2_select);
463
 
464
 
465
				// Zelle IP
466
				td_IP = document.createElement("td");
467
					tr.appendChild(td_IP);
468
 
469
						input_IP = document.createElement("input");
470
							input_IP.setAttribute("size", "30");
471
							input_IP.setAttribute("value", "");
472
							input_IP.setAttribute("type", "text");
473
							input_IP.setAttribute("name", "NS["+index+"][Server]");
474
						td_IP.appendChild(input_IP);
475
			break;
476
		}
477
		// Feinunterscheidung ENDE
478
 
479
		// "Kill-Zelle" (Knoten): <td><a><img>
480
		td_del = document.createElement("td");
481
			a_del = document.createElement("a");
482
				a_del.setAttribute("href", "javascript:kill('"+elem+"_"+index+"')");
483
			img_del = document.createElement("img");
484
			//<img src="../images/Icons/delete.gif" width="12" height="12" border="0">
485
				img_del.setAttribute("src", "../images/Icons/delete.gif");
486
				img_del.setAttribute("width", 12);
487
				img_del.setAttribute("height", 12);
488
				img_del.setAttribute("border", 0);
489
 
490
		// "Kill-Zelle" (Knoten verknüpfen): <td><a><img>
491
		tr.appendChild(td_del);
492
			td_del.appendChild(a_del);
493
				a_del.appendChild(img_del);
494
 
495
		document.getElementById(I).parentNode.insertBefore(tr, document.getElementById(I));
496
	}
497
 
498
function MM_swapImgRestore() { //v3.0
499
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
500
}
501
 
502
function MM_preloadImages() { //v3.0
503
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
504
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
505
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
506
}
507
 
508
function MM_findObj(n, d) { //v4.01
509
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
510
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
511
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
512
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
513
  if(!x && d.getElementById) x=d.getElementById(n); return x;
514
}
515
 
516
function MM_swapImage() { //v3.0
517
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
518
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
519
}
520
//-->
521
</script>
522
</head>
523
<body bgcolor="#<? echo $webs[bgcolor_seite]; ?>" leftmargin="20" topmargin="10" marginwidth="20" marginheight="10" alink="#999999" onLoad="MM_preloadImages('../images/navigation/bt_neu_f2.gif','../images/navigation/bt_bearbeiten_f2.gif','../images/navigation/bt_delete_f2.gif')">
524
<form method="POST" action="<? echo $self ?>" name="form">
525
  <table width="676" border="0" cellspacing="0" cellpadding="0">
526
    <tr valign="top">
527
      <td width="597">
528
        <?
529
	if ($action == "select_edit")
530
	{
531
	$files=get_files($basedir);
532
	$count = count($files);
533
?>
534
        <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
535
	<tr>
536
	        <td class="headline" bgcolor="#<? echo $webs[bgcolor_links] ?>">Zonen Bearbeiten (<? echo $site ?>) - <? echo $count ?>
537
              Eintr&auml;ge <br>
538
              <a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> | <a href="#D">D</a>
539
              | <a href="#E">E</a> | <a href="#F">F</a> | <a href="#G">G</a> | <a href="#H">H</a>
540
              | <a href="#I">&nbsp;I&nbsp;</a> | <a href="#J">J</a> | <a href="#K">K</a> | <a href="#L">L</a>
541
              | <a href="#M">M</a> | <a href="#N">N</a> | <a href="#O">O</a> | <a href="#P">P</a>
542
              | <a href="#Q">Q</a> | <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a>
543
              | <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | <a href="#X">X</a>
544
              | <a href="#Y">Y</a> | <a href="#Z">Z</a>
545
            </td>
546
	</tr>
547
<?
548
		foreach($files as $elem)
549
		{
550
?>
551
                          <?
552
	$char_buffer=strtoupper(substr($elem,0,1));
553
	if ($char_buffer != $char_buffer2)
554
	{
555
 
556
		?>
557
          <tr>
558
            <td colspan="4"> <b> <a name="<? echo $char_buffer ?>">
559
              <? echo $char_buffer ?>
560
              </a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#top">nach
561
              oben</a></b> </td>
562
          </tr>
563
            <?
564
	}
565
	$char_buffer2 = $char_buffer;
566
?>
567
	<tr>
568
		<td>
569
<a href="<? echo $self ?>?action=edit&file=<? echo $elem ?>"><? echo $elem ?></a>
570
		</td>
571
	</tr>
572
<?
573
		}
574
?>
575
	<tr>
576
	    <td bgcolor="#<? echo $webs[bgcolor_links] ?>" align="right">&nbsp;</td>
577
	</tr>
578
</table>
579
<?
580
	}
581
?>
582
<?
583
	if ($action == "delete")
584
	{
585
?>
586
<table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999">
587
	<tr>
588
	        <td class="headline" bgcolor="#<? echo $webs[bgcolor_links] ?>">Zonen L&ouml;schen (
589
              <? echo $site ?>
590
              )<br>
591
              <a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> | <a href="#D">D</a>
592
              | <a href="#E">E</a> | <a href="#F">F</a> | <a href="#G">G</a> | <a href="#H">H</a>
593
              | <a href="#I">&nbsp;I&nbsp;</a> | <a href="#J">J</a> | <a href="#K">K</a> | <a href="#L">L</a>
594
              | <a href="#M">M</a> | <a href="#N">N</a> | <a href="#O">O</a> | <a href="#P">P</a>
595
              | <a href="#Q">Q</a> | <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a>
596
              | <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | <a href="#X">X</a>
597
              | <a href="#Y">Y</a> | <a href="#Z">Z</a>
598
            </td>
599
	</tr>
600
<?
601
		$files=get_files($basedir);
602
		foreach($files as $elem)
603
		{
604
?>
605
                          <?
606
	$char_buffer=chr(ord(substr($elem,0,1)) & 223);
607
	if ($char_buffer != $char_buffer2)
608
	{
609
 
610
		?>
611
          <tr>
612
            <td colspan="4"> <b> <a name="<? echo $char_buffer ?>">
613
              <? echo $char_buffer ?>
614
              </a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#top">nach
615
              oben</a></b> </td>
616
          </tr>
617
            <?
618
	}
619
	$char_buffer2 = $char_buffer;
620
?>
621
	<tr>
622
		<td>
623
			<input type="checkbox" name="erase[]" value="<? echo $elem ?>"><? echo $elem ?><br>
624
		</td>
625
	</tr>
626
<?
627
		}
628
?>
629
	<tr>
630
	    <td bgcolor="#<? echo $webs[bgcolor_links] ?>" align="right">
631
			<input type="submit" value="Dateien L&ouml;schen">
632
		</td>
633
	</tr>
634
</table>
635
<?
636
	}
637
?>
638
<?
639
	if ($action == "edit")
640
	{
641
 
642
?>
643
<?
644
	$content = file ($basedir."/".$file);
645
 
646
	// Kommentare entfernen
647
	foreach(array_keys($content) as $elem)
648
	{
649
		if (is_numeric(strpos($content[$elem], ";")))
650
		{
651
			if (strpos($content[$elem], ";") > 0)
652
			{
653
				$content[$elem] = substr ($content[$elem], 0, strpos($content[$elem]));
654
			}
655
			else
656
			{
657
				unset($content[$elem]);
658
			}
659
		}
660
	}
661
 
662
	// Arrays definieren
663
		$A   = array();
664
		$MX  = array();
665
		$NS  = array();
666
		$SOA = array();
667
	// Datei parsen
668
	foreach(array_keys($content) as $elem)
669
	{
670
		// $ORIGIN bestimmen
671
		if (substr ($content[$elem], 0, 7) == "\$ORIGIN")
672
		{
673
			$ORIGIN = chop(substr ($content[$elem], 8));
674
			unset($content[$elem]);
675
			continue;
676
		}
677
 
678
		$content[$elem] = split (chr(9), $content[$elem]);
679
		if ($content[$elem][1] == "IN")
680
		{
681
			array_unshift ($content[$elem], $content[$elem][0]);
682
			unset($content[$elem][1]);
683
		}
684
		if ($content[$elem][2] == "IN")
685
		{
686
			if (substr ($content[$elem][0], -1) != ".")
687
			{
688
				$content[$elem][0]=$content[$elem][0].".".$ORIGIN;
689
				if (substr ($content[$elem][0], 0, 1) == ".")
690
				{
691
					$content[$elem][0] = "";
692
				}
693
			}
694
			switch($content[$elem][3])
695
			{
696
				case "A":
697
						array_push($A,$content[$elem]);
698
						unset($content[$elem]);
699
						break;
700
				case "MX":
701
						array_push($MX,$content[$elem]);
702
						unset($content[$elem]);
703
						break;
704
				case "NS":
705
						array_push($NS,$content[$elem]);
706
						unset($content[$elem]);
707
						break;
708
				case "SOA":
709
						if (!strpos($content[$elem],")"))
710
						{
711
							for($i = $elem+1; $i <= count($content); $i++)
712
							{
713
								$content[$elem][count($content[$elem])-1] = $content[$elem][count($content[$elem])-1]." ".$content[$i];
714
								if (strpos($content[$i],")"))
715
								{
716
									break;
717
								}
718
							}
719
						}
720
						$SOA  = $content[$elem];
721
						$SOA[4] = split(chr(32),$SOA[4]);
722
						//for ($killer=$elem; $killer <= $i ; $killer++)
723
						//{
724
						//	unset($content[$killer]);
725
						//}
726
						break;
727
			}
728
		}
729
	}
730
//foreach($content as $elem)
731
//{
732
//	echo "$elem<br>";
733
//}
734
?>
735
        <table width="100%" border="1" cellspacing="0" cellpadding="3">
736
          <tr bgcolor="#<? echo $webs[bgcolor_links] ?>">
737
            <td colspan="2" class="headline" height="28">DNS-Eintrag:
738
              <?
739
				if ($file)
740
				{
741
					?>
742
              Bearbeiten
743
              <?
744
				}
745
				else
746
				{
747
			?>
748
              Neueintrag
749
              <?
750
				}
751
			?>
752
             (<? echo $site ?>)</td>
753
          </tr>
754
          <tr>
755
            <td valign="top" bgcolor="#<? echo $webs[bgcolor_links] ?>" width="7%"><b>SOA:</b></td>
756
            <td width="93%">
757
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
758
                <tr>
759
                  <td width="17%">Zone:</td>
760
                  <td width="83%">
761
                    <input type="text" name="SOA[Zonename]" value="<? echo $SOA[0] ?>" size="40">
762
                  </td>
763
                </tr>
764
                <tr>
765
                  <td width="17%">Master-Server:</td>
766
                  <td width="83%">
767
                    <input type="text" name="SOA[NS]" value="<? echo $SOA[4][0] ?>" size="40">
768
                  </td>
769
                </tr>
770
                <tr>
771
                  <td width="17%">Admin:</td>
772
                  <td width="83%">
773
                    <input type="text" name="SOA[admin]" value="<? echo $SOA[4][1] ?>" size="40">
774
                  </td>
775
                </tr>
776
			</table><br>
777
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
778
                <tr>
779
                  <td width="36%">Zeit aktualisieren</td>
780
                  <td width="64%">
781
					<?
782
						$elem = 4;
783
						$SOA[4][$elem] = trim($SOA[4][$elem]);
784
						$Timer = substr($SOA[4][$elem],-1);
785
						if (in_array ($Timer, array ("M", "H", "D", "W")))
786
						{
787
						    $SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);
788
					    }
789
						else
790
						{
791
							$Timer = "";
792
						}
793
					?>
794
                    <table border="0" cellspacing="0" cellpadding="0">
795
                      <tr>
796
                        <td>
797
                          <input type="text" name="SOA[Zeiten][update][0]" size="5" value="<? echo $SOA[4][$elem] ?>">
798
                        </td>
799
                        <td>
800
                          <select name="SOA[Zeiten][update][1]">
801
                            <option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option>
802
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
803
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
804
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
805
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
806
                          </select>
807
                        </td>
808
                      </tr>
809
                    </table>
810
                  </td>
811
                </tr>
812
                <tr>
813
                  <td width="36%">Ablaufzeit</td>
814
                  <td width="64%">
815
					<?
816
						$elem = 6;
817
						$SOA[4][$elem] = trim($SOA[4][$elem]);
818
						$Timer = substr($SOA[4][$elem],-1);
819
						if (in_array ($Timer, array ("M", "H", "D", "W")))
820
						{
821
						    $SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);
822
					    }
823
						else
824
						{
825
							$Timer = "";
826
						}
827
					?>
828
                    <table border="0" cellspacing="0" cellpadding="0">
829
                      <tr>
830
                        <td>
831
                          <input type="text" name="SOA[Zeiten][timeout][0]" size="5" value="<? echo $SOA[4][$elem] ?>">
832
                        </td>
833
                        <td>
834
                          <select name="SOA[Zeiten][timeout][1]">
835
                            <option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option>
836
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
837
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
838
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
839
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
840
                          </select>
841
                        </td>
842
                      </tr>
843
                    </table>
844
 
845
                  </td>
846
                </tr>
847
                <tr>
848
                  <td width="36%">Wiederholungszeit transferieren</td>
849
					<td width="64%">
850
					<?
851
						$elem = 5;
852
						$SOA[4][$elem] = trim($SOA[4][$elem]);
853
						$Timer = substr($SOA[4][$elem],-1);
854
						if (in_array ($Timer, array ("M", "H", "D", "W")))
855
						{
856
						    $SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);
857
					    }
858
						else
859
						{
860
							$Timer = "";
861
						}
862
					?>
863
                    <table border="0" cellspacing="0" cellpadding="0">
864
                      <tr>
865
                        <td>
866
                          <input type="text" name="SOA[Zeiten][transfer_repeat][0]" size="5" value="<? echo $SOA[4][$elem] ?>">
867
                        </td>
868
                        <td>
869
                          <select name="SOA[Zeiten][transfer_repeat][1]">
870
                            <option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option>
871
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
872
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
873
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
874
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
875
                          </select>
876
                        </td>
877
                      </tr>
878
                    </table>
879
                  </td>
880
                </tr>
881
                <tr>
882
                  <td width="36%">Standard-Time-To-Live</td>
883
                  <td width="64%">
884
					<?
885
						$elem = 7;
886
						$SOA[4][$elem] = trim($SOA[4][$elem]);
887
						$Timer = substr($SOA[4][$elem],-1);
888
						if (in_array ($Timer, array ("M", "H", "D", "W")))
889
						{
890
						    $SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);
891
					    }
892
						else
893
						{
894
							$Timer = "";
895
						}
896
					?>
897
                    <table border="0" cellspacing="0" cellpadding="0">
898
                      <tr>
899
                        <td>
900
                          <input type="text" name="SOA[Zeiten][standard_TTL][0]" size="5" value="<? echo $SOA[4][$elem] ?>">
901
                        </td>
902
                        <td>
903
                          <select name="SOA[Zeiten][standard_TTL][1]">
904
                            <option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option>
905
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
906
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
907
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
908
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
909
                          </select>
910
                        </td>
911
                      </tr>
912
                    </table>
913
                  </td>
914
                </tr>
915
              </table>
916
            </td>
917
          </tr>
918
          <tr>
919
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2" valign="top">&nbsp;</td>
920
          </tr>
921
          <tr>
922
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">A:</td>
923
            <td class="headline" width="93%">
924
              <table border="0" cellspacing="0" cellpadding="0" width="100%" id="A">
925
                <tr>
926
                  <td width="25%">Domain</td>
927
                  <td align="center" width="25%">Time-To-Live</td>
928
                  <td align="center" width="25%">IP</td>
929
                  <td align="center" width="25%">&nbsp;</td>
930
                </tr>
931
                <?
932
	foreach(array_keys($A) as $elem)
933
	{
934
?>
935
                <tr ID="A_<? echo $elem?>">
936
                  <td width="25%">
937
                    <input type="text" name="A[<? echo $elem?>][Domain]" size="30" value="<? echo $A[$elem][0] ?>">
938
                  </td>
939
                  <?
940
						if ($A[$elem][1])
941
						{	// wir haben einen Eintrag und müssen ihn identifizieren
942
							$Timer = substr($A[$elem][1],-1);
943
							if (in_array ($Timer, array ("M", "H", "D", "W")))
944
							{
945
							    $A[$elem][1] = substr($A[$elem][1], 0, -1);
946
						    }
947
							else
948
							{
949
								$Timer = "";
950
							}
951
						}
952
						else
953
						{
954
							unset($Timer);
955
						}
956
					?>
957
                  <td align="center" width="25%">
958
                    <table border="0" cellspacing="0" cellpadding="0">
959
                      <tr>
960
                        <td>
961
                          <input type="text" name="A[<? echo $elem?>][TTL][0]" size="5" value="<? echo $A[$elem][1] ?>">
962
                        </td>
963
                        <td>
964
                          <select name="A[<? echo $elem?>][TTL][1]">
965
                            <option <? if (!$Timer) {echo "selected";} ?>>Standard</option>
966
                            <option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option>
967
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
968
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
969
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
970
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
971
                          </select>
972
                        </td>
973
                      </tr>
974
                    </table>
975
                  </td>
976
                  <td width="25%" align="center">
977
                    <input type="text" name="A[<? echo $elem?>][IP]" size="15" value="<? echo $A[$elem][4] ?>">
978
                  </td>
979
                  <td width="25%"><a href="javascript:kill('A_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a>
980
                  </td>
981
                </tr>
982
                <?
983
	}
984
?>
985
                <tr ID="A_n">
986
                  <td width="25%">&nbsp;</td>
987
                  <td align="center" width="25%">&nbsp;</td>
988
                  <td width="25%" align="center">&nbsp;</td>
989
                  <td width="25%"><a href="javascript:add('A_n')"><font color="#00CC33"><b>ADD</b></font></a></td>
990
                </tr>
991
              </table>
992
            </td>
993
          </tr>
994
          <tr>
995
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2" valign="top">&nbsp;</td>
996
          </tr>
997
          <tr>
998
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">MX:</td>
999
            <td class="headline" width="93%">
1000
              <table border="0" cellspacing="0" cellpadding="0" width="100%" id="MX">
1001
                <tr>
1002
                  <td width="25%" >Domain</td>
1003
                  <td align="center" width="25%">Time-To-Live</td>
1004
                  <td align="center" width="25%">Priorität / Server</td>
1005
                  <td align="center" width="25%">&nbsp;</td>
1006
                </tr>
1007
                <?
1008
	foreach(array_keys($MX) as $elem)
1009
	{
1010
?>
1011
                <tr ID="MX_<? echo $elem?>">
1012
                  <td width="25%">
1013
                    <input type="text" name="MX[<? echo $elem?>][Domain]" size="30" value="<? echo $MX[$elem][0] ?>">
1014
                  </td>
1015
                  <?
1016
						if ($MX[$elem][1])
1017
						{	// wir haben einen Eintrag und müssen ihn identifizieren
1018
							$Timer = substr($MX[$elem][1],-1);
1019
							if (in_array ($Timer, array ("M", "H", "D", "W")))
1020
							{
1021
							    $MX[$elem][1] = substr($MX[$elem][1], 0, -1);
1022
						    }
1023
							else
1024
							{
1025
								$Timer = "";
1026
							}
1027
						}
1028
						else
1029
						{
1030
							unset($Timer);
1031
						}
1032
					?>
1033
                  <td align="center" width="25%">
1034
                    <table border="0" cellspacing="0" cellpadding="0">
1035
                      <tr>
1036
                        <td>
1037
                          <input type="text" name="MX[<? echo $elem?>][TTL][0]" size="5" value="<? echo $MX[$elem][1] ?>">
1038
                        </td>
1039
                        <td>
1040
                          <select name="MX[<? echo $elem?>][TTL][1]">
1041
                            <option <? if (!isset($Timer)) {echo "selected";} ?>>Standard</option>
1042
                            <option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option>
1043
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
1044
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
1045
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
1046
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
1047
                          </select>
1048
                        </td>
1049
                      </tr>
1050
                    </table>
1051
                  </td>
1052
                  <td align="center" width="25%">
1053
                    <table border="0" cellspacing="0" cellpadding="0">
1054
                      <?
1055
	$MX[$elem][4] = split (chr(32), $MX[$elem][4]);
1056
?>
1057
                      <tr>
1058
                        <td>
1059
                          <input type="text" name="MX[<? echo $elem?>][Prioritaet]" size="3" value="<? echo $MX[$elem][4][0] ?>">
1060
                        </td>
1061
                        <td>
1062
                          <input type="text" name="MX[<? echo $elem?>][Server]" size="20" value="<? echo $MX[$elem][4][1] ?>">
1063
                        </td>
1064
                      </tr>
1065
                    </table>
1066
                  </td>
1067
                  <td width="25%"><a href="javascript:kill('MX_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a></td>
1068
                </tr>
1069
                <?
1070
	}
1071
?>
1072
                <tr ID="MX_n">
1073
                  <td width="25%">&nbsp;</td>
1074
                  <td align="center" width="25%">&nbsp;</td>
1075
                  <td align="center" width="25%">&nbsp;</td>
1076
                  <td width="25%"><a href="javascript:add('MX_n')"><font color="#00CC33"><b>ADD</b></font></a></td>
1077
                </tr>
1078
              </table>
1079
            </td>
1080
          </tr>
1081
          <tr>
1082
            <td valign="top" bgcolor="#<? echo $webs[bgcolor_links] ?>" colspan="2">&nbsp;</td>
1083
          </tr>
1084
          <tr>
1085
            <td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">NS:</td>
1086
            <td class="headline" width="93%">
1087
              <table border="0" cellspacing="0" cellpadding="0" width="100%" id="NS">
1088
                <tr>
1089
                  <td width="25%" >Domain</td>
1090
                  <td align="center" width="22%">Time-To-Live</td>
1091
                  <td align="center" width="40%">Server</td>
1092
                  <td align="center" width="13%">&nbsp;</td>
1093
                </tr>
1094
                <?
1095
	foreach(array_keys($NS) as $elem)
1096
	{
1097
?>
1098
                <tr ID="NS_<? echo $elem?>">
1099
                  <td width="25%">
1100
                    <input type="text" name="NS[<? echo $elem?>][Domain]" size="30" value="<? echo $NS[$elem][0] ?>">
1101
                  </td>
1102
                  <?
1103
						if ($NS[$elem][1])
1104
						{	// wir haben einen Eintrag und müssen ihn identifizieren
1105
							$Timer = substr($NS[$elem][1],-1);
1106
							if (in_array ($Timer, array ("M", "H", "D", "W")))
1107
							{
1108
							    $NS[$elem][1] = substr($NS[$elem][1], 0, -1);
1109
						    }
1110
							else
1111
							{
1112
								$Timer = "";
1113
							}
1114
						}
1115
						else
1116
						{
1117
							unset($Timer);
1118
						}
1119
					?>
1120
                  <td align="center" width="22%">
1121
                    <table border="0" cellspacing="0" cellpadding="0">
1122
                      <tr>
1123
                        <td>
1124
                          <input type="text" name="NS[<? echo $elem?>][TTL][0]" size="5" value="<? echo $NS[$elem][1] ?>">
1125
                        </td>
1126
                        <td>
1127
                          <select name="NS[<? echo $elem?>][TTL][1]">
1128
                            <option <? if (!isset($Timer)) {echo "selected";} ?>>Standard</option>
1129
                            <option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option>
1130
                            <option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option>
1131
                            <option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option>
1132
                            <option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option>
1133
                            <option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option>
1134
                          </select>
1135
                        </td>
1136
                      </tr>
1137
                    </table>
1138
                  </td>
1139
                  <td width="40%" align="center">
1140
                    <input type="text" name="NS[<? echo $elem?>][Server]" size="30" value="<? echo $NS[$elem][4] ?>">
1141
                  </td>
1142
                  <td width="13%"><a href="javascript:kill('NS_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a></td>
1143
                </tr>
1144
                <?
1145
	}
1146
?>
1147
                <tr id="NS_n">
1148
                  <td width="25%">&nbsp;</td>
1149
                  <td align="center" width="22%">&nbsp;</td>
1150
                  <td width="40%" align="center">&nbsp;</td>
1151
                  <td width="13%"><a href="javascript:add('NS_n')"><font color="#00CC33"><b>ADD</b></font></a></td>
1152
                </tr>
1153
              </table>
1154
            </td>
1155
          </tr>
1156
          <tr>
1157
            <td align="right" colspan="2" bgcolor="#<? echo $webs[bgcolor_links] ?>">
1158
              <input type="hidden" name="new" value="<? echo $file ?>">
1159
              <input type="submit" value="     OK     " name="go">
1160
              <input type="reset" name="Button" value="Zur&uuml;cksetzen">
1161
            </td>
1162
          </tr>
1163
        </table>
1164
        <?
1165
	}
1166
?>
1167
      </td>
1168
      <td width="79" align="right" bordercolor="#CCCCCC">
1169
        <table width="67" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999">
1170
          <tr>
1171
            <td class="frame"><a href="<? echo $self ?>?action=edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','../images/navigation/bt_neu_f2.gif',1)"><img name="Image5" border="0" src="../images/navigation/bt_neu.gif" width="67" height="40"></a></td>
1172
          </tr>
1173
          <tr>
1174
            <td class="frame"><a href="<? echo $self ?>?action=select_edit" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','../images/navigation/bt_bearbeiten_f2.gif',1)"><img name="Image6" border="0" src="../images/navigation/bt_bearbeiten.gif" width="67" height="40"></a></td>
1175
          </tr>
1176
          <tr>
1177
            <td class="frame"><a href="<? echo $self ?>?action=delete" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','../images/navigation/bt_delete_f2.gif',1)"><img name="Image7" border="0" src="../images/navigation/bt_delete.gif" width="67" height="40"></a></td>
1178
          </tr>
1179
        </table>
1180
      </td>
1181
</tr>
1182
</table>
1183
</form>
1184
</body>