<?php
  //error_reporting(E_ALL);
  //ini_set('display_errors', 1);

  if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'){
    @$url = "https://";
  }else{  
    @$url = "http://";
  }
  // Append the host(domain name, ip) to the URL.
  @$url.= $_SERVER['HTTP_HOST'];
  @$newPathDotCheck = $url."/v00/";
  @$currentServerRootPath = $_SERVER["DOCUMENT_ROOT"];
  /*
      // Append the requested resource location to the URL
      @$url.= $_SERVER['REQUEST_URI'];
      
      // Parse the URL
      @$parsedUrl = parse_url($url);
    
      // Extract the path from the URL
      @$path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '';
    
      //Please Turn on in Local mode Only [Note: Please comment the below line when you go to production mode] Start.
      $newPath = preg_replace('/^\/[^\/]+/', '', $path);
      if (!empty($newPath)) {
          $newPath = '/' . ltrim($newPath, '/');
      }
      //Please Turn on in Local mode Only [Note: Please comment the below line when you go to production mode] End.
    
      // Count the number of folders in the path
      @$folderCount = substr_count($newPath, '/') - 1; // Subtract 1 to exclude the file name
    
      // Create the new path with the appropriate number of ../
      $newPathDotCheck='';
      if(isset($folderCount) && $folderCount>0){
        @$newPathDotCheck = str_repeat('../', $folderCount);
      }
  */
?>
<!DOCTYPE html>
<html lang="en">
<head>

	<!-- META -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="" />
    <meta name="author" content="" />
    <meta name="robots" content="" />    
    <meta name="description" content="" />
    
    <!-- FAVICONS ICON -->
    <link rel="icon" href="assets/images/favicon.png" type="image/x-icon" />
    <link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.png" />
    
    <!-- PAGE TITLE HERE -->
    <title>FairDeal Trading | Home Page</title>
    
    <!-- MOBILE SPECIFIC -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <!-- BOOTSTRAP STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/bootstrap.min.css">
    <!-- FONTAWESOME STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/fontawesome/css/font-awesome.min.css" />
    <!-- OWL CAROUSEL STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/owl.carousel.min.css">
    <!-- MAGNIFIC POPUP STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/magnific-popup.min.css">
    <!-- LOADER STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/loader.min.css"> 
    <!-- FLATICON STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/flaticon.min.css">	
    <!-- MAIN STYLE SHEET -->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/style.css">
    <!-- Color Theme Change Css -->
    <link rel="stylesheet" class="skin" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/skin/skin-1.css">  
    <!-- Side Switcher Css-->
    <link rel="stylesheet" type="text/css" href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>assets/css/switcher.css">     
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">  
	<link href="https://fonts.googleapis.com/css?family=Poppins:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
	
	<!-- Dynamic Head Secion Link and Script Tag Include Start -->
    <?php
        if(!(isset($cssAndScriptFiles) && @count($cssAndScriptFiles)>0)){
          $cssAndScriptFiles = [];
        }
        //For Eg:-
          /*$cssAndScriptFiles = [
              'css' => ['test_css.css', 'assets/css/test_css1.css'],
              'js' => ['test_about.js', 'assets/js/test_about1.js'],
          ];*/

        if(isset($cssAndScriptFiles['css']) && @count($cssAndScriptFiles['css'])>0){
          foreach ($cssAndScriptFiles["css"] as $cssAndScriptFilesValue) {
                if(@filter_var($cssAndScriptFilesValue, FILTER_VALIDATE_URL) == true){
                  echo "<link rel='stylesheet' href='$cssAndScriptFilesValue'>\n";
                }else{
                  echo "<link rel='stylesheet' href='" . (isset($newPathDotCheck) ? $newPathDotCheck : "") . "{$cssAndScriptFilesValue}'>\n";
                }
          }
        }

        if(isset($cssAndScriptFiles['js']) && @count($cssAndScriptFiles['js'])>0){
          foreach ($cssAndScriptFiles["js"] as $cssAndScriptFilesValue) {
            if(@filter_var($cssAndScriptFilesValue, FILTER_VALIDATE_URL) == true){
              echo "<script src='$cssAndScriptFilesValue' type='text/javascript'></script>\n";
            }else{
              echo "<script src='" . (isset($newPathDotCheck) ? $newPathDotCheck : "") . "{$cssAndScriptFilesValue}' type='text/javascript'></script>\n";
            }
          }
        }
    ?>
    <!-- Dynamic Head Secion Link and Script Tag Include End -->
</head>
<body>
	<div class="page-wraper"> 
        <!-- HEADER START -->
        <header class="site-header header-style-1 mobile-sider-drawer-menu">
            <div class="top-bar bg-gray">
                <div class="container">
                    <div class="row">
                        <div class="mt-topbar-left">
                            <ul class="list-unstyled e-p-bx pull-right">
                                <li><i class="fa fa-envelope"></i> fairdeal@omantel.net.om</li>
                                <li><i class="fa fa-phone"></i>00 968 24814374 / 24811284 / 24815728</li>
                                <!--<li><i class="fa fa-clock-o"></i>Sun-Sat 9.45 am</li>-->
                            </ul>
                        </div>
                        <div class="mt-topbar-right">
                            <div class="appint-btn"><a href="contact-us.php" class="site-button">Make an Appointment</a></div>                            
                        </div>
                    </div>
                </div>
            </div>          
            <div class="sticky-header main-bar-wraper">
                <div class="main-bar bg-white">
                    <div class="container">
                        <div class="logo-header">
                            <div class="logo-header-inner logo-header-one">
                                <a href="<?php echo isset($newPathDotCheck)? $newPathDotCheck : ""; ?>index.php">
                                    <img src="assets/images/fairdeal-logo.png" alt="" />
                                </a>
                            </div>
                        </div>
                        
                        <?php include_once 'menu.php'; ?>
                        
                    </div>
                </div>
            </div>
        </header>
        <!-- HEADER END -->