include('includes/application_top.php');
//print_r($_REQUEST);
if(CAT_ID){
$cID = CAT_ID;
}else{
$cID = 0;
}
//echo "
".$cID;
//exit;
if(isSet($_GET['cat_id']))
{
$cID = $_GET['cat_id'];
}
if(!empty($_GET['page'])){
$page = (int)$_GET['page'];
}else{
$page = 1;
}
$limit = LIMIT_CLASSIFIED;
$start = ($page - 1) * $limit;
$sql_classified = "SELECT c.*, ct.cat_url_name FROM tbl_classified c, tbl_classified_to_categories cc , tbl_categories ct WHERE cc.categories_id='$cID' and cc.classified_id=c.classified_id and ct.categories_id=cc.categories_id and c.status='1' ORDER BY premium_listing desc, c.classified_id desc";
//echo $sql_classified;
$result_classified_rows = mysql_query($sql_classified) or die(mysql_error(). " " . mysql_errno());
$tot_rows = mysql_num_rows($result_classified_rows);
mysql_free_result($result_classified_rows);
//$pagelinks = paginate($limit, $tot_rows);
///////////////////////////////////////////////////////////
$thispage = "index.php?cat_id=$_GET[cat_id]" ;
$thispage =$_SERVER['REQUEST_URI'];
if(empty($_GET['page']))
{
$thispage .="index-".$page.".php";
}
$pos = "/index-".$page.".php";
$pagelinks= seo_paginate($limit, $tot_rows, $thispage, $pos);
//////////////////////////////////////////////////////////////////
$sql_classified .= " LIMIT $start, $limit";
$result_classified = mysql_query($sql_classified) or die(DB_QUERY_ERROR);
if($cID>0)
{
$categories_query = mysql_query("select cc.* from tbl_categories cc where cc.categories_id = '" . (int)$cID. "'");
$rows_fetch = mysql_fetch_array($categories_query);
$page_title=$rows_fetch['page_title'] . ' - ' . STORE_NAME;
$page_description=$rows_fetch['page_description'] . ' - ' . STORE_NAME;
$page_keywords=$rows_fetch['page_keywords'] . ' - ' . STORE_NAME;
}else{
$page_title = STORE_NAME;
$page_description = STORE_NAME;
$page_keywords = STORE_NAME;
}
?>
include('header1.php');?>
include('header.php');?>
|
|
|
include('right-nav.php');?> |
$cat_name = getCategoryName($cID);
if(empty($cat_name)) { $cat_name="Category"; }
echo ucwords(strtolower($cat_name));
?> |
displaylink_front($cID);?> |
$cat_desc = getCategoryDesc($cID);
if($cat_desc){?>
|
}?>
| |