<?php
	require_once("../connection.php");

$masterakun = mysqli_query($connect,"SELECT * FROM setting");
$m=mysqli_fetch_array($masterakun);

?><!DOCTYPE html>
<html lang="en">

<head>
	<!-- Meta -->
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /> <!-- For responsiveness on mobile browsers -->
	<meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="Awaiken">
	<!-- Page Title -->
	<title><?php echo $m['name_program'];?></title>
	<!-- Google Fonts css-->
	<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900" rel="stylesheet">
	<!-- Bootstrap css -->
	<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
	<!-- Font Awesome icon css-->
	<link href="css/font-awesome.min.css" rel="stylesheet" media="screen">
	<!-- Carousel css -->
	<link rel="stylesheet" href="css/owl.carousel.css">
	<!-- Slick nav css -->
	<link rel="stylesheet" href="css/slicknav.css">
	<!-- Animated css -->
	<link href="css/animate.css" rel="stylesheet">
	<!-- Magnific Popup CSS -->
	<link href="css/magnific-popup.css" rel="stylesheet">
	<!-- Main custom css -->
	<link href="css/custom.css" rel="stylesheet" media="screen">
	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body data-spy="scroll" data-target="#navigation" data-offset="84" onmousedown="return false;" onselectstart="return false;">
	
	<!-- Preloader starts -->
	<div class="preloader">
		<div class="sk-wave">
			<div class="sk-rect sk-rect1"></div>
			<div class="sk-rect sk-rect2"></div>
			<div class="sk-rect sk-rect3"></div>
			<div class="sk-rect sk-rect4"></div>
			<div class="sk-rect sk-rect5"></div>
		</div>
	</div>
	<!-- Preloader Ends -->

	<!-- Banner Section Ends -->
	
	
	
	<!-- How it work section starts -->
	<section class="how-work" id="howitwork" style="padding: 25px 5px;">
		<div class="container">
			
			
						 <div class='row'>
						<div class="tab-content responsive" style="padding-top: 0px;">
							<div class="tab-pane active fade in" id="download-app" style="font-size: 14px;">
							<?php
							$pages = mysqli_query($connect,"SELECT * FROM news ORDER BY id_news DESC");
while($p = mysqli_fetch_array($pages)){
				$content_news = strip_tags($p['detail']); // membuat paragraf pada isi berita dan mengabaikan tag html
                $content = substr($content_news,0,100); // ambil sebanyak 220 karakter
                $content = substr($content_news,0,strrpos($content," ")); // potong per spasi kalimat
			echo"
								<div class='col-md-12'><a href='detailnews.php?id=$p[id_news]'>
					<h5>$p[title]</h5>		</a>						
					$content...</div><hr>
			";	
}
														?>
														
														
</div>


						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- How it work section ends -->
	
    <!-- Jquery Library File -->
	<script src="js/jquery-1.12.4.min.js"></script>

	<!-- Bootstrap js file -->
	<script src="js/bootstrap.min.js"></script>
	<!-- Responsive Tab Library File -->
	<script src="js/responsive-tabs.js"></script>
	<!-- Bootstrap form validator -->
	<script src="js/validator.min.js"></script>
	<!-- Owl Carousel js file -->
	<script src="js/owl.carousel.js"></script>
	<!-- Slick Nav js file -->
	<script src="js/jquery.slicknav.js"></script>
	<!-- Wow js file -->
	<script src="js/wow.js"></script>
	<!-- Magnific Popup core JS file -->
	<script src="js/jquery.magnific-popup.min.js"></script>
	<!-- SmoothScroll -->
	<script src="js/SmoothScroll.js"></script>
    <!-- Main Custom js file -->
	<script src="js/function.js"></script>
</body>

</html>