<!DOCTYPE html>
<?php
$tiga=$this->db->query("SELECT * from web_setting where id='1'");
foreach ($tiga->result() as $rt) {
$namsek=$rt->nama;
$logo=$rt->logo;
}
?>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
  <meta charset="utf-8">
  <title>Absensi <?php echo $namsek;?></title>
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <meta content="Metronic Shop UI description" name="description">
  <meta content="Metronic Shop UI keywords" name="keywords">
  <meta content="keenthemes" name="author">

  <meta property="og:site_name" content="Presensi Online">
  <meta property="og:title" content="Chung Chin">
  <meta property="og:description" content="Software, jaringan, Linux, Windows">
  <meta property="og:type" content="website">
  <meta property="og:image" content="-CUSTOMER VALUE-"><!-- link to image for socio -->
  <meta property="og:url" content="xwaja.my.id">
  <link rel="shortcut icon" href="favicon.ico">

   <!-- Global styles START -->          
  <link href="<?php echo base_url('assets/global/plugins/font-awesome/css/font-awesome.min.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/global/plugins/bootstrap/css/bootstrap.min.css'); ?>" rel="stylesheet">
  <!-- Global styles END --> 
   
  <!-- Page level plugin styles START -->
  <link href="<?php echo base_url('assets/global/plugins/fancybox/source/jquery.fancybox.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/global/plugins/uniform/css/uniform.default.css'); ?>" rel="stylesheet" type="text/css">
  <!-- Page level plugin styles END -->

  <!-- Theme styles START -->
  <link href="<?php echo base_url('assets/global/css/components.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/global/css/plugins.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/frontend/layout/css/style.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/frontend/layout/css/style-responsive.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/frontend/layout/css/themes/red.css'); ?>" rel="stylesheet" id="style-color">
  <link href="<?php echo base_url('assets/frontend/layout/css/custom.css'); ?>" rel="stylesheet">
  <script src="<?php echo base_url('assets/js/fungsi.js'); ?>" type="text/javascript"></script>
  <link rel="stylesheet" href="<?php echo base_url('assets/js/plugins/datatables/dataTables.bootstrap.css'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/js/swal/sweetalert.css');?>">
<script src="<?php echo base_url('assets/js/swal/sweetalert.js');?>"></script>
<link rel="stylesheet" href="<?php echo base_url('assets/peta/leaflet.css');?>" />
<script src="<?php echo base_url('assets/peta/leaflet-src.js');?>"></script>
<link rel="stylesheet" href="<?php echo base_url('assets/peta/leaflet-ruler.css');?>" />
<script src="<?php echo base_url('assets/peta/leaflet-ruler.js');?>"></script>
  <!-- Theme styles END -->
</head>
<!-- Head END -->

<!-- Body BEGIN -->
<body class="corporate">
    <!-- BEGIN HEADER -->
    <div class="header">
      <div class="container">
        <a class="site-logo" href="index"><img src="<?php echo base_url('assets/back/'.$logo.'');?>" height="38" alt="<?php echo $namsek;?>"><?php echo $namsek;?></a>

        <a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>

        <!-- BEGIN NAVIGATION -->
        <div class="header-navigation pull-right font-transform-inherit">
          <ul>
            <li>
              <a href="index.php">Home </a>

            </li>
            <li class="active"><a href="bulanan">Rekap Bulanan</a></li>
            <li><a href="rekapindividu">Rekap Individu</a></li>
            <li><a href="login">Login</a></li>

          </ul>
        </div>
        <!-- END NAVIGATION -->
      </div>
    </div>
    <!-- Header END -->

    <div class="main">
      <div class="container">
        <ul class="breadcrumb">
            <li><a href="index.php">Home</a></li>
            <li class="active">Rekap Absensi Perbulan</li>
        </ul>
        <!-- BEGIN SIDEBAR & CONTENT -->
        <div class="row margin-bottom-20">
          <!-- BEGIN CONTENT -->
          <div class="col-md-12 col-sm-12">
            <div class="content-page">
			  <div class="row">
				<div class="col-md-12 ">
				  <!-- BEGIN SAMPLE FORM PORTLET-->
				  <div class="portlet box blue">
					<div class="portlet-title">
					  <div class="caption">
						<i class="fa fa-gift"></i> Daftar Peta
					  </div>
					  
					</div>
					<div class="portlet-body">
						<div class="row">
							<div class="col-md-12 ">
									<?php
								  $jenis=$this->input->get('jenis');
								  $dd=$this->input->get('dd');
								  $mm=$this->input->get('mm');
								  $yy=$this->input->get('yy');
								  if (!$dd) $dd=date('d');
								  if (!$mm) $mm=date('m');
								  if (!$yy) $yy=date('Y');
								  $harike3=substr(hari($dd,$mm,$yy),0,3);
								  ?>
									<div id="map" style="width:100%; height:400px;"></div>
									<script type='text/javascript'>
									var mymap = L.map('map').setView([<?php echo $koordinat;?>], 13);
									L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
										maxZoom: 18,
										attribution: '',
										id: 'mapbox.streets'
									}).addTo(mymap);
									L.control.ruler().addTo(mymap);
									var markers = [
									  <?php
									  $skrg="$yy-$mm-$dd";
									  if ($jenis =="ALL") {
										$carikelas="SELECT * FROM web_kelas ORDER BY urut ASC";
									  }elseif($jenis ==""){
										$carikelas="SELECT * FROM web_kelas ORDER BY urut ASC";
									  } else {
										$carikelas="SELECT * FROM web_kelas WHERE kode='".$jenis."' ORDER BY urut ASC";
									  }
									  $kelas = $this->db->query($carikelas);
									  foreach ($kelas->result() as $rs) {
										$namakelas=$rs->nama;
										$kodekelas=$rs->kode;
										$jurusan1=$this->db->query("SELECT * FROM web_siswa WHERE KD_JENIS_KETENAGAAN='$kodekelas'");
										foreach ($jurusan1->result() as $row1) {
										 $namapeg=$row1->NM_PEGAWAI;
										 $kodeabsen=$row1->absen;
										  $jurusan=$this->db->query("SELECT nip,lat_x,lat_y FROM web_absen where status='1' AND nip='$kodeabsen' and tgl='$skrg' and lat_x <>''");
										  foreach ($jurusan->result() as $row) {
											$kode=$row->nip;
											$latx=$row->lat_x;
											$laty=$row->lat_y;
											echo '{pos: ['.$latx.','.$laty.'], popup: "'.$namapeg.'"},';
											  }
										  }
										}
									  ?>

									  ];
									markers.forEach(function (obj) {
										var m = L.marker(obj.pos).addTo(mymap),
											p = new L.Popup({ autoClose: false, closeOnClick: false })
													.setContent(obj.popup)
													.setLatLng(obj.pos);
										m.bindPopup(p).openPopup();
									});

									</script>
									
							</div>
						</div>
					</div>
				  </div>
				  <!-- END SAMPLE FORM PORTLET-->
				</div>
			  </div>
          </div>
          <!-- END CONTENT -->
        </div>
        <!-- END SIDEBAR & CONTENT -->
      </div>
    </div>
    <!-- BEGIN FOOTER -->
    <div class="footer">
      <div class="container">
        <div class="row">
          <!-- BEGIN COPYRIGHT -->
          <div class="col-md-6 col-sm-6 padding-top-10">
             2019 © <?php echo $namsek;?>. ALL Rights Reserved. <a href="#">Privacy Policy</a> | <a href="#">Terms of Service</a>
          </div>
          <!-- END COPYRIGHT -->
          <!-- BEGIN PAYMENTS -->
          <div class="col-md-6 col-sm-6">
            <ul class="social-footer list-unstyled list-inline pull-right">
              <li><a href="#"><i class="fa fa-facebook"></i></a></li>
              <li><a href="#"><i class="fa fa-google-plus"></i></a></li>
              <li><a href="#"><i class="fa fa-dribbble"></i></a></li>
              <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
              <li><a href="#"><i class="fa fa-twitter"></i></a></li>
              <li><a href="#"><i class="fa fa-skype"></i></a></li>
              <li><a href="#"><i class="fa fa-github"></i></a></li>
              <li><a href="#"><i class="fa fa-youtube"></i></a></li>
              <li><a href="#"><i class="fa fa-dropbox"></i></a></li>
            </ul>  
          </div>
          <!-- END PAYMENTS -->
        </div>
      </div>
    </div>
    <!-- END FOOTER -->

    <!-- Load javascripts at bottom, this will reduce page load time -->
    <!-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) -->
    <!--[if lt IE 9]>
    <script src="<?php echo base_url('assets/global/plugins/respond.min.js'); ?>"></script>
    <![endif]-->
    <script src="<?php echo base_url('assets/global/plugins/jquery.min.js'); ?>" type="text/javascript"></script>
    <script src="<?php echo base_url('assets/global/plugins/jquery-migrate.min.js'); ?>" type="text/javascript"></script>
    <script src="<?php echo base_url('assets/global/plugins/bootstrap/js/bootstrap.min.js'); ?>" type="text/javascript"></script>      
    <script src="<?php echo base_url('assets/frontend/layout/scripts/back-to-top.js'); ?>" type="text/javascript"></script>
	<script src="<?php echo base_url('assets/frontend/layout/scripts/layout.js'); ?>" type="text/javascript"></script>
	<script src="<?php echo base_url('assets/js/plugins/datatables/jquery.dataTables.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/js/plugins/datatables/dataTables.bootstrap.min.js'); ?>"></script>
	<script>
		  $(function () {
			$('#example1').DataTable();
			
		  });
		</script>
    <!-- END CORE PLUGINS -->

    <!-- BEGIN PAGE LEVEL JAVASCRIPTS (REQUIRED ONLY FOR CURRENT PAGE) -->
    <script src="<?php echo base_url('assets/global/plugins/fancybox/source/jquery.fancybox.pack.js'); ?>" type="text/javascript"></script><!-- pop up -->
    <script src="<?php echo base_url('assets/global/plugins/uniform/jquery.uniform.min.js'); ?>" type="text/javascript" ></script>
	 <script type="text/javascript">
        jQuery(document).ready(function() {
            Layout.init();    
            Layout.initOWL();
            Layout.initTwitter();
            Layout.initFixHeaderWithPreHeader(); /* Switch On Header Fixing (only if you have pre-header) */
            Layout.initNavScrolling();
        });
    </script>
    
    <!-- END PAGE LEVEL JAVASCRIPTS -->
</body>
</html>