<?php
session_start();
//session_destroy();
mb_internal_encoding('UTF-8');

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

if (!isset($SESSION['visitor_ip'])){
include "visitor_ip.php";
$_SESSION['visitor_ip'] =ip_info("Visitor", "Country");
}
   
//echo 'session='.$_SESSION['visitor_ip'];

//ألاسعار المختلفة حسب البلد
$price_before='price_before';
$price_after='price_after';
$shipping='shipping';
$currency='جنيه';

if($_SESSION['visitor_ip']!='Egypt'){
$price_after='price_after_out'	;
$price_before='price_before_out';
$shipping='shipping_out';
$currency='دولار';
}


$_SESSION['comp_mobile_payment']='01033227230';
$colors='0';
$dimintions='0';
$shipping_fixed_value=50;
$cod_price='100';

// فى حالة كل قطعة ليها سعر الشحن الخاص بيها
$_SESSION['shipping_type']='1';

//فى حالة سعر الشحن ثابت لاى عدد لنفس الخدمة
//$_SESSION['shipping_type']='2';

// فى حالة سعر ثابت لاى عدد من اى خدمة
//$_SESSION['shipping_type']='0';


	
echo "<script>shipping_fixed_value='$shipping_fixed_value';</script>";
echo "<script>shipping_type='$_SESSION[shipping_type]';</script>";






function replace_p($txt){
	
	$txt=str_replace('<p>','',$txt);
	$txt=str_replace('</p>','<br>',$txt);
	return $txt;
}


$domain = "gamaia";  //اسم الداتابيس 

//$website_url = "http://localhost/gamaia/ar";	 //مسار الموقع
//$domain_url = "http://localhost/gamaia";	 //الدومين
$website_url = "http://localhost/gamaia";	 //مسار الموقع
$domain_url = "http://localhost/gamaia";	 //الدومين

//$server_url="http://localhost/$domain/ar/";
$server_url="/";

//دومين الجمعية  
if(!isset($_SESSION[$domain.'cart'])){
$_SESSION[$domain.'cart']=[];	
}

if (empty($_SESSION['token'])){ 
 
 $_SESSION['token']=bin2hex(random_bytes(32)); 
 //echo $_SESSION['token'];
 
 }



  //if (substr_count($_SERVER[‘HTTP_ACCEPTCODING’], ‘gzip’))
  //ob_start(“ob_gzhandler”);
  //else ob_start();









if($server_url=='/'){
		
	$currnet_src='/';
	$currnet_src_pure=ltrim($_SERVER['REQUEST_URI'], "ar/");
	$url = explode($currnet_src, $currnet_src_pure);
	
}else{
	
	$currnet_src="/$domain/ar/";
	$currnet_src_pure=explode($currnet_src,$_SERVER['REQUEST_URI']);
	$url = explode('/', $currnet_src_pure[1]);

}






//print_r($url);







$_SESSION['comp_title']='بريميم للطاقة الحيوية'; 			  //اسم الجمعية   

     
  $page_name=$url[0];									  //اسم الصفحة
$page_title='';										  //عنوان الصفحة
$search='';											  //كلمة الSearch
$comp_id='';                                          //رقم الجمعية
$product_id='';                                       //رقم الخدمة
$article_id='';                                       //رقم المقالة
$service_id='';                                       //رقم الخدمة
$max_con=10;                                          //عدد خانات الارقام
$max_rows=24;										  //عدد الblogs المعروضة
$num=0;

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


include 'minifi.php';

/* ********************* نوع الجهاز المتصل ***************************** */

require_once 'mobile_detect.php';
$detect = new Mobile_Detect;
$device_type='';
$system_type='';
 
// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {
 $device_type='mobile';
}
 
// Any tablet device.
if( $detect->isTablet() ){
	 $device_type='tablet';
 
}
 

 
// Check for a specific platform with the help of the magic methods:
if( $detect->isiOS() ){
 $system_type='ios';
}
 
if( $detect->isAndroidOS() ){
   $system_type='android';
}


/* ********************* نوع الجهاز المتصل ***************************** */



// تحويل الفقرات لسطور
function database_fix($value){
$value=str_replace("</p><p>", "<br /><br />", nl2br($value));
return 	$value;
}


// تحويل المسافات الى داش فى ال url
function url_dash($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;
}








include("injection.php");
include("deny_ie.php");



//ضمان توافق قاعدة البيانات مع اللغة العربية
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 ); //رقم الخدمة
}


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

if(!isset($_SESSION["index"])){
	$pages_desc_query="select `id`,`page_name`,`page_title`,`page_description`,`page_meta` from pages_desc";
	$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'];

	}


}


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'){

		echo"
			<style>
				.main_menu{
					padding: 15px 0px 15px 0px;
				}
			</style>";	
			$_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]) ); //كلمة البخث
	//$_GET['search_type']=preg_replace("/[^A-Za-z0-9.!? ]/",'', urldecode($url[2]) ); //نوع البحث
}


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



	$page_title='';
	$page_description='';
	$page_keywords='';
	$page_image='';
	$page_content='';
	$page_images='';
	$page_view='';
	$page_code='';
	$page_begin='';
	$page_finish='';
	$page_date='';	

	//echo $page_name;
	


//************************ صفحات عرض جميع محتوى اقسام********************************************
	//echo 'page_name='. $page_name;
	

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

	
   /*  اسم الجدول وبداية الكويرى */  
  $table='departs_services';
	$services_cat_query="select `id`,`title`,`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;






//echo  $page_name
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;
		$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=='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=",`images`,`code`,`$price_before`,`$price_after`";
	
	}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`,`finish_date`,`begin_date`,`code`";	
	
	}elseif(
     
  $page_name=='videos'){

		$additional_fields=",`link`";	
	
	}elseif(
     
  $page_name=='blogs'){

		$additional_fields=",`desc`";	
	
	}
	



	if(isset($_GET['depart_id'])){
		
		//لو المحتوى له اقسام متعددة فنجيب المحتوى من جدول اقسام التابع له
		
		// كويرى المحتوى
		
		//echo 'depart_id='.$_GET['depart_id'];
		
		if($_GET['depart_id']=='new'){
			
			$content_query="select $main_fields  $additional_fields from $table where 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 active=1 order by id desc, priority desc ";
			
		}else{
			
			$content_query="select $main_fields  $additional_fields from $table where 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);
		
		$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";
		
		
		//echo "ss=" . $seo_query;
		
	}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);
		
		$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";
		//echo "ss=" .$seo_query;
	
	}
	


	
	

	

//******************************صفحات الموضوع نفسه والذى ليس بشكل مقال********************************************
}elseif (
	
     
  $page_name=='product' ||
	
     
  $page_name=='book' ||
	
     
  $page_name=='course' ||	
	
     
  $page_name=='deploma' ||
	
     
  $page_name=='project' || 
	
     
  $page_name=='news' ||
	
     
  $page_name=='auther' ||
	
     
  $page_name=='service' 
){

	if(
     
  $page_name=='news' ){
		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name;
	}  elseif( 
     
  $page_name=='gallery'){
		
   /*  اسم الجدول وبداية الكويرى */  
  $table='galleries';
	}else{
		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name.'s';
	}

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


	if(
     
  $page_name=='product'){
		
		$additional_fields=",table1.`code`,table1.`$price_before`,table1.`$price_after`,table1.`$shipping`,table1.`video`,table1.`colors`,table1.`dimintions`,table1.`trademark`,table1.`material`,table1.`active`";
	
		$additional_table='join departs_services';
		$additional_where='and departs_services.id=table1.depart';
		
		
	}elseif(
     
  $page_name=='auther'){
		
		$additional_fields=",table1.`title_en`,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=='gallery'){
	
		$additional_fields="";
	
	}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";		
	}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);
		
		
	if(	$content_num==1){
	
	//مسار رفع الملفات والصورة	
	
	
     
  
   /*استخراج جميع الصور*/  
  @$current_image=explode(",",$content_fetch['images']);
	//echo $content_fetch['images'];
	
	$page_title=$content_fetch['title'];
	$page_desc=$content_fetch['seo_desc'];
	$page_keywords=$content_fetch['keywords'];
	@$page_image=$img_path.$current_image[1];
	$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"];
	
	
	$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"];
		//echo $value;
	}
	
	//$page_price=$content_fetch['price'];
	//$page_code=$content_fetch['code'];
	//$page_begin=$content_fetch['begin_date'];
	//$page_finish=$content_fetch['finish_date'];
	
	

	
	//اضافة مشاهدة جديدة للصفحة الحالية
	include 'add_view.php'; 
	}
	
	
}elseif (
//******************************صفحات الموضوع نفسه والذى بشكل مقال********************************************
	
     
  $page_name=='review' || 
	
     
  $page_name=='comparison' || 
	
     
  $page_name=='rule' ||
	
     
  $page_name=='blog' ||
	
     
  $page_name=='articles_news' ||
	
     
  $page_name=='video' 
	
){
	
	$additional_fields="";
	
	if( 
     
  $page_name=='articles_news'){
		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name;
	}else{
		
   /*  اسم الجدول وبداية الكويرى */  
  $table=$page_name.'s';
	}

	if( 
     
  $page_name=='video'){
		$additional_fields=",`link`";	
	}
	
	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);
	//مسار رفع الملفات والصورة	
	
	
	$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);
	//echo $seo_query;
	$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){
	
}
	
}










//echo $seo_query;

	

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

	


if( !isset($_SESSION['comp_title']) ){
	
$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);

//echo $companies_query;
  $_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_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_wedo'] =$companies_fetch['wedo'];
  $_SESSION['comp_description'] =$companies_fetch['description'];
  $_SESSION['comp_why'] =$companies_fetch['why'];

  
  
  
  
  $companies_contact_query="select `keyword`,`address1`,`address2`,`tel1`,`tel2`,`mobile1`,`mobile2`,`email1`,`email2`,`email3`,`fax`,`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);
  
 // echo $companies_contact_query;
  
  $_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'];
  $_SESSION['comp_tel2'] =$companies_contact_fetch['tel2'];
  $_SESSION['comp_mobile1'] =$companies_contact_fetch['mobile1'];
  $_SESSION['comp_mobile2'] =$companies_contact_fetch['mobile2'];
  $_SESSION['comp_email1'] =$companies_contact_fetch['email1'];
  $_SESSION['comp_email2'] =$companies_contact_fetch['email2'];
  $_SESSION['comp_email3'] =$companies_contact_fetch['email3'];
  $_SESSION['comp_fax'] =$companies_contact_fetch['fax'];
  $_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'];
  
}






?>


<html lang="en" dir="ltr" id='document' style='overflow-x:hidden'>

<head>
	<base href="<?php echo $server_url; ?>" />
	<meta charset="utf-8">
	<meta http-equiv='content-Type' content='text/html; charset=UTF-8'/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0 , shrink-to-fit=no">
	<meta name="theme-color" content="#dde1e4">
	<meta name="google-site-verification" content="XLGNsAhBNPgJ0jmdpkxwRcBWjn4yn7bne6bX6D41wmg" />
	
	
	
		
	
    <!-- Required meta tags -->
		
			<title><?php echo $page_title_with_company_name; ?></title>
			

			<meta name="keywords" content="<?php echo $page_keywords ?>">
			<meta name="description" content="<?php echo $page_desc ?>">
			<meta name="application-name" content="<?php echo  $_SESSION['comp_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 $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 $page_desc ?>">
            <meta name="twitter:image" content="<?php echo $website_url; ?>/<?php echo $page_image ?>">
			<!-- Twitter Card -->
			
   
	
	
	
	
	
	
	
	
	
    <link rel="icon" href="<?php echo $img_path; ?>icon.webp">
	
    
	
	
	<link type="text/css" rel="stylesheet" href="css/jquery-ui.css">
	<!-- Bootstrap CSS -->
    <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
    <!-- animate CSS -->
    <link type="text/css" rel="stylesheet" href="css/animate.css">
    <!-- owl carousel CSS -->
    <link type="text/css" rel="stylesheet" href="css/owl.carousel.min.css">
    <!-- flaticon CSS -->
    <link type="text/css" rel="stylesheet" href="css/flaticon.css">
    <!-- font awesome CSS -->
    <link type="text/css" rel="stylesheet" href="css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="css/magnific-popup.css">
    <!-- swiper CSS -->
    <link type="text/css" rel="stylesheet" href="css/slick.css">
    <link type="text/css" rel="stylesheet" href="css/gijgo.min.css">
    <link type="text/css" rel="stylesheet" href="css/nice-select.css">
	<link type='text/css' rel='stylesheet' href='css/line-icons.css'>

	
	
    <!-- style CSS -->
    <link type="text/css" rel="stylesheet" href="css/style_ar.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'])){ ?>

<script>
	var standalone = window.navigator.standalone,
    userAgent = window.navigator.userAgent.toLowerCase(),
    safari = /safari/.test( userAgent ),
    ios = /iphone|ipod|ipad/.test( userAgent );

if( ios ) {
    
    if ( !standalone && safari ) {
        

		// alert('browser');
        
    } else if ( standalone && !safari ) {
        

		// alert('standalone');
        
    } else if ( !standalone && !safari ) {
        

        //alert('uiwebview');
    };
   
} else {
    
document.write("<div class='pre_con backcolor_2' style='transition:0.5s;top:0;width: 100%;height: 100vh;z-index: 100000000000;padding: 0;margin: 0;position: absolute;direction: ltr;position:fixed;left:0%;'>"
				
				+"<div class='fire_power_body'>"
				+"<div class='fire_power'>"
				+"<div class='fire'>"
			    +"<div class='flames'>"
				+"<div class='flame'></div>"
				+"<div class='flame'></div>"
				+"<div class='flame'></div>"
				+"<div class='flame'></div>"
			    +"</div>"
			    +"<div class='logs'></div>"
			    +"</div>"
				+"</div>"
				+"</div>"
				+"</div></div>"
				); 
				
				
				
				
				
//alert("not_iphone");
}

</script>

<?php 
	}else{
		
		$_SESSION['first_time_ar']='done'
	
	}
?>


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


   <!--::header part start::-->
		<header>

	
								
								
								
								
								
								<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">
											<ul class='side_menu'>
											

												<li><a  rel='nofollow'  href="<?php echo $website_url ;?>/">الرئيسية <span class='menu_number' >001</span></a></li>
												
												<li class="list_li" menu_open="0"> 	 

													<a menu_open="0" class="btn inactive menu_header" > عن الجمعية ؟  <span class='menu_number' >002</span> <span style='font-size:18px;' class=" fa las la-angle-down"></span> </a>
													<ul class='sub_menu' style="display: none;">
															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/about/عن-الجمعية">عن الجمعية</a></li>
															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/whyus/لماذا-نحن">لماذا نحن؟؟</a></li>
															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/faq/الاسئلة-الشائعة">الاسئلة الشائعة</a></li>
															 <li menu_open="0"><a href="<?php echo $website_url ;?>/partners/شركاء النجاح">شركاء النجاح</a></li>

															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/history/تاريخنا">تاريخنا</a></li>
															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/vision/رؤيتنا">رؤيتـنــا</a></li>
															 <li menu_open="0"> <a href="<?php echo $website_url ;?>/suggessions/الطلبات-او-الاقتراحات">الطلبات و الاقتراحات</a></li>
													</ul>	
												</li>
											
												<li class="list_li" menu_open="0"> 	 

													<a menu_open="0" class="btn inactive menu_header" > الخدمات  <span class='menu_number' >003</span><span style='font-size:18px;' class=" fa las la-angle-down"></span> </a>
													<ul class='sub_menu' style="display: none;">
															 
														<?php 
														  mysqli_data_seek($services_cat_result,0);
														  
   /*بداية التكرار */  
 while($services_cat_fetch = mysqli_fetch_array($services_cat_result)) {
   		 $services_cat_fetch = clean_array($services_cat_fetch);
															  
														  ?>
															<li menu_open="0"> <a href="<?php echo $website_url ;?>/product/<?php echo $services_cat_fetch['id'] ?>/<?php echo url_dash($services_cat_fetch['title']); ?>"><?php echo $services_cat_fetch['title'] ?></a></li>
														
														  <?php } ?>
															 
													</ul>	
												</li>

												<li ><a  rel='nofollow' href="<?php echo $website_url ;?>/certificates/شهادات-الجودة">الشهادات <span class='menu_number' >004</span> </a></li>
												<li ><a  rel='nofollow' href="<?php echo $website_url ;?>/productionline/خط-الانتاج">خط الانتاج  <span class='menu_number' >005</span></a></li>
												<li ><a  rel='nofollow' href="<?php echo $website_url ;?>/gallery/معرض-الصور">معرض الصور  <span class='menu_number' >006</span></a></li>
								
												<li style='display:none;'><a  rel='nofollow' href="<?php echo $website_url ;?>/videos/الفيديوهات">الفيديوهات<span class='menu_number' >006</span></a></li>					  		

												<li class="list_li" menu_open="0"> 	 

													<a menu_open="0" class="btn inactive menu_header" > المقالات  <span class='menu_number' >007</span><span style='font-size:18px;' class=" fa las la-angle-down"></span> </a>
													<ul class='sub_menu' style="display: none;">
															 
														
														<li menu_open="0"> <a href="http://localhost/gamaia/blogs/حبيبات-فضلات-القطط">حبيبات فضلات القطط</a></li>
														<li menu_open="0"> <a href="http://localhost/gamaia/blogs/مصبعات-خشبية-للمنازل">مصبعات خشبية للمنازل</a></li>
														<li menu_open="0"> <a href="http://localhost/gamaia/blogs/نشارة-الخشب">نشارة الخشب</a></li>
														<li menu_open="0"> <a href="http://localhost/gamaia/blogs/المزيد">المزيد</a></li>
														
														 
															 
													</ul>	
												</li>
												
												<li><a  rel='nofollow' href="<?php echo $website_url ;?>/contact/الإتصال-بنا">الاتصال بنا<span class='menu_number' >008</span></a></li>					  		

												<li class="social_icon" style="display:block;bottom:-50px;text-align: left;margin-bottom: 0px;position: absolute;bottom: -2%;left: 5%;z-index:999">
                         
													<?php if($_SESSION['comp_face']!=''){ ?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive   lab la-facebook-f" target="_blank"  href="<?php echo $_SESSION['comp_face']?>" title='<?php echo $_SESSION['comp_title'];?> على الفيسبوك '></a>	
													<?php } if($_SESSION['comp_google']!=''){?>
													
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-google-plus" target="_blank"  href="<?php echo $_SESSION['comp_google']?>" title='<?php echo $_SESSION['comp_title'];?> على جوجل بلاس'></a>
													<?php } if($_SESSION['comp_twitter']!=''){?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-twitter" target="_blank"  href="<?php echo $_SESSION['comp_twitter']?>" title='<?php echo $_SESSION['comp_title'];?> على تويتر '></a>	
													<?php } if($_SESSION['comp_youtube']!=''){?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-youtube" target="_blank"  href="<?php echo $_SESSION['comp_youtube'];?>" title='<?php echo $_SESSION['comp_title'];?> على يوتيوب'></a>	
													<?php } if($_SESSION['comp_instagram']!=''){?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-instagram" target="_blank"  href="<?php echo $_SESSION['comp_instagram']?>" title='<?php echo $_SESSION['comp_title'];?> على انستجرام'></a>	
													<?php }  if($_SESSION['comp_pinterest']!=''){?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-pinterest-p" target="_blank"  href="<?php echo $_SESSION['comp_pinterest']?>" title='<?php echo $_SESSION['comp_title'];?> على بينتريست'></a>	
													<?php } if($_SESSION['comp_linkedin']!=''){?>
													<a style='border:0'  rel='nofollow'  class="bottom_social  inactive  lab la-facebook-f" target="_blank"  href="<?php echo $_SESSION['comp_linkedin']?>" title='<?php echo $_SESSION['comp_title'];?> على لينكيد ان'></a>	
													<?php } ?>

												</li>
						
											</ul>
											
											
											  
						
						
										</div>
									</div>
								</div>
								
								
								
									
			
			
			
								
								
							</div>
						

			<div class="main_menu home_menu absolute_menu animated">
				<div style="max-width: 1200px;margin: 0 auto;position: relative;background:#333;" >

					<div class='lang'>
						<?php if(($_SESSION['comp_twitter'])!=''){ ?> <a title="الحساب الرسمى <?php echo $_SESSION['comp_title'] ;?> على تويتر" href="<?php echo $_SESSION['comp_twitter']; ?>" target="_blank"><i class="lab la-twitter"></i></a><?php } ?>
	                    <?php if(($_SESSION['comp_face'])!=''){ ?> <a title="الحساب الرسمى <?php echo $_SESSION['comp_title'] ;?> على الفيسبوك" href="<?php echo $_SESSION['comp_face']; ?>" target="_blank"><i class="lab la-facebook-f"></i></a><?php } ?>
	                    <?php if(($_SESSION['comp_youtube'])!=''){ ?> <a title="الحساب الرسمى <?php echo $_SESSION['comp_title'] ;?> على اليوتيوب" target="_blank" href="<?php echo $_SESSION['comp_youtube']; ?>"><i class="lab la-youtube"></i></a><?php } ?>
                        <?php if(($_SESSION['comp_instagram'])!=''){ ?> <a title="الحساب الرسمى <?php echo $_SESSION['comp_title'] ;?> على انستجرام" href="<?php echo $_SESSION['comp_instagram']; ?>" target="_blank"><i class="lab la-instagram"></i></a><?php } ?>
						<a  rel='nofollow'   class="inactive" href="tel:+2<?php echo $_SESSION['comp_mobile1']; ?>" style='padding-right:0px;'> <span></span> <i class="las la-phone"><span style='padding-left: 6px;font-size: 14px;'><?php echo $_SESSION['comp_mobile1']; ?></span></i> </a>							
					</div>
				
				</div>
					
								
					<div class="row align-items-center" style=' margin:0px auto -20px auto; max-width:1200px;'>
						<div class="col-lg-12 p-0" >
						
					
								
							
									<div class="logo">
										<a  rel='nofollow'  class='inactive' href="<?php echo $website_url ;?>/"><img loading='lazy' src="<?php echo $img_path; ?>logo.webp" height="60" alt="#"></a>
									</div>
								
								
								
								
								
							
						
						
						
						</div>
					</div>
					
					
		<!------- begin slide menu ------->		
		
				<div class='bottom_bar' >
				
				
					<ul class='top_menu '>
					  
					  <li class="dropdown d-none d-xl-inline-block">
						<a href="javascript:void(0)" class="dropbtn inactive">عن الجمعية؟ <span class=" fa las la-angle-down"></span></a>
						<div class="dropdown-content">
							<div class='menu_inside'>
							  
							  <a href="<?php echo $website_url ;?>/about/عن-الجمعية">عن الجمعية</a>
							  <a href="<?php echo $website_url ;?>/whyus/لماذا-نحن">لماذا نحن؟</a>
							  <a href="<?php echo $website_url ;?>/faq/الاسئلة-الشائعة">الاسئلة الشائعة</a>
							  <a href="<?php echo $website_url ;?>/partners/شركاء النجاح">شركاء النجاح</a>							  
							  <a href="<?php echo $website_url ;?>/history/تاريخنا">تاريخنا</a>
							  <a href="<?php echo $website_url ;?>/vision/رؤيتنا">رؤيتـنــا</a>
							  <a href="<?php echo $website_url ;?>/suggessions/الطلبات-او-الاقتراحات">الطلبات و الاقتراحات</a>
							
							</div>
						</div>
					  </li>
					  
			
					  
						<li class="dropdown d-none d-xl-inline-block">
							<a href="javascript:void(0)" class="dropbtn inactive">الخدمات <span class=" fa las la-angle-down"></span></a>
							<div class="dropdown-content">
								<div class='menu_inside ' >
									
									<div class=''>
										
										<?php 
											mysqli_data_seek($services_cat_result,0);
											
   /*بداية التكرار */  
 while($services_cat_fetch = mysqli_fetch_array($services_cat_result)) {
   		 $services_cat_fetch = clean_array($services_cat_fetch);
												
										?>
										 <a href="<?php echo $website_url ;?>/product/<?php echo $services_cat_fetch['id'] ?>/<?php echo url_dash($services_cat_fetch['title']); ?>"><?php echo $services_cat_fetch['title'] ?></a>
																			
										<?php } ?>
									</div>
									
								
										
										
								</div>
							</div>
					    </li>
						<li class='d-none d-xl-inline-block'><a  rel='nofollow' href="<?php echo $website_url ;?>/certificates/شهادات-الجودة">الشهادات</a></li>
						<li class='d-none d-xl-inline-block' style='display:none;'><a  rel='nofollow' href="<?php echo $website_url ;?>/videos/الفيديوهات">الفيديوهات</a></li>
						

						<li class='d-none d-xl-inline-block'><a  rel='nofollow' href="<?php echo $website_url ;?>/contact/الإتصال-بنا">الاتصال بنا</a></li>
						
						
						
											  
					  <li class="dropdown d-none d-xl-inline-block">

						<a  class='more_points inactive'><i class="las la-braille" ></i></a>						
						<div class="dropdown-content">
							<div class='menu_inside'>
							  
								
								<a  rel='nofollow' href="<?php echo $website_url ;?>/productionline/خط-الانتاج">خط الانتاج</a>
								<a  rel='nofollow' href="<?php echo $website_url ;?>/gallery/معرض-الصور">معرض الصور</a>
								<a style=""  rel='nofollow' href="<?php echo $website_url ;?>/blogs_categories/المدونة">المدونة</a>
							
							</div>
						</div>
					  </li>
					  

						
						<li class='d-none d-lg-inline-block' ><a class='lang_icon' href='<?php echo $domain_url; ?>/'>EN</a></li>
						<li class='d-none d-lg-inline-block' ><a class='lang_icon' href='<?php echo $domain_url; ?>/it/'>IT</a></li>
						

						
						
						
							<li>
					  				
									<span class="menu-trigger visible-xs">
										<span></span>
										<span></span>
										<span></span>

									</span>

									
									<div class="search_icon"  style='padding-right:5px;' >
											<a style='width:38px;'  rel='nofollow'  class='inactive icon' id="search_1" href="javascript:void(0)"><i class="las la-search"></i></a>
									</div>
												
									
						<li class="dropdown d-lg-none d-inline-block lang_menu">
							<a href="javascript:void(0)" class="dropbtn inactive" style='font-size: 22px;padding: 8px 5px !important;'> <i class="lnr lnr-earth"></i></span></a>
							<div class="dropdown-content" style="width: 52px;min-width: 52px;">
								<div class='menu_inside' style='width:52px'>
								  
								  <a style='text-align: center;border-bottom: solid 1px #fff;padding: 10px 0px;'  href='<?php echo $domain_url; ?>/'>EN</a>
								  <a style='text-align: center;padding: 10px 0px;' href='<?php echo $domain_url; ?>/it/'>IT</a>
								
								</div>
							</div>
						</li>
									
									
									</li>


									
									
					</ul>
					
					
				
				</div>
		<!-- end slide menu -->	
				
						
			
					
					
				
			</div>
	
		

<div class="search_input" id="search_input_box">
				<div class="container " >
					<div class="justify-content-between search-inner" >
						<input style='text-align:center;' type="search" class="form-control" id="search_box2" placeholder="ادخل كلمة البحث">

							
							<span class='search_title' style=' display:none !important; '>Search In</span>
							
							<select aria-labelledby='lbl-main-menu-mob'  style='display: none !important;' class='dropdown search_options_tall'>
								<option value='books'>Books</option>
								<option value='auther'>Auther</option>
								<option value='publisher'>Publisher</option>
								<option value='realize'>Realizer</option>
							</select>
							
						<input id='search_btn2' type="button" class="btn" value='بحـث' >
					
										
						
						<span class="las la-times" id="close_search" title="Close Search"></span>
					</div>
				</div>
			</div>
			
			

			
		</header>
    <!-- Header part end-->
	
	
	
	
	
	<div class="sp-modal_overlay" ></div>
	

