<?php
ob_start();
require_once('includes/cmain.inc.php'); ?>
<?php
$url =  explode('/', rtrim($_SERVER["REQUEST_URI"],"/")); 
$count=count($url);
$menuurl = str_replace('-',' ',$url[$count-1]); 
$menuurl1=$menuurl;
$meta_url=SITE_WS_PATH.'/'.$url[2];

if($url[2] =='about-us'){ include('about-us.php'); exit;}
elseif(isset($url[2]) && $url[2] =='contact-us'){include('contact-us.php'); exit; }
elseif(isset($url[2]) && $url[2] =='know-more'){include('know-more.php'); exit; }

elseif(isset($url[2]) && $url[2] =='thanks'){include('thanks.php'); exit; }

elseif(isset($url[2]) && $url[2] =='blog'){include('blog.php'); exit;}





elseif(isset($url[2]) && $url[2] =='materials'){include('materials.php'); exit; }

//elseif(isset($url[2]) && $url[2] =='our-services'){include('our-services.php'); exit; }
elseif(isset($url[2]) && $url[2]=='home'){ echo '<script type="text/javascript"> window.location = "'.SITE_WS_PATH.'" </script>';}

$countryName = str_replace('-', ' ', $menuurl);

$location_replace = ucwords(stripslashes($countryName));
$banner_match = ucwords(stripslashes($countryName));
$services_replace = ucwords(stripslashes($countryName));

$sqls=db_query("select * from tbl_country where `country_url`='".$countryName."' and country_status=1");	
$ress=mysqli_fetch_array($sqls);
$newq =$ress['country_url'] ?? '';
//print_r($newq);exit();

if(!empty($newq)){include('our-services.php');exit;}

//print_r("select * from tbl_industry_served where `country_url`='".$menuurl."' and country_status=1");exit();
$sqlIndustry=db_query("select * from tbl_industry_served where `country_url`='".$menuurl."' and country_status=1");	
$ress_industry=mysqli_fetch_array($sqlIndustry);
$industryUrl =$ress_industry['country_url'] ?? '';
if(!empty($industryUrl)){
//print_r($industryUrl);exit();
    include('industries-served.php'); exit;
}

$sqlResources=db_query("select * from tbl_resource where `country_url`='".$menuurl."' and country_status=1");	

$ress_resources=mysqli_fetch_array($sqlResources);
$resourceUrl =$ress_resources['country_url'] ?? '';
if(!empty($resourceUrl)){
    include('resources.php'); exit;
}

http_response_code(404);
include('404page.php');
exit;
   ?> 

 

     
     
     
     
     
     
     
     
     
     
     
     
