<?php
include '../connection.php';
// Start retrive news
$sqlNews = "SELECT ID,newsName_en,summary_en,image FROM news WHERE status =1";
$executeSql = mysqli_query($connection,$sqlNews);
$newsDiv = "";
$newsdirection = "../assets/img/news/";

// End retrive news
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NEWS</title>
<?php include '../cssFile.php'; ?>
<link rel="icon" href="../assets/img/logo.png" type="image/x-icon">
<style type="text/css">
    .item{
	   width:90%;
    	margin:10px auto;
    }
    .item .shadow-effect{
    	height: 380px;
    }
   .shadow-effect p{
    	    text-align: justify;
    -webkit-box-orient: vertical;
    display: block;
    display: -webkit-box;
    overflow: hidden !important;
    text-overflow: ellipsis;
-webkit-line-clamp: 7;
    max-height: 168px;
    }
</style>
</head>
<bod dir="rtl">
<?php include 'navbar.php'; ?>
<!-- start fixed social icon -->
<div class="share animated flash slower">
    <div class="toggle icon">
        <i class='fas fa-share-alt' id="icon-share"></i>
    </div>
        <ul>
            <li><a href="https://www.facebook.com/take.achance.359"><i class='fab fa-facebook-f icon-facebook' aria-hidden="true"></i></a></li> 
            <li><a href="https://twitter.com/takeach13143934"><i class='fab fa-twitter icon-twitter' aria-hidden="true"></i></a></li> 
            <li><a href="https://www.youtube.com/channel/UCWcJwXluKFRnSEFkiZBvPhg"><i class='fab fa-youtube icon-youtube' aria-hidden="true"></i></a></li> 
            <li><a href="https://www.instagram.com/takeachancenpo"><i class='fab fa-instagram icon-instagram' aria-hidden="true"></i></a></li> 
            <li><a href="https://wa.me/00962796069492"><i class='fab fa-whatsapp icon-whatsapp' aria-hidden="true"></i></a></li> 
        </ul>
</div>
<!-- end fixed social icon -->
<div class="goshan animated flash slower">
        <a href='goshan.php'><div class="toggle icon">
            <img src='../assets/img/donateIcon.png' style='width:70px'>
        </div></a>

    </div>
    <!-- End fixed social icon -->
<div class="container" style='margin-top:30px;'>
    <div class="row justify-content-center">
        <div class="col-md-12 text-center">
            <h2 class="hvr-bounce-in" style='color:#0080BB'>
                NEWS
            </h2>
        <p><img src='../assets/img/s.png'></p>
        </div>
    </div>
</div>
<div class='container'>
	<div class='row mt-4'>
			<?php
			while($rowsNews = mysqli_fetch_row($executeSql))
			{
			    echo "
        		<div class='col-12 col-sm-6 col-md-4'>
			    <div class='item'>
			    <div class='shadow-effect'>
			    <img class='img-circle' src='{$newsdirection}{$rowsNews[3]}' alt='' style='max-width: 300px;height: 110px;'>
			    <h5 class='newsnamenews' style='border-bottom:1px solid #c5c5c5;padding-bottom:5px;'>{$rowsNews[1]}</h5>
			    <p class='newscontent' style='text-align:justify'>{$rowsNews[2]}</p>
			    </div>
			    <a href='show-news.php?ID={$rowsNews[0]}' class='testimonial-name'>READ MORE</a>
			    </div></div>";
			}
			?>
		
	</div>
</div>
<div class='row no-gutters' id="row-footer" style='width:100%;margin-top:60px;'>
        <div class='container'>
            <div class="col-md-12 text-center">
                <h4>
                <span>Take a chance to change...</span>
                    <span>Take a chance to dream...</span>
                    <span> Take a chance to be you....</span>
                </h4>

            </div>
        </div>
        <!-- End container -->
    </div>
    <!-- End row -->

    <!-- end footer -->
    
    <!-- For coursor animation -->
    <div class="cursor"></div>
<?php include '../jsFile.php'; ?>


</body>
</html>
