<?php 
	$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;
	
	$nik_data 	= $this->session->userdata('nik');
	$nama_data 	= $this->session->userdata('nama');
	$jk_data 	= $this->session->userdata('jk');
	if($jk_data == 'L'){
		$yth = ' Bapak ';
		}else if($jk_data == 'P'){
		$yth = ' Ibu ';
		}else{
		$yth = '';
	}
	
?>
<!DOCTYPE html>
<html lang="id">
	<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;?> |
			<?=$set->deskripsi_singkat;?>
		</title>
		<link rel="shortcut icon" href="<?php echo base_url('sb/img/favicon.png'); ?>">
		<!-- Custom fonts for this template-->
		<link href="<?php echo base_url('sb'); ?>/vendor/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">
		<link href="<?=base_url('one');?>/assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
		
		<!-- Custom styles for this page -->
		<link href="<?php echo base_url('sb'); ?>/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
		<link href="<?php echo base_url('sb'); ?>/vendor/select2/css/select2.min.css" rel="stylesheet">
		<link rel="stylesheet" href="<?php echo base_url('sb'); ?>/css/AdminLTE.min.css">
		<link rel="stylesheet" href="<?php echo base_url('sb'); ?>/datepicker/datepicker3.css">
		<style type="text/css">
			body {
			margin-top: 0px;
			}
		</style>
	</head>
	
	<body class="background-batik">
	    <div class="preloader">
			<div class="loading">
				<img src="<?php echo base_url('sb/img/loading.gif'); ?>" width="500">
				<center>
					<h4>Harap Tunggu . . .</h4>
				</center>
			</div>
		</div>
		<div class="container">
			<?php echo $contents; ?>	
		</div>
		
		<!-- Bootstrap core JavaScript-->
		<!-- script src="<?php echo base_url('sb'); ?>/vendor/select2/js/select2.min.js"></script -->
		<script src="<?php echo base_url('sb'); ?>/vendor/jquery/jquery.min.js"></script>
		<script src="<?php echo base_url('sb'); ?>/vendor/select2/js/select2.min.js"></script>
		<script src="<?php echo base_url('sb'); ?>/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
		
		<!-- Core plugin JavaScript-->
		<script src="<?php echo base_url('sb'); ?>/vendor/jquery-easing/jquery.easing.min.js"></script>
		
		<!-- Custom scripts for all pages-->
		<script src="<?php echo base_url('sb'); ?>/js/sb-admin-2.min.js"></script>
		
		<!-- script src="http://code.jquery.com/jquery-2.2.1.min.js"></script -->
		<script>
			$(document).ready(function() {
			$(".preloader").fadeOut();
			})
		</script>
		
		<script>
			$(function() {
				$('[data-toggle="tooltip"]').tooltip()
			})
		</script>
	</body>
	
</html>