// confirm password on each time any page is accessed in blocked country(ies)......
if(isset($_SESSION['auth_password'])){
if($_SESSION['auth_country']=="Yes"){
$con_saved_password = $_SESSION['auth_password'];
$check_acpcountry = mysql_query("select * from traffic where auth_password = '$con_saved_password'")or die(mysql_error());
if(mysql_num_rows($check_acpcountry)!="1"){
unset($_SESSION['auth_country']);
unset($_SESSION['auth_password']);
header("location:welcome.php");
}
}
}
?>
// codes for dynamic title, keywords and description
$descprefix = "Manufacturers, Exporters, Seller and Supplier of top quality ";
if(isset($_REQUEST['url'])){
$url = $_REQUEST['url'];
$murl_chk_rs = mysql_query("select * from category where url='$url'");
$murl_chk = mysql_fetch_array($murl_chk_rs);
$surl_chk_rs = mysql_query("select * from subcategory where url='$url'");
$surl_chk = mysql_fetch_array($surl_chk_rs);
$turl_chk_rs = mysql_query("select * from tcategory where url='$url'");
$turl_chk = mysql_fetch_array($turl_chk_rs);
$furl_chk_rs = mysql_query("select * from fcategory where url='$url'");
$furl_chk = mysql_fetch_array($furl_chk_rs);
if(mysql_num_rows($murl_chk_rs)>0){
$seotitle = $murl_chk['title'];
$seokeywords = $murl_chk['keywords'];
$seodescription = $murl_chk['description'];
if($seotitle==''){
$seotitle = $murl_chk['cname'];
}
if($seokeywords=='' AND $seotitle!=''){
$seokeywords = $murl_chk['title'];
}
if($seokeywords==''){
$seokeywords = $murl_chk['cname'];
}
if($seodescription=='' AND $seotitle!=''){
$seodescription =$descprefix.$murl_chk['title'];
}
if($seodescription==$descprefix){
$seodescription =$descprefix.$murl_chk['cname'];
}
}
if(mysql_num_rows($surl_chk_rs)>0){
$seotitle = $surl_chk['title'];
$seokeywords = $surl_chk['keywords'];
$seodescription = $surl_chk['description'];
$cat_id = $surl_chk['cat_id'];
$seocid_chk_rs = mysql_query("select * from category where cat_id='$cat_id'");
$seocid_chk = mysql_fetch_array($seocid_chk_rs);
if($seotitle==''){
$seotitle = $seocid_chk['cname'].", ".$surl_chk['subcat_name'];
}
if($seokeywords=='' AND $seotitle!=''){
$seokeywords = $surl_chk['title'];
}
if($seokeywords==''){
$seokeywords = $seocid_chk['cname'].", ".$surl_chk['subcat_name'];
}
if($seodescription=='' AND $seotitle!=''){
$seodescription =$descprefix.$surl_chk['title'];
}
if($seodescription==$descprefix){
$seodescription =$descprefix.$seocid_chk['cname'].", ".$surl_chk['subcat_name'];
}
}
if(mysql_num_rows($turl_chk_rs)>0){
$seotitle = $turl_chk['title'];
$seokeywords = $turl_chk['keywords'];
$seodescription = $turl_chk['description'];
$cat_id = $turl_chk['cat_id'];
$sub_id = $turl_chk['sub_id'];
$seocid_chk_rs = mysql_query("select * from category where cat_id='$cat_id'");
$seocid_chk = mysql_fetch_array($seocid_chk_rs);
$seosid_chk_rs = mysql_query("select * from subcategory where subcat_id='$sub_id'");
$seosid_chk = mysql_fetch_array($seosid_chk_rs);
if($seotitle==''){
$seotitle = $seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$turl_chk['tcat_name'];
}
if($seokeywords=='' AND $seotitle!=''){
$seokeywords = $surl_chk['title'];
}
if($seokeywords==''){
$seokeywords = $seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$turl_chk['tcat_name'];
}
if($seodescription=='' AND $seotitle!=''){
$seodescription =$descprefix.$surl_chk['title'];
}
if($seodescription==$descprefix){
$seodescription =$descprefix.$seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$turl_chk['tcat_name'];
}
}
if(mysql_num_rows($furl_chk_rs)>0){
$seotitle = $furl_chk['title'];
$seokeywords = $furl_chk['keywords'];
$seodescription = $furl_chk['description'];
$cat_id = $furl_chk['cat_id'];
$sub_id = $furl_chk['sub_id'];
$tcat_id = $furl_chk['tcat_id'];
$seocid_chk_rs = mysql_query("select * from category where cat_id='$cat_id'");
$seocid_chk = mysql_fetch_array($seocid_chk_rs);
$seosid_chk_rs = mysql_query("select * from subcategory where subcat_id='$sub_id'");
$seosid_chk = mysql_fetch_array($seosid_chk_rs);
$seotid_chk_rs = mysql_query("select * from tcategory where tcat_id='$tcat_id'");
$seotid_chk = mysql_fetch_array($seotid_chk_rs);
if($seotitle==''){
$seotitle = $seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$seotid_chk['tcat_name'].", ".$furl_chk['fcat_name'];
}
if($seokeywords=='' AND $seotitle!=''){
$seokeywords = $surl_chk['title'];
}
if($seokeywords==''){
$seokeywords = $seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$seotid_chk['tcat_name'].", ".$furl_chk['fcat_name'];
}
if($seodescription=='' AND $seotitle!=''){
$seodescription =$descprefix.$surl_chk['title'];
}
if($seodescription==$descprefix){
$seodescription =$descprefix.$seocid_chk['cname'].", ".$seosid_chk['subcat_name'].", ".$seotid_chk['tcat_name'].", ".$furl_chk['fcat_name'];
}
}
}elseif(isset($_REQUEST['purl'])){
$purl = $_REQUEST['purl'];
$purl_chk_rs = mysql_query("select * from product where purl='$purl'");
$purl_chk = mysql_fetch_array($purl_chk_rs);
$cat_id = $purl_chk['cat_id'];
$sub_id = $purl_chk['sub_id'];
$tcat_id = $purl_chk['tcat_id'];
$fcat_id = $purl_chk['fcat_id'];
$murl_chk_rs = mysql_query("select * from category where cat_id='$cat_id'");
$murl_chk = mysql_fetch_array($murl_chk_rs);
$surl_chk_rs = mysql_query("select * from subcategory where subcat_id='$sub_id'");
$surl_chk = mysql_fetch_array($surl_chk_rs);
$turl_chk_rs = mysql_query("select * from tcategory where tcat_id='$tcat_id'");
$turl_chk = mysql_fetch_array($turl_chk_rs);
$furl_chk_rs = mysql_query("select * from fcategory where fcat_id='$fcat_id'");
$furl_chk = mysql_fetch_array($furl_chk_rs);
if(mysql_num_rows($purl_chk_rs)>0){
$seotitle = $purl_chk['title'];
$seokeywords = $purl_chk['keywords'];
$seodescription = $purl_chk['description'];
$seocid_chk_rs = mysql_query("select * from category where cat_id='$cat_id'");
$seocid_chk = mysql_fetch_array($seocid_chk_rs);
if(mysql_num_rows($seocid_chk_rs)>0){
$seocname = $seocid_chk['cname'].", ";
}else{
$seocname = "";
}
$seosid_chk_rs = mysql_query("select * from subcategory where subcat_id='$sub_id'");
$seosid_chk = mysql_fetch_array($seosid_chk_rs);
if(mysql_num_rows($seosid_chk_rs)>0){
$seosname = $seosid_chk['subcat_name'].", ";
}else{
$seosname = "";
}
$seotid_chk_rs = mysql_query("select * from tcategory where tcat_id='$tcat_id'");
$seotid_chk = mysql_fetch_array($seotid_chk_rs);
if(mysql_num_rows($seotid_chk_rs)>0){
$seotname = $seotid_chk['tcat_name'].", ";
}else{
$seotname = "";
}
$seofid_chk_rs = mysql_query("select * from fcategory where fcat_id='$fcat_id'");
$seofid_chk = mysql_fetch_array($seofid_chk_rs);
if(mysql_num_rows($seofid_chk_rs)>0){
$seofname = $seofid_chk['fcat_name'].", ";
}else{
$seofname = "";
}
if($seotitle==''){
$seotitle = $seocname.$seosname.$seotname.$seofname.$purl_chk['pname'];
}
if($seokeywords=='' AND $seotitle!=''){
$seokeywords = $purl_chk['title'];
}
if($seokeywords==''){
$seokeywords = $seocname.$seosname.$seotname.$seofname.$purl_chk['pname'];
}
if($seodescription=='' AND $seotitle!=''){
$seodescription =$descprefix.$purl_chk['title'];
}
if($seodescription==$descprefix){
$seodescription =$descprefix.$seocname.$seosname.$seotname.$seofname.$purl_chk['pname'];
}
}
}else{
$seo_chk_rs = mysql_query("select * from seo where id='1'");
$seo_chk = mysql_fetch_array($seo_chk_rs);
$seotitle = $seo_chk['title'];
$seokeywords = $seo_chk['keywords'];
$seodescription = $seo_chk['description'];
}
if(isset($_REQUEST['pid'])){
$pid = $_REQUEST['pid'];
}
// code for dynamic title, keywords and description ends here.
// code for rewritting title, keywords and description , making it html friendly.
$seotitle = str_replace("'","'",$seotitle);
$seokeywords = str_replace("'","'",$seokeywords);
$seodescription = str_replace("'","'",$seodescription);
// code for rewritting title, keywords and description , making it html friendly ends here.
?>
require("jsinclude.php");?>
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)){
?>
}
?>