if(isset($_REQUEST['url'])){
$url = $_REQUEST['url'];
$url_chk_ids_rs = mysql_query("select * from subcategory where url='$url'");
$url_chk_ids=mysql_fetch_array($url_chk_ids_rs);
if(mysql_num_rows($url_chk_ids_rs)>0){
$cat_id= $url_chk_ids['cat_id'];
$sub_id = 0;
}
$slides_rs=mysql_query("select * from slides where cat_id='$cat_id' AND sub_id='$sub_id' AND tcat_id='$tcat_id' AND fcat_id='$fcat_id' AND acpstatus='yes' order by rank");
if(mysql_num_rows($slides_rs)==0){
$slides_rs=mysql_query("select * from slides where acpstatus='yes' ORDER BY RAND() LIMIT 0, 5");
}
}else{
$slides_rs=mysql_query("select * from slides where acpstatus='yes' ORDER BY RAND() LIMIT 0, 5");
}
while($slides=mysql_fetch_array($slides_rs)){
?>
}
?>