<?php
	$id = $this->session->userdata('id');
	$set = $this->db->query("SELECT * FROM pengaturan WHERE id='2' ")->row();
	
	//ubah timezone menjadi jakarta
	date_default_timezone_set("Asia/Jakarta");
	
	//ambil jam dan menit
	$jam = date('H:i');
	
	//atur salam menggunakan IF
	if ($jam > '05:30' && $jam < '10:00') {
		$salam = 'pagi';
		} elseif ($jam >= '10:00' && $jam < '15:00') {
		$salam = 'siang';
		} elseif ($jam < '18:00') {
		$salam = 'sore';
		} else {
		$salam = 'malam';
	}
	
	//tampilkan pesan
	$salam = $salam;
	
	
?>
<!DOCTYPE html>
<html lang="en">
	
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		
		<title><?=$set->title;?></title>
		<link rel="shortcut icon" href="<?php echo base_url('sb/img/Favicon.ico'); ?>">
		<!-- Custom fonts for this template-->
		<link href="<?php echo base_url('sb/adminlte'); ?>/fontawesome-free/css/all.min.css" rel="stylesheet"
        type="text/css">
		<link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">
		
		<!-- Custom styles for this template-->
		<link href="<?php echo base_url('sb'); ?>/css/style.css" rel="stylesheet">
		<link href="<?php echo base_url('sb'); ?>/css/sb-admin-2.min.css" rel="stylesheet">
	</head>
	
	<body class="background-pintu  alert-success">
		<?php echo $contents; ?>
		
		<!-- Bootstrap core JavaScript-->
		<script src="<?php echo base_url('sb'); ?>/vendor/jquery/jquery.min.js"></script>
		<script src="<?php echo base_url('sb/adminlte'); ?>/bootstrap/js/bootstrap.bundle.min.js"></script>
		
		<!-- Core plugin JavaScript-->
		<script src="<?php echo base_url('sb/adminlte'); ?>/jquery-easing/jquery.easing.min.js"></script>
		
		<!-- Custom scripts for all pages-->
		<script src="<?php echo base_url('sb/adminlte'); ?>/js/sb-admin-2.min.js"></script>
		
		<script>
			$(document).ready(function() {
				$(".preloader").fadeOut();
			})
		</script>
	</body>
	
</html>