			<?php  
				    include("config/connection.php");
              		$sql ="select *, sum(tb_pemesanan_detil.harga) as total, tb_member.* from tb_pemesanan
							inner join tb_pemesanan_detil on tb_pemesanan.id_pemesanan = tb_pemesanan_detil.id_pemesanan
							inner join tb_member on tb_pemesanan.id_member = tb_member.id_member
							where tb_pemesanan.id_pemesanan = '".$_POST['id_pemesanan']."'";
					$hasil = mysql_query($sql) or die("Kesalahan Pada SQL");
					mysql_close($test);
					$a = 0;
					$row = mysql_fetch_object($hasil);
						
						$id_member = $row->id_member;    
						$id_pemesanan = $row->id_pemesanan;
						$nama = $row->nama;
						$email = $row->email;
						$alamat = $row->alamat;
						$telp = $row->telp;
						$tanggal_trx = $row->tanggal_trx;
						$total = $row->total;
						$a = $a + 1;
						
			?>
                <table class="table" width="100%">
                    <tbody>
                      <tr>
                        <td>Kode Pemesanan</td>
                        <td>:</td>
                        <td><?PHP echo $id_pemesanan ?></td>
                      </tr>
                      <tr>
                        <td>ID Member</td>
                        <td>:</td>
                        <td><?PHP echo $id_member ?></td>
                      </tr>
                      <tr>
                        <td>Nama</td>
                        <td>:</td>
                        <td><?PHP echo $nama ?></td>
                      </tr>
                      <tr>
                        <td>Email</td>
                        <td>:</td>
                        <td><?PHP echo $email; ?></td>
                      </tr>
                      <tr>
                        <td>Nomer Telp/Hp</td>
                        <td>:</td>
                        <td><?PHP echo $telp; ?></td>
                      </tr>
                      <tr>
                        <td>Alamat</td>
                        <td>:</td>
                        <td><?PHP echo $alamat; ?></td>
                      </tr>
                    </tbody>
                  </table>
                  <table class="table table-bordered" width="100%">
                    <thead style="background:#CCC">
                      <tr>
                        <th>Tanggal</th>
                        <th>Nama</th>
                        <th>No Identitas</th>
                        <th>Jadwal</th>
                        <th>Jenis Angkutan</th>
                        <th>Penumpang</th>
                        <th>Harga</th>
                      </tr>
                    </thead>
                    <tbody>
            <?php
			
				    include("config/connection.php");
              		$sql ="select tb_pemesanan_detil.*, tb_angkutan.nama as angkutan, tb_jenis_angkutan.nama as jenis_angkutan from tb_pemesanan_detil 
					inner join tb_angkutan on tb_pemesanan_detil.id_angkutan = tb_angkutan.id_angkutan 
					inner join tb_jenis_angkutan on tb_angkutan.id_jenis_angkutan = tb_jenis_angkutan.id_jenis_angkutan 
					where id_pemesanan = '".$id_pemesanan."'";
					$hasil = mysql_query($sql) or die("Kesalahan Pada SQL");
					mysql_close($test);
					
					while($row = mysql_fetch_object($hasil)){
						    
						$jadwal = $row->jadwal;
						$nama = $row->nama;
						$no_identitas = $row->no_identitas;
						$harga = $row->harga;
						$tanggal = $row->tanggal;
						$angkutan = $row->angkutan;
						$jenis_angkutan = $row->jenis_angkutan;
						if($jadwal == '1'){
							$jadwal = 'Pagi - 10.30 Wita';
						}else{
							$jadwal = 'Sore - 15.30 Wita';
						}
						
						echo "<tr class='odd gradeX context'>";
						echo "<td>".$tanggal."</td>";
						echo "<td>".$nama."</td>";
						echo "<td>".$no_identitas."</td>";
						echo "<td>".$jadwal."</td>";
						echo "<td>".$jenis_angkutan."</td>";
						echo "<td>".$angkutan."</td>";
						echo "<td>Rp.".number_format($harga)."</td>";
						echo "</tr>";
					}
			?>
                    </tbody>
              </table>
			<a href="tiket-booking-proses.php?id_pemesanan=<?php echo $id_pemesanan?>">
            	<button type="submit" class="btn btn-success"><i class='glyphicon glyphicon-print'></i> Cetak</button>
            </a>    