<?php
session_start(); // تأكد من بدء الجلسة أولاً

/*
if (session_status() == PHP_SESSION_NONE) {
    $randomSessionName = 'SESSION_' . bin2hex(random_bytes(5)); 
    session_name($randomSessionName);
    session_start();  // بدء الجلسة
} else {
	session_start();//بدء الجلسة

}
*/
//***************************************صفحة الهيدر الرئيسية لكل الموقع ويتم استدعائها فى كل الصفحات***********************************

//ضبط الانكود بحيث يدعم اللغة العربية
mb_internal_encoding('UTF-8');

// ضبط اعدادات اللغة العربية للصفحة 
header("content-type:text/html;charset=utf-8");

//استدعاء ملف الاعداد
$conc_type='web_read_conc';
include 'conf.php';






//استدعاء ملف التشفير
include("encrypt.php");

//وضع لينك الموقع فى متغير
$actual_link = rtrim("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]",'/');

if($server_url=='/'){
//تحديد الصفحة الحالية فى حالة اللايف

	$currnet_src='/';
	$currnet_src_pure='';
	if($sub_folder==''){
		$currnet_src_pure=ltrim($_SERVER['REQUEST_URI'], $currnet_src);
	}else{
		$currnet_src_pure=str_replace("/$sub_folder/","",$_SERVER['REQUEST_URI']);
	}
	$url = explode('/', $currnet_src_pure);

	

}else{
	//تحديد الصفحة الحالية فى حالة اللوكال هوست
	$currnet_src='';
	if($sub_folder!=''){
		$currnet_src="/$main_folder/$sub_folder/";
	}else{
		$currnet_src="/$main_folder/";		
	}
	$currnet_src_pure=explode($currnet_src,$_SERVER['REQUEST_URI']);
	$url = explode('/', $currnet_src_pure[1]);

}


//ضغط الصفحة باستخدام gzip
if (!isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
    ob_start();            
}
elseif (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') == false) {
    if (strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') == false) {
        ob_start();
    }
    elseif(!ob_start("ob_gzhandler")) {
        ob_start();
    }   
}
elseif(!ob_start("ob_gzhandler")) {
    ob_start();
}

//استدعاء ملف تحديد نوع الجهاز المتصل
include "device_type.php";





if (!isset($SESSION['visitor_ip'])){
//استدعاء ملف تحديد ايبى الزائر
include "visitor_ip.php";

$_SESSION['visitor_ip'] =$vis_ip;

}
   

//فانشكن تحول الفقرات لسطور
function replace_p($txt){

	$txt=str_replace('<p>','',$txt);

	$txt=str_replace('</p>','<br>',$txt);

	return $txt;

}

// تحويل السطور الى فقرات قبل ادخالها لقاعدة البيانات


// تحويل الفقرات لسطور
function database_fix($value){

$value=str_replace("</p><p>", "<br /><br />", nl2br($value));

return 	$value;

}


// فانكشن لازالة المسافات بين النصوص وتحويلها لداش


// تحويل المسافات الى داش فى ال url
function url_dash($value){
$value=trim($value);
$value=str_replace(" ", "-", nl2br($value));

return 	$value;

}

// فانكشن لازالة واستبدال حروف ورموز من النص 

function remove_br_style($value){

	$value=str_replace('&lt;','',$value);

	$value=htmlspecialchars_decode($value);

	$value=str_replace(' dir="RTL"' ,'',$value);

	$value=str_replace('<br />' ,'',$value);

	$value=str_replace('<div>' ,'<p>',$value);

	$value=str_replace('</div>' ,'</p>',$value);

	$value = preg_replace('/(<[^>]+) style=".*?"/i', '$1', $value);



	return $value;

}




// متغيرات مبدئية تترك فارغة كما هى  //

	$title_ar='';                                      	 // عنوان الصفحة خاص بال seo

	$page_name=$url[0];									  // اسم الصفحة
	
	$page_title='';										  //عنوان الصفحة

	$search='';											  //كلمة الSearch

	$comp_id='';                                          //رقم الجمعية

	$service_id='';                                       //رقم الخدمة

	$article_id='';                                       //رقم المقالة

	$service_id='';                                       //رقم الخدمة


	$page_description='';  									// وصف الصفحة

	$page_keywords=''; 										// الكلمات المفتاحية

	$page_image='';  										// الصورة الاساسية للصفحة

	$page_content='';  										// محتوى الصفحة

	$page_images=''; 										// جميع الصور الخاصة بالصحفة الحالية
	
	$page_view=''; 											// عدد المشاهدات

	$page_code=''; 											// الكود ان وجد

	$page_begin=''; 										// تاريخ البدء ان وجد

	$page_finish=''; 										// تاريخ الانتهاء ان وجد

	$page_date='';	 										// تاريخ انشاء الصفحة
	


if( 
     
  $page_name=='uther'){
     
  $page_name='auther';}

if( 
     
  $page_name=='bout'){
     
  $page_name='about';}




// استدعاء ملف الحماية من حقن قاعدة البيانات
include("injection.php");

// استدعاء ملف منع متصفح الانترنت اكسبلوور
include("deny_ie.php");






// التحقق من ان ال id رقم
if(isset($_GET['id']) && !is_numeric($_GET['id'])){echo 'خطأ فى الكود'; die();}



// ضبط اعدادات قاعدة البيانات للغة العربية


//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");

mysqli_query($conn,'SET CHARACTER SET utf8');

mysqli_query($conn,"SET character_set_client=utf8");

mysqli_query($conn,"SET character_set_connection=utf8");

mysqli_query($conn,"SET character_set_database=utf8");

mysqli_query($conn,"SET character_set_results=utf8");

mysqli_query($conn,"SET character_set_server=utf8");

mysqli_query($conn,"set character_set_server='utf8'"); 









// **********************************  فلترة المدخلات  **************************************//



if(isset($_GET['comp_id'])){

	$_GET['comp_id']=filter_var( $_GET['comp_id'], FILTER_SANITIZE_NUMBER_INT ); //رقم الجمعية

}


if(isset($_GET['id'])){

	$_GET['id']=filter_var( urldecode($url[1]), FILTER_SANITIZE_NUMBER_INT ); //رقم الخدمة

}


if(isset($_GET['cat_id'])){

	$_GET['cat_id']=filter_var( urldecode($url[1]), FILTER_SANITIZE_NUMBER_INT ); //رقم الخدمة

}



if(isset($_GET['depart_id'])){

	if($_GET['depart_id'] !='new'){

		$_GET['depart_id']=filter_var( urldecode($url[1]), FILTER_SANITIZE_NUMBER_INT ); //رقم الخدمة

	}

}



if(isset($_GET['cat_id'])){

	$_GET['cat_id']=filter_var( urldecode($url[1]), FILTER_SANITIZE_NUMBER_INT ); //رقم الخدمة

}





//$_SESSION['dark_mode']='true';	
if($_SESSION['dark_mode']!='true'){
	$_SESSION['dark_mode']='false';
}
	//******************************حفظ البيانات الاساسية فى متغيرات سيشنز لعدم الضغط على قاعدة البيانات ********************************************

if( $_SESSION['session_enable']!='1' || !isset($_SESSION['session_enable']) ){

$_SESSION['session_enable']='1';	

$companies_query="select `aya`,`donate`,`slogan`,`title`,`about`,`wedo`,`history`,`mission`,`goal`,`vision`,`impession`,`wedo`,`description`,`why`,`manager`,`manager_word`,`word3` from companies where id=1";


//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");

$companies_result=mysqli_query($conn,$companies_query);	

$companies_fetch=mysqli_fetch_array($companies_result);
	$companies_fetch=clean_array($companies_fetch);




  $_SESSION['comp_slogan'] =$companies_fetch['slogan'];  // الشعار المكتوب

  $_SESSION['comp_title'] =$companies_fetch['title'];  // اسم الجمعية

  $_SESSION['comp_about'] =$companies_fetch['about']; // عن الجمعية

  $_SESSION['comp_wedo'] =$companies_fetch['wedo']; // ماذا نفعل

  $_SESSION['comp_manager'] =$companies_fetch['manager']; // مدير الجمعية

  $_SESSION['comp_manager_word'] =$companies_fetch['manager_word']; // كلمة رئيس مجلس الإدارة

  $_SESSION['comp_aya'] =$companies_fetch['aya']; // اية قرانية او عبارة ملهمة تتكرر فى كل الصفحات

  $_SESSION['comp_donate'] =$companies_fetch['donate']; // رابط التبرع للجمعية
  
  $_SESSION['comp_word3'] =$companies_fetch['word3']; 

  $_SESSION['comp_vision'] =$companies_fetch['vision']; 		// الرؤية

  $_SESSION['comp_history'] =$companies_fetch['history']; 		// تاريخ الجمعية

  $_SESSION['comp_mission'] =$companies_fetch['mission']; 		// الرسالة

  $_SESSION['comp_goal'] =$companies_fetch['goal'];     		// الاهداف

  $_SESSION['comp_impession'] =$companies_fetch['impession']; // الطموحات


  $_SESSION['comp_description'] =$companies_fetch['description']; 	// وصف الجمعية

  $_SESSION['comp_why'] =$companies_fetch['why'];					// لماذا نحن؟





  $companies_contact_query="select `time_from`,`time_to`,`keyword`,`address1`,`address2`,`tel1`,`tel2`,`mobile1`,`mobile2`,`email1`,`email2`,`email3`,`fax`,`map`,`face`,`linkedin`,`twitter`,`instagram`,`snap`,`pinterest`,`youtube`,`google` from companies_contact where id=1";

  $companies_contact_result=mysqli_query($conn,$companies_contact_query);	

  $companies_contact_fetch=mysqli_fetch_array($companies_contact_result);
	$companies_contact_fetch=clean_array($companies_contact_fetch);

  

  
  $_SESSION['time_from'] =$companies_contact_fetch['time_from'];		// تاريخ البدء
  
  $_SESSION['time_to'] =$companies_contact_fetch['time_to'];			// تاريخ الانتهاء
	
  $_SESSION['comp_keywords'] =$companies_contact_fetch['keyword'];		// الكلمات المفتاحية

  $_SESSION['comp_address1'] =$companies_contact_fetch['address1'];		// العنوان الأساسى

  $_SESSION['comp_address2'] =$companies_contact_fetch['address2'];		// عنوان اخر

  $_SESSION['comp_tel1'] =$companies_contact_fetch['tel1'];				// الهاتف1

  $_SESSION['comp_tel2'] =$companies_contact_fetch['tel2'];				// الهاتف2

  $_SESSION['comp_mobile1'] =$companies_contact_fetch['mobile1'];		// جوال1

  $_SESSION['comp_mobile2'] =$companies_contact_fetch['mobile2'];		// جوال2

  $_SESSION['comp_email1'] =$companies_contact_fetch['email1'];			// بريد الكترونى1

  $_SESSION['comp_email2'] =$companies_contact_fetch['email2'];			// بريد الكترونى2

  $_SESSION['comp_email3'] =$companies_contact_fetch['email3'];			// بريد الكترونى3

  $_SESSION['comp_fax'] =$companies_contact_fetch['fax'];				// فاكس
  
  $_SESSION['comp_map'] = decrypt_s($companies_contact_fetch['map']);	// الخريطة
  
  $_SESSION['comp_face'] =$companies_contact_fetch['face'];				// لينك الفيسبوك

  $_SESSION['comp_linkedin'] =$companies_contact_fetch['linkedin'];		// لينك ليندك ان

  $_SESSION['comp_twitter'] =$companies_contact_fetch['twitter'];		// لينك تويتر

  $_SESSION['comp_instagram'] =$companies_contact_fetch['instagram'];	// لينك انسترجرام	

  $_SESSION['comp_pinterest'] =$companies_contact_fetch['pinterest'];	// لينك بينتريست

  $_SESSION['comp_snap'] =$companies_contact_fetch['snap'];				// لينك سنابشات

  $_SESSION['comp_youtube'] =$companies_contact_fetch['youtube'];		// لينك اليوتيوب

  $_SESSION['comp_google'] =$companies_contact_fetch['google'];			// لينك جوجل بلاس




	//استدعاء القوائم من قاعدة البيانات
	$query_menus="select id,title from menus where active=1 order by `sort` asc , `id` asc";
	$result_menus=mysqli_query($conn,$query_menus);
	
	
	$_SESSION['menus']=[];
	$_SESSION["not_menued"]=[];
	
	/*بداية التكرار */  
	while($fetch_menus = mysqli_fetch_array($result_menus)) {
   		 $fetch_menus = clean_array($fetch_menus); $_SESSION['menus'][$fetch_menus['title']]=$fetch_menus['title']; } 
									
	$keys = array_keys($_SESSION['menus']); // نحصل على كل المفاتيح كمصفوفة


	
	//الاستعلام عن عناوين الصفحات المنفردة

	$pages_desc_query="select `id`,`page_name`,`page_title`,`page_description`,`user_create`,`page_meta`,`active`,`menu` ,`not_menued` from pages_desc order by  `menu` asc ,`sort` asc, `id` asc";

	$pages_desc_result=mysqli_query($conn,$pages_desc_query);	



	//ضبط القوائم والصفحات
   /*بداية التكرار */  
 while($pages_desc_fetch = mysqli_fetch_array($pages_desc_result)) {
   		 $pages_desc_fetch = clean_array($pages_desc_fetch);


		$_SESSION["$pages_desc_fetch[page_name]"] = $pages_desc_fetch['page_title'];
		
		$_SESSION['pages_status'][$pages_desc_fetch['page_name']] = $pages_desc_fetch['active'];
		//فى حالة الصفحة داخل قائمة
		if($pages_desc_fetch['menu']!=''){
			$_SESSION["$pages_desc_fetch[menu]"][]="$pages_desc_fetch[page_name],$pages_desc_fetch[page_title],$pages_desc_fetch[user_create]";
			
		}else{
			//فى حالة الصفحة ليست داخل قائمة
	
			
			if($pages_desc_fetch['not_menued']=='0'){
				$_SESSION["not_menued"][$pages_desc_fetch['page_name']]="$pages_desc_fetch[page_name],$pages_desc_fetch[page_title],$pages_desc_fetch[user_create]";

			}
			
		}

	}
	

	//print_r($_SESSION["not_menued"]);


}





if(
     
  $page_name==''){

	
     
  $page_name='index';

}

// **********************************  فلترة المدخلات  **************************************//

// تحديد عنوان الصفحةالغير منفردة 

if(isset($_GET['id']) || isset($_GET['cat_id']) || isset($_GET['depart_id'])){





	$_GET['page_title']=preg_replace("/[^A-Za-z0-9.!? ]/",'', urldecode($url[2]) ); //عنوان الصفحة



}else{

	

	//تحديد عناويين الصفحات المنفردة

	if ( isset($_SESSION["$page_name"]) ){

		if(
     
  $page_name=='index'){


				$_GET['page_title']=$_SESSION["$page_name"] ; //عنوان الصفحة

		}else{

				$_GET['page_title']=$_SESSION["$page_name"] ; //عنوان الصفحة

		}

		

	}else{

		$_GET['page_title']=filter_var( urldecode($url[1]) ); //عنوان الصفحة		

	}



}



if(isset($_GET['search'])){

	$_GET['search']=preg_replace("/[^A-Za-z0-9.!? ]/",'', urldecode($url[1]) ); //كلمة البخث

}











//************************ صفحات عرض جميع محتوى اقسام********************************************



	



//أقسام الخدمات



	
   /*  اسم الجدول وبداية الكويرى */  
  $table='departs_services';

	$services_cat_query="select `id`,`title`,`desc`,`created`,`view`,`images`,`icon`  from departs_services where active=1 order by `priority` desc , `sort` desc , id desc ";

	$services_cat_result=mysqli_query($conn,$services_cat_query);

	

	//echo $services_cat_query;







if(
     
  $page_name=='index' ){

	

		//كويرى السيو

		

		$seo_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc where page_name='$page_name' ";

		$seo_result=mysqli_query($conn,$seo_query);	

		$seo_fetch=mysqli_fetch_array($seo_result);
	$seo_fetch=clean_array($seo_fetch);

		//echo $seo_query;
		
		$title_ar=$seo_fetch['page_title'];
	
		
		
		

		$page_title=$seo_fetch['page_title'];

		$page_desc=$seo_fetch['page_description'];

		$page_keywords=$seo_fetch['page_meta'];

		$page_image=$img_path."pages_desc/img".$seo_fetch['id'].".webp";

		

		

		



}elseif($page_name=='page'){
	
	
	
		//كويرى السيو

		

		$seo_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc where page_name='$_GET[id]' ";
		//echo $seo_query;
		$seo_result=mysqli_query($conn,$seo_query);	

		$seo_fetch=mysqli_fetch_array($seo_result);
	$seo_fetch=clean_array($seo_fetch);

		//echo $seo_query;
		
		$title_ar=$seo_fetch['page_title'];
	
		
		
		

		$page_title=$seo_fetch['page_title'];

		$page_desc=$seo_fetch['page_description'];

		$page_keywords=$seo_fetch['page_meta'];

		$page_image=$img_path."pages_desc/img".$seo_fetch['id'].".webp";

		
	
	
}elseif (
     
  $page_name=='search'){

	



if(isset($_GET['search'])){

	

	// كويرى المحتوى

		$content_query="

		SELECT `id`,`title`,`date`,`writer` ,`table_id`,`images`,`code`  FROM services WHERE ( `desc` LIKE '%".$_GET['search']."%'  or `title` LIKE '%".$_GET['search']."%' ) and active=1  

		order by `date` desc limit  $max_rows

		";

		//فى حالة لا يوجد كويرى السيو
		

		$page_title='بحث - '. $_GET['search'];

		$page_desc='بحث عن- '. $_GET['search'];

		$page_keywords=$_GET['search'];

		$page_image='';

		

}

		

}elseif (

	
     
  $page_name=='services' ||

	
     
  $page_name=='books' ||

	
     
  $page_name=='consultings' ||

	
     
  $page_name=='sessions' ||

	
     
  $page_name=='courses' ||

	
     
  $page_name=='deplomas' ||	

	
     
  $page_name=='whats_new' || 

	
     
  $page_name=='videos' || 

	
     
  $page_name=='news' || 
	
	
     
  $page_name=='projects' || 

	
     
  $page_name=='news_posts' ||

	
     
  $page_name=='services' ||

	
     
  $page_name=='reviews' || 

	
     
  $page_name=='comparisons' || 

	
     
  $page_name=='rules' ||

	
     
  $page_name=='galleries' ||

	
     
  $page_name=='blogs' ||

	
     
  $page_name=='articles_news_posts' 



	

){





	if(
     
  $page_name=='news_posts' ){

		
     
  $page_name='news';

	}else if(
     
  $page_name=='articles_news_posts'){

		
     
  $page_name='articles_news';

	}else if(
     
  $page_name=='whats_new'){

		
     
  $page_name='services';

	}  

	

	

	
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name;







	$main_fields="`id`,`title`,`writer`,`view`,`date`";

	$additional_fields="";	

	$additional_table='';

	$additional_where='';

		



	if(
     
  $page_name=='services'){

		

		$additional_fields="";

	

	}elseif(
     
  $page_name=='courses'){

	

		$additional_fields=",`video`,`reasons`,`instructor`,`code`,`images`,`begin`,`end`,`$price_after`,`$price_before`,`hours`,`place`,`policy`,`days_details`,`course_type`,`before_exper`,`recervation`";

	

	}elseif(
     
  $page_name=='books'){

	

		$additional_fields=",`images`,`code`,`$price_after`,`$price_before`,`publisher_en`,`realize_en`";



	}elseif(
     
  $page_name=='deplomas'){

	

		$additional_fields=",`video`,`reasons`,`instructor`,`code`,`images`,`begin`,`end`,`$price_after`,`$price_before`,`hours`,`place`,`policy`,`days_details`,`course_type`,`before_exper`,`recervation`";

	

	}elseif(
     
  $page_name=='galleries'){

	

		$additional_fields=",`images`";

	

	}elseif(
     
  $page_name=='news'){



		$additional_fields=",`images`";	

	

	}elseif(
     
  $page_name=='projects'){



		$additional_fields=",`images`,`finish_date`,`begin_date`,`code`";	

	

	}elseif(
     
  $page_name=='videos'){



		$additional_fields=",`desc`,`link`";	

	

	}elseif(
     
  $page_name=='blogs'){



		$additional_fields=",`desc`";	

	

	}

	







	if(isset($_GET['depart_id'])){

		

		//لو المحتوى له اقسام متعددة فنجيب المحتوى من جدول اقسام التابع له

		

		// كويرى المحتوى

		



		

		if($_GET['depart_id']=='new'){

			

			$content_query="select $main_fields  $additional_fields from $table where `title` !='' and active=1 order by id desc, priority desc limit 0,$max_rows ";

			

		}elseif($_GET['depart_id']==0){

			

			$content_query="select `id`,`title`,`desc`,`images`,`date`,`view` from departs_"."$table where `title` !='' and active=1  order by id desc, priority desc ";

			

		}else{

			

			$content_query="select $main_fields  $additional_fields from $table where `title` !='' and active=1 and depart=$_GET[depart_id] order by id desc, priority desc limit 0,$max_rows ";



		}



	//كويرى السيو

		

		$seo_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc where page_name='$page_name' ";

		
//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");

		$seo_result=mysqli_query($conn,$seo_query);	

		$seo_fetch=mysqli_fetch_array($seo_result);
	$seo_fetch=clean_array($seo_fetch);

		
		$title_ar=$seo_fetch['page_title'];
	

		$page_title=$seo_fetch['page_title'];

		$page_desc=$seo_fetch['page_description'];

		$page_keywords=$seo_fetch['page_meta'];

		$page_image=$img_path."pages_desc/img".$seo_fetch['id'].".webp";

		


		

	}else{

		//لو الصفحة ليس لها اقسام متعددة فنجيب المحتوى من جدول وصف الصفحات

		

		// كويرى المحتوى



		$content_query="select $main_fields $additional_fields from $table where active=1 order by id desc, priority desc limit 0,$max_rows ";


		//كويرى السيو

		

		$seo_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc where page_name='$page_name' ";

		
//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");

		$seo_result=mysqli_query($conn,$seo_query);	

		$seo_fetch=mysqli_fetch_array($seo_result);
	$seo_fetch=clean_array($seo_fetch);

		
		$title_ar=$seo_fetch['page_title'];

		
		

		$page_title=$seo_fetch['page_title'];

		$page_desc=$seo_fetch['page_description'];

		$page_keywords=$seo_fetch['page_meta'];

		$page_image=$img_path."pages_desc/img".$seo_fetch['id'].".webp";
	

	}

	





	

	



	



//******************************صفحات الموضوع نفسه والذى ليس بشكل مقال********************************************

}elseif (

	
     
  $page_name=='service' ||

	
     
  $page_name=='book' ||

	
     
  $page_name=='course' ||	

	
     
  $page_name=='deploma' ||

	
     
  $page_name=='project' || 
	
	
     
  $page_name=='clients_survie' || 
	
	
     
  $page_name=='employees_survie' || 
	
	
     
  $page_name=='volunteers_survie' || 
	
	
     
  $page_name=='visitors_survie' || 
	
	
     
  $page_name=='video' || 

	
     
  $page_name=='news_article' ||
	
	
     
  $page_name=='gallery' ||

	
     
  $page_name=='auther' ||

	
     
  $page_name=='service' 

){



	if(
     
  $page_name=='news_article' ){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table='news';

	}  elseif( 
     
  $page_name=='gallery'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table='galleries';

	}elseif( 
     
  $page_name=='service'){

			
   /*  اسم الجدول وبداية الكويرى */  
  $table='departs_services';
	}

	else{

		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name.'s';

	}



	$main_fields="`id`,`title`,`desc`,`writer`,`view`,`date`,`seo_desc`,`keywords`,`images`";

	$additional_fields="";	

	





	if(
     
  $page_name=='service'){
	

		$additional_fields="";


	}elseif(
     
  $page_name=='auther'){

		

		$additional_fields=",table1.`code`,table1.`video`,table1.`facebook`,table1.`twitter`,table1.`youtube`,table1.`instagram`,table1.`linkedin`";

	

	}elseif(
     
  $page_name=='book'){

		

		$additional_fields=",authers.title as book_writer,table1.`code`,table1.`$price_before`,table1.`$price_after`,table1.`$shipping`,table1.`video`,table1.`publisher`,table1.`realize`,table1.`printing_date`,table1.`printing_num`,table1.`archive`";

		$additional_table='join authers';

		$additional_where='and authers.id=table1.writer';

	

	}elseif(
     
  $page_name=='deploma'){

	

		$additional_fields=",table1.`course_videos`,table1.`video`,table1.`reasons`,table1.`instructor`,table1.`code`,table1.`begin`,table1.`end`,table1.`$price_before`,table1.`$price_after`,table1.`hours`,table1.`place`,table1.`policy`,table1.`days_details`,table1.`course_type`,table1.`before_exper`,table1.`recervation`,table1.`instructor`";

	}elseif(
     
  $page_name=='course'){

	

		$additional_fields=",table1.`video`,table1.`reasons`,table1.`instructor`,table1.`code`,table1.`begin`,table1.`end`,table1.`$price_before`,table1.`$price_after`,table1.`hours`,table1.`place`,table1.`policy`,table1.`days_details`,table1.`course_type`,table1.`before_exper`,table1.`recervation`,table1.`instructor`";

	

	}elseif(
     
  $page_name=='project'){



		$additional_fields=",`finish_date`,`begin_date`,`code`";		

	

	}elseif(
     
  $page_name=='video'){


		$additional_fields=",`link`";

	

	}

	

	if(
     
  $page_name=='auther'){

		$content_query="SELECT table1.`id`,table1.`depart`, table1.`title`, table1.`desc`, table1.`writer`, table1.`view`, table1.`date`, table1.`keywords`, table1.`seo_desc`,table1.`images`

		$additional_fields 

		FROM

		$table as table1  $additional_table 

		where 

		table1.active=1 and table1.id=$_GET[id] $additional_where

		order by 

		table1.id desc , table1.priority desc";		

	}if(
     
  $page_name=='service'){

		$content_query="select *from departs_services where id=$_GET[id] and active=1 ";		

	}elseif(
     
  $page_name=='news_article'){

		$content_query="select * from news where id=$_GET[id] and active=1";		

	}elseif(
     
  $page_name=='gallery'){

		$content_query="select * from galleries where id=$_GET[id] and active=1";		

	}elseif(
     
  $page_name=='project'){

		$content_query="select * from projects where id=$_GET[id] and active=1";		

	}elseif(
     
  $page_name=='clients_survie'){

		$content_query="SELECT polls_questions.id as question_id,polls_questions.title,polls_questions.option1,polls_questions.option2,polls_questions.option3,polls_questions.option4,polls_questions.option5,polls.title as poll_title ,polls.id as poll_id,polls.title as `desc`,polls.title as seo_desc,polls.title as keywords,polls.view as view FROM `polls_questions` join polls on polls.id=polls_questions.poll_id and polls_questions.poll_id=$_GET[id] and polls_questions.active=1 and polls.active=1 order by polls_questions.`priority` desc , polls_questions.`sort` asc , polls_questions.id asc;";		
		$table='polls';
	}elseif(
     
  $page_name=='employees_survie'){

		$content_query="SELECT polls_questions.id as question_id,polls_questions.title,polls_questions.option1,polls_questions.option2,polls_questions.option3,polls_questions.option4,polls_questions.option5,polls.title as poll_title ,polls.id as poll_id,polls.title as `desc`,polls.title as seo_desc,polls.title as keywords,polls.view as view FROM `polls_questions` join polls on polls.id=polls_questions.poll_id and polls_questions.poll_id=$_GET[id] and polls_questions.active=1 and polls.active=1 order by polls_questions.`priority` desc , polls_questions.`sort` asc , polls_questions.id asc;";		
		$table='polls';
	}elseif(
     
  $page_name=='visitors_survie'){

		$content_query="SELECT polls_questions.id as question_id,polls_questions.title,polls_questions.option1,polls_questions.option2,polls_questions.option3,polls_questions.option4,polls_questions.option5,polls.title as poll_title ,polls.id as poll_id,polls.title as `desc`,polls.title as seo_desc,polls.title as keywords,polls.view as view FROM `polls_questions` join polls on polls.id=polls_questions.poll_id and polls_questions.poll_id=$_GET[id] and polls_questions.active=1 and polls.active=1 order by polls_questions.`priority` desc , polls_questions.`sort` asc , polls_questions.id asc;";		
		$table='polls';
	}elseif(
     
  $page_name=='volunteers_survie'){

		$content_query="SELECT polls_questions.id as question_id,polls_questions.title,polls_questions.option1,polls_questions.option2,polls_questions.option3,polls_questions.option4,polls_questions.option5,polls.title as poll_title ,polls.id as poll_id,polls.title as `desc`,polls.title as seo_desc,polls.title as keywords,polls.view as view FROM `polls_questions` join polls on polls.id=polls_questions.poll_id and polls_questions.poll_id=$_GET[id] and polls_questions.active=1 and polls.active=1 order by polls_questions.`priority` desc , polls_questions.`sort` asc , polls_questions.id asc;";		
		$table='polls';
	}elseif(
     
  $page_name=='video'){

		$content_query="select * from videos where id=$_GET[id] and active=1";		

	}else{

		$content_query="SELECT table1.`id`,table1.`depart`, table1.`title`, table1.`desc`, table1.`writer`, table1.`view`, table1.`date`, table1.`keywords`, table1.`seo_desc`,table1.`images`

		$additional_fields , table2.title as depart_title 

		FROM

		$table as table1 join departs_"."$table as table2 $additional_table 

		where 

		table1.depart=table2.id and table1.active=1 and table1.id=$_GET[id] $additional_where

		order by 

		table1.id desc , table1.priority desc";

		

	}

	

	$content_result=mysqli_query($conn,$content_query);


	$content_fetch=mysqli_fetch_array($content_result);
	$content_fetch=clean_array($content_fetch);

	$content_num=mysqli_num_rows($content_result);

	$title_ar=$content_fetch['title'];
	
	

	if(	$content_num==1){

	

	//مسار رفع الملفات والصورة من اليوتيوب

	
	$current_image='';
	$page_image='';
	if($page_name!='video'){
		
     
  
   /*استخراج جميع الصور*/  
  @$current_image=explode(",",$content_fetch['images']);
		@$page_image=$img_path.$current_image[1];
	}else{
		$video_image=explode("v=",$content_fetch['link']);
		$current_image="https://img.youtube.com/vi/$video_image[1]/0.jpg";
		$page_image=$current_image;
	}


	//تحميل بيانات الصفحة فى المتغيرات 
	$page_title=$content_fetch['title'];

	$page_desc=$content_fetch['seo_desc'];

	$page_keywords=$content_fetch['keywords'];

	

	$page_content=$content_fetch['desc'];

	@$page_images=$content_fetch['images'];

	$page_view=$content_fetch['view'];

	@$page_date=$content_fetch['date'];

	@$page_writer=$content_fetch['writer'];

	@$page_price_before=$content_fetch["$price_before"];

	@$page_price_after=$content_fetch["$price_after"];

	@$page_shipping=$content_fetch["$shipping"];

	

	

	if($additional_fields!=''){
		
		$additional_fields=trim($additional_fields,',');
		$additional_fields=explode(',',$additional_fields);
	
		foreach ($additional_fields as &$value) {

			$value=str_replace('`','',$value);

			$value=str_replace('table1.','',$value);

			${'page_'.$value}=$content_fetch["$value"];


		}
	}

	

	



	

	//اضافة مشاهدة جديدة للصفحة الحالية
	include 'add_view.php'; 

	}

	

	

}elseif (

//******************************صفحات الموضوع نفسه والذى بشكل مقال********************************************

	
     
  $page_name=='review' || 

	
     
  $page_name=='comparison' || 

	
     
  $page_name=='rule' ||

	
     
  $page_name=='blog' ||

	
     
  $page_name=='articles_news' 

	

){

	

	$additional_fields="";

	

	if( 
     
  $page_name=='articles_news'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name;

	}else{

		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name.'s';

	}





	

	if (
     
  $page_name=='review' ){

	//فى حالة الصفحة مرتبطة بقسم

	

		$content_query="SELECT table1.`id`,table1.`depart`, table1.`title`, table1.`desc`, table1.`writer`, table1.`view`, table1.`date`, table1.`keywords`, table1.`seo_desc`,table1.`table_id` $additional_fields ,table2.title as depart_title 

		FROM

		$table as table1 join departs_"."$table as table2 

		where 

		table1.depart=table2.id and table1.active=1 and table1.id=$_GET[id] 

		order by 

		table1.id desc , table1.priority desc";

	}else{

	//فى حالة الصفحة غير مرتبطة بقسم

		

		$content_query="SELECT `id`,`depart`, `title`,`desc`, `writer`,`view`,`date`, `keywords`, `seo_desc`,`table_id` $additional_fields FROM $table where active=1 and id=$_GET[id] order by id desc ,priority desc";

	}

	

	

	$content_result=mysqli_query($conn,$content_query);	

	$content_fetch=mysqli_fetch_array($content_result);
	$content_fetch=clean_array($content_fetch);

	//مسار رفع الملفات والصورة	

	

	$title_ar=$content_fetch['title'];
	
	
	//تحميل بيانات الصفحة فى المتغيرات 
	$page_title=$content_fetch['title'];

	$page_desc=$content_fetch['seo_desc'];

	$page_keywords=$content_fetch['keywords'];

	$page_image=$img_path.$content_fetch['id'].".webp";

	$page_content=$content_fetch['desc'];

	$page_view=$content_fetch['view'];

	$page_writer=$content_fetch['writer'];

	$page_date=$content_fetch['date'];

	if(isset($content_fetch['images'])){

		$page_images=$content_fetch['images'];

	}

	

	//اضافة مشاهدة جديدة للصفحة الحالية
	 include 'add_view.php'; 

	

}elseif (

//******************************معاينة صفحات الموضوع نفسه والذى بشكل مقال********************************************

	
     
  $page_name=='review_preview' || 

	
     
  $page_name=='comparison_preview' || 

	
     
  $page_name=='rule_preview' ||

	
     
  $page_name=='articles_news_preview' 

	

){

	

	if( 
     
  $page_name=='review_preview'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table="reviews";

	}else if(
     
  $page_name=='comparison_preview'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table="comparisons";

	}else if(
     
  $page_name=='rule_preview'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table="rules";

	}else if(
     
  $page_name=='articles_news_preview'){

		
   /*  اسم الجدول وبداية الكويرى */  
  $table="articles_news";

	}

	

	

	if (
     
  $page_name=='review' ){

	//فى حالة الصفحة مرتبطة بقسم

	

		$content_query="SELECT table1.`id`,table1.`depart`, table1.`title`, table1.`desc`, table1.`writer`, table1.`view`, table1.`date`, table1.`keywords`, table1.`seo_desc`,table1.`table_id`,table2.title as depart_title 

		FROM

		$table as table1 join departs_"."$table as table2 

		where 

		table1.depart=table2.id and table1.active=1 and table1.id=$_GET[id] 

		order by 

		table1.id desc , table1.priority desc";

	}else{

	//فى حالة الصفحة غير مرتبطة بقسم

		

		$content_query="SELECT `id`,`depart`, `title`, `desc`, `writer`,`view`,`date`, `keywords`, `seo_desc`,`table_id` FROM $table where active=1 and id=$_GET[id] order by id desc ,priority desc";

	}







	$content_result=mysqli_query($conn,$content_query);	

	$content_fetch=mysqli_fetch_array($content_result);
	$content_fetch=clean_array($content_fetch);


	//مسار رفع الملفات والصورة	

	

	
	//تحميل بيانات الصفحة فى المتغيرات 
	$page_title=$content_fetch['title'];

	$page_desc=$content_fetch['seo_desc'];

	$page_keywords=$content_fetch['keywords'];

	$page_image=$img_path.$content_fetch['id'].".webp";

	$page_content=$content_fetch['desc'];

	$page_view=$content_fetch['view'];

	$page_writer=$content_fetch['writer'];

	$page_date=$content_fetch['date'];

	

	

	//اضافة مشاهدة جديدة للصفحة الحالية
	include 'add_view.php'; 

	

}else{

	

	//******************************صفحات ليس لها اقسام تابعة لها او انها ليست دايناميك********************************************

	

	$seo_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc where page_name='$page_name' ";

	$seo_result=mysqli_query($conn,$seo_query);	

	$seo_fetch=mysqli_fetch_array($seo_result);
	$seo_fetch=clean_array($seo_fetch);


	
	
		
		

	$page_title=$seo_fetch['page_title'];

	$page_desc=$seo_fetch['page_description'];

	$page_keywords=$seo_fetch['page_meta'];

	$page_image=$img_path.'pages_desc/img'.$seo_fetch['id'].'.webp';



		

	if(mysqli_num_rows($seo_result)!=1){

		

	}

	

}




$page_title= urldecode(str_replace('-',' ',$page_title))  ;

$page_title_with_company_name= $_SESSION['comp_title'] .' - ' . urldecode(str_replace('-',' ',$page_title))  ;








//عدم تغيير التايتل فى ال url


$href_lang_ar=substr($actual_link, 0, strrpos( $actual_link, '/')).'/'.url_dash($title_ar);
if($page_name!='' && $page_name!='index'){$actual_link=substr($actual_link, 0, strrpos( $actual_link, '/'));}
$href_lang_en=str_replace('/ar','',$actual_link);







?>
<!DOCTYPE html>
<html lang="ar" dir="rtl" id='document'>



<head>

	<base href="<?php echo $website_url; ?>/" />

	<meta charset="utf-8">
	<meta http-equiv='content-Type' content='text/html; charset=UTF-8'/>
	<meta content='width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=5' name='viewport'/> 
    <link rel="icon" href="<?php echo $img_path; ?>icon.png">
	
	
	<?php //****************************** ميتا تاجس لجوجل والفيس وتويتر .. مفيدة عند مشاركة الصفحات على مواقع التواصل ********************************************?>

	
	
			<meta name="keywords" content="<?php echo $page_keywords ?>">
			
			<meta name="description" content="<?php echo strip_tags($page_desc); ?>">
			
			<meta name="application-name" content="<?php echo  $_SESSION['comp_title'] ?>">	
			
			<meta name="theme-color" content="#dde1e4">
			
			<link rel="canonical" href="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>">

			<title><?php echo $page_title_with_company_name; ?></title>

            <!-- Facebook Card -->

            <meta property="og:type" content="article">

            <meta property="og:title" content="<?php echo $page_title_with_company_name ?>">

            <meta property="og:url" content="<?php echo $website_url.urldecode($_SERVER['REQUEST_URI']);?>">

            <meta property="og:image" content="<?php echo $website_url; ?>/<?php echo $page_image ?>">

            <meta property="og:site_name" content="<?php echo  $_SESSION['comp_title'] ?>">

            <meta property="og:description" content="<?php echo strip_tags($page_desc); ?>">

            <!-- /Facebook Card -->



            <!-- Twitter Card -->

            <meta name="twitter:card" content="summary_large_image">

            <meta name="twitter:site" content="<?php echo $_SESSION['comp_title']; ?>">

            <meta name="twitter:title" content="<?php echo $page_title_with_company_name ?>">

            <meta name="twitter:description" content="<?php echo strip_tags($page_desc); ?>">

            <meta name="twitter:image" content="<?php echo $website_url; ?>/<?php echo $page_image ?>">

			<!-- Twitter Card -->

			


	<?php if(
     
  $page_name=='' || 
     
  $page_name=='index'){?>
		<link rel='alternate' href='<?php echo $website_url; ?>/' hreflang='ar' />

	<?php }else { ?>
		
		<?php if($title_ar!=''){?><link rel='alternate' href='<?php echo $href_lang_ar; ?>' hreflang='ar' /><?php }?>


	<?php } ?>	

	
	<?php //****************************** تحميل اصدار معين من الجى كويرى فى صفحات الخدمات ********************************************?>

	
	<?php if($page_name!='service'){ ?>
		

		<script  src="js/jquery3.7.1.js"></script>

  
		
		
		
	<?php } ?>	

	<?php if($page_name!='index' || $page_name!=''){ ?>
		<script  src="js/owl.carousel.min.js"></script>
	<?php } ?>	
	
	
	
	
	
	
    
	<?php if(
     
  $page_name=='index'){?>
		<script type="application/ld+json">
			{
			  "@context": "https://schema.org",
			  "@type": "Organization",
			  "name": "<?php echo $_SESSION['comp_title']; ?>",
			  "url": "<?php echo $website_url; ?>",
			  "logo": "<?php echo $website_url; ?>/<?php echo $img_path; ?>logo_ar.webp",
			  "sameAs": [
				"https://www.facebook.com/premium.pets.store.eg",
				"<?php echo $website_url; ?>"
			  ]
			}
		</script>
		
		
	<?php }?>
	
	<?php //****************************** وضع اسكيما مخصصة لصفحات الأخبار .. مفيدة لجوجل ********************************************?>

	<?php if(
     
  $page_name=='blog'){?>
	

		<script type="application/ld+json">
		{
		  "@context": "https://schema.org/",
		  "@type": "Person",
		  "name": "Mohamed Sami",
		  "url": "<?php echo $website_url; ?>/auther.php",
		  "image": "<?php echo $website_url; ?>/<?php echo $img_path; ?>auther.webp",
		  "jobTitle": "auther",
		  "worksFor": {
			"@type": "Organization",
			"name": "<?php echo $_SESSION['comp_title']; ?>"
		  }  
		}
		</script>
	
		<script type="application/ld+json">
		{
		  "@context": "https://schema.org/", 
		  "@type": "BreadcrumbList", 
		  "itemListElement": [{
			"@type": "ListItem", 
			"position": 1, 
			"name": "services",
			"item": "<?php echo $website_url; ?>/blogs/0/Blogs"  
		  },{
			"@type": "ListItem", 
			"position": 2, 
			"name": "service_name",
			"item": "<?php echo $website_url; ?>/blog/<?php echo $current_id; ?>/<?php echo $title_ar; ?>"  
		  }]
		}
		</script>
		
		
		<script type="application/ld+json">
			{
			  "@context": "https://schema.org",
			  "@type": "BlogPosting",
			  "mainEntityOfPage": {
				"@type": "WebPage",
				"@id": "<?php echo $website_url; ?>"
			  },
			  "headline": "<?php echo $title_ar; ?>",
			  "description": "<?php echo strip_tags($page_content); ?>",
			  "image": "<?php echo $website_url; ?>/<?php echo $img_path; ?>logo.webp",  
			  "author": {
				"@type": "Person",
				"name": "Mohamed Sami",
				"url": "<?php echo $website_url; ?>/auther.php"
			  },  
			  "publisher": {
				"@type": "Organization",
				"name": "<?php echo $_SESSION['comp_title']; ?>",
				"logo": {
				  "@type": "ImageObject",
				  "url": "<?php echo $website_url; ?>/<?php echo $img_path; ?>logo_ar.webp"
				}
			  },
			  "datePublished": ""
			}
		</script>

		
		
	<?php }?>
	
	
		<?php if(
     
  $page_name=='service'){?>
		
		<script type="application/ld+json">
		{
		  "@context": "https://schema.org/",
		  "@type": "service",
		   "name": "<?php echo $title_ar; ?>",
			  "description": "<?php echo strip_tags($page_content); ?>",
		  "image": [
			<?php for($i=1;$i<count($current_image);$i++){ ?>
		    "<?php echo $website_url ;?>/<?php echo $img_path; ?><?php $current_image_explode=explode('.',$current_image[$i]);echo $current_image_explode[0].'.webp'; ?>",
			<?php }?>
		   ],
		  "review": {
			"@type": "Review",
			"reviewRating": {
			  "@type": "Rating",
			  "ratingValue": 4.9,
			  "bestRating": 5
			}
		  },
		  "brand": {
				"@type": "Brand",
				"name": "<?php echo $_SESSION['comp_title']; ?>"
			},
		  "aggregateRating": {
			"@type": "AggregateRating",
			"ratingValue": 4.9,
			"reviewCount": 10000
		  },
		  "offers": {
			"@type": "Offer",
			"url": "<?php echo 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>",
			"priceCurrency": "EGP",
			"price": <?php echo $price_after;?>,
			"priceValidUntil": "2050-11-20",
			"itemCondition": "https://schema.org/UsedCondition",
			"availability": "https://schema.org/InStock"
		  }
		}
		</script>
	
	
		<script type="application/ld+json">
		{
		  "@context": "https://schema.org/", 
		  "@type": "BreadcrumbList", 
		  "itemListElement": [{
			"@type": "ListItem", 
			"position": 1, 
			"name": "services",
			"item": "<?php echo $website_url; ?>/it/services/0/services"  
		  },{
			"@type": "ListItem", 
			"position": 2, 
			"name": "service_name",
			"item": "<?php echo 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>",
		  }]
		}
		</script>
		
		


		
	<?php }?>
	

	
<?php //****************************** تحميل ملفات css ********************************************?>

	    <!-- owl carousel CSS -->
    <link type="text/css" rel="stylesheet" href="css/owl.carousel.min.css">


	<!-- Bootstrap CSS -->

    <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">

    <!-- animate CSS -->
	
	<link type="text/css" rel="stylesheet" href="css/jquery-ui.css">

    <link type="text/css" rel="stylesheet" href="css/animate.css">
	

    <!-- font awesome CSS -->

	<link type="text/css" rel="stylesheet" href="css/line-awesome.min.css" >


    <!-- style CSS -->

    <link type="text/css" rel="stylesheet" href="css/style.css">
	<link type="text/css" rel="stylesheet" href="css/light_vars.css">




	







</head>









<body class="full-page" >





<div id="to_top"><span class="fa las la-angle-right"></span> </div>



<?php if(!isset($_SESSION['first_time_ar'])){ 


// now try it
$ua=getBrowser();
$browser_name=  $ua['name'] ;
$browser_virsion=$ua['version'] ;
$browser_platform=$ua['platform'] ;
$browser_agent= $ua['userAgent'];


if ($browser_name=='Apple Safari'){

		

	}else{

		

	}
	$_SESSION['first_time_ar']='done';
}

?>





<main>

<div id='smoothing' class='smoothing_content'>  

  

  

 

 

						<div class="overload_back" style="top:0px;width: 100%; height: 100vh; background:rgba(0, 0, 0, 0.9); position: fixed; z-index: 2147483647; display: none;"></div>

						

						<div class="success_message" style="border:solid 2px #ffc107;display:none;max-width:500px;max-height:300px;text-align:center;padding:20px;overflow-y:auto;width: 90%;height: 90%;background:#130d10;position: fixed;right: 0px;bottom: 0;z-index: 10000000000;top: 50%;left: 50%;margin-right: auto;transform: translate(-50%, -50%);">

									

									<div style="color:var(--white);text-align: center;font-size: 22px;border-bottom: solid 1px #fff;display: inline-block;margin: 0 auto;padding: 10px;margin-bottom:15px;">اجراء طلب</div>

									<br>

									<br>

									<div style="font-family:arial;color:var(--white);font-size: 18px;line-height:22px;display: inline-block;margin: 0 auto;padding: 10px;margin-bottom:15px;text-align:right;">تم إرسال طلبك بنجاح<br> سنقوم بمراجعته وسوف نتواصل معكم فى اقرب وقت</div>

									<br>

									<button class='btn_4 success_message_btn'>موافق</button>

						  </div>

						  

						

					

					 			

					

					

					







		<header>




		<?php //****************************** القائمة الجانبية ********************************************?>


			<div class="main_menu2"	>			

				

				<div class='offcanvas-overlay'></div>

								

				<div class="off-canven-menu">

									<span class="close-icon">

										<i class="las la-times"></i>

									</span>

									<div class="canven-menu-warp">

										<div class="canven-menu-iner">

									
											<?php include 'menu_side.php' ;?>	  

										</div>

									</div>

								</div>

				

			</div>				

									

									

									

									

			<div class="main_menu home_menu absolute_menu animated">


					<div class="row align-items-center" style='position:relative; margin:0px auto -20px auto; max-width:1200px;'>

						<div class="col-lg-12 p-0" >


								<div class="logo">

									<a  style='float:right;margin-left:20px;margin-right:20px;' rel='nofollow'  class='inactive' href="<?php echo $website_url ;?>/"><img  <?php echo $_SESSION['comp_title'].' - الشعار' ?> src="<?php echo $img_path; ?>logo.webp" height="60" alt="#"></a>

								</div>

		

								

								<div class='bottom_bar' >

										
										<?php //****************************** القائمة العلوية ********************************************?>
										
										<?php include 'menu_top.php';?>
								</div>

								<!-- end slide menu -->	

						</div>

					</div>

					

					


				

						

			

					

					

				

			</div>

	

		




			

		</header>

    <!-- Header part end-->

	

	

	

		<?php //******************************ديف شفاف فوق الجميع********************************************?>


	<div class="sp-modal_overlay" ></div>

	



