<?php
/****************************************** صفحة عرض  المزيد من الأخبار ***************************************/ 
	
//ضمان توافق قاعدة البيانات مع اللغة العربية
mysqli_query($conn,"SET NAMES 'utf8'");
	
   /*بداية الاستعلام*/  
	$related_query="select `id`,`title`,`images` from $table where active=1 and id not in($_GET[id]) order by `priority` desc , `sort` desc , id asc limit 6";
	$related_result=mysqli_query($conn,$related_query);	
	if(mysqli_num_rows($related_result)>0){
	
?>
	<aside class="single_sidebar_widget popular_post_widget" style='max-width:1200px;margin:50px auto;'>
		 <div class='col-md-12' style='height: 100px;overflow: hidden;margin-bottom: 20px;'>
				
				<!-- ================ عنوان الصقحة ================= --> 
				<div class="page_title_right" style='font-size: 26px !important;'> المزيد من <?php echo $related_title; ?></div>
				<div class="right_lines"></div>
				<div class="right_lines l2"></div>
			
		</div>
		 <div class='container-fluid'>
			<div class='row'> 
	<?php
		
		
		   /*بداية التكرار */  
		while($related_fetch = mysqli_fetch_array($related_result)) {
   		 $related_fetch = clean_array($related_fetch);
			$related_id=$related_fetch['id'];
			$related_title=$related_fetch['title'];
		
			   /*استخراج جميع الصور*/  
			  $current_image=explode(",",$related_fetch['images']);

			   /*استخراج الصورة الاساسية*/  
			  $current_image=explode(".",$current_image[1]);
			
			  $related_image=$img_path.'news/'.$current_image[0].'_480.webp';
			

	?>

		
			<div class="big_div_with_border big_div_3_2_1 col-lg-3  col-md-4 col-sm-6 col-12">
			
					
						 <a  rel='nofollow'   style="background:url(<?php echo $related_image; ?>);background-position:center;background-size:cover;background-position:center;" class='product_img related_img_wide ' href="<?php echo  $website_url.'/'.$page_name.'/'.$related_id.'/'.url_dash($related_title); ?>"  >

						 </a>
					 

						<a  rel='nofollow'  href="<?php echo  $website_url.'/'.$page_name.'/'.$related_id.'/'.url_dash($related_title); ?>" >
							<h3 class='product_title_down'><?php echo $related_title; ?></h3>
						</a>
					
					
					
			</div>
		


	<?php } ?>
		</div>
		</div>
	</aside>
<?php }?>