• Tidak ada hasil yang ditemukan

Sistem Informasi Pemesanan Tiket Bus Online Pada CV. Chandra Berbasis Web

N/A
N/A
Protected

Academic year: 2017

Membagikan "Sistem Informasi Pemesanan Tiket Bus Online Pada CV. Chandra Berbasis Web"

Copied!
65
0
0

Teks penuh

(1)

LAMPIRAN LISTING PROGRAM

A.

Website Utama

1.

koneksi.php

<?php

$dbhost = "localhost"; $dbuser = "root"; $dbpass = "";

$dbname = "chandra";

$conn = mysql_connect("$dbhost","$dbuser","$dbpass"); if (!$conn) die ('Gagal Melakukan Koneksi');

mysql_select_db($dbname,$conn) or die ('Database Tidak Diketemukan di Server');

?>

2.

index.php

<!DOCTYPE html >

<?php include ("koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA MEDAN</title>

<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="page.css"> </head>

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li class='active'><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li><a href="tiket/cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li>

<li><a href="tiket/bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li>

<li><a href="profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="kontak.php"><span class="glyphicon glyphicon-phone"></span>Kontak</a></li>

</ul> </section> </nav> <?php

if(isset($_GET['info'])){ $display = "block";

(2)

} else{

$display = "none"; $pemberitahuan = ""; }

?>

<div class="alert alert-danger" style="display:<?php echo $display ?>"><?php echo $pemberitahuan; ?>

<button class="close" data-dismiss="alert">&times;</button></div>

<div class="col-sm-4">

<div class="home panel-default">

<div class="home-heading"><span class="glyphicon glyphicon-search"></span> <b>Cari Tiket</b></div>

<div class="panel-body">

<div class="tls">*Silahkan Pilih Tempat Tujuan Anda.</div> <form action="tiket/cari_tiket.php" method="get">

<div class="input-group col-md-5 col-md-offset-7">

<label for="i1" class="col-sm-3 control-label">Jurusan</label> <select type="submit" name="cari" class="form-control"

onchange="this.form.submit()">

<option>Pilih Jurusan ..</option> <?php

$pil=mysql_query("select distinct tujuan from tiket order by tujuan ASC");

while($p=mysql_fetch_array($pil)){ ?>

<option><?php echo $p['tujuan'] ?></option> <?php

} ?> </select> </div>

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

<div class="panel panel-default"> <div class="panel-body">

<div id="judul">---Selamat Datang di Website CV. Chandra---</div> <div class="col-sm-8">

<div class="slider"> <ul> <?php

include ("koneksi.php"); $no=1;

$banner=mysql_query("SELECT * FROM home ORDER BY id ASC"); $jmlS = mysql_num_rows($banner);

while($no<=$jmlS){

$b=mysql_fetch_array($banner);

echo "<li><img src='admin/images/$b[gambar]' /></li>"; $no++;

(3)

<div class="kata col-sm-4"><h2>CV. Chandra adalah bus angkutan umum antar kota.

Website CV. Chandra ini dibuat untuk membantu pelayanan penjualan tiket agar lebih mudah. Sesuai dengan moto kami 'transportasi terpercaya', kami akan selalu memberikan kepercayaan dan kepuasan kepada para pelanggan kami yang tentunya akan terus kami

tingkatkan melalui dukungan tim manajemen dan operasional yang terpercaya.

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

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div> </div> </body> </html> <style> .kata{

width: 48%;

margin-left: -55px; margin-top: -250px; }

.tls{

font-family: "times new roman"; font-size: 12px;

margin-bottom: 10px; }

#judul{

margin-left: 0px; font-size: 22px; color: BLACK; text-align: left;

background-color: #f6f6f6; border-color: #e9e9e9;

font-family:"Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;

padding: 10px 15px;

border-bottom: 1px solid transparent; border-top-right-radius: 3px;

border-top-left-radius: 3px; }

h2{

font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;

font-weight: normal; padding: 10px 100px; font-size: 16px; text-align: justify; }

h1{

font-family: "times new roman"; }

a{

text-decoration: none; }

.plans {

margin-top: 70px;

(4)

padding: 0px 0px; width: 900px;

margin-left: 160px; }

.plans .brands {

display: inline-block; margin: 0 0px 0px 0px; width: 170px;

}

.plans .channels { margin: 100px 0 0 0; }

.plans .plans-items { background-color: navy; padding: 3px 3px;

width: 170px; }

.plans .plans-items:hover { background-color: blue; }

.plans .plans-items:hover strong { color: #01b9ff;

}

.plans .plans-items p { font-weight: 700; padding: 0px; color: #577287; font-size: 1.0em; }

.plans .plans-items strong { color: #0e293e;

font-size: 4.5em; font-weight: 700; }

.plans .plans-items strong small { font-size: 16px;

font-weight: 300; }

.plans .plans-items ul { list-style: none; margin: 0 0 20px 0; }

.plans .plans-items ul li { line-height: 1em;

}

.btn2:hover {

background-color: #01a9ea; }

.btn2.btn-plans { margin-top: -60px; color: #fff;

display: inline-block; font-size: 1.0em; font-weight: 700; height: 20px;

(5)

3.

cektiket2.php

<!DOCTYPE html >

<?php include ("../koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA MEDAN</title>

<link rel="stylesheet" type="text/css" href="../style.css"> <link rel="stylesheet" type="text/css" href="../page.css"> </head>

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li><a href="../index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li class='active'><a href="cektiket2.php"><span

class="glyphicon glyphicon-search"></span>Cari Tiket</a></li> <li><a href="bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li>

<li><a href="../profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="../kontak.php"><span class="glyphicon glyphicon-phone"></span>Kontak</a></li>

</ul> </section> </nav>

<div class="col-sm-4">

<div class="pnl panel-default">

<div class="pnl-heading"><span class="glyphicon glyphicon-search"></span> <b>Cari Tiket</b></div>

<div class="panel-body">

<form action="cari_tiket.php" method="get">

<div class="input-group col-md-5 col-md-offset-7">

<label for="i1" class="col-sm-3 control-label">Jurusan</label> <select type="submit" name="cari" class="form-control"

onchange="this.form.submit()">

<option>Pilih Jurusan ..</option> <?php

$pil=mysql_query("select distinct tujuan from tiket order by tujuan ASC");

while($p=mysql_fetch_array($pil)){ ?>

<option><?php echo $p['tujuan'] ?></option> <?php

} ?>

</select></div>

(6)

<div class="panel panel-default"> <div class="pl panel-default"> <?php

include '../koneksi.php'; include '../page.php';

include ('../config/fungsi_tanggal.php');

$carikode = mysql_query("select max(id_order) from orders") or die (mysql_error());

$datakode = mysql_fetch_array($carikode); if ($datakode) {

$nilaikode = substr($datakode[0], 1); $kode = (int) $nilaikode;

$kode = $kode + 1;

$kode_otomatis = "P".str_pad($kode, 4, "0", STR_PAD_LEFT); } else {

$kode_otomatis = "P0005"; }

if(isset($_POST['submit'])){

$nama_pemesan = $_POST['nama_pemesan']; $alamat = $_POST['alamat'];

$no_telp = $_POST['no_telp']; $dewasa = $_POST['dewasa']; $anak = $_POST['anak']; $tgl_order = date('Y/m/d/');

date_default_timezone_set('Asia/Jakarta'); $jam_order = date(' h:i:s');

$table = "INSERT INTO orders SET"; $field= "id_order = '$kode_otomatis',

nama_pemesan = '$nama_pemesan', alamat = '$alamat',

no_telp = '$no_telp', dewasa = '$dewasa', anak = '$anak',

tgl_order = '$tgl_order', jam_order = '$jam_order',

id_tiket = '$_GET[getid_tiket]'";

mysql_query("$table $field")or die('Error!!'.mysql_error()) $max = mysql_fetch_array(mysql_query("SELECT max(id_order) as id_order FROM orders"));

echo

"<script>window.location.href='detailorder.php?getid_tiket=$_GET[g etid_tiket]&getid_order=$max[id_order]';</script>";

exit; }

if(isset($_REQUEST['pilih'])){ echo"<script>

window.location.href='?getid_tiket=$_POST[pilih]'; </script>";

}

if(isset($_REQUEST['getid_tiket'])){

$tampil = mysql_fetch_array(mysql_query("SELECT * FROM tiket WHERE id_tiket = '$_GET[getid_tiket]'"));

?>

<center><h4>&raquo; Form Data Pemesan &laquo;</h4>

Silahkan Masukkan biodata diri anda dengan benar!</center> <form method="POST" action="">

(7)

<table align="center"> <tr>

<td>Nama Pemesan</td> <td>:</td>

<td><input type="text" name="nama_pemesan" class="data" required/></td>

</tr> <tr>

<td>Alamat</td> <td>:</td>

<td><input type="text" name="alamat" size="40" class="data" required/></td>

</tr> <tr>

<td>No Telepon/HP<br><sub><font color="#000099">*Bisa dihubungi saat ini</font></sub></td>

<td>:</td>

<td><input type="text" name="no_telp" class="data" required/></td>

</tr> <tr>

<td>Dewasa</td> <td>:</td>

<td><input type="number" name="dewasa" class="data" style="width:50px;" required/></td>

</tr> <tr>

<td>Anak</td> <td>:</td>

<td><input type="number" name="anak" class="data" style="width:50px;" required/></td>

</tr> <tr>

<td colspan=3 align='center'><input type="submit" name="submit" value="Simpan" class='btn btn-primary'/>

<a href="?"><input type="button" name="batal" value="Batal" class='btn btn-warning'/></a></td>

</tr> </table> </form>

<?php }else{

echo"<div class='panel-heading'><span class='glyphicon glyphicon-th-list'></span> <b>Daftar Keberangkatan</b></div>";

echo"<form method='post' action=''>";

if(isset($_GET['page']) && $_GET['page'] != ''){ $page = $_GET['page'];

} else {

$page = 1; }

$href = "cektiket2.php"; $rowsPerPage = 7;

$select = 'SELECT * FROM tiket ORDER BY id_tiket ASC '; $resultselect= mysql_query(getPagingQuery($select,

$rowsPerPage))or die ('Error load data : '.mysql_error());

$pagingLink = getPagingLink($href, $select, $rowsPerPage, $page); if(mysql_num_rows($resultselect)==0){

(8)

}else{

echo "<center><table id='tbl' class='table condensed table-striped' >

<tr>

<th bgcolor='silver'>No</th>

<th bgcolor='silver'>Tanggal Berangkat</th> <th bgcolor='silver'>Jam Berangkat</th> <th bgcolor='silver'>Kelas</th>

<th bgcolor='silver'>Tujuan</th> <th bgcolor='silver'>Harga</th> <th bgcolor='silver'>Tiket</th> </tr>";

$no=1;

while($row = mysql_fetch_array($resultselect)){ extract($row);

$lihat=mysql_fetch_array(mysql_query("SELECT * FROM tiket WHERE id_tiket = '$id_tiket'"));

echo '<td>'.$no++.'</td>';

echo '<td>'.tgl_indo($tgl_berangkat).'</td>'; echo '<td>'.$jam_berangkat.'</td>';

echo '<td>'.$kelas.'</td>'; echo '<td>'.$tujuan.'</td>';

echo '<td>Rp.'.number_format($lihat['harga'],0,',','.').',-</td>';

if($lihat['stok_tiket'] > 0){ echo '<td><a

href="cektiket2.php?getid_tiket='.$lihat['id_tiket'].'" class="btn btn-pilih">Pilih</a></td></tr>';

} else {

echo '<td>Habis!</td></tr>'; }

}

echo"</table></center>"; }

echo"</form>";}?></div> <?php

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); echo $pagingLink;

?>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div> </div> </body> </html>

4.

cari_tiket.php

<!DOCTYPE html >

<?php include ("../koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA MEDAN</title>

(9)

<link rel="stylesheet" type="text/css" href="../page.css"> </head>

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li><a href="../index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li class='active'><a href="cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li> <li><a href="bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li>

<li><a href="../profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="../kontak.php"><span class="glyphicon glyphicon-phone"></span>Contact</a></li>

</ul> </section> </nav>

<div class="col-sm-4">

<div class="pnl panel-default">

<div class="pnl-heading"><span class="glyphicon glyphicon-search"></span> <b>Cari Tiket</b></div>

<div class="panel-body">

<form action="cari_tiket.php" method="get">

<div class="input-group col-md-5 col-md-offset-7">

<label for="i1" class="col-sm-3 control-label">Jurusan</label> <select type="submit" name="cari" class="form-control"

onchange="this.form.submit()">

<option>Pilih Jurusan ..</option> <?php

$pil=mysql_query("select distinct tujuan from tiket order by tujuan ASC");

while($p=mysql_fetch_array($pil)){ ?>

<option><?php echo $p['tujuan'] ?></option> <?php

} ?> </select> </div>

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

<div class="panel panel-default"> <div class="pl panel-default">

<div class='panel-heading'><span class='glyphicon glyphicon-th-list'></span> <b>Daftar Keberangkatan</b></div>

<form method='post' action=''>

<center><table class='table table-condensed table-striped' > <tr>

(10)

<th>Tanggal Berangkat</th> <th>Jam Berangkat</th> <th>Kelas</th>

<th>Tujuan</th> <th>Harga</th> <th>Tiket</th> </tr>

<?php

include ("../koneksi.php");

include ("../config/fungsi_tanggal.php"); if(isset($_GET['cari'])){

$cari=mysql_real_escape_string($_GET['cari']);

$brg=mysql_query("select * from tiket where tgl_berangkat like '$cari' or tujuan like '$cari'");

} $no=1;

while($b=mysql_fetch_array($brg)){ ?>

<tr>

<td><?php echo $no++ ?></td>

<td><?php echo tgl_indo($b['tgl_berangkat']) ?></td> <td><?php echo $b['jam_berangkat'] ?></td>

<td><?php echo $b['kelas'] ?></td> <td><?php echo $b['tujuan'] ?></td>

<td>Rp.<?php echo number_format($b['harga'],0,',','.') ?>,-</td>

<?php if($b['stok_tiket'] > 0){ echo '<td><a

href="cektiket2.php?getid_tiket='.$b['id_tiket'].'" class="btn btn-pilih">Pilih</a></td></tr>';

} else {

echo '<td>Habis!</td></tr>'; }?>

</tr> <?php }

?>

</table></center> </form></div>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div></div> </body> </html>

5.

detailorder.php

<!DOCTYPE html >

<?php include ("../koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA</title>

(11)

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li><a href="../index.php"><span class="glyphicon glyphicon-home">Home</a></li>

<li><a href="cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li>

<li><a href="bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li>

<li><a href="../profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="../contact.php"><span class="glyphicon glyphicon-phone"></span>Contact</a></li>

</ul> </section> </nav>

<div class="panel panel-default"> <?php

include ("../koneksi.php");

include ("../config/fungsi_tanggal.php");

if(isset($_REQUEST['batal'])){

mysql_query("DELETE FROM orders WHERE id_order = '$_GET[getid_order]'");

echo"<script>

alert('Registrasi dibatalkan'); window.location.href='../index.php'; </script>";

}

if(isset($_REQUEST['getid_tiket'])){

$tampil = mysql_fetch_array(mysql_query("SELECT * FROM tiket WHERE id_tiket = '$_GET[getid_tiket]'"));

?>

<center><h1>&raquo; Rincian Pemesanan Tiket &laquo;</h1></center> <form method="POST" action="">

<table border="0" align="center" width="65%" style="border : 1px solid black;border-spacing : 1px;">

<tr>

<th align="justify">Jurusan</th> <th>:</th>

<td><?=$tampil['tujuan']?></td>

<th align="justify">Tanggal Berangkat</th> <th>:</th>

<td><?=tgl_indo($tampil['tgl_berangkat'])?></td> <th align="justify">Kelas</th>

<th>:</th>

<td><?=$tampil['kelas']?></td> </tr>

<tr>

(12)

<th>:</th>

<td><?=$tampil['jam_berangkat']?></td> <th align="justify">Harga</th>

<th>:</th>

<td><?=$tampil['harga']?></td> </tr>

</table>

<br>

<?php $lihatPesanan = mysql_fetch_assoc(mysql_query("SELECT * FROM orders WHERE id_order='$_GET[getid_order]'"));?>

<table align="center" width="50%" > <tr>

<td colspan="3"><h2>&raquo; Data Diri</h2></td> </tr>

<tr>

<td>Kode Order</td> <td>:</td>

<td><?=$lihatPesanan['id_order']?></td> </tr>

<tr>

<td>Nama Pemesan</td> <td>:</td>

<td><?=$lihatPesanan['nama_pemesan']?></td> </tr>

<tr>

<td>Alamat</td> <td>:</td>

<td><?=$lihatPesanan['alamat']?></td> </tr>

<tr>

<td>No Telepon/HP</td> <td>:</td>

<td><?=$lihatPesanan['no_telp']?></td> </tr>

<tr>

<td>Dewasa</td> <td>:</td>

<td><?=$lihatPesanan['dewasa']?></td> </tr>

<tr>

<td>Anak-Anak</td> <td>:</td>

<td><?=$lihatPesanan['anak']?></td> </tr>

<tr>

<td>Total Biaya</td> <td>:</td>

<td><?=($lihatPesanan['dewasa']+$lihatPesanan['anak'])." * Rp. ".number_format($tampil['harga'],0,',','.')." = <b>Rp.

".number_format(($lihatPesanan['dewasa']+$lihatPesanan['anak'])*$t ampil['harga'],0,',','.')."<b>"?></td>

</tr> <tr>

<td colspan="3"><h3>&raquo; Info!</h3></td> </tr>

<tr>

(13)

- Simpan Kode Order Anda (Jika sewaktu-waktu ingin membatalkan tiket)<br>

- Reservasi dapat dilakukan 2x24 jam sebelum bus berangkat pada tanggal dan jam yang telah ditentukan<br>

- Harga dan ketersediaan tempat duduk sewaktu waktu dapat berubah<br>

- Bawalah bukti rincian pemesanan tiket Anda pada saat keberangkatan</u></td>

</tr> <tr>

<td colspan=6 align='center'> <a

href="cetak.php?getid_tiket=<?=$_GET['getid_tiket']?>&getid_order= <?=$_GET['getid_order']?>" target="_blank" class='btnn

btn-info'>Cetak Data Registrasi</a>

<a href="../index.php?"><input type="button" name="tutup" value="Tutup Info Detail" class='btnn btn-primary'/></a>

<input type="submit" name="batal" value="Batalkan Pemesanan" class='btnn btn-warning'/></td>

</tr> </table> </form> <?php }?>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div></div> </body> </html> <style> table{

font-family: "times new roman"; font-size: 16px;

} h1{

font-size: 25px;

font-family: "times new roman"; }

h2{

font-size: 17px;

font-family: "times new roman"; margin-top: -5px;

margin-bottom: 5px; }

h3{

font-family: "times new roman"; font-size: 17px;

margin-bottom: 5px; }

.btnn {

(14)

text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer;

-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none;

border: 1px solid transparent; border-radius: 4px;

}

.btn-warning { color: #333; margin-left: 0px; border-color: #357ebd; background-color: #fff; border-color: #ccc; margin-bottom: 30px;} .btn-primary {

color: #fff;

background-color: #428bca; border-color: #357ebd; margin-left: -37px; margin-bottom: 30px; }

.btn-info{ color: #fff;

margin-right: 37px; border-color: #357ebd; background-color: teal; border-color: #ccc; text-decoration: none; font-family: sans-serif; margin-bottom: 30px; }

</style>

6.

cetak.php

<html> <head>

<title>Pemesanan Tiket CV. Chandra</title> </head>

<body onLoad="window.print() "> <center>

<?php

include ("../koneksi.php");

include ("../config/fungsi_tanggal.php");

if(isset($_REQUEST['batal'])){

mysql_query("DELETE FROM orders WHERE id_order = '$_GET[getid_order]'");

echo"<script>

alert('Registrasi dibatalkan'); window.location.href='../index.php'; </script>";

(15)

if(isset($_REQUEST['getid_tiket'])){

$tampil = mysql_fetch_array(mysql_query("SELECT * FROM tiket WHERE id_tiket = '$_GET[getid_tiket]'"));

?>

<div class="bukti"> <div class="warna">

<center><div class="ats">PENGANGKUTAN BUS UMUM</div></center> <center><h1>CV. CHANDRA</h1></center>

<center><div class="at">(CAHAYA HIDUP ANDA DIRIDHOI ALLAH)</div></center></div>

<form method="POST" action="">

<table border="0" align="center" width="65%" style="border : 1px solid black;border-spacing : 1px;">

<tr>

<th align="justify">Jurusan</th> <th>:</th>

<td><?=$tampil['tujuan']?></td>

<th align="justify">Tanggal Berangkat</th> <th>:</th>

<td><?=tgl_indo($tampil['tgl_berangkat'])?></td> <th align="justify">Kelas</th>

<th>:</th>

<td><?=$tampil['kelas']?></td> </tr>

<tr>

<th align="justify">Jam Berangkat</th> <th>:</th>

<td><?=$tampil['jam_berangkat']?></td> <th align="justify">Harga</th>

<th>:</th>

<td><?=$tampil['harga']?></td> </tr>

</table> <br>

<?php $lihatPesanan = mysql_fetch_assoc(mysql_query("SELECT * FROM orders WHERE id_order='$_GET[getid_order]'"));?>

<table align="center" width="50%"> <tr>

<td colspan="3"><h2>&raquo; Data Diri</h2></td> </tr>

<tr>

<td>Nama Pemesan</td> <td>:</td>

<td><?=$lihatPesanan['nama_pemesan']?></td> </tr>

<tr>

<td>Alamat</td> <td>:</td>

<td><?=$lihatPesanan['alamat']?></td> </tr>

<tr>

<td>No Telepon/HP</td> <td>:</td>

<td><?=$lihatPesanan['no_telp']?></td> </tr>

<tr>

(16)

<td>:</td>

<td><?=$lihatPesanan['dewasa']?></td> </tr>

<tr>

<td>Anak</td> <td>:</td>

<td><?=$lihatPesanan['anak']?></td> </tr>

<tr>

<td>Biaya</td> <td>:</td>

<td><?=($lihatPesanan['dewasa']+$lihatPesanan['anak'])." * Rp. ".number_format($tampil['harga'],0,',','.')." = <b>Rp.

".number_format(($lihatPesanan['dewasa']+$lihatPesanan['anak'])*$t ampil['harga'],0,',','.')."<b>"?></td>

</tr> <tr>

<td colspan="3"><h3>&raquo; Info!</h3></td> </tr>

<tr>

<td colspan="3">

- Reservasi dapat dilakukan 2x24 jam sebelum bus berangkat pada tanggal dan jam yang telah ditentukan<br>

- Harga dan ketersediaan tempat duduk sewaktu waktu dapat berubah<br>

- Bawalah bukti rincian pemesanan tiket Anda pada saat keberangkatan<br>

- Hadir 30 menit sebelum keberangkatan</u></td> </tr>

<tr>

<td></td><td colspan=6

align='right'>Pendaftar,<br><br><br></td> </tr>

<tr>

<td colspan=6

align='right'><?=$lihatPesanan['nama_pemesan']?></td> </tr>

</table> </form> </div> <?php }?> </center> </body> </html>

<style type="text/css"> body{

font-family:"Courier New", Courier, monospace; }

table{

font-size:16px; }

h1{

font-size: 25px;

font-family: "times new roman"; margin-top: 0px;

} h2{

(17)

font-family: "times new roman"; margin-top: -5px;

margin-bottom: 5px; }

h3{

font-family: "times new roman"; font-size: 17px;

margin-top: 15px; margin-bottom: 5px; }

.tr{

border : 1px solid black; border-spacing : 1px; font-size:14px;

}

.bukti{

border : 1px solid black; border-spacing : 1px;

background: url('../images/bg.png'); width: 92%;

} .ats{

margin-top: 15px; }

.at{

margin-top: -15px; margin-bottom: 10px; }

.warna{

background-color: #dddddd; padding: 1px 1px;

margin-bottom: 10px; }

</style>

7.

bataltiket.php

<!DOCTYPE html >

<?php include ("../koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA MEDAN</title>

<link rel="stylesheet" type="text/css" href="../style.css"> <link rel="stylesheet" type="text/css" href="../page.css"> </head>

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

(18)

<li><a href="../index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li><a href="cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li>

<li class='active'><a href="bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li> <li><a href="../profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="../kontak.php"><span class="glyphicon glyphicon-phone"></span>Kontak</a></li>

</ul> </section> </nav>

<div class="panel panel-default">

<form method="GET" action="prosesbatal.php"> <table align="center">

<center><h2>&raquo; Batal Pemesanan Tiket &laquo;</h2></center> <tr>

<td>Kode Order</td> <td>:</td>

<td><input type="text" name="id_order" size="24" class="data" placeholder="Masukkan kode order anda"

required/></td> </tr> <tr>

<td colspan=3 align='center'><input type="submit" name="submit" value="Cek" class='btn btn-batal'/>

<a href="?"><input type="button" name="batal" value="Batal" class='btn btn-btl'/></a></td>

</tr> </table> </form>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div> </div> </body> </html> <style> h2{

font-size: 25px;

font-family: "times new roman";} </style>

8.

prosesbatal.php

<!DOCTYPE html >

<?php include ("../koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA</title>

<link rel="stylesheet" type="text/css" href="../style.css"> <link rel="stylesheet" type="text/css" href="../page.css"> </head>

<body>

(19)

<ul class="title-area"> <li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li><a href="../index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li><a href="cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li>

<li><a href="bataltiket.php"><span class="glyphicon glyphicon-cancel"></span>Batal Tiket</a></li>

<li><a href="../profil.php"><span class="glyphicon glyphicon-profil"></span>Profil</a></li>

<li><a href="../kontak.php"><span class="glyphicon glyphicon-phone"></span>Contact</a></li>

</ul> </section> </nav>

<div class="panel panel-default"> <div class="pb panel-batal">

<center><h1>&raquo;Pesanan Tiket Anda&laquo;</h1></center> <table>

<?php

include ("../koneksi.php");

include ("../config/fungsi_tanggal.php");

if(isset($_GET['id_order'])){

$result = mysql_query("SELECT * FROM orders INNER JOIN tiket ON orders.id_tiket = tiket.id_tiket WHERE orders.id_order =

'".$_GET['id_order']."'");

while ($data=mysql_fetch_array($result)){ echo "<tr>";

echo "<p> Kode Order <div class='tikdu'>: ".$data['id_order']."</div></p>";

echo "<p> Nama <div class='tikdu'>: ".$data['nama_pemesan']."</div></p>"; echo "<p> Alamat <div class='tikdu'>: ".$data['alamat']."</div></p>";

echo "<p> No Telepon/HP <div class='tikdu'>: ".$data['no_telp']."</div></p>";

echo "<p> Dewasa <div class='tikdu'>: ".$data['dewasa']."</div></p>";

echo "<p> Anak-Anak <div class='tikdu'>: ".$data['anak']."</div></p>";

echo "<p> Tanggal Berangkat <div class='tikdu'>: ".tgl_indo($data['tgl_berangkat'])."</div></p>"; echo "<p> Jam Berangkat <div class='tikdu'>: ".$data['jam_berangkat']."</div></p>";

echo "<p> Kelas <div class='tikdu'>:

".$data['kelas']."</div></p>"; echo "<p> Tujuan <div class='tikdu'>:

(20)

echo "<p>Total Harga <div class='tikdu'>: ".($data['dewasa']+$data['anak'])." * Rp.

".number_format($data['harga'],0,',','.')." = <b>Rp.

".number_format(($data['dewasa']+$data['anak'])*$data['harga'],0,' ,','.')."<b>"."</div></p>";

echo '<div class=bt><td><a

href="proses.php?id='.$data['id_order'].'" onclick="return confirm(\'Apakah Anda Yakin Ingin Batalkan Pemesanan

Tiket?\')"><h3>Batalkan Pesanan Tiket</h3></a></td></div>'; echo "</tr>";

} } ?>

</table> </div>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div> </div> </body> </html> <style > p{

margin-left: 15px;

font-family: "times new roman"; font-size: 16px;

} h1{

font-family: "times new roman"; font-size: 23px;

margin-bottom: 30px; }

a{

text-decoration: none; }

h3{

background-color: #428bca; margin-top: 10px;

padding: 9px 9px; margin-left: 150px; border-radius: 4px; color: #ffffff;

font-family: sans-serif; font-size: 15px;

}

.tikdu{

margin-top: -35px; padding-left: 150px;

font-family: "times new roman"; font-size: 15px;

} .btl{

height: 50px; }

.pb {

(21)

width: 563px;

margin-bottom: 20px;

background-color: #ffffff; border: 1px solid transparent; border-radius: 4px;

-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); }

.panel-batal {

border-color: #dddddd; }

</style>

9.

proses.php

<?php

include('../koneksi.php'); $id = $_GET['id'];

$query = mysql_query("delete from orders where id_order='$id'") or die(mysql_error());

if ($query) {

header('location:cektiket2.php?message=delete'); }

?>

10.

kontak.php

<!DOCTYPE html >

<?php include ("koneksi.php"); ?>

<html> <head>

<title>CV. CHANDRA MEDAN</title>

<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="page.css"> </head>

<body>

<nav class="top-bar" data-topbar role="navigation"> <ul class="title-area">

<li class="name">

<h1><a href="index.php">CV. CHANDRA</a></h1> </li>

<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>

</ul>

<section class="top-bar-section"> <ul class="right">

<li><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>

<li><a href="tiket/cektiket2.php"><span class="glyphicon glyphicon-search"></span>Cari Tiket</a></li>

<li><a href="tiket/bataltiket.php"><span

(22)

<li class='active'><a href="kontak.php"><span class="glyphicon glyphicon-phone"></span>Kontak</a></li> </ul>

</section> </nav>

<div class="panel panel-default"> <div class="panel-body">

<h1>KONTAK CV. CHANDRA</h1> <div class="modal-dialogfil"> <div class="modal-contentfil"> <div class = "content_kanan"> <?php include ("hubungi.php");?> </div>

<?php

include ("koneksi.php");

$q=mysql_query("select * from kontak where id_kontak='1'"); $sql=mysql_fetch_array($q);

echo "<p align='justify'>$sql[isi_kontak] </p>";?> </div></div></div>

<div class="footer">

<center>Copyright &copy; 2017 CV. CHANDRA. All rights reserved.</center>

</div> </div> </body> </html> <style> h1{

color: #16a183;

margin-left: 50px;

font-family: "times new roman"; font-size: 25px;

} p{

margin-left: 0px;

font-family: "times new roman"; font-weight: normal;

padding: 0px 5px; font-size: 17px; width: 350px; color: #16a183; text-align: justify; }

.content_kanan{ font-weight: bold; text-align: center; font-size: 20px;

border-left: 1px solid #BDBBBB; color: #16a183;

font-family: Microsoft Yi Baiti; width: 60%;

height: 520px; float: right;

background: #FAFAFA; }

(23)

margin: 5px 90px;

border-collapse: collapse; width: 70%;

}

.content_kanan img{ width: 150px;

height: 150px; padding: 0px; margin: 20px;

border: 1px solid black; border-radius: 20px; }

.content_kanan h2{ color:#16a183;

font-family: comic sans-serif; font-size: 19px;

}

.content_kanan input[type="submit"] { background:#dddddd;

border: 0px; height: 30px;

border-radius: 3px; color: #16a183; font-weight: bold; padding: 0px 25px; margin-top: 10px; cursor: pointer;

transition: background 0.3s ease-in-out; margin-left: 0px;

}

.content_kanan input[type="reset"] { background:#dddddd;

border: 0px; height: 30px;

border-radius: 3px; color: #16a183; font-weight: bold; padding: 0px 25px; margin-top: 10px; cursor: pointer;

transition: background 0.3s ease-in-out; margin-left: -230px;

}

</style>

11.

hubungi.php

<html> <head>

<title>CV. CHANDRA MEDAN</title> </head>

<body>

<center>

<table border=0 >

<form method="POST" action="aksi_hub.php">

<h2>Hubungi Kami jika ada yang ingin ditanyakan atau berkomentar tentang CV. Chandra</h2>

(24)

<td>Nama</td> <td>:</td>

<td><input type="text" name="nma" size="35"></td> </tr>

<tr>

<td>E-mail</td> <td>:</td>

<td><input type="text" name="mail" size="35"></td> </tr>

<tr>

<td>Subjek</td> <td>:</td>

<td><input type="text" name="sbj" size="35"></td> </tr>

<tr>

<td>Pesan</td> <td>:</td>

<td><textarea type="text" name="psn" cols="35" rows="5" size="28"></textarea></td>

</tr>

<center> <tr>

<td> </td> <td> </td>

<td><input type="submit" value="Kirim"></td> <td><input type="reset" value="Reset"/></td> </tr>

</center> </form> </table> </center> </body> </html>

12.

aksi_hub.php

<?php

include ("koneksi.php"); $nama=$_POST['nma']; $email=$_POST['mail']; $subjek=$_POST['sbj']; $pesan=$_POST['psn']; $tanggal = date('Y/m/d/');

$result=mysql_query("insert into hubungi

values('','$nama','$email','$subjek','$pesan','$tanggal')"); if ($result) {

header('location:kontak.php?info=Pesan Anda udah terkirim. Terima kasih telah menghubungi kami');

} else {

(25)

B.

Halaman Admin

1.

index.php

<html> <head>

<title>ADMINISTRATOR</title> <script language="javascript"> function validasi(form){

if (form.username.value == ""){

alert("Anda belum mengisikan Username."); form.username.focus();

return (false); }

if (form.password.value == ""){

alert("Anda belum mengisikan Password."); form.password.focus();

return (false); }

return (true); }

</script>

<link href="css/style.css" rel="stylesheet" type="text/css" /> </head>

<body OnLoad="document.login.username.focus();">

<div class="panel panel-default"> <div class="panel-body">

<h1>ADMINISTRATOR CV. CHANDRA</h1> <?php

if(isset($_GET['info'])){ $display = "block";

$pemberitahuan = $_GET['info']; }

else{

$display = "none"; $pemberitahuan = ""; }

?>

<div class="alert alert-danger" style="display:<?php echo $display ?>"><?php echo $pemberitahuan; ?>

<button class="close" data-dismiss="alert">&times;</button> </div>

<div class="log">

<img src="../images/login.png" width="97" height="105" hspace="10" align="left">

<form name="login" action="cek_login.php" method="POST" onSubmit="return validasi(this)">

<table>

<tr><td>Username</td><td> <input type="text" name="username" placeholder="username..."></td></tr>

<tr><td>Password</td><td> <input type="password" name="password" placeholder="password..."></td></tr>

<tr><td colspan="2"><input type="submit" value="Login"> </td></tr>

(26)

</form>

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

<div class="modal_footer"> <div class="container"> <center>

<b class="copyright">Copyright &copy; CV. CHANDRA 2017 </b> All rights reserved.<br>

</center> </div> </div> </body> </html> <style> table{

margin-left: 360px; margin-top: 100px; }

input[type="text"] { width: 255px;

height: 25px; padding: 5px;

margin-right: -20px; border: 1px solid #ccc; border-radius: 4px; height: 30px;

background-color: #fff; }

input[type="password"] { width: 255px;

height: 25px; padding: 5px; height: 30px;

margin-right: -20px; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; }

input[type="submit"] { display: inline-block; width: 60px;

padding: 3px 10px; margin-bottom: 0; margin-left: 75px; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer;

background-image: none;

border: 1px solid transparent; border-radius: 4px;

color: #fff;

background-color: #345487; border-color: black;

} img{

(27)

margin-top: -110px; }

h1{

margin-left: 330px; font-size: 22px; color: BLACK;

border-color: #e9e9e9;

font-family:"Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;

padding: 10px 15px;

border-bottom: 1px solid transparent; border-top-right-radius: 3px;

border-top-left-radius: 3px; }

td{

font-family: "times new roman"; font-size: 17px;

}

</style>

2.

cek_login.php

<?php

if(!isset($_SESSION)){ session_start(); }

include "../koneksi.php"; $user=$_POST['username']; $pass=md5($_POST['password']);

$query_user=mysql_query("SELECT * from admin where username_admin='$user'");

$cek_user=mysql_num_rows($query_user); $data_user=mysql_fetch_array($query_user); if($cek_user==0){

header('location:index.php?info=Username anda tidak ada'); }elseif($data_user['password_admin']==$pass){

$_SESSION['username_admin']=$user; $_SESSION['password_admin']=$pass; header('location:home.php');

}else{

header('location:index.php?info=Password anda salah'); }?>

3.

cek_session.php

<?php

include "../koneksi.php"; if(!isset($_SESSION)){

session_start(); }

$user=$_SESSION['username_admin']; $pass=$_SESSION['password_admin'];

$query=mysql_query(" SELECT username_admin,password_admin from admin where username_admin='$_SESSION[username_admin]' and password_admin='$_SESSION[password_admin]' ");

(28)

if($cek>=1){

return TRUE; exit(); }else{

header('location:index.php?info=anda tidak berhak mengakses laman ini');

}

4.

home.php

<?php

include "cek_session.php"; ?>

<!doctype html> <html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ADMINISTRATOR</title>

<link href="" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/style.css"> </head>

<body>

<nav id="navbar" class="navbar navbar-default"> <div class="container-fluid">

<div class="navbar-header"> <a class="navbar-brand" id="logo" href="#">ADMIN CV. CHANDRA</a></div>

<div class="collapse navbar-collapse" id="defaultNavbar1"> <ul class="nav navbar-nav navbar-right">

<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">

<?php

include "../koneksi.php";

$query_admin=mysql_query("SELECT * FROM admin WHERE username_admin='$_SESSION[username_admin]'");

$admin=mysql_fetch_array($query_admin);

echo $admin['nama_admin']; ?><img src="<?php if($admin['jk']=="Laki-Laki"){

echo "../images/default_pl.png"; }else{

echo "../images/default_pp.png"; }

?>" alt="" class=" nav-avatar img-circle" ><b class="caret"></b></a>

<ul class="dropdown-menu" role="menu">

<li><a href="profile.php">Profile</a></li> <li><a href="logout.php">Logout</a></li> </ul></li></ul>

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

<div class="panel panel-default"> <div class="panel-body">

<?php

if(isset($_GET['info'])){ $display = "block";

(29)

} else{

$display = "none"; $pemberitahuan = ""; }

?>

<div class="alert alert-danger" style="display:<?php echo $display ?>"><?php echo $pemberitahuan; ?>

<button class="close" data-dismiss="alert">&times;</button> </div>

<div id="sidebar1"> <div id="main_menu">

<h3><span class="glyphicon glyphicon-th"></span>Menu</h3> </div>

<div id="isi_menu_kiri">

<a href="home.php">&raquo; Beranda</a> <a href="order.php">&raquo; Orders</a> <a href="tiket.php">&raquo; Tiket</a> <a href="profil.php">&raquo; Profil</a> <a href="kontak.php">&raquo; Contact</a> <a href="gambar_home.php">&raquo; Home</a> <a href="hub.php">&raquo; Hubungi Kami</a> <a href="admin.php">&raquo; User Manager</a> <a href="logout.php">&raquo; Logout</a> </div> </div>

<div id="judul">Selamat datang di halaman administrator</div>

<div class="pull-left" id="conten">

<div id="isi">Halaman ini di gunakan untuk input,edit, dan delete. Silahkan klik menu pilihan yang berada

di sebelah kiri untuk mengelola content website. </div> </div></div></div>

<div class="modal_footer"> <div class="container"> <center>

<b class="copyright">Copyright &copy; CV. CHANDRA 2017 </b> All rights reserved.<br>

</center> </div></div> </body>

</html>

5.

order.php

<?php

include "cek_session.php"; ?>

<!doctype html> <html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ADMINISTRATOR</title>

(30)

</head> <body>

<div id="jdl">Data Order</div> <div class="pull-left" id="conten"> <div id="">

<br>

<table class="table table-condensed table-striped" > <thead>

<tr class="kolom"> <th >NO</th>

<th >NAMA PEMESAN</th> <th >Tanggal</th> <th >Status</th> <th >Aksi</th> </tr>

</thead> <tbody> <?php

include '../koneksi.php';

include '../config/fungsi_tanggal.php'; include '../page.php';

if(isset($_GET['page']) && $_GET['page'] != ''){ $page = $_GET['page'];

} else {

$page = 1; }

$href = "order.php"; $rowsPerPage = 7;

$sql= 'SELECT * FROM orders ORDER BY id_order DESC'; $query_order=mysql_query(getPagingQuery($sql,

$rowsPerPage));

$pagingLink = getPagingLink($href, $sql, $rowsPerPage, $page);

$no=1;

while ($data_order=mysql_fetch_array($query_order)) { echo "<tr>

<td><b>$no</b></td>

<td><b>$data_order[nama_pemesan]</b></td>

<td><b>";echo tgl_indo($data_order['tgl_order']); echo ", $data_order[jam_order]</b></td>

<td><b>$data_order[status_order]</b></td> <td><div class='btn btn-group-xs'>

<a href='detail.php?id_order=$data_order[id_order]' class='btn btn-default'><i class='glyphicon glyphicon-search'></i>Detail</a>

</div> </td> </tr>"; $no++; }

?>

</tbody> </table> </div></div> </body>

(31)

6.

tiket.php

<?php

include "cek_session.php"; ?>

<!doctype html> <html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ADMINISTRATOR</title>

<link href="" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/style.css">

<link rel="stylesheet" type="text/css" href="css/page.css" /> </head>

<body>

<nav id="navbar" class="navbar navbar-default"> <div class="container-fluid">

<div class="navbar-header"> <a class="navbar-brand" id="logo" href="#">ADMIN CV. CHANDRA</a></div>

<div class="collapse navbar-collapse" id="defaultNavbar1"> <ul class="nav navbar-nav navbar-right">

<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <?php

include "../koneksi.php";

$query_admin=mysql_query("SELECT * FROM admin WHERE username_admin='$_SESSION[username_admin]'");

$admin=mysql_fetch_array($query_admin);

echo $admin['nama_admin']; ?><img src="<?php if($admin['jk']=="Laki-Laki"){

echo "../images/default_pl.png"; }else{

echo "../images/default_pp.png"; }

?>" alt="" class=" nav-avatar img-circle" ><b class="caret"></b></a>

<ul class="dropdown-menu" role="menu"> <li><a href="profile.php">Profile</a></li> <li><a href="logout.php">Logout</a></li> </ul></li>

</ul> </div></div> </nav>

<div class="panel panel-default"> <div class="panel-body"> <?php

if(isset($_GET['info'])){ $display = "block";

$pemberitahuan = $_GET['info']; }

else{

$display = "none"; $pemberitahuan = ""; }

(32)

<div class="alert alert-danger" style="display:<?php echo $display ?>"><?php echo $pemberitahuan; ?>

<button class="close" data-dismiss="alert">&times;</button> </div>

<div id="sidebar1"> <div id="main_menu">

<h3><span class="glyphicon glyphicon-th"></span>Menu</h3> </div>

<div id="isi_menu_kiri">

<a href="home.php">&raquo; Beranda</a> <a href="order.php">&raquo; Orders</a> <a href="tiket.php">&raquo; Tiket</a> <a href="profil.php">&raquo; Profil</a> <a href="kontak.php">&raquo; Contact</a> <a href="gambar_home.php">&raquo; Home</a> <a href="hub.php">&raquo; Hubungi Kami</a> <a href="admin.php">&raquo; User Manager</a> <a href="logout.php">&raquo; Logout</a> </div> </div>

<div id="jdl">Data Tiket</div> <div class="col-sm-4">

<div class="panel-body">

<form action="cari_tiket.php" method="get">

<div class="input-group col-md-5 col-md-offset-7"> <label for="i1" class="col-sm-3 control-label"></label> <select type="submit" name="cari" class="form-control" onchange="this.form.submit()">

<option>Pilih Jurusan ..</option> <?php

$pil=mysql_query("select distinct tujuan from tiket order by tujuan ASC");

while($p=mysql_fetch_array($pil)){ ?>

<option><?php echo $p['tujuan'] ?></option> <?php

} ?> </select> </div>

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

<div class="btn btn-input"><a href="input.php">Input Tiket Baru</a></div>

<?php

if (!empty($_GET['message']) && $_GET['message'] == 'success') { echo '<script language="JavaScript">

{

alert("Terima kasih, data anda telah berhasil di edit"); }

</script>'; }

?>

<table id="data" class="display" cellspacing="0" width="70%"> <thead>

<tr>

<th>No</th>

(33)

<th>Kelas</th> <th>Jurusan</th> <th>Harga</th> <th>Stok</th> <th>Opsi</th> </tr>

</thead> <?php

include '../page.php';

include ('../config/fungsi_tanggal.php');

if(isset($_GET['page']) && $_GET['page'] != ''){ $page = $_GET['page'];

} else {

$page = 1; }

$href = "tiket.php"; $rowsPerPage = 7;

$no=1;

$sql= 'SELECT * FROM tiket';

$result=mysql_query(getPagingQuery($sql, $rowsPerPage));

$pagingLink = getPagingLink($href, $sql, $rowsPerPage, $page); while ($data=mysql_fetch_array($result))

{

echo "<tr>";

echo "<td>".$no++."</td>";

echo "<td>".tgl_indo($data['tgl_berangkat'])."</td>"; echo "<td>".$data['jam_berangkat']."</td>";

echo "<td>".$data['kelas']."</td>"; echo "<td>".$data['tujuan']."</td>";

echo "<td> Rp.".number_format($data['harga'],0,',','.').",-</td>";

echo "<td>".$data['stok_tiket']."</td>"; echo '<td><a

href="edit.php?id_tiket='.$data['id_tiket'].'&tgl='.$data['tgl_ber angkat'].'&jam='.$data['jam_berangkat'].'&kls='.$data['kelas'].'&t jn='.$data['tujuan'].'&hrg='.$data['harga'].'">Edit</a> | <a href="hapus.php?id_tiket='.$data['id_tiket'].'" onclick="return confirm(\'Yakin?\')">Hapus</a></td>';

echo "</tr>"; }

?>

</table>

<?php echo $pagingLink; ?> </center>

</div></div>

<div class="modal_footer"> <div class="container"> <center>

<b class="copyright">Copyright &copy; CV. CHANDRA 2017 </b> All rights reserved.<br>

</center> </div></div> </body> </html> <style> table {

(34)

border-spacing:0;

font-family:"times new roman"; font-size:17px;

width: auto; color: #7FFFD4; margin-left: 215px; padding-left:0px;

background-color:#E6E6FA; }

table a{

text-decoration: none; }

table th {

font-weight:bold; padding:10px; text-align:left; color:#fff;

background-color:#DC143C; border-top:1px black solid; border-bottom:1px black solid; }

table td {

padding:10px;

border-top:1px black solid; border-bottom:1px black solid; color: #8B0000;

text-align:left; } tr:nth-child(even) {

background-color: #DDA0DD; } </style>

7.

input.php

<?php

include "cek_session.php";?> <!doctype html>

<html> <head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ADMINISTRATOR</title>

<link href="" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/style.css">

<link rel="stylesheet" type="text/css" href="css/page.css" /> <link type="text/css" href="../js/datepicker/css/jquery-ui-1.8.6.custom.css" rel="stylesheet" />

<script type="text/javascript"

src="../js/datepicker/js/jquery-1.4.2.min.js"></script> <script type="text/javascript"

src="../js/datepicker/js/jquery-ui-1.8.6.custom.min.js"></script> <script type="text/javascript">

jQuery(function($){

$.datepicker.regional['vi'] = { closeText: 'Tutup',

Gambar

table td[class*="col-"], table th[class*="col-"] {

Referensi

Dokumen terkait

Hasil dari penelitian ini adalah mereka secara pribadi memiliki penilaian tersendiri bagaimana mereka mengkonstruksikan sosok lesbian dari sudut pandang mereka, seorang feminim

Berdasarkan angka mortalitas yang tinggi, tatalaksana yang bervariasi, faktor risiko yang masih menjadi perdebatan, dan kurangnya penelitian tentang ICH batang otak di

1) Konstanta (  0) memiliki nilai 6,339. Secara matematis nilai ini berarti jika tidak ada variabel Tunjangan Penghasilan Pegawai, Komitmen Organisasi dan

Namun, meningkatnya ekspektasi pasar terhadap masih dipertahankannya kebijakan suku bunga rendah oleh bank sentral AS hingga September tahun ini, dan seiring

Puji syukur kehadirat Allah SWT yang telah memberikan rahmat memberikan dan hidayahnya-Nya, serta memberikan kemudahan sehingga penulis dapat menyelesaikan skripsi dengan

- Jika posisi gigi-gigi terhadap masing-masing rahangnya normal maka relasi gigi-gigi bawah terhadap gigi-gigi atas distoklusi karena gigi-gigi tersebut terletak pada rahang

mengandung konsentrasi ikan pelagis adalah pada kedalaman 5 hingga 15 meter dan yang terbanyak berada pada lapisan 11-15 meter.Jumlah ketersediaan ikan dari hasil

Melalui institusi komuniti ini, penyertaan masyarakat sivil (individu atau organisasi) boleh diwujudkan sebagai satu bentuk keprihatinan, dan untuk melakukan kawalan