Location: PHPKode > projects > WeBBind Web Gui to Bind > webbind_0.98/resultdomain.php
<?
/*
	Get the query from index page for search and display matching zones filename
	on the specified dns server.
	Exclude from the valid response files with suffixes: .slavezone .removed .backup 
*/

require("global.php");
require("htmlcommon.php");
require("clrzonesess.php");

ClrZoneSess($zonelock);

HTMLHeader();
Confirm();

if ( $domainname != "" ) {

	exec ("ls $basemount/$servername[$serverchoose]/zones/*$domainname*.dns", $result );

	if ((count($result)) < 1) {
		Banner("NO MATCH<BR><BR><A HREF=\"$phpbindurl\">Back to Search Page</A>\n",$username,$servername[$serverchoose]);
		print ("<BR><BR><BR><BR><HR>\n");
		exit();
	}

	Banner("Zone Search Results",$username,$servername[$serverchoose]);

	for ($i = 0; $i < (count ($result)); $i++) {

	$zonename = explode("/", $result[$i]);
	end($zonename);

		if ( !ereg(".slavezone", (current($zonename))) && !ereg(".removed", (current($zonename))) && !ereg(".backup", (current($zonename)))  ) {

        print("<center><table BORDER COLS=3 WIDTH=\"100%\" >\n");
        print("<form method=\"post\" action=\"showzone.php\">\n");
        print("<tr BGCOLOR=\"#DCDCDC\">\n");

	print("<td BGCOLOR=\"#990000\">\n");
	print("<center><a href=\"nslookup.php?username=$username&zonename=").ereg_replace(".dns","",current($zonename)).("&querytype=SOA\"><img src=\"/icons/index.gif\" alt=\"VERIFICA\" border=\"0\"></a>");
	print("</td>\n");

        print("<td BGCOLOR=\"#DCDCDC\" WIDTH=\"80%\" >\n");
        print("<center><font face=\"Verdana\" size=2 font color=\"#FFFFFF\"><B><A HREF=\"http://www.").ereg_replace(".dns","",current($zonename)).("\" target=_blank >").current($zonename).("</A></B></font></center>\n");
        print("</td>\n");
        print("<td BGCOLOR=\"#990000\">\n");
        print("<center><INPUT type=\"SUBMIT\" name=\"consulta\" value=\" Read \"></center>\n");
        print("</td>\n");

 if ($readonly <> 1) {
        print("<td BGCOLOR=\"#990000\">\n");
        print("<center><INPUT type=\"SUBMIT\" name=\"modifica\" value=\"  Modify  \"></center>\n");
        print("</td>\n");
        print("<td BGCOLOR=\"#990000\">\n");
        print("<center><a href=\"removezone.php?zonename=").current($zonename).("&zonefile=$result[$i]&idserver=$serverchoose&username=$username\" onClick=\"return conferma()\"><img src=\"/icons/broken.gif\" alt=\"ELIMINA\" border=\"0\"></a>");
        print("</td>\n");
 }

        print("</tr>\n");
        print("<INPUT type=\"HIDDEN\" name=\"zonechoose\" value=\"$result[$i]\" >\n");
	print("<INPUT type=\"HIDDEN\" name=\"idserver\" value=\"$serverchoose\" >\n");
	print("<INPUT type=\"HIDDEN\" name=\"username\" value=\"$username\" >\n");
        print("</form>\n");
        print("</table></center>\n");

		}
	}
   print("<center><table BORDER=0 COLS=1 WIDTH=\"100%\" >\n");
   print("<tr BGCOLOR=\"#C0C0C0\">\n");
   print("<td>\n");
   print("<center><font face=\"Verdana\" size=2 font color=\"#FFFFFF\"><A HREF=\"$phpbindurl\">Return to Search Page</A></center>\n");
   print("</td>\n");
   print("</tr>\n");
   print("</table></center>\n");

   } else {
   
   Banner("NO VALUES SPECIFIED !<BR><BR><A HREF=\"$phpbindurl\">Back to Search Page</A>\n",$username,$servername[$serverchoose]);
   print ("<BR><BR><BR><BR><HR>\n");
   }
 

?>

Return current item: WeBBind Web Gui to Bind