<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link href="<?php echo base_url();?>resources/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo base_url();?>resources/css/jquery.smartmenus.bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo base_url('resources/css/AdminLTE.min.css') ?>">
</head>
<style type="text/css">
  #content{overflow: hidden;}
  .modal-besar{
    width: 98%;
  }
</style>
<body class="hold-transition skin-blue layout-top-nav">
<style type="text/css">
  ul {
  font-size: 12px;
  font-style: normal;
  }
.red{
  color: red;
}
.statistik{
  line-height: 35px;
  background-color: #EEEEE6;
  padding-left: 10px;
  border-bottom: 1px dotted #B7B7AF;
  border-collapse: collapse;
  float: left;
  width: 99%;
  background: radial-gradient( 1px -10px, circle, white 18%, red 26px );
}
.statistik:hover{
  color: red;
  background-color: #FFFF99;
}
.tools{
  float: right;
  margin-right: 50px;
  color: red;
}
.col-md{
  padding-left: 15px;
  padding-right: 15px;
}
</style>

<div class="wrapper">
  <div class="content-wrapper">
    <!--button data-toggle="modal" data-target="#modalku">MODAR</button-->
    <section class="content-header">
      <h1>DASHBOARD
        <small>[Pendaftaran Online]</small>
      </h1>
    </section>
  <div class="konten">
    <section class="content">
      <div class="row">
        <div class="col-md">
          <div class="box">
              <div class="box-header with-border">
                  <h4 class="box-title">Cari Pendaftaran Online <small></small></h4>
                  <table class="table table-responsive"><tbody>
                      <tr>
                          <td>
                            <div class="col-md-9">
                              Cari dengan Nomor Register Online
                              <div class="input-group input-group-sm" style="width: 400px;">
                                <input type="text" id ="key_cari_efiling" name="key_cari_efiling" class="form-control pull-right" placeholder="Ketik Nomor register online (3 huruf dari belakang)">
                                <div class="input-group-btn">
                                  <button type="submit" id="key_c" class="btn btn-default"><i class="fa fa-search"></i></button>
                                </div>
                              </div>
                            </div>
                            <div class="col-md-2">
                              <br>                              
                              <a href="#" onClick="cek_pendaftaran_online()" class="btn btn-sm btn-warning"><i class="fa fa-edit"></i> CEK PENDAFTARAN ONLINE</a><span id="load_efiling"> <small><font color="red"><i class="fa fa-refresh fa-spin"></i> Proses..</span></font></small>
                            </div>
                        </td>
                      </tr>
                      </tbody>
                  </table>
              </div>
              
          </div> 
          <div class="box" id="hasil_cari_efiling"></div>         
          <div class="box">
              <div class="box-header with-border">
              <h3 class="box-title">Pendaftaran Online Baru<small><br>Pendaftaran yang belum diregister dan mendapatkan nomor perkara</small></h3>
            </div>
            <div class="box-body ">
              <table class="table table-bordered table-hover  table-striped" style="font-size: 14px;">
                <tr>
                  <th style="width: 3%;text-align:center">No.</th>
                  <th style="width: 12%">Nomor Register<br>Online</th>
                  <th style="width: 12%">Tanggal Pendaftaran</th>
                  <th style="width: 17%">Jenis Perkara</th>
                  <th style="width: 10%">Jumlah Panjar</th>
                  <th style="width: 10%">Status Pembayaran</th>
                  <th style="width: 5%">Aksi</th>
                </tr>
                <?php 
                if($efiling_blm_perkara->num_rows()>0) {
                  $i=1;
                  foreach ($efiling_blm_perkara->result() as $row) {
                    if($row->alur_perkara_id==1 OR $row->alur_perkara_id==9 OR $row->alur_perkara_id==15){
                      $jenis_perkara = 'Perdata Gugatan';
                    }elseif($row->alur_perkara_id==2){
                      $jenis_perkara = 'Perdata Permohonan';
                    }
                    if($row->status_pembayaran==1){
                      $status_pembayaran='Dibayar';
                    }else{
                      $status_pembayaran='Menunggu Pembayaran';
                    }
                    if($this->session->userdata('jenis_pengadilan')==1){
                      $alur_perkaranya = 1;
                    }elseif($this->session->userdata('jenis_pengadilan')==3){
                      $alur_perkaranya = 9;
                    }elseif($this->session->userdata('jenis_pengadilan')==4){
                      $alur_perkaranya = 15;
                    }
                      echo "
                          <tr>
                            <td>".$i."</td>
                            <td>".$row->nomor_register."</td>
                            <td>".$this->tanggalhelper->convertDayDate($row->tanggal_pendaftaran)."</td>
                            <td>".$jenis_perkara."</td>
                            <td> Rp. ".number_format($row->jumlah_skum,2,',','.')."</td>
                            <td>".$status_pembayaran."</td>";
                            echo '<td><a href="'.base_url().'add_perdata_online/'.base64_encode($this->encrypt->encode($alur_perkaranya)).'/'.base64_encode($this->encrypt->encode(10)).'/'.base64_encode($this->encrypt->encode($row->efiling_id)).'/'.$row->jumlah_skum.'" class="btn btn-success btn-sm" href=""><i class="fa fa-send"></i> Register </a></td>
                          </tr>
                      ';
                    $i++;
                  }
                }
                ?>
              </table>
            </div>

          </div>          
<!--           <div class="box">
  <div class="box-header with-border">
    <h3 class="box-title">STATISTIK DELEGASI KELUAR BERDASARKAN TAHAPAN PROSES PELAKSANAAN</small></h3>
  </div>
  <div class="box-body" style="font-size: 12;">
    <ul class="todo-list">
      <a href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('k_blm_k')) ?>"><li class="statistik"> 
          <i class="fa fa-envelope"></i>
        <span >Bantuan Delegasi Keluar Belum Terkirim</span>
        <div class="tools"><?php echo $k_blm_kirim?> delegasi</div>
      </li>
      </a>
      <a href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('k_sdh_k')) ?>"><li class="statistik">
          <i class="fa fa-envelope"></i>
        <span >Bantuan Delegasi Keluar Sudah Terkirim</span>
        <div class="tools"><?php echo $k_sdh_kirim?> delegasi</div>
      </li>
      </a>
      <a href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('k_sdh_l')) ?>"><li class="statistik" >
          <i class="fa fa-envelope"></i>
        <span>Bantuan Delegasi Keluar Sudah Dilaksanakan</span>
        <div class="tools"><?php echo $k_sdh_dilaksanakan?> delegasi</div>
      </li>
      </a>
      <a  href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('k_blm_l')) ?>"><li class="statistik">
          <i class="fa fa-envelope"></i>
        <span >Bantuan Delegasi Keluar Belum Dilaksanakan</span>
        <div class="tools"><?php echo $k_blm_dilaksanakan?> delegasi</div>
      </li>
      </a>
      <a  href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode(2)) ?>"><li class="statistik">
          <i class="fa fa-envelope"></i>
        <span>Total Delegasi Keluar</span>
        <div class="tools"><?php echo $k_total_k?> delegasi</div>
      </li>
      </a>

    </ul>
  </div>
</div>
<div class="box">
  <div class="box-header with-border">
    <h3 class="box-title">STATISTIK DELEGASI MASUK BERDASARKAN TAHAPAN PROSES PELAKSANAAN</small></h3>
  </div>
  <div class="box-body" style="font-size: 12;">
    <ul class="todo-list">
      <a href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('m_sdh_l')) ?>"><li class="statistik" >
          <i class="fa fa-envelope"></i>
        <span>Bantuan Delegasi Masuk Sudah Dilaksanakan</span>
        <div class="tools"><?php echo $m_sdh_dilaksanakan?> delegasi</div>
      </li>
      </a>
      <a  href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode('m_blm_l')) ?>"><li class="statistik">
          <i class="fa fa-envelope"></i>
        <span >Bantuan Delegasi Masuk Belum Dilaksanakan</span>
        <div class="tools"><?php echo $m_blm_dilaksanakan?> delegasi</div>
      </li>
      </a>
      <a  href="<?php echo base_url();?>perkara_list_delegasi/type/<?php echo base64_encode($this->encrypt->encode(1)) ?>"><li class="statistik">
          <i class="fa fa-envelope"></i>
        <span>Total Delegasi Masuk</span>
        <div class="tools"><?php echo $m_total_k?> delegasi</div>
      </li>
      </a>

    </ul>
  </div>
</div>          
        </div>
 -->
<!--         <div class="col-md">
  <div class="box">
    <div class="box-header with-border">
      <h3 class="box-title">STATISTIK DELEGASI MASUK BERDASARKAN TAHAPAN PROSES PELAKSANAAN</small></h3>
    </div>
    <div class="box-body" style="font-size: 12;">
      <ul class="todo-list">
        <li>
            <i class="fa fa-envelope"></i>
          <span class="text">Bantuan Delegasi Masuk Belum Terkirim </span>
          <div class="tools">
            <i class="fa fa-eye putus_list " value="2"></i>
          </div>
        </li>
        <li>
            <i class="fa fa-envelope"></i>
          <span class="text">Bantuan Delegasi Masuk Sudah Terkirim </span>
          <div class="tools">
            <i class="fa fa-eye putus_list " value="2"></i>
          </div>
        </li>
        <li>
            <i class="fa fa-envelope"></i>
          <span class="text">Bantuan Delegasi Masuk Sudah Dilaksanakan</span>
          <div class="tools">
            <i class="fa fa-eye putus_list " value="2"></i>
          </div>
        </li>
        <li>
            <i class="fa fa-envelope"></i>
          <span class="text">Bantuan Delegasi Masuk Belum Dilaksanakan</span>
          <div class="tools">
            <i class="fa fa-eye putus_list " value="2"></i>
          </div>
        </li>
        <li>
            <i class="fa fa-envelope"></i>
          <span class="text">Total Delegasi Masuk</span>
          <div class="tools">
            <i class="fa fa-eye putus_list " value="2"></i>
          </div>
        </li>

      </ul>
    </div>
  </div>-->


  <div class="control-sidebar-bg"></div>
  <div class="modal fade" id="modalku"  tabindex="-1" role="dialog">
    <div class="modal-dialog modal-besar">
        <div id='modalku_konten'class="modal-content">
            
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
</div>


<script type="text/javascript">
$(document).ready(function(){
  $("#hasil_cari_efiling").hide();
  $("#key_cari_efiling").keyup(function(){
      var i = $(this).val();
      var i_leng = i.length;
      if(i.indexOf('/') >= 1 || i=="" || i_leng>=3){
        $.post('<?php echo base_url()?>efiling/show_hasil_pencarian', {
          search:i
        }, function(response){
          var json = jQuery.parseJSON(response);
          events = '';
          if(json.st==1){
          $("#hasil_cari_efiling").html(json.hasil_cari);
          $("#hasil_cari_efiling" ).slideDown( "slow", function() {
            $("#hasil_cari_efiling").show();
            });            
          }else{
            $("#hasil_cari_efiling").hide();
          }   
        });        
     }
      
  });
});

$('#load_efiling').hide();

function cek_pendaftaran_online(){
  $('#load_efiling').show();
   $.ajax({
       url: '<?php echo base_url('efiling/get_efiling_masuk');?>',
       dataType: 'json',
       complete: function(){
           $('#load_efiling').hide();
           location.reload();
      },       
   })
}

</script>
</body>
</html>
