Membuat Antrian PTSP part 5 cetak antrian sidang tambahan

Bismillahirrahmanirrahim

Sebelum dilanjutkan ketahap berikutnya, karena aplikasi ini dibuat berdasarkan permintaan dan kebutuhan yang pada saat itu, sehingga harus adanya perubahan lagi pada tabel “tbl_antrian_depan” ada beberapa field yang harus ditambahkan kembali sebagai berikut :

karena banyaknya perubahan isi dari field dan beberapa perubahan tabel untuk lebih jelasi silahkan didownload database yang saya import ini (download disini). kemudian silahkan disesuaikan.

sistem ini sekarang semakin dikembangkan bukan sekedar antrian PTSP lagi, tapi sudah di update untuk keperluan antrian sidang, sehingga view nya pun berubah hampir 40% dari code sebelumnya, berikut code perubahan dimulai dari views

v_antrian_depan.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $sistem->judul.' | '.$sistem->deskripsi;?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!--=================================================================-->
  <link rel="icon" type="image/png" href="<?php echo base_url('img/'.$fav);?>"/>
<!--=================================================================-->
  <link rel="stylesheet" href="<?php echo base_url('bootstrap4/css/bootstrap.min.css');?>">
  <link rel="stylesheet" href="<?php echo base_url();?>bower_components/font-awesome/css/font-awesome.min.css">
  <script src="<?php echo base_url('bootstrap4/js/jquery.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/popper.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/bootstrap.min.js');?>"></script>

</head>
<body>
<div class="container">
<h1 align="center"><?php echo strtoupper($instansi->keterangan);?></h1>
<hr/>
<div class="row" style="text-align: center;">
  <form class="col-md alert btn-info" action="<?php echo $link_informasi;?>" method="POST">
  <input type="hidden" name="ad_jenis_id" value="1">
  <button type="submit" class="col-md alert btn-lg btn-info" style="height: 270px;color:white;">
    <b style="font-size:30px;">MEJA<br/>INFORMASI</b><br/><br/>
    <i class="fa fa-info-circle" style="font-size:40px;"></i><br/><br/>
    <div class="btn btn-lg btn-block btn-danger">AMBIL ANTRIAN</div>
  </button>
  </form>
  <form class="col-md alert btn-success" action="<?php echo $link_pendaftaran;?>" method="POST">
  <input type="hidden" name="ad_jenis_id" value="2">
  <button class="col-md alert btn-lg btn-success" style="height: 270px;color:white;">
    <b style="font-size:30px;">PENDAFTARAN<br/>PERKARA</b><br/><br/>
    <i class="fa fa-book" style="font-size:40px;"></i><br/><br/>
    <div class="btn btn-lg btn-block btn-warning" style="color:white;">AMBIL ANTRIAN</div>
  </button>
  </form>
  <form class="col-md alert btn-danger" action="<?php echo $link_kasir;?>" method="POST">
  <input type="hidden" name="ad_jenis_id" value="3">
  <button class="col-md alert btn-lg btn-danger" style="height: 270px;color:white;">
    <b style="font-size:30px;">MEJA<br/>KASIR</b><br/><br/>
    <i class="fa fa-money" style="font-size:40px;"></i><br/><br/>
    <div class="btn btn-lg btn-block btn-info" style="color:white;">AMBIL ANTRIAN</div>
  </button>
  </form>
  <form class="col-md alert btn-warning" action="<?php echo $link_produk;?>" method="POST">
  <input type="hidden" name="ad_jenis_id" value="4">
  <button class="col-md alert btn-lg btn-warning" style="height: 270px;color:white;">
    <b style="font-size:30px;">PRODUK<br/>PENGADILAN</b><br/><br/>
    <i class="fa fa-file" style="font-size:40px;"></i><br/><br/>
    <div class="btn btn-lg btn-block btn-success">AMBIL ANTRIAN</div>
  </button>
  </form>
  <form class="col-md alert btn-danger" action="<?php echo $link_pengaduan;?>" method="POST">
  <input type="hidden" name="ad_jenis_id" value="5">
  <button class="alert btn-lg btn-danger" style="height: 270px;width:100%;color:white;">
    <b style="font-size:30px;">LAYANAN<br/>PENGADUAN</b><br/><br/>
    <i class="fa fa-ticket" style="font-size:40px;"></i><br/><br/>
    <div class="btn btn-lg btn-block btn-info">AMBIL ANTRIAN</div>
  </button>
  </form>
  <div class="col-md alert btn-primary">
  <button class="col-md alert btn-lg btn-primary" style="height: 270px;color:white;" data-toggle="modal" data-target="#myModal">
    <b style="font-size:30px;">JADWAL<br/>SIDANG</b><br/><br/>
    <i class="fa fa-calendar" style="font-size:40px;"></i><br/><br/>
    <a href="#" class="btn btn-lg btn-block btn-danger">AMBIL ANTRIAN</a>
  </button>
  </div>
</div>
<hr/>
</div> <!-- end container -->
</body>
</html>

<!-- The Modal -->
<div class="modal" id="myModal">
  <div class="container">
    <div class="modal-content">

      <!-- Modal Header -->
      <div class="modal-header">
        <h4 class="modal-title">JADWAL SIDANG <?php echo strtoupper($instansi->keterangan);?></h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>

      <!-- Modal body -->
      <div class="modal-body">
        <div class="row">
          <?php foreach($jadwal_sidang as $js){ ?>
          <?php if(empty($js->ad_nomor_panggil) OR $js->ad_nomor_panggil == ''){ ?>
          <form class="col-md-4" action="<?php echo $link_sidang;?>" method="POST">
            <input type="hidden" name="ad_jenis_id" value="6">
            <input type="hidden" name="ad_nomor_perkara" value="<?php echo $js->nomor_perkara; ?>">
            <input type="hidden" name="ad_ruangan" value="<?php echo $js->ruangan;?>">
            <input type="hidden" name="ad_para_pihak" value="<?php echo $js->para_pihak;?>">
            <button type="submit" class="alert btn-info" style="width: 100%;height: 200px;">
              <b>ANTRIAN SIDANG</b><br/>Nomor Perkara<br/>
              <b><?php echo $js->nomor_perkara; ?></b><br/>
              <i><?php echo $js->pihak1_text; ?><br/>
              <?php echo $js->pihak2_text; ?></i><br/>
              <span style="font-size: 10px;">Ruang Sidang : <?php if(empty($js->ruangan)){echo '1';}else{echo $js->ruangan;}?></span>
            </button>
          </form>
          <?php }else{ ?>
          <div class="col-md-4" action="" method="POST">
            <input type="hidden" name="ad_jenis_id" value="5">
        <input type="hidden" name="ad_nomor_perkara" value="<?php echo $js->nomor_perkara; ?>">
            <input type="hidden" name="ad_ruangan" value="<?php echo $js->ruangan;?>">
            <button type="submit" class="alert btn-default" style="width: 100%;height: 200px;">
              <b>NOMOR <?php echo $js->ad_nomor_panggil;?></b><br/><?php echo date('d-m-Y H:i:s',strtotime($js->ad_tgl));?><br/>
              <b><?php echo $js->nomor_perkara; ?></b><br/>
              <i><?php echo $js->pihak1_text; ?><br/>
              <?php echo $js->pihak2_text; ?></i><br/>
              <span style="font-size: 10px;">Ruang Sidang : <?php if(empty($js->ruangan)){echo '1';}else{echo $js->ruangan;}?></span>
            </button>
          </div>
          <?php } ?>
        <?php } ?>
        </div>
      </div>

      <!-- Modal footer -->
      <div class="modal-footer">
        <button type="button" class="btn btn-danger" data-dismiss="modal">Kembali</button>
      </div>

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

v_cetak_antrian.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();
  $link_web = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 12")->row();

  $hari=date('D');
  if($hari=='Sun'){$hari='Minggu';}
  else if($hari=='Mon'){$hari='Senin';}
  else if($hari=='Tue'){$hari='Selasa';}
  else if($hari=='Wed'){$hari='Rabu';}
  else if($hari=='Thu'){$hari='Kamis';}
  else if($hari=='Fri'){$hari='Jum\'at';}
  else if($hari=='Sat'){$hari='Sabtu';
  }
  
  $bulan=date('m');
  if($bulan=='01'){$bulan='Januari';}
  else if($bulan=='02'){$bulan='Februari';}
  else if($bulan=='03'){$bulan='Maret';}
  else if($bulan=='04'){$bulan='April';}
  else if($bulan=='05'){$bulan='Mei';}
  else if($bulan=='06'){$bulan='Juni';}
  else if($bulan=='07'){$bulan='Juli';}
  else if($bulan=='08'){$bulan='Agustus';}
  else if($bulan=='09'){$bulan='September';}
  else if($bulan=='10'){$bulan='Oktober';}
  else if($bulan=='11'){$bulan='November';}
  else if($bulan=='12'){$bulan='Desember';}
  
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="2; url=<?php echo base_url('antrian_depan');?>">
<textarea id="printing-css" style="display:none;">.no-print{display:none}</textarea>
<iframe id="printing-frame" name="print_frame" src="about:blank" style="display:none;"></iframe>
<script type="text/javascript">
 window.focus();
 window.print();
//}
</script>
</head>
<body>
<div id="print_antrian">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<center>
<table style="width:300px;">
<tr>
<td class="text-center">
<div class="container text-center">
  <div class="row">
    <div class="col-md bg-success" style="padding:10px;text-align:center">
      <div style="font-weight:bold;font-size:20px;padding-bottom:5px;"><?php echo strtoupper($instansi->keterangan);?></div>
      <div style="border-top:1px solid gray;width: 230px;margin-left: auto;margin-right: auto;"></div>
      <div style="padding:5px;font-weight:bold;font-size:15px;"><?php echo $row->ad_jenis_nama;?></div>			
      <div style="font-size:50px;font-weight:bold;padding:5px;">
        <?php echo $row->ad_nomor_panggil;?>
      </div>
      <div style="padding-top:5px;font-size:13px;">
      <?php echo date('d-m-Y H:i:s' ,strtotime($row->ad_tgl)); ?>
      </div>
      <div style="padding:5px;font-size:15px;font-weight:bold">
        Sisa Antrian : <?php echo $row->ad_sisa_antrian;?>
      </div>
      <div style="padding:5px;font-size:13px;"><?php echo $link_web->link;?></div>
      </div>
  </div>
</div>	
</td>
</tr>
</table>
</center>
</div>

</body>
</html>

v_cetak_antrian_sidang.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();
  $link_web = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 12")->row();

  $hari=date('D');
  if($hari=='Sun'){$hari='Minggu';}
  else if($hari=='Mon'){$hari='Senin';}
  else if($hari=='Tue'){$hari='Selasa';}
  else if($hari=='Wed'){$hari='Rabu';}
  else if($hari=='Thu'){$hari='Kamis';}
  else if($hari=='Fri'){$hari='Jum\'at';}
  else if($hari=='Sat'){$hari='Sabtu';
  }
  
  $bulan=date('m');
  if($bulan=='01'){$bulan='Januari';}
  else if($bulan=='02'){$bulan='Februari';}
  else if($bulan=='03'){$bulan='Maret';}
  else if($bulan=='04'){$bulan='April';}
  else if($bulan=='05'){$bulan='Mei';}
  else if($bulan=='06'){$bulan='Juni';}
  else if($bulan=='07'){$bulan='Juli';}
  else if($bulan=='08'){$bulan='Agustus';}
  else if($bulan=='09'){$bulan='September';}
  else if($bulan=='10'){$bulan='Oktober';}
  else if($bulan=='11'){$bulan='November';}
  else if($bulan=='12'){$bulan='Desember';}
  
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="3; url=<?php echo base_url('antrian_depan');?>">
<textarea id="printing-css" style="display:none;">.no-print{display:none}</textarea>
<iframe id="printing-frame" name="print_frame" src="about:blank" style="display:none;"></iframe>
<script type="text/javascript">
 window.focus();
 window.print();
//}
</script>
</head>
<body>
<div id="print_antrian">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<center>
<table style="width:300px;">
<tr>
<td class="text-center">
<div class="container text-center">
  <div class="row">
    <div class="col-md bg-success" style="padding:10px;text-align:center">
      <div style="font-weight:bold;font-size:20px;padding-bottom:5px;"><?php echo strtoupper($instansi->keterangan);?></div>
      <div style="border-top:1px solid gray;width: 230px;margin-left: auto;margin-right: auto;"></div>
      <div style="padding:5px;font-weight:bold;font-size:15px;"><?php echo $row->ad_jenis_nama;?></div>			
      <div style="font-size:50px;font-weight:bold;padding:5px;">
        <?php echo $row->ad_nomor_panggil;?>
      </div>			
      <div style="font-size:18px;font-weight:bold;padding:5px;">
        Nomor Perkara<br/>
        <?php echo $row->ad_nomor_perkara;?>
      </div>
      <div style="padding-top:5px;font-size:13px;">
      <span style="font-size: 10px;">Ruang Sidang : <?php if(empty($row->ruangan)){echo '1';}else{echo $row->ruangan;}?></span><br/>
      <?php echo date('d-m-Y H:i:s' ,strtotime($row->ad_tgl)); ?>
      </div>
      <div style="padding:5px;font-size:15px;font-weight:bold">
        Sisa Antrian : <?php echo $row->ad_sisa_antrian;?>
      </div>
      <div style="padding:5px;font-size:13px;"><?php echo $link_web->link;?></div>
      </div>
  </div>
</div>	
</td>
</tr>
</table>
</center>
</div>

</body>
</html>

Pada update ini dibuat 2 jenis untuk display antrian ptsp dan 1 display untuk antrian sidang

v_tampil_antrian.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();
?>


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $sistem->judul.' | '.$sistem->deskripsi;?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!--=================================================================-->
  <link rel="icon" type="image/png" href="<?php echo base_url('img/'.$fav);?>"/>
<!--=================================================================-->
  <link rel="stylesheet" href="<?php echo base_url('bootstrap4/css/bootstrap.min.css');?>">
  <link rel="stylesheet" href="<?php echo base_url();?>bower_components/font-awesome/css/font-awesome.min.css">
  <script src="<?php echo base_url('bootstrap4/js/jquery.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/popper.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/bootstrap.min.js');?>"></script>

</head>
<body>
<div class="container">
<h1 align="center"><?php echo strtoupper($instansi->keterangan);?></h1>
<hr/>

<div class="row">
  <div class="col-md-4" style="text-align:center;">
    <div class="alert btn-info">
    <b style="font-size: 80px;" id="load_antrian_informasi"></b><br/>
    <b style="font-size: 30px;">MEJA INFORMASI</b>
    <p></p>
    </div>
  </div>
  <div class="col-md-4" style="text-align:center;">
    <div class="alert btn-primary">
    <b style="font-size: 80px;" id="load_antrian_pendaftaran"></b><br/>
    <b style="font-size: 30px;">PENDAFTARAN</b>
    <p></p>
    </div>    
  </div>
  <div class="col-md-4" style="text-align:center;">
    <div class="alert btn-warning">
    <b style="font-size: 80px;" id="load_antrian_kasir"></b><br/>
    <b style="font-size: 30px;">KASIR</b>
    <p></p>
    </div>    
  </div>
  <div class="col-md-6" style="text-align:center;">
    <div class="alert btn-success">
    <b style="font-size: 80px;" id="load_antrian_produk"></b><br/>
    <b style="font-size: 30px;">PRODUK PENGADILAN</b>
    <p></p>
    </div>
  </div>
  <div class="col-md-6" style="text-align:center;">
    <div class="alert btn-danger">
    <b style="font-size: 80px;" id="load_antrian_pengaduan"></b><br/>
    <b style="font-size: 30px;">PENGADUAN</b>
    <p></p>
    </div>  
  </div>
</div>
</div> <!-- end container -->

    <!-- input type="hidden" id="awal" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="akhir" id="akhir" value="<?php echo $jlhnotif;?>" -->
    <!-- Main content -->
    <section class="content">
      <div class="play-musik d-none">
          <button id="play">Play</button>
          <button id="pause">Pause</button>
      </div>
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
        <div style="padding-top:100px" class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document">
          <div class="modal-content">
            <div class="bg-primary modal-header">
              <!-- button type="button" class="close" data-dismiss="modal">&times;</button-->
                      <div class="modal-title" align="center" id="judul">
                          <div style="font-size:35px;font-weight: bold;">ANTRIAN PTSP</div>
                       </div>
                      </div>
                      <div class="modal-body">
                        <div class="row">
                          <div class="col-md-12" align="center" id="nama">
                              <label style="font-size:50px">
                                NOMOR ANTRIAN<br/>
                                <b style="font-size:70px;"><span id="load_antrian_modal"></span></b>
                                <br>SILAHKAN MENUJU <br/><b><span id="load_antrian_modal_jenis"></span></b>
                              </label>
                          </div>
                        </div>
                      </div>

            <div class="modal-footer bg-primary" id="footer">
              <h4>
                <i>Terimakasih</i>
              </h4>
            </div>
          </div>
        </div>
      </div>

    </section>

    <audio id="start" src="<?php echo base_url('sound/start.mp3');?>"></audio>
    <audio id="antrian" src="<?php echo base_url('sound/antrian.wav');?>"></audio>

    <audio id="suara0" src="<?php echo base_url('sound/0.wav');?>"></audio>
    <audio id="suara1" src="<?php echo base_url('sound/1.wav');?>"></audio>
    <audio id="suara2" src="<?php echo base_url('sound/2.wav');?>"></audio>
    <audio id="suara3" src="<?php echo base_url('sound/3.wav');?>"></audio>
    <audio id="suara4" src="<?php echo base_url('sound/4.wav');?>"></audio>
    <audio id="suara5" src="<?php echo base_url('sound/5.wav');?>"></audio>
    <audio id="suara6" src="<?php echo base_url('sound/6.wav');?>"></audio>
    <audio id="suara7" src="<?php echo base_url('sound/7.wav');?>"></audio>
    <audio id="suara8" src="<?php echo base_url('sound/8.wav');?>"></audio>
    <audio id="suara9" src="<?php echo base_url('sound/9.wav');?>"></audio>

    <audio id="silahkan" src="<?php echo base_url('sound/silahkan.wav');?>"></audio>
    <audio id="menuju" src="<?php echo base_url('sound/menuju.wav');?>"></audio>
    <audio id="suara-layanan" src="<?php echo base_url('sound/layanan.wav');?>"></audio>

    <audio id="kode_A" src="<?php echo base_url('sound/a.wav');?>"></audio>
    <audio id="kode_B" src="<?php echo base_url('sound/b.wav');?>"></audio>
    <audio id="kode_C" src="<?php echo base_url('sound/c.wav');?>"></audio>
    <audio id="kode_D" src="<?php echo base_url('sound/d.wav');?>"></audio>
    <audio id="kode_E" src="<?php echo base_url('sound/e.wav');?>"></audio>

    <audio id="jenis_A" src="<?php echo base_url('sound/informasi.wav');?>"></audio>
    <audio id="jenis_B" src="<?php echo base_url('sound/pendaftaran-perkara.wav');?>"></audio>
    <audio id="jenis_C" src="<?php echo base_url('sound/kasir.wav');?>"></audio>
    <audio id="jenis_D" src="<?php echo base_url('sound/produk-pengadilan.wav');?>"></audio>
    <audio id="jenis_E" src="<?php echo base_url('sound/pengaduan.wav');?>"></audio>

    <audio id="end" src="<?php echo base_url('sound/end.mp3');?>"></audio>

    <input type="hidden" id="awal" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="akhir" id="akhir" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="panggila" id="panggila">
    <input type="hidden" name="panggilb" id="panggilb">
    <input type="hidden" name="panggilc" id="panggilc">
    <input type="hidden" name="layanan"  id="layanan">

<script>
    setInterval(function(){
      $("#load_antrian_modal").load('<?=base_url()?>antrian_depan/load_antrian_modal?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_jenis").load('<?=base_url()?>antrian_depan/load_antrian_modal_jenis?>')
      }, 1000);

    setInterval(function(){
      $("#load_antrian_informasi").load('<?=base_url()?>antrian_depan/load_antrian_informasi?>')
      }, 1000); 
    setInterval(function(){
      $("#load_antrian_pendaftaran").load('<?=base_url()?>antrian_depan/load_antrian_pendaftaran?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_kasir").load('<?=base_url()?>antrian_depan/load_antrian_kasir?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_produk").load('<?=base_url()?>antrian_depan/load_antrian_produk?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_pengaduan").load('<?=base_url()?>antrian_depan/load_antrian_pengaduan?>')
      }, 1000);  

      function data_panggil(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_panggil",
            dataType: "json",
            success : function(data){
            $('#panggila').val(data.no_panggila);
            $('#panggilb').val(data.no_panggilb);
            $('#panggilc').val(data.no_panggilc);
            $('#layanan').val(data.layanan);
            }
          });
        }

        function data_awal(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir",
            dataType: "json",
            success : function(data){
              $('#awal').val(data.no_akhir);
            }
          });
        }

      function data_akhir()
      {
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir",
            dataType: "json",
            success : function(data){
              $('#akhir').val(data.no_akhir)
              //$('#akhir').attr("readonly","true");
            }
          });
      }

      function cektotal()
      {
        var awal = document.getElementById('awal');
        var akhir = document.getElementById('akhir');
        if (awal.value == akhir.value)
        {
          
        }
        else
        {
            document.getElementById("play").click();

            $('#myModal').modal({
                show:true,
                backdrop:true,
                keyboard:true,
              });

     document.getElementById('start').pause();
     document.getElementById('start').currentTime=0;
     document.getElementById('start').play();
       
     //SET DELAY UNTUK MEMAINKAN REKAMAN NOMOR URUT  
     totalwaktu=document.getElementById('start').duration*1000;
     setTimeout(function() {
       document.getElementById('antrian').pause();
       document.getElementById('antrian').currentTime=0;
       document.getElementById('antrian').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       var kode = document.getElementById('layanan').value;
       document.getElementById('kode_'+kode+'').pause();
       document.getElementById('kode_'+kode+'').currentTime=0;
       document.getElementById('kode_'+kode+'').play();
     }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var a = document.getElementById('panggila').value;
        document.getElementById('suara'+a+'').pause();
        document.getElementById('suara'+a+'').currentTime=0;
        document.getElementById('suara'+a+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var b = document.getElementById('panggilb').value;
        document.getElementById('suara'+b+'').pause();
        document.getElementById('suara'+b+'').currentTime=0;
        document.getElementById('suara'+b+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var c = document.getElementById('panggilc').value;
        document.getElementById('suara'+c+'').pause();
        document.getElementById('suara'+c+'').currentTime=0;
        document.getElementById('suara'+c+'').play();
          }, totalwaktu);

     totalwaktu=totalwaktu+1000;
     setTimeout(function() {
       document.getElementById('silahkan').pause();
       document.getElementById('silahkan').currentTime=0;
       document.getElementById('silahkan').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1000;
     setTimeout(function() {
       document.getElementById('menuju').pause();
       document.getElementById('menuju').currentTime=0;
       document.getElementById('menuju').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       document.getElementById('suara-layanan').pause();
       document.getElementById('suara-layanan').currentTime=0;
       document.getElementById('suara-layanan').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       var layanan = document.getElementById('layanan').value;
       document.getElementById('jenis_'+layanan+'').pause();
       document.getElementById('jenis_'+layanan+'').currentTime=0;
       document.getElementById('jenis_'+layanan+'').play();
     }, totalwaktu);

  totalwaktu=totalwaktu+2000;
  setTimeout(function() {
      document.getElementById('end').pause();
      document.getElementById('end').currentTime=0;
      document.getElementById('end').play();
     }, totalwaktu);

            setTimeout(function(){
              $('#myModal').modal('hide');
            }, 20000);

            data_awal();
        }
      }

  $(document).ready(function(){

});

      setInterval(function()
      {
        data_panggil();
      }, 1000);

      setInterval(function()
      {
        data_akhir();
        cektotal();
      }, 2000);

    </script>


</body>
</html>

kemudian untuk jenis yang kedua menggunakan video informasi yang bisa di update melalui halaman admin, seperti ini

v_tampil_antrian_ptsp.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();


  $hari=date('D');
  if($hari=='Sun'){$hari='Minggu';}
  else if($hari=='Mon'){$hari='Senin';}
  else if($hari=='Tue'){$hari='Selasa';}
  else if($hari=='Wed'){$hari='Rabu';}
  else if($hari=='Thu'){$hari='Kamis';}
  else if($hari=='Fri'){$hari='Jum\'at';}
  else if($hari=='Sat'){$hari='Sabtu';
  }
  
  $bulan=date('m');
  if($bulan=='01'){$bulan='Januari';}
  else if($bulan=='02'){$bulan='Februari';}
  else if($bulan=='03'){$bulan='Maret';}
  else if($bulan=='04'){$bulan='April';}
  else if($bulan=='05'){$bulan='Mei';}
  else if($bulan=='06'){$bulan='Juni';}
  else if($bulan=='07'){$bulan='Juli';}
  else if($bulan=='08'){$bulan='Agustus';}
  else if($bulan=='09'){$bulan='September';}
  else if($bulan=='10'){$bulan='Oktober';}
  else if($bulan=='11'){$bulan='November';}
  else if($bulan=='12'){$bulan='Desember';}

?>


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $sistem->judul.' | '.$sistem->deskripsi;?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!--=================================================================-->
  <link rel="icon" type="image/png" href="<?php echo base_url('img/'.$fav);?>"/>
<!--=================================================================-->
  <link rel="stylesheet" href="<?php echo base_url('bootstrap4/css/bootstrap.min.css');?>">
  <link rel="stylesheet" href="<?php echo base_url();?>bower_components/font-awesome/css/font-awesome.min.css">
  <script src="<?php echo base_url('bootstrap4/js/jquery.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/popper.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/bootstrap.min.js');?>"></script>

</head>
<body>
<div class="container">
<div style="margin: 10px;"></div>

<div class="row">
  <div class="col-md-9">
    <div style="width: 100%;padding:5px;color:white;font-weight: bold;" class="bg-danger"><marquee><?php echo $video->desk_slide;?></marquee></div>
    <video class="" src="<?php echo base_url('video/'.$video->gbr_sampul_slide);?>" width="100%" muted loop controls autoplay class="img img-thumbnail"></video>
  </div>
  <div class="col-md-3" style="color:white;">
      <div class="alert btn-primary text-center">
        <b style="font-size: 37px;" id="load_antrian_informasi"></b><br/>
        <b>MEJA INFORMASI</b><br/>
      </div>
      <div class="alert btn-info text-center">
        <b style="font-size: 37px;" id="load_antrian_pendaftaran"></b><br/>
        <b>PENDAFTARAN PERKARA</b><br/>
      </div>
      <div class="alert bg-warning text-center">
        <b style="font-size: 37px;" id="load_antrian_kasir"></b><br/>
        <b>KASIR</b><br/>
      </div>
      <div class="alert btn-success text-center">
        <b style="font-size: 37px;" id="load_antrian_produk"></b><br/>
        <b>PRODUK PENGADILAN</b><br/>
      </div>
      <div class="alert btn-danger text-center">
        <b style="font-size: 37px;" id="load_antrian_pengaduan"></b><br/>
        <b>PENGADUAN</b><br/>
      </div>
  </div>
  <div class="col-md-12">
    <div class="bg-danger" style="color:white;padding:10px;font-weight: bold;font-size:20px;">
      PUKUL : <span id="jam_sekarang"></span> <span style="float:right;"><?php echo $hari.', '.date('d').' '.$bulan.' '.date('Y');?></span>
    </div>
  </div>
</div>

</div> <!-- end container -->

    <section class="content">
      <div class="play-musik d-none">
          <button id="play">Play</button>
          <button id="pause">Pause</button>
      </div>
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
        <div style="padding-top:100px" class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document">
          <div class="modal-content">
            <div class="bg-primary modal-header">
              <!-- button type="button" class="close" data-dismiss="modal">&times;</button-->
                      <div class="modal-title" align="center" id="judul">
                          <div style="font-size:35px;font-weight: bold;">ANTRIAN PTSP</div>
                       </div>
                      </div>
                      <div class="modal-body">
                        <div class="row">
                          <div class="col-md-12" align="center" id="nama">
                              <label style="font-size:50px">
                                NOMOR ANTRIAN<br/>
                                <b style="font-size:70px;"><span id="load_antrian_modal"></span></b>
                                <br>SILAHKAN MENUJU <br/><b><span id="load_antrian_modal_jenis"></span></b>
                              </label>
                          </div>
                        </div>
                      </div>

            <div class="modal-footer bg-primary" id="footer">
              <h4>
                <i>Terimakasih</i>
              </h4>
            </div>
          </div>
        </div>
      </div>

    </section>

    <audio id="start" src="<?php echo base_url('sound/start.mp3');?>"></audio>
    <audio id="antrian" src="<?php echo base_url('sound/antrian.wav');?>"></audio>

    <audio id="suara0" src="<?php echo base_url('sound/0.wav');?>"></audio>
    <audio id="suara1" src="<?php echo base_url('sound/1.wav');?>"></audio>
    <audio id="suara2" src="<?php echo base_url('sound/2.wav');?>"></audio>
    <audio id="suara3" src="<?php echo base_url('sound/3.wav');?>"></audio>
    <audio id="suara4" src="<?php echo base_url('sound/4.wav');?>"></audio>
    <audio id="suara5" src="<?php echo base_url('sound/5.wav');?>"></audio>
    <audio id="suara6" src="<?php echo base_url('sound/6.wav');?>"></audio>
    <audio id="suara7" src="<?php echo base_url('sound/7.wav');?>"></audio>
    <audio id="suara8" src="<?php echo base_url('sound/8.wav');?>"></audio>
    <audio id="suara9" src="<?php echo base_url('sound/9.wav');?>"></audio>

    <audio id="silahkan" src="<?php echo base_url('sound/silahkan.wav');?>"></audio>
    <audio id="menuju" src="<?php echo base_url('sound/menuju.wav');?>"></audio>
    <audio id="suara-layanan" src="<?php echo base_url('sound/layanan.wav');?>"></audio>

    <audio id="kode_A" src="<?php echo base_url('sound/a.wav');?>"></audio>
    <audio id="kode_B" src="<?php echo base_url('sound/b.wav');?>"></audio>
    <audio id="kode_C" src="<?php echo base_url('sound/c.wav');?>"></audio>
    <audio id="kode_D" src="<?php echo base_url('sound/d.wav');?>"></audio>
    <audio id="kode_E" src="<?php echo base_url('sound/e.wav');?>"></audio>

    <audio id="jenis_A" src="<?php echo base_url('sound/informasi.wav');?>"></audio>
    <audio id="jenis_B" src="<?php echo base_url('sound/pendaftaran-perkara.wav');?>"></audio>
    <audio id="jenis_C" src="<?php echo base_url('sound/kasir.wav');?>"></audio>
    <audio id="jenis_D" src="<?php echo base_url('sound/produk-pengadilan.wav');?>"></audio>
    <audio id="jenis_E" src="<?php echo base_url('sound/pengaduan.wav');?>"></audio>

    <audio id="end" src="<?php echo base_url('sound/end.mp3');?>"></audio>

    <input type="hidden" id="awal" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="akhir" id="akhir" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="panggila" id="panggila">
    <input type="hidden" name="panggilb" id="panggilb">
    <input type="hidden" name="panggilc" id="panggilc">
    <input type="hidden" name="layanan"  id="layanan">

<script>
    var myVar = setInterval(myTimer, 1000);
    function myTimer() {
        var d = new Date();
        document.getElementById("jam_sekarang").innerHTML = d.toLocaleTimeString();
    }

    setInterval(function(){
      $("#load_antrian_modal").load('<?=base_url()?>antrian_depan/load_antrian_modal?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_jenis").load('<?=base_url()?>antrian_depan/load_antrian_modal_jenis?>')
      }, 1000);

    setInterval(function(){
      $("#load_antrian_informasi").load('<?=base_url()?>antrian_depan/load_antrian_informasi?>')
      }, 1000); 
    setInterval(function(){
      $("#load_antrian_pendaftaran").load('<?=base_url()?>antrian_depan/load_antrian_pendaftaran?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_kasir").load('<?=base_url()?>antrian_depan/load_antrian_kasir?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_produk").load('<?=base_url()?>antrian_depan/load_antrian_produk?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_pengaduan").load('<?=base_url()?>antrian_depan/load_antrian_pengaduan?>')
      }, 1000);  

      function data_panggil(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_panggil",
            dataType: "json",
            success : function(data){
            $('#panggila').val(data.no_panggila);
            $('#panggilb').val(data.no_panggilb);
            $('#panggilc').val(data.no_panggilc);
            $('#layanan').val(data.layanan);
            }
          });
        }

        function data_awal(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir",
            dataType: "json",
            success : function(data){
              $('#awal').val(data.no_akhir);
            }
          });
        }

      function data_akhir()
      {
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir",
            dataType: "json",
            success : function(data){
              $('#akhir').val(data.no_akhir)
              //$('#akhir').attr("readonly","true");
            }
          });
      }

      function cektotal()
      {
        var awal = document.getElementById('awal');
        var akhir = document.getElementById('akhir');
        if (awal.value == akhir.value)
        {
          
        }
        else
        {
            document.getElementById("play").click();

            $('#myModal').modal({
                show:true,
                backdrop:true,
                keyboard:true,
              });

     document.getElementById('start').pause();
     document.getElementById('start').currentTime=0;
     document.getElementById('start').play();
       
     //SET DELAY UNTUK MEMAINKAN REKAMAN NOMOR URUT  
     totalwaktu=document.getElementById('start').duration*1000;
     setTimeout(function() {
       document.getElementById('antrian').pause();
       document.getElementById('antrian').currentTime=0;
       document.getElementById('antrian').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       var kode = document.getElementById('layanan').value;
       document.getElementById('kode_'+kode+'').pause();
       document.getElementById('kode_'+kode+'').currentTime=0;
       document.getElementById('kode_'+kode+'').play();
     }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var a = document.getElementById('panggila').value;
        document.getElementById('suara'+a+'').pause();
        document.getElementById('suara'+a+'').currentTime=0;
        document.getElementById('suara'+a+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var b = document.getElementById('panggilb').value;
        document.getElementById('suara'+b+'').pause();
        document.getElementById('suara'+b+'').currentTime=0;
        document.getElementById('suara'+b+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var c = document.getElementById('panggilc').value;
        document.getElementById('suara'+c+'').pause();
        document.getElementById('suara'+c+'').currentTime=0;
        document.getElementById('suara'+c+'').play();
          }, totalwaktu);

     totalwaktu=totalwaktu+1000;
     setTimeout(function() {
       document.getElementById('silahkan').pause();
       document.getElementById('silahkan').currentTime=0;
       document.getElementById('silahkan').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1000;
     setTimeout(function() {
       document.getElementById('menuju').pause();
       document.getElementById('menuju').currentTime=0;
       document.getElementById('menuju').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       document.getElementById('suara-layanan').pause();
       document.getElementById('suara-layanan').currentTime=0;
       document.getElementById('suara-layanan').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       var layanan = document.getElementById('layanan').value;
       document.getElementById('jenis_'+layanan+'').pause();
       document.getElementById('jenis_'+layanan+'').currentTime=0;
       document.getElementById('jenis_'+layanan+'').play();
     }, totalwaktu);

  totalwaktu=totalwaktu+2000;
  setTimeout(function() {
      document.getElementById('end').pause();
      document.getElementById('end').currentTime=0;
      document.getElementById('end').play();
     }, totalwaktu);

            setTimeout(function(){
              $('#myModal').modal('hide');
            }, 20000);

            data_awal();
        }
      }

  $(document).ready(function(){

});

      setInterval(function()
      {
        data_panggil();
      }, 1000);

      setInterval(function()
      {
        data_akhir();
        cektotal();
      }, 2000);

    </script>


</body>
</html>

dan untuk display antrian sidang. sebelumnya harus mempunyai database SIPP atau Sistem Informasi Penelusuran Perkara yang tidak mungkin bisa dibagikan disini karena merupakan database yang sifatnya rahasia. berikut hasil nya

v_tampil_antrian_sidang.php

<?php 
  $fav = $this->db->query("SELECT gambar FROM tbl_pengaturan WHERE id = 7")->row()->gambar;
  $sistem = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 14")->row();
  $instansi = $this->db->query("SELECT * FROM tbl_pengaturan WHERE id = 11")->row();

  $hari=date('D');
  if($hari=='Sun'){$hari='Minggu';}
  else if($hari=='Mon'){$hari='Senin';}
  else if($hari=='Tue'){$hari='Selasa';}
  else if($hari=='Wed'){$hari='Rabu';}
  else if($hari=='Thu'){$hari='Kamis';}
  else if($hari=='Fri'){$hari='Jum\'at';}
  else if($hari=='Sat'){$hari='Sabtu';
  }
  
  $bulan=date('m');
  if($bulan=='01'){$bulan='Januari';}
  else if($bulan=='02'){$bulan='Februari';}
  else if($bulan=='03'){$bulan='Maret';}
  else if($bulan=='04'){$bulan='April';}
  else if($bulan=='05'){$bulan='Mei';}
  else if($bulan=='06'){$bulan='Juni';}
  else if($bulan=='07'){$bulan='Juli';}
  else if($bulan=='08'){$bulan='Agustus';}
  else if($bulan=='09'){$bulan='September';}
  else if($bulan=='10'){$bulan='Oktober';}
  else if($bulan=='11'){$bulan='November';}
  else if($bulan=='12'){$bulan='Desember';}

?>


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $sistem->judul.' | '.$sistem->deskripsi;?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!--=================================================================-->
  <link rel="icon" type="image/png" href="<?php echo base_url('img/'.$fav);?>"/>
<!--=================================================================-->
  <link rel="stylesheet" href="<?php echo base_url('bootstrap4/css/bootstrap.min.css');?>">
  <link rel="stylesheet" href="<?php echo base_url();?>bower_components/font-awesome/css/font-awesome.min.css">
  <script src="<?php echo base_url('bootstrap4/js/jquery.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/popper.min.js')?>"></script>
  <script src="<?php echo base_url('bootstrap4/js/bootstrap.min.js');?>"></script>

</head>
<body>
<div class="container">
<div style="margin: 10px;"></div>

<div class="row">
  <div class="col-md-9">
    <div style="width: 100%;padding:5px;color:white;font-weight: bold;" class="bg-danger"><marquee><?php echo $video->desk_slide;?></marquee></div>
    <video class="" src="<?php echo base_url('video/'.$video->gbr_sampul_slide);?>" width="100%" muted loop controls autoplay class="img img-thumbnail"></video>
  </div>
  <div class="col-md-3">
      <div class="alert btn-primary text-center">
        <b style="font-size: 90px;" id="load_antrian_sidang1"></b><br/>
        <b>RUANG SIDANG I</b><br/>
      </div>
      <div class="alert btn-info text-center">
        <b style="font-size: 90px;" id="load_antrian_sidang2"></b><br/>
        <b>RUANG SIDANG II</b><br/>
      </div>
      <div class="alert btn-success text-center">
        <b style="font-size: 90px;" id="load_antrian_sidang3"></b><br/>
        <b>RUANG SIDANG III</b><br/>
      </div>
  </div>
  <div class="col-md-12">
    <div class="bg-danger" style="color:white;padding:10px;font-weight: bold;font-size:20px;">
      PUKUL : <span id="jam_sekarang"></span> <span style="float:right;"><?php echo $hari.', '.date('d').' '.$bulan.' '.date('Y');?></span>
    </div>
  </div>
</div>
</div> <!-- end container -->

    <!-- input type="hidden" id="awal" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="akhir" id="akhir" value="<?php echo $jlhnotif;?>" -->
    <!-- Main content -->
    <section class="content">
      <div class="play-musik d-none">
          <button id="play">Play</button>
          <button id="pause">Pause</button>
      </div>
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
        <div style="padding-top:100px" class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document">
          <div class="modal-content">
            <div class="bg-success modal-header">
              <!-- button type="button" class="close" data-dismiss="modal">&times;</button-->
            </div>
                      <div class="modal-body">
                        <div class="row">
                          <div class="col-md-12" align="center">
                            <label style="font-size: 19px">
                              NOMOR ANTRIAN<br/>
                              <b style="font-size:80px;" id="load_antrian_modal_sidang"></b><br/>
                              NOMOR PERKARA<br/>
                              <b style="font-size:30px;" id="load_antrian_modal_no_perkara_sidang"></b>
                            </label>
                          </div>
                          <div class="col-md-12" align="center">
                            <label style="font-size: 19px">
                            <span id="load_antrian_modal_para_pihak_sidang"></span><br/>
                            SILAHKAN MENUJU<br/>
                            <b style="font-size:25px"><span id="load_antrian_modal_nama_ruang_sidang"></span></b>
                            </label>
                          </div>
                        </div>
                      </div>

            <div class="modal-footer bg-success" id="footer">
            </div>
          </div>
        </div>
      </div>

    </section>

    <audio id="start" src="<?php echo base_url('sound/start.mp3');?>"></audio>
    <audio id="antrian" src="<?php echo base_url('sound/antrian.wav');?>"></audio>

    <audio id="suara0" src="<?php echo base_url('sound/0.wav');?>"></audio>
    <audio id="suara1" src="<?php echo base_url('sound/1.wav');?>"></audio>
    <audio id="suara2" src="<?php echo base_url('sound/2.wav');?>"></audio>
    <audio id="suara3" src="<?php echo base_url('sound/3.wav');?>"></audio>
    <audio id="suara4" src="<?php echo base_url('sound/4.wav');?>"></audio>
    <audio id="suara5" src="<?php echo base_url('sound/5.wav');?>"></audio>
    <audio id="suara6" src="<?php echo base_url('sound/6.wav');?>"></audio>
    <audio id="suara7" src="<?php echo base_url('sound/7.wav');?>"></audio>
    <audio id="suara8" src="<?php echo base_url('sound/8.wav');?>"></audio>
    <audio id="suara9" src="<?php echo base_url('sound/9.wav');?>"></audio>

    <audio id="dengan-nomor" src="<?php echo base_url('sound/dengan-nomor-perkara.mp3');?>"></audio>

    <audio id="silahkan" src="<?php echo base_url('sound/dipersilahkan.mp3');?>"></audio>

    <audio id="kode_A" src="<?php echo base_url('sound/a.wav');?>"></audio>
    <audio id="kode_B" src="<?php echo base_url('sound/b.wav');?>"></audio>
    <audio id="kode_C" src="<?php echo base_url('sound/c.wav');?>"></audio>
    <audio id="kode_D" src="<?php echo base_url('sound/d.wav');?>"></audio>
    <audio id="kode_E" src="<?php echo base_url('sound/e.wav');?>"></audio>
    <audio id="kode_S" src="<?php echo base_url('sound/s.wav');?>"></audio>

    <audio id="jenis_A" src="<?php echo base_url('sound/informasi.wav');?>"></audio>
    <audio id="jenis_B" src="<?php echo base_url('sound/pendaftaran-perkara.wav');?>"></audio>
    <audio id="jenis_C" src="<?php echo base_url('sound/kasir.wav');?>"></audio>
    <audio id="jenis_D" src="<?php echo base_url('sound/produk-pengadilan.wav');?>"></audio>
    <audio id="jenis_E" src="<?php echo base_url('sound/pengaduan.wav');?>"></audio>
    <audio id="jenis_S" src="<?php echo base_url('sound/pengaduan.wav');?>"></audio>

    <audio id="end" src="<?php echo base_url('sound/end.mp3');?>"></audio>

    <input type="hidden" id="awal" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="akhir" id="akhir" value="<?php echo $jlhnotif;?>">
    <input type="hidden" name="panggila" id="panggila">
    <input type="hidden" name="panggilb" id="panggilb">
    <input type="hidden" name="panggilc" id="panggilc">
    <input type="hidden" name="layanan"  id="layanan">
    <input type="hidden" name="pkr0" id="pkr0">
    <input type="hidden" name="pkr1" id="pkr1">
    <input type="hidden" name="pkr2" id="pkr2">
    <input type="hidden" name="pkr3" id="pkr3">
    <input type="hidden" name="ruang" id="ruang">

<script>
    var myVar = setInterval(myTimer, 1000);
    function myTimer() {
        var d = new Date();
        document.getElementById("jam_sekarang").innerHTML = d.toLocaleTimeString();
    }

    setInterval(function(){
      $("#load_antrian_modal_sidang").load('<?=base_url()?>antrian_depan/load_antrian_modal_sidang?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_jenis_sidang").load('<?=base_url()?>antrian_depan/load_antrian_modal_jenis_sidang?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_no_perkara_sidang").load('<?=base_url()?>antrian_depan/load_antrian_modal_no_perkara_sidang?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_para_pihak_sidang").load('<?=base_url()?>antrian_depan/load_antrian_modal_para_pihak_sidang?>')
      }, 1000);
    setInterval(function(){
      $("#load_antrian_modal_nama_ruang_sidang").load('<?=base_url()?>antrian_depan/load_antrian_modal_nama_ruang_sidang?>')
      }, 1000);


    setInterval(function(){
      $("#load_antrian_sidang1").load('<?=base_url()?>antrian_depan/load_antrian_sidang1?>')
      }, 1000); 
    setInterval(function(){
      $("#load_antrian_sidang2").load('<?=base_url()?>antrian_depan/load_antrian_sidang2?>')
      }, 1000);  
    setInterval(function(){
      $("#load_antrian_sidang3").load('<?=base_url()?>antrian_depan/load_antrian_sidang3?>')
      }, 1000); 

      function data_panggil(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_panggil_sidang",
            dataType: "json",
            success : function(data){
            $('#panggila').val(data.no_panggila);
            $('#panggilb').val(data.no_panggilb);
            $('#panggilc').val(data.no_panggilc);
            $('#layanan').val(data.layanan);
            $('#nomor_perkara').val(data.nomor_perkara);
            $('#pkr0').val(data.pkr0);
            $('#pkr1').val(data.pkr1);
            $('#pkr2').val(data.pkr2);
            $('#pkr3').val(data.pkr3);
            $('#ruang').val(data.ruang);
            }
          });
        }

        function data_awal(){
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir_sidang",
            dataType: "json",
            success : function(data){
              $('#awal').val(data.no_akhir);
            }
          });
        }

      function data_akhir()
      {
        $.ajax({
            type  : "POST",
            url   : "<?=base_url()?>antrian_depan/cari_data_akhir_sidang",
            dataType: "json",
            success : function(data){
              $('#akhir').val(data.no_akhir)
            }
          });
      }

      function cektotal()
      {
        var awal = document.getElementById('awal');
        var akhir = document.getElementById('akhir');
        if (awal.value == akhir.value)
        {
          
        }
        else
        {
            document.getElementById("play").click();

            $('#myModal').modal({
                show:true,
                backdrop:true,
                keyboard:true,
              });

     document.getElementById('start').pause();
     document.getElementById('start').currentTime=0;
     document.getElementById('start').play();
       
     //SET DELAY UNTUK MEMAINKAN REKAMAN NOMOR URUT  
     totalwaktu=document.getElementById('start').duration*1000;
     setTimeout(function() {
       document.getElementById('antrian').pause();
       document.getElementById('antrian').currentTime=0;
       document.getElementById('antrian').play();
     }, totalwaktu);

     totalwaktu=totalwaktu+1200;
     setTimeout(function() {
       var kode = document.getElementById('layanan').value;
       document.getElementById('kode_'+kode+'').pause();
       document.getElementById('kode_'+kode+'').currentTime=0;
       document.getElementById('kode_'+kode+'').play();
     }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var a = document.getElementById('panggila').value;
        document.getElementById('suara'+a+'').pause();
        document.getElementById('suara'+a+'').currentTime=0;
        document.getElementById('suara'+a+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var b = document.getElementById('panggilb').value;
        document.getElementById('suara'+b+'').pause();
        document.getElementById('suara'+b+'').currentTime=0;
        document.getElementById('suara'+b+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var c = document.getElementById('panggilc').value;
        document.getElementById('suara'+c+'').pause();
        document.getElementById('suara'+c+'').currentTime=0;
        document.getElementById('suara'+c+'').play();
          }, totalwaktu);

     totalwaktu=totalwaktu+1000;
     setTimeout(function() {
       document.getElementById('dengan-nomor').pause();
       document.getElementById('dengan-nomor').currentTime=0;
       document.getElementById('dengan-nomor').play();
     }, totalwaktu);

      totalwaktu=totalwaktu+3000;
      setTimeout(function() {
        var pkr0 = document.getElementById('pkr0').value;
        document.getElementById('suara'+pkr0+'').pause();
        document.getElementById('suara'+pkr0+'').currentTime=0;
        document.getElementById('suara'+pkr0+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var pkr1 = document.getElementById('pkr1').value;
        document.getElementById('suara'+pkr1+'').pause();
        document.getElementById('suara'+pkr1+'').currentTime=0;
        document.getElementById('suara'+pkr1+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var pkr2 = document.getElementById('pkr2').value;
        document.getElementById('suara'+pkr2+'').pause();
        document.getElementById('suara'+pkr2+'').currentTime=0;
        document.getElementById('suara'+pkr2+'').play();
          }, totalwaktu);

      totalwaktu=totalwaktu+1200;
      setTimeout(function() {
        var pkr3 = document.getElementById('pkr3').value;
        document.getElementById('suara'+pkr3+'').pause();
        document.getElementById('suara'+pkr3+'').currentTime=0;
        document.getElementById('suara'+pkr3+'').play();
          }, totalwaktu);

     totalwaktu=totalwaktu+2700;
     setTimeout(function() {
       document.getElementById('silahkan').pause();
       document.getElementById('silahkan').currentTime=0;
       document.getElementById('silahkan').play();
     }, totalwaktu);

      totalwaktu=totalwaktu+3000;
      setTimeout(function() {
        var ruang = document.getElementById('ruang').value;
        document.getElementById('suara'+ruang+'').pause();
        document.getElementById('suara'+ruang+'').currentTime=0;
        document.getElementById('suara'+ruang+'').play();
          }, totalwaktu);

    totalwaktu=totalwaktu+2000;
    setTimeout(function() {
        document.getElementById('end').pause();
        document.getElementById('end').currentTime=0;
        document.getElementById('end').play();
       }, totalwaktu);

            setTimeout(function(){
              $('#myModal').modal('hide');
            }, 30000);

            data_awal();
        }
      }

      setInterval(function()
      {
        data_panggil();
      }, 1000);

      setInterval(function()
      {
        data_akhir();
        cektotal();
      }, 2000);

    </script>


</body>
</html>

untuk kali ini, yang dibahas cuma bagian views, untuk models dan controllers nya akan di update di posting berikutnya

Recommended For You

About the Author: adyrhs

Leave a Reply

Your email address will not be published. Required fields are marked *