<?php
ob_start();
require_once('includes/cmain.inc.php');
?> 

<?php
$qs1=explode("/",$_SERVER["REQUEST_URI"]);
//echo "<pre>"; print_r($qs1); exit();
$countryName=str_replace('-',' ',$qs1[2]);
$banner_match = ucwords(stripslashes($countryName));
$stateName=str_replace('-',' ',$qs1[3]);	 
$location_replace = ucwords(stripslashes($stateName));
//print_r($countryName);exit();
if($location_replace=='Tags'){
   // print_r($location_replace);exit();
    include('blog_tags.php');
}

//start of knowledge-base/ -->
if($countryName=='blog'){
$url = explode('/', rtrim($_SERVER["REQUEST_URI"],"/")); 
$count=count($url);
$menu = $url[$count-1]; 
$menuedit=str_replace('-',' ',$menu);
$menuurl = ucwords(stripslashes($menuedit));
//print_r("Select catP_Name from tbl_blogcatp where status='1'");exit();
$sqlCat="Select catP_Name from tbl_blogcatp where status='1'";
$sqlCatExec=db_query($sqlCat);
while($blogcatresult=mysqli_fetch_array($sqlCatExec)){
$blogcategory[]=$blogcatresult['catP_Name'];
}
//print_r($menuurl);exit();
if(in_array($menuurl,$blogcategory)){ include('blog_category.php');exit;}
elseif (!isset($blogcategory['catP_Name']) || $menuurl != $blogcategory['catP_Name']) {
    
include('blog-details.php');exit;}
}else{
    include("404page.php");exit();
}

ob_end_flush();
?>