Файл: sites.php
Строк: 41
<?
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[SitesTitle]);
print "<H1 class=pagetitle>".$_lang[SitesTitle]."</H1><hr class=hr>";
if (GetSetting("catalog_enable")) {
print "<table class=rpTableBlank>";
$r = @mysql_query("select * from catalog order by id") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
while ($rr = @mysql_fetch_object($r)) {
$file="./_rootimages/banners/cat_".$rr->uid."_".$rr->id.".";
if (file_exists($file."gif")) { $file = $file."gif"; }
else if (file_exists($file."jpg")) { $file = $file."jpg"; }
else if (file_exists($file."png")) { $file = $file."png"; }
else { $file = ""; }
if ($file) { $file = "<img src='$file'>"; }
print "<tr><td align=center width=1>$file</td><td><a class=rootlink href='http://$rr->url' target=_blank>$rr->title</a><br>$rr->opisanie</td></tr>";
print "<tr><td colspan=2 height=5></td></tr>";
}
print "</table>";
} else { print $_lang[SitesCatalogDisabled]; }
foot('utf-8');
mclose();
?>