Файл: RootPanel 1.7.0 FreeCode/RootPanel 1.7.0 FreeCode/zones.php
Строк: 275
<?
session_set_cookie_params(86400);
session_start();
$full_home_path = dirname(__FILE__);
require_once($full_home_path."/_rootload.php");
mconnect();
validateUser();
if (!EnableLanguages()) { error("Can not load languages."); mclose(); exit; }
if (!GetCurrentCurrency()) { print $_lang[ErrorGetCurrentCurrency]; mclose(); exit; }
head('utf-8',$_lang[OrderAvailZones]);
print "<H1 class=pagetitle>".$_lang[OrderAvailZones]."</H1><hr class=hr>";
$zones = GetZonesActive();
if (mysql_num_rows($zones) > 0) {
$tableRows = 2;
$domainCostType = GetSetting("domainCostType");
$zonesShowReg=GetSetting("zonesShowReg");
$zonesShowRenew=GetSetting("zonesShowRenew");
$zonesShowReg2=GetSetting("zonesShowReg2");
$zonesShowRenew2=GetSetting("zonesShowRenew2");
$zonesShowRegHostReseller=GetSetting("zonesShowRegHostReseller");
$zonesShowRenewHostReseller=GetSetting("zonesShowRenewHostReseller");
$zonesShowRegReseller=GetSetting("zonesShowRegReseller");
$zonesShowRenewReseller=GetSetting("zonesShowRenewReseller");
if ($zonesShowReg) { $tableRows++; }
if ($zonesShowRenew) { $tableRows++; }
if ($zonesShowReg2) { $tableRows++; }
if ($zonesShowRenew2) { $tableRows++; }
if ($zonesShowRegHostReseller) { $tableRows++; }
if ($zonesShowRenewHostReseller) { $tableRows++; }
if ($zonesShowRegReseller) { $tableRows++; }
if ($zonesShowRenewReseller) { $tableRows++; }
print "<table class='rpTable' cellpadding=$tableRows>";
print "<tr bgcolor=$font_head align=left>";
print "<Td align=center>".$_lang[OrderZoneSmall]."</td>";
print "<td align=center>".$_lang[OrderSrokSmall]."</td>";
if ($zonesShowReg) { print "<td align=center><B>".$_lang[ZonesReg]."</B><BR>"; if (!$domainCostType) {print $_lang[ZonesRegCost0]; } else {print $_lang[ZonesRegCost1]; } print "</td>"; }
if ($zonesShowReg2) { print "<td align=center><B>".$_lang[ZonesReg]."</B><BR>"; if (!$domainCostType) {print $_lang[ZonesReg2Cost0]; } else {print $_lang[ZonesReg2Cost1]; } print "</td>"; }
if ($zonesShowRegHostReseller) { print "<td align=center><B>".$_lang[ZonesReg]."</B><BR>".$_lang[ZonesHostReseller]."</td>"; }
if ($zonesShowRegReseller) { print "<td align=center><B>".$_lang[ZonesReg]."</B><BR>".$_lang[ZonesReseller]."</td>"; }
if ($zonesShowRenew) { print "<td align=center><B>".$_lang[ZonesRenew]."</B><BR>"; if (!$domainCostType) {print $_lang[ZonesRenewCost0]; } else {print $_lang[ZonesRegCost1]; } print "</td>"; }
if ($zonesShowRenew2) { print "<td align=center><B>".$_lang[ZonesRenew]."</B><BR>"; if (!$domainCostType) {print $_lang[ZonesRenew2Cost0]; } else {print $_lang[ZonesReg2Cost1]; } print "</td>"; }
if ($zonesShowRenewHostReseller) { print "<td align=center><B>".$_lang[ZonesRenew]."</B><BR>".$_lang[ZonesHostReseller]."</td>"; }
if ($zonesShowRenewReseller) { print "<td align=center><B>".$_lang[ZonesRenew]."</B><BR>".$_lang[ZonesReseller]."</td>"; }
print "</tr>";
getfont();
$cnt=0;
while ($zone = mysql_fetch_object($zones)) {
getfont();
$cnt++;
print "<tr bgcolor=$font_row height=30>";
print "<Td align=left>.".$zone->zone."</td>";
print "<td align=center>".($zone->minsrok/12)." ".$_lang[OrderSokraschenieGod]."</td>";
if ($zonesShowReg) { print "<td align=center>".round($zone->cost_if_not_host*CURK,2)." ".CURS."</td>"; }
if ($zonesShowReg2) { print "<td align=center>".round($zone->cost_if_host*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRegHostReseller) { print "<td align=center>".round($zone->cost_if_reseller*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRegReseller) { print "<td align=center>".round($zone->cost_if_domainreseller*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRenew) { print "<td align=center>".round($zone->renew_if_not_host*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRenew2) { print "<td align=center>".round($zone->renew_if_host*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRenewHostReseller) { print "<td align=center>".round($zone->renew_if_reseller*CURK,2)." ".CURS."</td>"; }
if ($zonesShowRenewReseller) { print "<td align=center>".round($zone->renew_if_domainreseller*CURK,2)." ".CURS."</td>"; }
print "</tr>";
}
print "<tr bgcolor=$font_head align=left><Td colspan=$tableRows>".$_lang[ZonesTotal].": $cnt</td></tr>";
print "</table>";
}
foot('utf-8');
mclose();
?>