<link href="<?php echo $base?>plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $base?>plugins/iCheck/all.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $base?>plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet"/>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.extensions.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/timepicker/bootstrap-timepicker.min.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/iCheck/icheck.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $base?>plugins/autocomplete/shieldui-all.css" />
<link href="<?php echo $base?>bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="<?php echo $base?>bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="<?php echo $base?>bootstrap/js/locales/bootstrap-datetimepicker.id.js" charset="UTF-8"></script>
<script type="text/javascript" src="<?php echo $base?>plugins/autocomplete/shieldui-all.min.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
	var base = <?php echo json_encode($base);?>;
	
	
	$('.context').click(function(e){
		var kode = $(this).attr('id');
		$('#kodekunci').val(kode);
   		$("#menuklik").modal('show');
	});
	
	/*$('.context').bind('contextmenu', function(e){
		e.preventDefault();
    	var kode = $(this).attr('id');
		$('#kodekunci').val(kode);
   		$("#menuklik").modal('show');
	});*/
	
	$('#editdata').click(function(){
		var kode = $('#kodekunci').val();
		window.location=''+base+'edit-dosen/'+ kode +'';
	});
	
	$('#nonaktif').click(function(){
		var kode = $('#kodekunci').val();
		if (confirm("Anda yakin me-nonaktifkan data dengan kode " + kode+"?")){
			window.location=''+base+'query-delete-dosen/'+ kode +'';	
		}
	});
	
	$('#newdata').click(function(){
		window.location=''+base+'add-dosen';
	});

  });
   
</script>
<aside class="right-side">                
                <section class="content-header">
                    <h1>
                        Data Tiket
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="home"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li><a href="#">Laporan</a></li>
                        <li class="active">Data Tiket</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="box">
                                <div class="box-header">
                                </div><!-- /.box-header -->
        <div class="table-responsive">
        <table id="example1" class="table table-bordered table-striped">
             <thead>
                <tr>
                    <th>No</th>
                    <th>No Tiket</th>
                    <th>Nama</th>
                    <th>No Identitas</th>
					<th>Tanggal</th>
                    <th><div align="center">Aksi</div></th>
                </tr>
            </thead>
            <tbody>
			<?php  
				    include("config/connection.php");
              		$sql ="select tb_tiket.*, tb_angkutan.nama as angkutan from tb_tiket inner join 
							tb_angkutan on tb_angkutan.id_angkutan = tb_tiket.id_angkutan order by tb_tiket.id desc";
					$hasil = mysql_query($sql) or die("Kesalahan Pada SQL");
					mysql_close($test);
					$a = 0;
					while($row = mysql_fetch_object($hasil)){
						$idtiket = $row->id;
						$id_jadwal = $row->id_jadwal;
						$harga = $row->harga;
						$namapenumpang = $row->nama;
						$no_identitas = $row->no_identitas;
						$tanggal = $row->tanggal;
						$no_tiket = $row->no_tiket;
						$a = $a + 1;
						
			?>
            		<tr>
                    	<td><?php echo $a ?></td>
                        <td><?php echo $no_tiket ?></td>
                        <td><?php echo $namapenumpang ?></td>
                        <td><?php echo $no_identitas ?></td>
                        <td><?php echo $tanggal ?></td>
                        <td><div align="center"><a class="btn btn-xs btn-primary btn-inline" href="tiket.php?id=<?php echo $no_tiket?>" target="_blank"><i class="fa fa-print"></i></a></div></td>
                    </tr>
            <?php		
					}
			?>         
        	</tbody>
          </table>
          </div>
        </div><!-- /.box-body -->
      </div><!-- /.box -->
    </div><!-- /.col -->
  </div><!-- /.row -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="js/bootstrap.min.js" type="text/javascript"></script>

        <script src="js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
        <script src="js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="js/AdminLTE/app.js" type="text/javascript"></script>
		<script type="text/javascript">
            $(function() {
                $("#example1").dataTable();
                $('#example2').dataTable({
                    "bPaginate": true,
                    "bLengthChange": false,
                    "bFilter": false,
                    "bSort": true,
                    "bInfo": true,
                    "bAutoWidth": false
                });
            });
        </script>
