Файл: RootPanel 1.7.0 FreeCode/RootPanel 1.7.0 FreeCode/_rootbill/_testwhois.inc.php
Строк: 191
<?
_head('utf-8',$_lang[WhoisTitle]);
printWhoisForm("","","utf-8");
if ($domain or $checkedzones or $zone) {
$weSalesTypes = GetSetting("weSalesTypes");
$weSalesTypes = @split("::",$weSalesTypes);
print "<table width=95% border=1 cellspacing=1 cellpadding=2><tr><th align='center'>".$_lang[WhoisCheckResult]."</th><tr></table>";
if ($zone) { $checkedzones = array($zone); }
if (!$domain) { $error = $_lang[WhoisErrorDomain]; }
else if (!$checkedzones) { $error = $_lang[WhoisErrorZone]; }
if ($error) { print "<font color=red>".$_lang[Error].": $error</font><BR><BR>"; }
else {
print "<table class='rpTableBlank' width='95%' border=1 cellspacing=0 cellpadding=3>";
$freecnt = 0;
while (list($k, $v) = @each($checkedzones)) {
$d = new domain($domain.".".$v);
$order = "";
if (@in_array("hosting",$weSalesTypes) and @in_array("domains",$weSalesTypes)) {
$order .= "<b>[ <A class=rootlink href=order.php?zone=$v&domain=$domain&domain_reg=1>".$_lang[WhoisOrderHostAndDomain]."</a> ]</b> ";
}
if (@in_array("domains",$weSalesTypes)) {
$order .= "<b>[ <A class=rootlink href=order.php?type=d&zone=$v&domain=$domain>".$_lang[WhoisOrderDomain]."</a> ]</b> ";
}
if ($d->is_available()) {
$err = $d->last_error;
if ($err) { $avail = $_lang[WhoisAvailError]; $color = "domainerror"; } else { $avail = $_lang[WhoisAvailFree]; $color = "domainfree"; $freecnt++;}
if (IsZoneActive($v)) { $act = $order; } else { $act = $_lang[WhoisDomainNotActive]; }
} else {
$avail = $_lang[WhoisAvailNotFree]; $color = "domainreged";
$act = "";
if (@in_array("hosting",$weSalesTypes)) {
$act .= "<b>[ <A class=rootlink href=order.php?zone=$v&domain=$domain&domain_reg=0>".$_lang[WhoisOrderHost]."</a> ]</b> ";
}
$act .= "<B>[ <A class=rootlink href=?do=$do&whoisdomain=$d->domain>".$_lang[WhoisWhois]."</a> ]</b> ";
}
print "<tr><td><B>$d->domain</b></td><Td align=center class=$color>$avail</td><td align=left> $act </td><td>$err</td></tr>";
$err="";
}
print "</table>";
$whoisShow = GetSetting("whoisShow");
if ($whoisShow == "1" or ($whoisShow == "2" and $freecnt == 0)) {
print "<BR><table width=95% border=1 cellspacing=1 cellpadding=2 bgcolor=#EEEEEE><tr><th align='center'>".$_lang[WhoisFreeDomainsInOtherZones]."</th></tr></table>";
print "<table class='rpTableBlank' border=1 cellspacing=1 cellpadding=2>";
$cnt = 0;
$allzones = GetZonesNamesForWhois();
while (list($k, $v) = @each($allzones)) {
if (!in_array($v,$checkedzones)) {
$d = new domain($domain.".".$v);
$order = "";
if (@in_array("hosting",$weSalesTypes) and @in_array("domains",$weSalesTypes)) {
$order .= "<b>[ <A class=rootlink href=order.php?zone=$v&domain=$domain&domain_reg=1>".$_lang[WhoisOrderHostAndDomain]."</a> ]</b> ";
}
if (@in_array("domains",$weSalesTypes)) {
$order .= "<b>[ <A class=rootlink href=order.php?type=d&zone=$v&domain=$domain>".$_lang[WhoisOrderDomain]."</a> ]</b> ";
}
if ($d->is_available() and !$d->last_error) {
print "<tr><td><B>$d->domain </b></td><Td align=center class=domainfree> ".$_lang[WhoisAvailFree]." </td><td align=left> $order </td></tr>";
$cnt++;
}
}
}
if ($cnt == 0) { print "<tr><td>".$_lang[WhoisNoFreeDomainsInOtherZones]."</td></tr>"; }
print "</table>";
}
if (mb_strlen($domain) == 2) {
print "<BR><font color=red>".$_lang[Warning]."</font> ".$_lang[WhoisAboutDomainLength];
}
}
}
if ($whoisdomain) {
print "<table width=95% border=1 cellspacing=0 cellpadding=0><tr><th align=center>".$_lang[WhoisDomainInfo]."</th></tr></table>";
$d = new domain($whoisdomain);
$whois_info = $d->html_info();
if ($d->last_error) {
print $_lang[Error].": $d->last_error";
}
else {
print "$whois_info";
}
}
_foot('utf-8');
?>