Blame | Letzte Änderung | Log anzeigen | RSS feed
<?$self=basename($PHP_SELF);define ("modul_name", "domain_admin");define ("tool_name", "dnsadmin");require_once "../Online-Shop/connect2.php";// ###############################################################if ($web_rechte[domain_admin][dnsadmin][basedir]){$basedir=$web_rechte[domain_admin][dnsadmin][basedir];}else{echo "<p> FEHLER: Basisverzeichnis nicht eingerichtet.</p>";exit;}if ($web_rechte[domain_admin][dnsadmin][reseller]){}else{echo "<p> FEHLER: Reseller nicht eingerichtet.</p>";exit;}// ###############################################################function get_files($dir){$handle=opendir ($dir);$files=array();while ($file = readdir ($handle)){if ($file != "." && $file != ".."){if (!strstr ($file, '.zone')){array_push($files,$file);}}}closedir($handle);sort ($files);return $files;}if ($go){//Marke setzen, dass Server neu gestartet werden soll. Incl. Zeitstempel$query="update content_management.dienst_start set starten = '1' where (server ='dns' and reseller = '$site')";$result = mysql_query ($query) or die (mysql_errno().": ".mysql_error()."<hr>$query<hr>");// Dateien erstellen$header = array("; BIND-Editor Version 1.0","; Webagentur Niewerth",);$content_SOA=array($SOA[Zonename].chr(9).$SOA[standard_TTL][0].$SOA[standard_TTL][1].chr(9)."IN".chr(9)."SOA".chr(9).$SOA[NS]." ".$SOA[admin]." (",chr(9).chr(9).chr(9).chr(9).date("Ymd")."01",chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][update][0].$SOA[Zeiten][update][1],chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][transfer_repeat][0].$SOA[Zeiten][transfer_repeat][1],chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][timeout][0].$SOA[Zeiten][timeout][1],chr(9).chr(9).chr(9).chr(9).$SOA[Zeiten][standard_TTL][0].$SOA[Zeiten][standard_TTL][1]." )");$fp = fopen ($basedir."/".substr ($SOA[Zonename], 0, -1), "w+");foreach($header as $elem){fwrite ($fp, $elem."\n");}foreach($content_SOA as $elem){fwrite ($fp, $elem."\n");}if ($A){foreach($A as $elem){if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }fwrite ($fp,$elem[Domain].chr(9).$elem[TTL][0].$elem[TTL][1].chr(9)."IN".chr(9)."A".chr(9).$elem[IP]."\n");}}if ($NS){foreach($NS as $elem){if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }fwrite ($fp,$elem[Domain].chr(9).$elem[TTL][0].$elem[TTL][1].chr(9)."IN".chr(9)."NS".chr(9).$elem[Server]."\n");}}if ($MX){foreach($MX as $elem){if (!$elem[Domain]) { $elem[Domain]=$SOA[Zonename]; }if ($elem[TTL][1] == "Standard") { unset($elem[TTL]); }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");}}fclose ($fp);// named.zones neu schreiben wenn NEUEINTRAG//if ($new){$files=get_files($basedir);$fp = fopen ("/etc/".$web_rechte[domain_admin][dnsadmin][zonefile], "w+");foreach($files as $elem){$elem = trim($elem);fwrite ($fp, "zone \"$elem\" IN {\n");fwrite ($fp, chr(9)."type master;\n");fwrite ($fp, chr(9)."file \"$basedir/$elem\";\n");fwrite ($fp, "};\n\n");}fclose ($fp);}// Mail an secondary schickenif ($new == ""){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");}unset($action);}if ($erase){foreach($erase as $elem){unlink ($basedir."/".$elem);}unset($action);}if (!$action) {$action = "select_edit";}?><html><head><title>Domain - Eintrag</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel=stylesheet type="text/css" href="redaktion.css"><meta name="description" content="Redaktionssystem"><meta name="author" content="Webagentur Niewerth"><meta name="robots" content="noindex"><script language="JavaScript"><!--function kill(I){if (confirm("Wollen Sie diesen Eintrag wirklich löschen ?")){document.getElementById(I).parentNode.removeChild(document.getElementById(I));}}function add(I){if (document.getElementById(I).parentNode.childNodes.length == 2){index = 1;elem = I.substr(0,I.indexOf("_"));}else{index = document.getElementById(I).previousSibling.getAttribute("ID");elem = index.substr(0,index.indexOf("_"));index = parseInt(index.substr(index.indexOf("_")+1)) + 1;}tr = document.createElement("tr");tr.setAttribute("id", elem+"_"+index);// Feinunterscheidungswitch(elem){case "A":// Zelle Domaintd_Domain = document.createElement("td");tr.appendChild(td_Domain);input_Domain = document.createElement("input");input_Domain.setAttribute("size", "30");input_Domain.setAttribute("value", "");input_Domain.setAttribute("type", 'text');input_Domain.setAttribute("name", "A["+index+"][Domain]");td_Domain.appendChild(input_Domain);// Zelle TTLtd_TTL = document.createElement("td");td_TTL.setAttribute("align", "center");tr.appendChild(td_TTL);Timer_TTL_table = document.createElement("table");Timer_TTL_table.setAttribute("border", 0);Timer_TTL_table.setAttribute("cellSpacing", 0);Timer_TTL_table.setAttribute("cellPadding", 0);td_TTL.appendChild(Timer_TTL_table);Timer_TTL_tbody = document.createElement("tbody");Timer_TTL_table.appendChild(Timer_TTL_tbody);Timer_TTL_tr = document.createElement("tr");Timer_TTL_tbody.appendChild(Timer_TTL_tr);Timer_TTL_td1 = document.createElement("td");Timer_TTL_td2 = document.createElement("td");Timer_TTL_tr.appendChild(Timer_TTL_td1);Timer_TTL_tr.appendChild(Timer_TTL_td2);Timer_TTL_td1_input = document.createElement("input");Timer_TTL_td1_input.setAttribute("type", "text");Timer_TTL_td1_input.setAttribute("name", "A["+index+"][TTL][0]");Timer_TTL_td1_input.setAttribute("size", 5);Timer_TTL_td1.appendChild(Timer_TTL_td1_input);Timer_TTL_td2_select = document.createElement("select");Timer_TTL_td2_select.setAttribute("name", "A["+index+"][TTL][1]");Timer_TTL_td2_option_1 = document.createElement("option");Timer_TTL_td2_option_2 = document.createElement("option");Timer_TTL_td2_option_3 = document.createElement("option");Timer_TTL_td2_option_4 = document.createElement("option");Timer_TTL_td2_option_5 = document.createElement("option");Timer_TTL_td2_option_6 = document.createElement("option");Timer_TTL_td2_option_2.setAttribute("value", "S");Timer_TTL_td2_option_3.setAttribute("value", "M");Timer_TTL_td2_option_4.setAttribute("value", "H");Timer_TTL_td2_option_5.setAttribute("value", "D");Timer_TTL_td2_option_6.setAttribute("value", "W");Timer_TTL_td2_option_1_text=document.createTextNode("Standard");Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");Timer_TTL_td2_option_5_text=document.createTextNode("Tage");Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);Timer_TTL_td2.appendChild(Timer_TTL_td2_select);// Zelle IPtd_IP = document.createElement("td");tr.appendChild(td_IP);input_IP = document.createElement("input");input_IP.setAttribute("size", "15");input_IP.setAttribute("value", "");input_IP.setAttribute("type", "text");input_IP.setAttribute("name", "A["+index+"][IP]");td_IP.appendChild(input_IP);break;case "MX":// Zelle Domaintd_Domain = document.createElement("td");tr.appendChild(td_Domain);input_Domain = document.createElement("input");input_Domain.setAttribute("size", "30");input_Domain.setAttribute("value", "");input_Domain.setAttribute("type", "text");input_Domain.setAttribute("name", "MX["+index+"][Domain]");td_Domain.appendChild(input_Domain);// Zelle TTLtd_TTL = document.createElement("td");td_TTL.setAttribute("align", "center");tr.appendChild(td_TTL);Timer_TTL_table = document.createElement("table");Timer_TTL_table.setAttribute("border", 0);Timer_TTL_table.setAttribute("cellSpacing", 0);Timer_TTL_table.setAttribute("cellPadding", 0);td_TTL.appendChild(Timer_TTL_table);Timer_TTL_tbody = document.createElement("tbody");Timer_TTL_table.appendChild(Timer_TTL_tbody);Timer_TTL_tr = document.createElement("tr");Timer_TTL_tbody.appendChild(Timer_TTL_tr);Timer_TTL_td1 = document.createElement("td");Timer_TTL_td2 = document.createElement("td");Timer_TTL_tr.appendChild(Timer_TTL_td1);Timer_TTL_tr.appendChild(Timer_TTL_td2);Timer_TTL_td1_input = document.createElement("input");Timer_TTL_td1_input.setAttribute("type", "text");Timer_TTL_td1_input.setAttribute("name", "MX["+index+"][TTL][0]");Timer_TTL_td1_input.setAttribute("size", 5);Timer_TTL_td1.appendChild(Timer_TTL_td1_input);Timer_TTL_td2_select = document.createElement("select");Timer_TTL_td2_select.setAttribute("name", "MX["+index+"][TTL][1]");Timer_TTL_td2_option_1 = document.createElement("option");Timer_TTL_td2_option_2 = document.createElement("option");Timer_TTL_td2_option_3 = document.createElement("option");Timer_TTL_td2_option_4 = document.createElement("option");Timer_TTL_td2_option_5 = document.createElement("option");Timer_TTL_td2_option_6 = document.createElement("option");Timer_TTL_td2_option_2.setAttribute("value", "S");Timer_TTL_td2_option_3.setAttribute("value", "M");Timer_TTL_td2_option_4.setAttribute("value", "H");Timer_TTL_td2_option_5.setAttribute("value", "D");Timer_TTL_td2_option_6.setAttribute("value", "W");Timer_TTL_td2_option_1_text=document.createTextNode("Standard");Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");Timer_TTL_td2_option_5_text=document.createTextNode("Tage");Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);Timer_TTL_td2.appendChild(Timer_TTL_td2_select);// Zelle Servertd_Server = document.createElement("td");td_Server_table = document.createElement("table");td_Server_tbody = document.createElement("tbody");td_Server_table_tr = document.createElement("tr");td_Server_table_tr_td1 = document.createElement("td");td_Server_table_tr_td2 = document.createElement("td");tr.appendChild(td_Server);td_Server.appendChild(td_Server_table);td_Server_table.appendChild(td_Server_tbody);td_Server_tbody.appendChild(td_Server_table_tr);td_Server_table_tr.appendChild(td_Server_table_tr_td1);td_Server_table_tr.appendChild(td_Server_table_tr_td2);td_Server_table.setAttribute("border", 0);td_Server_table.setAttribute("cellSpacing", 0);td_Server_table.setAttribute("cellPadding", 0);input_Server = document.createElement("input");input_Server.setAttribute("size", "3");input_Server.setAttribute("value", "");input_Server.setAttribute("type", "text");input_Server.setAttribute("name", "MX["+index+"][Prioritaet]");td_Server_table_tr_td1.appendChild(input_Server);input_Prioritaet = document.createElement("input");input_Prioritaet.setAttribute("size", "20");input_Prioritaet.setAttribute("value", "");input_Prioritaet.setAttribute("type", "text");input_Prioritaet.setAttribute("name", "MX["+index+"][Server]");td_Server_table_tr_td2.appendChild(input_Prioritaet);break;case "NS":// Zelle Domaintd_Domain = document.createElement("td");tr.appendChild(td_Domain);input_Domain = document.createElement("input");input_Domain.setAttribute("size", "30");input_Domain.setAttribute("value", "");input_Domain.setAttribute("type", "text");input_Domain.setAttribute("name", "NS["+index+"][Domain]");td_Domain.appendChild(input_Domain);// Zelle TTLtd_TTL = document.createElement("td");td_TTL.setAttribute("align", "center");tr.appendChild(td_TTL);Timer_TTL_table = document.createElement("table");Timer_TTL_table.setAttribute("border", 0);Timer_TTL_table.setAttribute("cellSpacing", 0);Timer_TTL_table.setAttribute("cellPadding", 0);td_TTL.appendChild(Timer_TTL_table);Timer_TTL_tbody = document.createElement("tbody");Timer_TTL_table.appendChild(Timer_TTL_tbody);Timer_TTL_tr = document.createElement("tr");Timer_TTL_tbody.appendChild(Timer_TTL_tr);Timer_TTL_td1 = document.createElement("td");Timer_TTL_td2 = document.createElement("td");Timer_TTL_tr.appendChild(Timer_TTL_td1);Timer_TTL_tr.appendChild(Timer_TTL_td2);Timer_TTL_td1_input = document.createElement("input");Timer_TTL_td1_input.setAttribute("type", "text");Timer_TTL_td1_input.setAttribute("name", "NS["+index+"][TTL][0]");Timer_TTL_td1_input.setAttribute("size", 5);Timer_TTL_td1.appendChild(Timer_TTL_td1_input);Timer_TTL_td2_select = document.createElement("select");Timer_TTL_td2_select.setAttribute("name", "NS["+index+"][TTL][1]");Timer_TTL_td2_option_1 = document.createElement("option");Timer_TTL_td2_option_2 = document.createElement("option");Timer_TTL_td2_option_3 = document.createElement("option");Timer_TTL_td2_option_4 = document.createElement("option");Timer_TTL_td2_option_5 = document.createElement("option");Timer_TTL_td2_option_6 = document.createElement("option");Timer_TTL_td2_option_2.setAttribute("value", "S");Timer_TTL_td2_option_3.setAttribute("value", "M");Timer_TTL_td2_option_4.setAttribute("value", "H");Timer_TTL_td2_option_5.setAttribute("value", "D");Timer_TTL_td2_option_6.setAttribute("value", "W");Timer_TTL_td2_option_1_text=document.createTextNode("Standard");Timer_TTL_td2_option_2_text=document.createTextNode("Sekunden");Timer_TTL_td2_option_3_text=document.createTextNode("Minuten");Timer_TTL_td2_option_4_text=document.createTextNode("Stunden");Timer_TTL_td2_option_5_text=document.createTextNode("Tage");Timer_TTL_td2_option_6_text=document.createTextNode("Wochen");Timer_TTL_td2_option_1.appendChild(Timer_TTL_td2_option_1_text);Timer_TTL_td2_option_2.appendChild(Timer_TTL_td2_option_2_text);Timer_TTL_td2_option_3.appendChild(Timer_TTL_td2_option_3_text);Timer_TTL_td2_option_4.appendChild(Timer_TTL_td2_option_4_text);Timer_TTL_td2_option_5.appendChild(Timer_TTL_td2_option_5_text);Timer_TTL_td2_option_6.appendChild(Timer_TTL_td2_option_6_text);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_1);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_2);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_3);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_4);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_5);Timer_TTL_td2_select.appendChild(Timer_TTL_td2_option_6);Timer_TTL_td2.appendChild(Timer_TTL_td2_select);// Zelle IPtd_IP = document.createElement("td");tr.appendChild(td_IP);input_IP = document.createElement("input");input_IP.setAttribute("size", "30");input_IP.setAttribute("value", "");input_IP.setAttribute("type", "text");input_IP.setAttribute("name", "NS["+index+"][Server]");td_IP.appendChild(input_IP);break;}// Feinunterscheidung ENDE// "Kill-Zelle" (Knoten): <td><a><img>td_del = document.createElement("td");a_del = document.createElement("a");a_del.setAttribute("href", "javascript:kill('"+elem+"_"+index+"')");img_del = document.createElement("img");//<img src="../images/Icons/delete.gif" width="12" height="12" border="0">img_del.setAttribute("src", "../images/Icons/delete.gif");img_del.setAttribute("width", 12);img_del.setAttribute("height", 12);img_del.setAttribute("border", 0);// "Kill-Zelle" (Knoten verknüpfen): <td><a><img>tr.appendChild(td_del);td_del.appendChild(a_del);a_del.appendChild(img_del);document.getElementById(I).parentNode.insertBefore(tr, document.getElementById(I));}function MM_swapImgRestore() { //v3.0var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages() { //v3.0var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_findObj(n, d) { //v4.01var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}//--></script></head><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')"><form method="POST" action="<? echo $self ?>" name="form"><table width="676" border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="597"><?if ($action == "select_edit"){$files=get_files($basedir);$count = count($files);?><table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999"><tr><td class="headline" bgcolor="#<? echo $webs[bgcolor_links] ?>">Zonen Bearbeiten (<? echo $site ?>) - <? echo $count ?>Einträge <br><a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> | <a href="#D">D</a>| <a href="#E">E</a> | <a href="#F">F</a> | <a href="#G">G</a> | <a href="#H">H</a>| <a href="#I"> I </a> | <a href="#J">J</a> | <a href="#K">K</a> | <a href="#L">L</a>| <a href="#M">M</a> | <a href="#N">N</a> | <a href="#O">O</a> | <a href="#P">P</a>| <a href="#Q">Q</a> | <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a>| <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | <a href="#X">X</a>| <a href="#Y">Y</a> | <a href="#Z">Z</a></td></tr><?foreach($files as $elem){?><?$char_buffer=strtoupper(substr($elem,0,1));if ($char_buffer != $char_buffer2){?><tr><td colspan="4"> <b> <a name="<? echo $char_buffer ?>"><? echo $char_buffer ?></a> <a href="#top">nachoben</a></b> </td></tr><?}$char_buffer2 = $char_buffer;?><tr><td><a href="<? echo $self ?>?action=edit&file=<? echo $elem ?>"><? echo $elem ?></a></td></tr><?}?><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" align="right"> </td></tr></table><?}?><?if ($action == "delete"){?><table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#FFFFFF" bordercolordark="#999999"><tr><td class="headline" bgcolor="#<? echo $webs[bgcolor_links] ?>">Zonen Löschen (<? echo $site ?>)<br><a href="#A">A</a> | <a href="#B">B</a> | <a href="#C">C</a> | <a href="#D">D</a>| <a href="#E">E</a> | <a href="#F">F</a> | <a href="#G">G</a> | <a href="#H">H</a>| <a href="#I"> I </a> | <a href="#J">J</a> | <a href="#K">K</a> | <a href="#L">L</a>| <a href="#M">M</a> | <a href="#N">N</a> | <a href="#O">O</a> | <a href="#P">P</a>| <a href="#Q">Q</a> | <a href="#R">R</a> | <a href="#S">S</a> | <a href="#T">T</a>| <a href="#U">U</a> | <a href="#V">V</a> | <a href="#W">W</a> | <a href="#X">X</a>| <a href="#Y">Y</a> | <a href="#Z">Z</a></td></tr><?$files=get_files($basedir);foreach($files as $elem){?><?$char_buffer=chr(ord(substr($elem,0,1)) & 223);if ($char_buffer != $char_buffer2){?><tr><td colspan="4"> <b> <a name="<? echo $char_buffer ?>"><? echo $char_buffer ?></a> <a href="#top">nachoben</a></b> </td></tr><?}$char_buffer2 = $char_buffer;?><tr><td><input type="checkbox" name="erase[]" value="<? echo $elem ?>"><? echo $elem ?><br></td></tr><?}?><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" align="right"><input type="submit" value="Dateien Löschen"></td></tr></table><?}?><?if ($action == "edit"){?><?$content = file ($basedir."/".$file);// Kommentare entfernenforeach(array_keys($content) as $elem){if (is_numeric(strpos($content[$elem], ";"))){if (strpos($content[$elem], ";") > 0){$content[$elem] = substr ($content[$elem], 0, strpos($content[$elem]));}else{unset($content[$elem]);}}}// Arrays definieren$A = array();$MX = array();$NS = array();$SOA = array();// Datei parsenforeach(array_keys($content) as $elem){// $ORIGIN bestimmenif (substr ($content[$elem], 0, 7) == "\$ORIGIN"){$ORIGIN = chop(substr ($content[$elem], 8));unset($content[$elem]);continue;}$content[$elem] = split (chr(9), $content[$elem]);if ($content[$elem][1] == "IN"){array_unshift ($content[$elem], $content[$elem][0]);unset($content[$elem][1]);}if ($content[$elem][2] == "IN"){if (substr ($content[$elem][0], -1) != "."){$content[$elem][0]=$content[$elem][0].".".$ORIGIN;if (substr ($content[$elem][0], 0, 1) == "."){$content[$elem][0] = "";}}switch($content[$elem][3]){case "A":array_push($A,$content[$elem]);unset($content[$elem]);break;case "MX":array_push($MX,$content[$elem]);unset($content[$elem]);break;case "NS":array_push($NS,$content[$elem]);unset($content[$elem]);break;case "SOA":if (!strpos($content[$elem],")")){for($i = $elem+1; $i <= count($content); $i++){$content[$elem][count($content[$elem])-1] = $content[$elem][count($content[$elem])-1]." ".$content[$i];if (strpos($content[$i],")")){break;}}}$SOA = $content[$elem];$SOA[4] = split(chr(32),$SOA[4]);//for ($killer=$elem; $killer <= $i ; $killer++)//{// unset($content[$killer]);//}break;}}}//foreach($content as $elem)//{// echo "$elem<br>";//}?><table width="100%" border="1" cellspacing="0" cellpadding="3"><tr bgcolor="#<? echo $webs[bgcolor_links] ?>"><td colspan="2" class="headline" height="28">DNS-Eintrag:<?if ($file){?>Bearbeiten<?}else{?>Neueintrag<?}?>(<? echo $site ?>)</td></tr><tr><td valign="top" bgcolor="#<? echo $webs[bgcolor_links] ?>" width="7%"><b>SOA:</b></td><td width="93%"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="17%">Zone:</td><td width="83%"><input type="text" name="SOA[Zonename]" value="<? echo $SOA[0] ?>" size="40"></td></tr><tr><td width="17%">Master-Server:</td><td width="83%"><input type="text" name="SOA[NS]" value="<? echo $SOA[4][0] ?>" size="40"></td></tr><tr><td width="17%">Admin:</td><td width="83%"><input type="text" name="SOA[admin]" value="<? echo $SOA[4][1] ?>" size="40"></td></tr></table><br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="36%">Zeit aktualisieren</td><td width="64%"><?$elem = 4;$SOA[4][$elem] = trim($SOA[4][$elem]);$Timer = substr($SOA[4][$elem],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);}else{$Timer = "";}?><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="SOA[Zeiten][update][0]" size="5" value="<? echo $SOA[4][$elem] ?>"></td><td><select name="SOA[Zeiten][update][1]"><option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td></tr><tr><td width="36%">Ablaufzeit</td><td width="64%"><?$elem = 6;$SOA[4][$elem] = trim($SOA[4][$elem]);$Timer = substr($SOA[4][$elem],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);}else{$Timer = "";}?><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="SOA[Zeiten][timeout][0]" size="5" value="<? echo $SOA[4][$elem] ?>"></td><td><select name="SOA[Zeiten][timeout][1]"><option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td></tr><tr><td width="36%">Wiederholungszeit transferieren</td><td width="64%"><?$elem = 5;$SOA[4][$elem] = trim($SOA[4][$elem]);$Timer = substr($SOA[4][$elem],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);}else{$Timer = "";}?><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="SOA[Zeiten][transfer_repeat][0]" size="5" value="<? echo $SOA[4][$elem] ?>"></td><td><select name="SOA[Zeiten][transfer_repeat][1]"><option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td></tr><tr><td width="36%">Standard-Time-To-Live</td><td width="64%"><?$elem = 7;$SOA[4][$elem] = trim($SOA[4][$elem]);$Timer = substr($SOA[4][$elem],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$SOA[4][$elem] = substr($SOA[4][$elem], 0, -1);}else{$Timer = "";}?><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="SOA[Zeiten][standard_TTL][0]" size="5" value="<? echo $SOA[4][$elem] ?>"></td><td><select name="SOA[Zeiten][standard_TTL][1]"><option <? if ($Timer == "") {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td></tr></table></td></tr><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2" valign="top"> </td></tr><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">A:</td><td class="headline" width="93%"><table border="0" cellspacing="0" cellpadding="0" width="100%" id="A"><tr><td width="25%">Domain</td><td align="center" width="25%">Time-To-Live</td><td align="center" width="25%">IP</td><td align="center" width="25%"> </td></tr><?foreach(array_keys($A) as $elem){?><tr ID="A_<? echo $elem?>"><td width="25%"><input type="text" name="A[<? echo $elem?>][Domain]" size="30" value="<? echo $A[$elem][0] ?>"></td><?if ($A[$elem][1]){ // wir haben einen Eintrag und müssen ihn identifizieren$Timer = substr($A[$elem][1],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$A[$elem][1] = substr($A[$elem][1], 0, -1);}else{$Timer = "";}}else{unset($Timer);}?><td align="center" width="25%"><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="A[<? echo $elem?>][TTL][0]" size="5" value="<? echo $A[$elem][1] ?>"></td><td><select name="A[<? echo $elem?>][TTL][1]"><option <? if (!$Timer) {echo "selected";} ?>>Standard</option><option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td><td width="25%" align="center"><input type="text" name="A[<? echo $elem?>][IP]" size="15" value="<? echo $A[$elem][4] ?>"></td><td width="25%"><a href="javascript:kill('A_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a></td></tr><?}?><tr ID="A_n"><td width="25%"> </td><td align="center" width="25%"> </td><td width="25%" align="center"> </td><td width="25%"><a href="javascript:add('A_n')"><font color="#00CC33"><b>ADD</b></font></a></td></tr></table></td></tr><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" colspan="2" valign="top"> </td></tr><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">MX:</td><td class="headline" width="93%"><table border="0" cellspacing="0" cellpadding="0" width="100%" id="MX"><tr><td width="25%" >Domain</td><td align="center" width="25%">Time-To-Live</td><td align="center" width="25%">Priorität / Server</td><td align="center" width="25%"> </td></tr><?foreach(array_keys($MX) as $elem){?><tr ID="MX_<? echo $elem?>"><td width="25%"><input type="text" name="MX[<? echo $elem?>][Domain]" size="30" value="<? echo $MX[$elem][0] ?>"></td><?if ($MX[$elem][1]){ // wir haben einen Eintrag und müssen ihn identifizieren$Timer = substr($MX[$elem][1],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$MX[$elem][1] = substr($MX[$elem][1], 0, -1);}else{$Timer = "";}}else{unset($Timer);}?><td align="center" width="25%"><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="MX[<? echo $elem?>][TTL][0]" size="5" value="<? echo $MX[$elem][1] ?>"></td><td><select name="MX[<? echo $elem?>][TTL][1]"><option <? if (!isset($Timer)) {echo "selected";} ?>>Standard</option><option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td><td align="center" width="25%"><table border="0" cellspacing="0" cellpadding="0"><?$MX[$elem][4] = split (chr(32), $MX[$elem][4]);?><tr><td><input type="text" name="MX[<? echo $elem?>][Prioritaet]" size="3" value="<? echo $MX[$elem][4][0] ?>"></td><td><input type="text" name="MX[<? echo $elem?>][Server]" size="20" value="<? echo $MX[$elem][4][1] ?>"></td></tr></table></td><td width="25%"><a href="javascript:kill('MX_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a></td></tr><?}?><tr ID="MX_n"><td width="25%"> </td><td align="center" width="25%"> </td><td align="center" width="25%"> </td><td width="25%"><a href="javascript:add('MX_n')"><font color="#00CC33"><b>ADD</b></font></a></td></tr></table></td></tr><tr><td valign="top" bgcolor="#<? echo $webs[bgcolor_links] ?>" colspan="2"> </td></tr><tr><td bgcolor="#<? echo $webs[bgcolor_links] ?>" class="headline" width="7%" valign="top">NS:</td><td class="headline" width="93%"><table border="0" cellspacing="0" cellpadding="0" width="100%" id="NS"><tr><td width="25%" >Domain</td><td align="center" width="22%">Time-To-Live</td><td align="center" width="40%">Server</td><td align="center" width="13%"> </td></tr><?foreach(array_keys($NS) as $elem){?><tr ID="NS_<? echo $elem?>"><td width="25%"><input type="text" name="NS[<? echo $elem?>][Domain]" size="30" value="<? echo $NS[$elem][0] ?>"></td><?if ($NS[$elem][1]){ // wir haben einen Eintrag und müssen ihn identifizieren$Timer = substr($NS[$elem][1],-1);if (in_array ($Timer, array ("M", "H", "D", "W"))){$NS[$elem][1] = substr($NS[$elem][1], 0, -1);}else{$Timer = "";}}else{unset($Timer);}?><td align="center" width="22%"><table border="0" cellspacing="0" cellpadding="0"><tr><td><input type="text" name="NS[<? echo $elem?>][TTL][0]" size="5" value="<? echo $NS[$elem][1] ?>"></td><td><select name="NS[<? echo $elem?>][TTL][1]"><option <? if (!isset($Timer)) {echo "selected";} ?>>Standard</option><option <? if ((isset($Timer)) and ($Timer == "")) {echo "selected";} ?> value="">Sekunden</option><option <? if ($Timer == "M") {echo "selected";} ?> value="M">Minuten</option><option <? if ($Timer == "H") {echo "selected";} ?> value="H">Stunden</option><option <? if ($Timer == "D") {echo "selected";} ?> value="D">Tage</option><option <? if ($Timer == "W") {echo "selected";} ?> value="W">Wochen</option></select></td></tr></table></td><td width="40%" align="center"><input type="text" name="NS[<? echo $elem?>][Server]" size="30" value="<? echo $NS[$elem][4] ?>"></td><td width="13%"><a href="javascript:kill('NS_<? echo $elem?>')"><img src="../images/Icons/delete.gif" width="12" height="12" border="0"></a></td></tr><?}?><tr id="NS_n"><td width="25%"> </td><td align="center" width="22%"> </td><td width="40%" align="center"> </td><td width="13%"><a href="javascript:add('NS_n')"><font color="#00CC33"><b>ADD</b></font></a></td></tr></table></td></tr><tr><td align="right" colspan="2" bgcolor="#<? echo $webs[bgcolor_links] ?>"><input type="hidden" name="new" value="<? echo $file ?>"><input type="submit" value=" OK " name="go"><input type="reset" name="Button" value="Zurücksetzen"></td></tr></table><?}?></td><td width="79" align="right" bordercolor="#CCCCCC"><table width="67" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#999999"><tr><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></tr><tr><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></tr><tr><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></tr></table></td></tr></table></form></body>