Просмотр файла MyLounge/myred/whois.php

Размер файла: 2.45Kb
<?php
include("include/vars.php");
require("include/functions.php");
$lang=setlanguage();
require("language/$lang");
$menu=setmenu();

if (!$do) {
	$do="whois";
	}

if ($do=='whois') {
$main="<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"400\" align=\"center\">
<tr>
<td>$text_122</td>
</tr>
</table>
<form action=\"whois.php\" method=\"post\">
<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"500\" align=\"center\">
<tr>
<td>$text_10</td>
<td><div align =\"right\">http://www.</div></td>
<td>
<input type=\"text\" name=\"dom\" maxlength=\"100\">.
<select name=\"ext\">";

// Hello, difficult query :-)
	$tld_query = mysql_query("SELECT * FROM $domain_table ORDER BY domain ASC");
	while ($tlds = mysql_fetch_array($tld_query)) {	
		$main.="<option>$tlds[0]</option>";
	}
$main.="</select>
</td>
</tr>
<tr>
<td colspan=\"2\" align=\"center\">
<input type=\"hidden\" name=\"do\" value=\"lookup\">
<input type=\"submit\" name=\"submit\" value=\"$text_123\">
<input type=\"reset\" value=\"reset\"></td>
</tr>
</table>
</form>";

$template = new MyredTemplate("template/template.html");
$template->assign("TITLE", $pagetitle);
$template->assign("MENU", $menu);
$template->assign("MAIN", $main);
$template->myred_print() or die($template->error);
exit;
}

if ($do=='lookup') {
 	if (!$dom) {
		errormsg($text_16);
		exit;
	}
	$new_dom="$dom.$ext";
	$lookup_result=mysql_query("SELECT * FROM $redir_table WHERE host='$new_dom'");
 	if (mysql_num_rows($lookup_result) < 1) {
		errormsg($text_124);
		exit;
	}
	$lookup_array=mysql_fetch_array($lookup_result);
	$host=$lookup_array[host];
	$name=$lookup_array[name];
	$vname=$lookup_array[vname];
	$mail = $lookup_array[email];
	$date=$lookup_array[time];
	$date = date($dateformat, $date);	

$main="<table cellspacing=\"1\" cellpadding=\"3\" border=\"0\" width=\"400\" align=\"center\">
<tr>
<td colspan=\"2\"><div align=\"center\"><b>$text_125</b></div></td>
</tr>
<tr>
<td colspan=\"2\">&nbsp;</td>
</tr>
<tr>
<td>$text_10</td>
<td>$host</td>
</tr>
<tr>
<td>$text_126</td>
<td>$name, $vname</td>
</tr>
<tr>
<td>$text_54</td>
<td>$mail</td>
</tr>
<tr>
<td>$text_127</td>
<td>$date</td>
</tr>
</table>";

$template = new MyredTemplate("template/template.html");
$template->assign("TITLE", $pagetitle);
$template->assign("MENU", $menu);
$template->assign("MAIN", $main);
$template->myred_print() or die($template->error);
exit;
}
?>