<?php 
$record_instansi	= $this->db->query("SELECT * FROM identitas LIMIT 1")->row();
?>
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <head>
	<title>.:: <?php echo $record_instansi->nama_app; ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
	<style type="text/css">
	@font-face {
	  font-family: 'Cabin';
	  font-style: normal;
	  font-weight: 400;
	  src: local('Cabin Regular'), local('Cabin-Regular'), url(<?php echo base_url(); ?>asset/font/satu.woff) format('woff');
	}
	@font-face {
	  font-family: 'Cabin';
	  font-style: normal;
	  font-weight: 700;
	  src: local('Cabin Bold'), local('Cabin-Bold'), url(<?php echo base_url(); ?>asset/font/dua.woff) format('woff');
	}
	@font-face {
	  font-family: 'Lobster';
	  font-style: normal;
	  font-weight: 400;
	  src: local('Lobster'), url(<?php echo base_url(); ?>asset/font/tiga.woff) format('woff');
	}	
	
	</style>
    <link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.css" media="screen">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../bower_components/bootstrap/assets/js/html5shiv.js"></script>
      <script src="../bower_components/bootstrap/assets/js/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" href="<?php echo base_url(); ?>asset/js/jquery/jquery-ui.css" />
  
    <script src="<?php echo base_url(); ?>asset/js/jquery.min.js"></script>
    <script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
    <script src="<?php echo base_url(); ?>asset/js/bootswatch.js"></script>
	<script src="<?php echo base_url(); ?>asset/js/jquery/jquery-ui.js"></script>
	<script src="<?php echo base_url(''); ?>asset/ckeditor/ckeditor.js"></script>
	<!-- bootstrap autocomplet -->
		<script type="text/javascript" src="<?php echo base_url();?>asset/js/jquery.autocomplete.js"></script>
		<link href="<?php echo base_url();?>asset/js/jquery.autocomplete.css" rel="stylesheet" />
	<!-- batas bootstrap autocomplet -->
	<script type="text/javascript">
	var site = "<?php echo site_url();?>";
        $(function(){
            $('.autocompletekelurahan').autocomplete({
                // serviceUrl berisi URL ke controller/fungsi yang menangani request kita
                serviceUrl: site+'/autocomplete/search',
                // fungsi ini akan dijalankan ketika user memilih salah satu hasil request
                onSelect: function (suggestion) {
                    $('#id_radius').val(''+suggestion.id_radius); 
                    $('#id_kec').val(''+suggestion.id_kec); 
					$('#id_kel').val(''+suggestion.id_kel);
					
                }
            });
        });
		$(function(){
            $('.autocompletekomdanas').autocomplete({
                // serviceUrl berisi URL ke controller/fungsi yang menangani request kita
                serviceUrl: site+'/autocomplete/json_komdanas',
                // fungsi ini akan dijalankan ketika user memilih salah satu hasil request
                onSelect: function (suggestion) {
                    $('#id').val(''+suggestion.id); 
                    $('#prop_name').val(''+suggestion.prop_name); 
					$('#kec').val(''+suggestion.kec);
					$('#nilai').val(''+suggestion.nilai);
					
                }
            });
        });
		 $(function(){
            $('.autocompletedosen').autocomplete({
                // serviceUrl berisi URL ke controller/fungsi yang menangani request kita
                serviceUrl: site+'/autocomplete/dosen',
                // fungsi ini akan dijalankan ketika user memilih salah satu hasil request
                onSelect: function (suggestion) {
                    $('#dosen_id').val(''+suggestion.dosen_id); 
                    $('#kategori_dosen_id').val(''+suggestion.kategori_dosen_id); 
					
                }
            });
        });
		$(function(){
            $('.autocompleteperkara').autocomplete({
                // serviceUrl berisi URL ke controller/fungsi yang menangani request kita
                serviceUrl: site+'/autocomplete/perkara',
                // fungsi ini akan dijalankan ketika user memilih salah satu hasil request
                onSelect: function (suggestion) {
                    $('#nomor_perkara').val(''+suggestion.nomor_perkara); 
                    $('#pihak1_text').val(''+suggestion.pihak1_text); 
					$('#pihak2_text').val(''+suggestion.pihak2_text); 
					
                }
            });
        });
		$(function(){
            $('.autocompletemahasiswa').autocomplete({
                // serviceUrl berisi URL ke controller/fungsi yang menangani request kita
                serviceUrl: site+'/autocomplete/mahasiswa',
                // fungsi ini akan dijalankan ketika user memilih salah satu hasil request
                onSelect: function (suggestion) {
                    $('#stambuk').val(''+suggestion.stambuk); 
                    $('#mahasiswa_id').val(''+suggestion.mahasiswa_id); 
					
                }
            });
        });
	// <![CDATA[
	
	$(document).ready(function () {
		$(function () {
			$( "#kode_surat" ).autocomplete({
				source: function(request, response) {
					$.ajax({ 
						url: "<?php echo site_url('index.php/admin/get_klasifikasi'); ?>",
						data: {kode: 
						$("#kode_surat").val()
						
						},
						dataType: "json",
						type: "POST",
						success: function(data){
							response(data);
						}    
					});
				},
			});
		});
		
		$(function () {
			$( "#dari" ).autocomplete({
				source: function(request, response) {
					$.ajax({ 
						url: "<?php echo site_url('index.php/admin/get_instansi_lain'); ?>",
						data: { kode: $("#dari").val()},
						dataType: "json",
						type: "POST",
						success: function(data){
							response(data);
						}    
					});
				},
			});
		});
		
	$(function () { 
		$("#kode2").autocomplete({ //id kode sebagai key autocomplete yang akan dibawa ke source url 
			minLength:0, 
			delay:0, 
			source:'<?php echo site_url('index.php/admin/get_allklasifikasisurat'); ?>', //nama source kita ambil langsung memangil fungsi get_allkota 
				select:function(event, ui){ 
					$('#nama').val(ui.item.nama); 
					$('#uraian').val(ui.item.uraian); 
					
					} }); 
					});
					
		$(function() {
			$( "#tgl_surat" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'yy-mm-dd'
			});
		});
		$(function() {
			$( "#datepicker" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'dd-mm-yy'
			});
		});
		$(function() {
			$( "#datepicker2" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'dd-mm-yy'
			});
		});
	});
	// ]]>
	</script>
	
	</head>
	
  <body style="">
    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
         <span class="navbar-brand"><strong style="font-family: verdana;"><?php $record_instansi->nama_app; ?></strong></span>
          <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
        </div>
        <div class="navbar-collapse collapse" id="navbar-main">
          <ul class="nav navbar-nav">	
			<li><a href="<?php echo base_url(); ?>admin"><i class="icon-home icon-white"> </i> Beranda</a></li>
            
		<?php
		if ($this->session->userdata('admin_level') == 1) {
		?>	
			<li><a href="<?php echo base_url(); ?>kewenangan/list_data_"><i class="icon-list icon-white"> </i> Kewenangan</a></li>
			
			<li><a href="<?php echo base_url(); ?>kecamatan/list_data_"><i class="icon-edit icon-white"> </i> Data Kecamatan</a></li>
			<li class="dropdown">
              <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes"><i class="icon-home icon-white"> </i> Data Kelurahan <span class="caret"></span></a>
              <ul class="dropdown-menu" aria-labelledby="themes">
                <li><a tabindex="-1" href="<?php echo base_url(); ?>kelurahan_komdanas/list_data_lokal">Lokal</a></li>
				<li><a tabindex="-1" href="<?php echo base_url(); ?>kelurahan_komdanas/list_data_">Seluruh Satker</a></li>
				 
			</ul>
            </li>
			<li><a href="<?php echo base_url(); ?>komponen/list_data_"><i class="icon-play icon-white"> </i> Komponen Biaya</a></li>
			<li class="dropdown">
              <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes"><i class="icon-wrench icon-white"> </i> Pengaturan <span class="caret"></span></a>
              <ul class="dropdown-menu" aria-labelledby="themes">
                <li><a tabindex="-1" href="<?php echo base_url(); ?>identitas/update_">Instansi Pengguna</a></li>
				<li><a tabindex="-1" href="<?php echo base_url(); ?>user_siakad/list_data">Manajemen Admin</a></li>
				<li><a tabindex="-1" href="<?php echo base_url(); ?>hitung_panjar/json_radius">Cek Komdanas</a></li>
				<li><a tabindex="-1" href="<?php echo base_url(); ?>update/update_versi">Update APP</a></li>
				<li><a tabindex="-1" href="<?php echo base_url(); ?>dashboard/bersihkan">Re-load Cookies</a></li>
			</ul>
            </li>
		<?php
		} elseif ($this->session->userdata('admin_level') == 2) { // Hakim
			
		?>	
			<li><a href="<?php echo base_url(); ?>komponen/list_data_"><i class="icon-play icon-white"> </i> Komponen Biaya</a></li>
			<li><a href="<?php echo base_url(); ?>kewenangan/list_data_"><i class="icon-list icon-white"> </i> Kewenangan</a></li>
			<li><a href="<?php echo base_url(); ?>kelurahan/list_data_"><i class="icon-home icon-white"> </i> Data Kelurahan</a></li>
		<?php 
		}else { 
			 redirect('admin/login');
			}
		?>
          </ul>

          <ul class="nav navbar-nav navbar-right">
			<li class="dropdown">
              <a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes"><i class="icon-user icon-white"></i> <?php echo $this->session->userdata('admin_nama'); ?> <span class="caret"></span></a>
              <ul class="dropdown-menu" aria-labelledby="themes">
                <li><a tabindex="-1" href="<?php echo base_url(); ?>user_siakad/password_save/act_ubah">Rubah Password</a></li>
                <li><a tabindex="-1" href="<?php echo base_url(); ?>admin/logout">Keluar</a></li>
               
              </ul>
            </li>
          </ul>

        </div>
      </div>
    </div>

	<?php 
	//$q_instansi	= $this->db->query("SELECT * FROM tr_instansi LIMIT 1")->row();
	echo $this->session->userdata('admin_level');
	?>
    <div class="container">

      <div class="page-header" id="banner">
        <div class="row">
          <div class="" style="padding: 15px 15px 0 15px;">
			<div class="well well-sm">
				<img src="<?php echo base_url(); ?>upload/<?php echo $record_instansi->logo; ?>" class="thumbnail span3" style="display: inline; float: left; margin-right: 20px; width: 100px; height: 100px">
                <h2 style="margin: 15px 0 10px 0; color: #000;"><?php echo $record_instansi->nama_website; ?></h2>
                <div style="color: #000; font-size: 16px; font-family: Tahoma" class="clearfix"><b>Alamat : <?php echo $record_instansi->alamat; ?></b></div>
             </div>
          </div>
        </div>
      </div>

		<?php $this->load->view('admin/'.$page); ?>
	  
	  <div class="span12 well well-sm modal-footer">
		<h4 style="font-weight: bold"><?php echo $record_instansi->nama_website; ?> <a href="http://www.pa-palu.go.id/" target="_blank"> email : <?php echo $record_instansi->email; ?></a></a></h4>
		<h6>&copy;  2017. Load Time : {elapsed_time}, Memory Available : {memory_usage} Lisensi @www.pinisisoft.com</h6>
	  </div>
 
    </div>

  
</body></html>
	<script type="text/javascript">
		$(document).ready(function(){
			$(" #alert" ).fadeOut(5000);
		});
	</script>
	<script>
    CKEDITOR.replace('editor1' ,{
      filebrowserImageBrowseUrl : '<?php echo base_url('asset/kcfinder'); ?>'
    });
	CKEDITOR.replace('editor2' ,{
      filebrowserImageBrowseUrl : '<?php echo base_url('asset/kcfinder'); ?>'
    });
  </script>