<title>List Data Tujuan</title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js" type="text/javascript"  charset="utf8" ></script>
<script>
	$(document).ready(function(){
		$('#example').dataTable();
	});
</script>
<div id="pagetitle">LIST DATA TUJUAN: MEDIUM BUS</div>
<div id="bataspadding">
	<div id="tomboltambah">
		<a href="?m=tujuan_input" class="tombolaksi">+ TUJUAN</a>
		<?php
			$jbdb = mysqli_query($koneksi, "SELECT * FROM tbl_bustype WHERE bustype_status='Aktif'");
			while($jbdt = mysqli_fetch_array($jbdb)) {
		?>
			<a href="?m=tujuan_index1&id=<?php echo $jbdt['bustype_id']; ?>" class="tombolaksi"><?php echo $jbdt['bustype_nama']; ?></a>
		<?php } ?>
	</div>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="display" id="example">
		<thead>
			<tr>
				<th>NO</th>
				<th>TUJUAN</th>
				<th>JENIS</th>
				<th>HARGA</th>
				<th>HARI</th>
				<th>STATUS</th>
				<th>#</th>
			</tr>
		</thead>
  		<?php
			$nomor = 1;
			$query = mysqli_query($koneksi, "SELECT * FROM cmas_tujuan WHERE bustype_id='2' ORDER BY tujuan_id ASC");
			while($data = mysqli_fetch_array($query)){
			$harga = $data['tujuan_harga'];
			?>
			<tr>
				<td align="center" valign="middle"><?php echo $nomor; ?></td>
				<td>
					<a href="?m=tujuan_edit&id=<?php echo $data['tujuan_id']; ?>">
						<?php echo $data['tujuan_nama']; ?>
					</a><br>
					<font color="#999"><?php echo $data['tujuan_seo']; ?></font>
				</td>
				<td><?php echo $data['bustype_nama']; ?></td>
				<td align="right">Rp. <?php echo number_format($harga,0,",","."); ?></td>
				<td align="center"><?php echo $data['tujuan_hari']; ?> Hari</td>
				<td align="center"><?php echo $data['tujuan_status']; ?></td>
				<td align="center" valign="middle" width="10">
					<a href="?m=tujuan_hapus&id=<?php echo $data['tujuan_id']; ?>" onclick="return confirm('DATA TUJUAN AKAN DIHAPUS, ANDA YAKIN?');" class="tombolaksi">Del</a>
				</td>
			</tr>
		<?php $nomor++; } ?>
	</table>
</div>