include_once("./common.inc.php");
include_once("./rating_common.inc.php");
$id = getParam("id");
$uid = getParam("uid");
$sql = "select * from tblratingcategory order by BINARY strCategoryName";
$result = query($sql);
$strLeftCategory = "
Все категории\n";
$strRightCategory = "";
$strSelectedCategory = "Все категории";
$i = 1;
while ( $row = fetch_array($result) ) {
if ( (eregi("^[0-9]+$", $id)) && ($id == $row["id"]) ) {
$strSelectedCategory = $row["strCategoryName"];
}
if ( $i % 2 ) {
$strRightCategory .= "$row[strCategoryName]\n";
}
else {
$strLeftCategory .= "$row[strCategoryName]\n";
}
$i++;
}
$strTitle = "КАТАЛОГ САЙТОВ : РЕЙТИНГ - $strSelectedCategory";
$strKeywords = $strTitle;
$strDescription = $strTitle;
include_once("./header.inc.php");
?>
| Рейтинговый каталог сайтов |
 |
ТОП #
|
# |
Название
и описание сайта |
Хосты |
if ( eregi("^[0-9]+$", $id) ) {
$strWhere = " and CategoryId=$id";
}
if ( eregi("^[0-9]+$", $uid) ) {
$strWhere = " and id=$uid";
}
$q = getParam("q");
if ($q != "") {
$strWhere .= " and (strSiteDescription like BINARY '%" . insertParam($q) . "%' or strSiteName like BINARY '%" . insertParam($q) . "%' or strSiteUrl like BINARY '%" . insertParam($q) . "%') ";
}
// Pagination
$lngRecordsPerPage = 10;
$lngPagesLimit = 100;
$sql = "select count(id) as count_id from tblratinguser where boolSiteStatus=1 $strWhere";
$paginationInfo = getPagination ($sql, "rating.php", $lngRecordsPerPage, $lngPagesLimit, array("id" => $id, "q" => $q) );
//! Pagination
$sql = "select * from tblratinguser where boolSiteStatus=1 $strWhere order by dteToday desc, lngHostsNumber desc limit $paginationInfo[lngStartLimit], $lngRecordsPerPage ";
$result = query($sql);
$i = $paginationInfo[lngStartLimit] + 1;
$dteToday = date("Y-m-d");
while ( $row = fetch_array($result) ) {
if ($dteToday != $row["dteToday"]) {
$row["lngHostsNumber"] = 0;
}
?>
|
|
if ($row["strSiteBanner"] != "") { echo $row["strSiteBanner"]; } ?> |
$i++;
}
?>
include_once("./footer.inc.php");
?>