0)
{
$MasterCatName = ucwords(trim(mysql_result($MasterCatQuery,0,'name')));
$MetaTitle = trim(mysql_result($MasterCatQuery,0,'metatitle'));
$MetaKey = trim(mysql_result($MasterCatQuery,0,'metakey'));
$MetaDesc = trim(mysql_result($MasterCatQuery,0,'metadesc'));
$MasterCatSeoUrl = trim(mysql_result($MasterCatQuery,0,'seourl'));
}
else
{
header("location: home.html");
die;
}
$SubCatQuery = mysql_query("SELECT * FROM store_category WHERE id='".$SubCatID."' AND masterid='".$MaterID."'");
$SubCatNum = @mysql_num_rows($SubCatQuery);
if($SubCatNum > 0)
{
$SubCatName = ucwords(trim(mysql_result($SubCatQuery,0,'name')));
$MetaTitle = trim(mysql_result($SubCatQuery,0,'metatitle'));
$MetaKey = trim(mysql_result($SubCatQuery,0,'metakey'));
$MetaDesc = trim(mysql_result($SubCatQuery,0,'metadesc'));
$SubCatSeoUrl = trim(mysql_result($SubCatQuery,0,'seourl'));
}
if($_GET['sid'] == '')
{
$_GET['sid'] = 0;
}
if(trim($MetaTitle) == '')
{
$MetaTitle = "ACL - Home / Products / ".$MasterCatName;
if(trim($SubCatName) != '')
{
$MetaTitle .= " / ".$SubCatName;
}
}
?>
=$MetaTitle;?>
Home /
Products /
if(trim($SubCatName) != '')
{
$MasterCatPageName = '';
if($MasterCatSeoUrl!='')
{
$MasterCatPageName = $MasterCatSeoUrl;
}
else
{
$MasterCatPageName = 'product_category.html?mid='.$_GET['mid'];
}
?>
=$MasterCatName;?> / =$SubCatName;?>
}
else
{
?>
=ucwords($MasterCatName);?>
}
?>
$ProductQuery = mysql_query("SELECT * FROM store_products WHERE masterid='".$MaterID."' AND subcatid='".$_GET['sid']."' AND isactive='1' ORDER BY rank ASC, name ASC");
$ProductNum = mysql_num_rows($ProductQuery);
for($k=0; $k<$ProductNum ;$k++)
{
$PID = mysql_result($ProductQuery,$k,'id');
$Mid = mysql_result($ProductQuery,$k,'masterid');
$Subid = mysql_result($ProductQuery,$k,'subcatid');
$Name = mysql_result($ProductQuery,$k,'name');
$Image1 = trim(@mysql_result($ProductQuery,$k,'productimage'));
$Image2 = trim(@mysql_result($ProductQuery,$k,'productimage2'));
$Image3 = trim(@mysql_result($ProductQuery,$k,'productimage3'));
$ProductSeoUrl = trim(@mysql_result($ProductQuery,$k,'seourl'));
$ImagePath = "";
if($Image1 != '' && file_exists($UploadSmallImage.$Image1))
{
$ImagePath = $UploadSmallImage.$Image1;
}
else if($Image2 != '' && file_exists($UploadSmallImage.$Image2))
{
$ImagePath = $UploadSmallImage.$Image2;
}
/*else if($Image3 != '' && file_exists($UploadSmallImage.$Image3))
{
$ImagePath = $UploadSmallImage.$Image3;
}*/
else
{
$ImagePath = $NoImage;
}
if(trim($ImagePath) != '' && $RecordFound == 0)
{
$RecordFound = 1;
}
$ProductPageName = '';
if($ProductSeoUrl!='')
{
$ProductPageName = $ProductSeoUrl;
}
else
{
$ProductPageName = 'productdetails.html?id='.$PID;
}
?>
}
if($RecordFound != 1)
{
echo ' No Record Found! ';
}
?>
//include_once('pagging.php');?>
|