Website Pemesanan Tiket Pesawat Terbang.
Universitas Kristen Maranatha
ABSTRAK
Perkembangan teknologi dan transportasi udara pada jaman sekarang ini
menjadi semakin cepat dan membantu menunjang efisiensi kerja manusia.
Pembuatan website ini bertujuan untuk memudahkan para penggunanya
dalam memesan tiket sebuah maskapai pesawat terbang. Pembuatan website ini
juga meningkatkan efisiensi kerja manusia, karena penyebaran internet yang sudah
sangat luas sehingga mudah untuk mengakses website ini.
Pokok pembahasan dari penulisan laporan ini adalah menjelaskan struktur
dasar dalam pembuatan website ini. Bahasa pemrograman yang digunakan adalah
PHP. Hal ini dikarenakan bahasa pemrograman web PHP memungkinkan untuk
membangun sebuah situs yang dinamis dan menggunakan database.
Dengan pembuatan website ini, diharapkan dapat semakin memudahkan
efisiensi kerja manusia dalam melakukan pemesanan tiket.
(2)
Universitas Kristen Maranatha
ABSTRACT
The growth of technology and airline transportation in this period are
getting faster and increase the working efficiency of human.
The making of this website aims to make it easier for users to book an airline
ticket airplane. The goal of this website is to help and increase the efficiency of
human works. This is possible because the the globalization era that make the
Internet easy to get and also to access this website.
The subject of this report is to explain the basic structure of the making of
this website. The programming language used is PHP. This is because the PHP
web programming language allows to build a dynamic site and integrated with the
database.
Hopefully this website can further increasing the efficiency of the airline
ticket booking.
(3)
Universitas Kristen Maranatha
DAFTAR ISI
Abstrak ... i
Abstract ... ii
Kata Pengantar ... iii
Daftar isi ... iv
Daftar Gambar ... vii
Daftar Tabel ... ix
Bab I Pendahuluan ... 1
1.1 Latar belakang ... 1
1.2 Identifikasi Masalah ... 1
1.3 Tujuan ... 2
1.4 Batasan Masalah ... 2
1.5 Sistematika Penulisan ... 2
Bab II Landasan Teori ... 4
2.1 SDLC (System Development Life Cycle) ... 4
2.1.1 Prototype ... 7
2.1.2 Waterfall ... 8
2.2 Aplikasi Berbasis Web ... 10
2.2.1 Client Side Scripting ... 11
2.2.2 Server Side Scripting ... 14
2.2.3 Backend Storage ... 17
2.3 Bahasa Pemrograman ... 17
2.3.1 HTML ... 17
2.3.2 PHP ... 18
2.3.3 ASP ... 19
(4)
Universitas Kristen Maranatha
2.3.5 MYSQL ... 21
2.3.6 JavaScript ... 21
2.4 Program yang Digunakan ... 22
2.4.1 jQuery ... 22
2.4.2 Adobe Dreamweaver CS5 ... 23
2.4.3 XAMPP ... 26
Bab III Perencanaan dan Realisasi Sistem ... 28
3.1 Analisis ... 28
3.1.1 Kebutuhan Maskapai Penerbangan ... 28
3.1.2 Kebutuhan User ... 28
3.1.3 Spesifikasi Kebutuhan Fungsi Dasar Website ... 29
3.1.4 Spesifikasi Kebutuhan Non-Fungsional Website ... 30
3.1.5 Deskripsi Website ... 30
3.1.6 Spesifikasi Software dan Hardware ... 30
3.2 Perancangan Sistem
3.2.1 Diagram Konteks ... 31
3.2.2 Pendefinisian Pengguna ... 32
3.3 Desain Website ... 33
3.3.1 Desain Halaman User ... 33
3.3.2 Desain Halaman Admin ... 35
3.3.2.1 Halaman Awal ... 35
3.3.2.2 Halaman Isi ... 36
3.4 DFD (Data Flow Diagram) ... 36
3.4.1 Diagram Konteks ... 36
3.4.2 Diagram Level 1 ... 37
3.4.3 Diagram Level 2 ... 37
(5)
Universitas Kristen Maranatha
Bab IV Implementasi dan Analisis Website Pemesanan Tiket Pesawat ... 45
4.1 Halaman Awal ... 45
4.2 Halaman Login ... 46
4.3 Halaman Galeri ... 47
4.3.1 Halaman Where You Can Go ... 48
4.3.2 Halaman At A Glance ... 48
4.3.3 Halaman Fine Dining ... 49
4.4 Halaman Schedule ... 49
4.5 Halaman Booking ... 50
4.6 Halaman Contact Us ... 52
4.7 Halaman Admin ... 53
Bab V Kesimpulan dan Saran ... 55
5.1 Kesimpulan ... 55
5.2 Saran ... 55
Daftar Pustaka ... 56
Lampiran A ... A-1
Lampiran B ... B-1
(6)
Universitas Kristen Maranatha
DAFTAR GAMBAR
Gambar 2.1 SDLC ... 6
Gambar 2.2 Prototype SDLC ... 8
Gambar 2.3 SDLC Tipe Waterfall ... 9
Gambar 2.4 Arsitektur Aplikasi Berbasis Web ... 11
Gambar 2.5 Proses Client Side Scripting ... 13
Gambar 2.6 Contoh Proses Server Side Scripting PHP ... 15
Gambar 2.7 Elemen dasar HTML ... 18
Gambar 2.8 Format Penulisan Atribut ... 19
Gambar 2.9 Tampilan Adobe Dreamweaver ... 25
Gambar 2.10 File yang terintegrasi ... 26
Gambar 2.11 Fitur Adobe Spry ... 27
Gambar 3.1 Diagram Konteks ... 32
Gambar 3.2 Layout halaman User ... 34
Gambar 3.3 Halaman Awal Admin ... 36
Gambar 3.4 Halaman Isi ... 37
Gambar 3.5 Diagram Konteks ... 37
Gambar 3.6 DFD Level 1 ... 38
Gambar 3.7 Pendaftaran ... 38
Gambar 3.8 Pemesanan Tiket ... 39
Gambar 3.9 Admin Melakukan Input Tiket ... 40
(7)
Universitas Kristen Maranatha
Gambar 3.11 Alur Profil Kota ... 41
Gambar 3.12 Melihat Jadwal Penerbangan ... 41
Gambar 3.13 Basis Data ... 42
Gambar 3.14 Diagram Entitas ... 43
Gambar 4.1 Halaman Awal ... 45
Gambar 4.2 Halaman Login ... 46
Gambar 4.3 Halaman Galeri ... 47
Gambar 4.4 Halaman Where You Can Go ... 48
Gambar 4.5 Halaman At A Glance ... 48
Gambar 4.6 Halaman Fine Dining ... 49
Gambar 4.7 Halaman Schedule ... 49
Gambar 4.8 Menentukan kota tujuan dan kota asal ... 50
Gambar 4.9 Tampilan jika rute perjalanan tidak ada ... 50
Gambar 4.10 list nomor penerbangan ... 51
Gambar 4.11 Overall Data ... 51
Gambar 4.12 Halaman Contact us ... 52
Gambar 4.13 Login Admin ... 53
Gambar 4.14 Menu Admin ... 53
Gambar 4.15 Input Harga Tiket ... 54
(8)
Universitas Kristen Maranatha
DAFTAR TABEL
Tabel 2.1 Perbandingan PHP dan ASP ... 20
Tabel 3.1 Tabel Fungsi Dasar Website ... 30
Tabel 3.2 Detail Database ... 44
(9)
UNIVERSITAS KRISTEN MARANATHA
LAMPIRAN A
(10)
UNIVERSITAS KRISTEN MARANATHA
Diagram Blok halaman utama
(11)
UNIVERSITAS KRISTEN MARANATHA
Registrasi
(12)
UNIVERSITAS KRISTEN MARANATHA
Diagram blok halaman utama setelah login
(13)
UNIVERSITAS KRISTEN MARANATHA
Gallery
(14)
UNIVERSITAS KRISTEN MARANATHA
Booking
(15)
UNIVERSITAS KRISTEN MARANATHA
Pencarian Jadwal Penerbangan
Pengiriman
Feedback
(16)
UNIVERSITAS KRISTEN MARANATHA
Halaman Utama Admin
(17)
UNIVERSITAS KRISTEN MARANATHA
LAMPIRAN B
(18)
UNIVERSITAS KRISTEN MARANATHA
Halaman Registrasi
Register.form.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; include 'template/register.php' ?>
<head>
<title>HOME</title> </head>
<body> <div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<center><h1>REGISTRATION FORM</h1><br></center>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Username:</td>
<td><input type="text" name="username_member" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Password:</td>
<td><input type="password" name="password_member" value="" size="32" /></td>
</tr>
(19)
UNIVERSITAS KRISTEN MARANATHA
<tr valign="baseline">
<td nowrap="nowrap" align="right">Full Name:</td>
<td><input type="text" name="nama_member" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Telephone Number:</td>
<td><input type="text" name="no_telp_member" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">E-mail:</td>
<td><input type="text" name="email_member" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Identity Number:</td>
<td><input type="text" name="no_ktp_member" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">DOB:</td>
<td><input type="text" id="from" name="tanggal" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Sex:</td>
<td><select name="j_kelamin">
<option value="Male">male</option>
<option value="Female">female</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Register" id="submit" /></td>
(20)
UNIVERSITAS KRISTEN MARANATHA
</table>
<input type="hidden" name="MM_insert" value="form1" /> </form>
<p><font color="#FF0000">Note : Please fill all the field correctly.</font></p> </div><!-- end of content -->
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body></html> <?php
mysql_free_result($login); ?>
(21)
UNIVERSITAS KRISTEN MARANATHA
Halaman plan & book
plan.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php';
include 'template/recordset/recordset.namakota.detailtiket.php';
//SESSION
$_SESSION['infant']=NULL; $_SESSION['children']=NULL; $_SESSION['adult']=NULL; $_SESSION['kota_asal']=NULL; $_SESSION['kota_tujuan']=NULL; $_SESSION['tanggal']=NULL; $_SESSION['jumlah_duduk']=NULL; ?>
<head>
<title>HOME</title> </head>
<body>
<div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?>
<div id="content"> <!--PLAN & BOOK-->
<fieldset><legend><h6>Plan & Book</h6></legend> <form name="booking"
(22)
UNIVERSITAS KRISTEN MARANATHA
<?php
if ($totalRows_detail_tiket == 0)
echo 'action="booking.result.php"'; else
echo 'action="booking.result.fail.php"'; ?> method="post">
<span id="spryselect1">
Where You Depart From? <br /> <select name="kota_asal"> <?php do { ?>
<option value="<?php echo $row_nama_kota['nama_kota']?>"><?php echo
$row_nama_kota['nama_kota']?>,<?php echo $row_nama_kota['nama_airport'] ?></option> <?php
} while ($row_nama_kota = mysql_fetch_assoc($nama_kota)); $rows = mysql_num_rows($nama_kota);
if($rows > 0) {
mysql_data_seek($nama_kota, 0);
$row_nama_kota = mysql_fetch_assoc($nama_kota); }
?>
</select><br/>
Where Do You Want To Go? <br/> <select name="kota_tujuan"> <?php do { ?>
<option value="<?php echo $row_nama_kota['nama_kota']?>"><?php echo
$row_nama_kota['nama_kota']?>,<?php echo $row_nama_kota['nama_airport'] ?></option>
<?php
} while ($row_nama_kota = mysql_fetch_assoc($nama_kota)); $rows = mysql_num_rows($nama_kota);
if($rows > 0) {
mysql_data_seek($nama_kota, 0);
$row_nama_kota = mysql_fetch_assoc($nama_kota);} ?>
(23)
UNIVERSITAS KRISTEN MARANATHA
<table border="0"> <tr>
<td align="right">infant (0-2) </td> <td align="left"><select name="infant"> <option value="0">0
<option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 </select></td>
</tr> <tr>
<td align="right">Children (3-13) </td> <td align="left"><select name="children"> <option value="0">0
<option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 </select></td>
</tr> <tr>
<td align="right">Adult (13++) </td> <td align="left"><select name="adult"> <option value="1">1
<option value="2">2 <option value="3">3 <option value="4">4
</select></td> </tr>
</table><br>
(24)
UNIVERSITAS KRISTEN MARANATHA
<select name="kelas" >
<option value="economy">economy</option> <option value="bussiness">bussiness</option> <option value="vip">vip</option>
</select><br>
<span class="selectRequiredMsg">Please select an item.</span></span>
<input type="submit" name="submit" id="loginbtn" value="Go!">|<input type="reset" value="reset" id="loginbtn">
</form></fieldset> <!-- manage booking --> <br><br>
<fieldset><legend><h6>Manage Your Booking</h6></legend> <form name="manage_booking" action="search.flight.php"> Flight Number : <br>
<input type="text" name="f_number"><br>
<input type="submit" name="submit" id="loginbtn" value="Search"> <br><br>
</form></fieldset>
</div><!-- end of content -->
<div class="cleaner"></div> </div> <!-- end of main -->
<?php include ('template/footer.php');?> </div></div>
</body> </html>
(25)
UNIVERSITAS KRISTEN MARANATHA
Halaman Booking Result Fail
Booking.result.fail.php
Jika tidak ada rute yang diinginkan pada database, maka akan ditampilkan
halaman ini.
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head>
<title>HOME</title> </head>
<body>
<div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<center><h2>Sorry, Your Flight Request Is Not Exist</h2><br/><h5> <a href="plan.login.php">Choose Again</a></h5></center> </div><!-- end of content -->
<div class="cleaner"></div> </div> <!-- end of main --> <?php include ('template/footer.php')?> </div></div>
(26)
UNIVERSITAS KRISTEN MARANATHA
Halaman booking result
Booking.result.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.namakota.detailtiket.php'; include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php';
// menampilkan data yang sesuai dengan kota asal dan kota tujuan yang diinput namun tanggalnya tidak expired
$tgl=date('l, d-m-Y');
$kota_asal=$_POST['kota_asal']; $kota_tujuan=$_POST['kota_tujuan'];
mysql_select_db($database_koneksi, $koneksi);
$query_detail_tiket = "SELECT * FROM detail_tiket WHERE kota_asal='$kota_asal' AND kota_tujuan ='$kota_tujuan' AND TO_DAYS(tanggal) > TO_DAYS(NOW())";
$detail_tiket = mysql_query($query_detail_tiket, $koneksi) or die(mysql_error()); $row_detail_tiket = mysql_fetch_assoc($detail_tiket);
$totalRows_detail_tiket = mysql_num_rows($detail_tiket); ?>
<head> <title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<?php
//kalau tidak ada rute di database maka muncul tulisan flight route does not exist if ($totalRows_detail_tiket==0)
echo '<h4>Sorry, Your Flight Route Does Not Exist</h4><br> <a href="plan.login.php"><h5>Search Again</h5></a><br>
(27)
UNIVERSITAS KRISTEN MARANATHA
<table border="0">
<tr><td> </td><td> </td> <td> </td><td> </td> </tr>'; //kalau ada rute maka dibuat tabel seperti dibawah
else
echo '<h4>Flight Number For Selected Route</h4><br><br> <table border="1" cellpadding="10px">
<tr bgcolor="#000000">
<td><h4>Flight Number </h4></td>
<td><h4>Economy Class</h4></td>
<td><h4>Bussiness Class</h4></td> <td><h4>VIP Class</h4></td>
<td><h4>Departure</h4></td> </tr>' ;?>
<?php do{ ?> <tr>
<td>
<a href="booking.result2.php?recordID=<?php echo $row_detail_tiket['nama_penerbangan']; ?>"> <?php echo $row_detail_tiket['nama_penerbangan']; ?> </a>
</td>
<td><?php echo $row_detail_tiket['harga_e_class']?> </td>
<td><?php echo $row_detail_tiket['harga_b_class']?> </td>
<td><?php echo $row_detail_tiket['harga_v_class']> </td>
<td><?php echo $row_detail_tiket['tanggal'] ?> </td>
</tr>
<?php } while ($row_detail = mysql_fetch_assoc($detail_tiket)); ?>
</table> <?php
$_SESSION['infant']=$_POST['infant']; $_SESSION['children']=$_POST['children']; $_SESSION['adult']=$_POST['adult']; $_SESSION['kelas']=$_POST['kelas']; ?>
</div><!-- end of content --> <div class="cleaner"></div>
(28)
UNIVERSITAS KRISTEN MARANATHA
</div> <!-- end of main -->
<?php include ('template/footer.php')?></div></div> </body>
</html> <?php
mysql_free_result($detail_tiket); ?>
Halaman booking result 2
Booking.result2
’
.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php';
include 'template/recordset/recordset.namakota.detailtiket.php'; include 'template/recordset/recordset.select.detailtiket.php'; include 'template/recordset/recordset.insert.logtiket.php'; ?>
<?php
if ($_SESSION['kelas']=='bussiness')
include 'template/recordset/recordset.update.jumlahduduk.b.php'; elseif ($_SESSION['kelas']=='economy')
include 'template/recordset/recordset.update.jumlahduduk.e.php'; elseif ($_SESSION['kelas']=='vip')
include 'template/recordset/recordset.update.jumlahduduk.v.php'; ?>
<head>
<title>HOME</title> </head>
(29)
UNIVERSITAS KRISTEN MARANATHA
<body>
<div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<form method="post" name="form1" action="<?php echo $editFormAction; ?>" id="form1"> <div id="halaman">
<center><h3>Flight Details</h3><br>
<left>Recipient : <?php echo $_SESSION['MM_Username']; ?></left>
<h4>Flight Number : <?php echo $row_DetailRS1['nama_penerbangan']; ?><br>
From <?php echo $row_DetailRS1['kota_asal']; ?> To <?php echo $row_DetailRS1['kota_tujuan']; ?></h4> Departure Date : <?php echo $row_DetailRS1['tanggal']; ?>
</center><br>
<strong>Class :</strong> <?php echo $_SESSION['kelas'] ?><br> <strong>Price :</strong>
<?php if ($_SESSION['kelas']=='bussiness') echo $row_DetailRS1['harga_b_class']; elseif ($_SESSION['kelas']=='economy') echo $row_DetailRS1['harga_e_class']; elseif($_SESSION['kelas']=='vip')
echo $row_DetailRS1['harga_v_class']; ?><br>
<strong>Infant Discount :</strong>
<?php echo $row_DetailRS1['harga_anak']; ?>
<fieldset><legend><h5> Passenger Summary </h5></legend> <table>
<tr>
(30)
UNIVERSITAS KRISTEN MARANATHA
<td>Children</td> <td>Adult</td> </tr>
<tr>
<td><input type="text" disabled="disabled" value="<?php echo $_SESSION['infant'] ?>" name="infant"></td>
<td><input type="text" disabled="disabled" value="<?php echo $_SESSION['children'] ?>" name="children"></td>
<td><input type="text" disabled="disabled" value="<?php echo $_SESSION['adult'] ?>" name="adult"></td> </table>
</fieldset>
<strong>Total Price : </strong><h4> <?php if ($_SESSION['kelas']=='bussiness')
echo ($row_DetailRS1['harga_b_class']-$row_DetailRS1['harga_anak'])*$_SESSION['infant'] + $_SESSION['children']*$row_DetailRS1['harga_b_class']+$row_DetailRS1['harga_b_class']* $_SESSION['adult'];
elseif ($_SESSION['kelas']=='economy')
echo($row_DetailRS1['harga_e_class']-$row_DetailRS1['harga_anak'])*$_SESSION['infant'] + $_SESSION['children']*$row_DetailRS1['harga_e_class']+$row_DetailRS1['harga_e_class']* $_SESSION['adult'];
elseif($_SESSION['kelas']=='vip')
echo($row_DetailRS1['harga_v_class']-$row_DetailRS1['harga_anak'])*$_SESSION['infant'] + $_SESSION['children']*$row_DetailRS1['harga_v_class']+$row_DetailRS1['harga_v_class']* $_SESSION['adult'];
$total=$_SESSION['infant']+$_SESSION['children']+$_SESSION['adult']; ?></h4> <input type="hidden" value='<?php echo $total ?>' name="total" />
</div> <BR><br><br>
<input type="submit" value="Proceed">
<input type="text" name="jumlah_duduk" value=" <?php
$jumlah_b=$row_jumlahduduk['duduk_b']-$total; $jumlah_e=$row_jumlahduduk['duduk_e']-$total;
(31)
UNIVERSITAS KRISTEN MARANATHA
$jumlah_v=$row_jumlahduduk['duduk_v']-$total;
if ($_SESSION['kelas']=='bussiness') echo ($jumlah_b);
elseif ($_SESSION['kelas']=='economy') echo ($jumlah_e);
elseif ($_SESSION['kelas']=='vip')
echo ($jumlah_v); ?>"
size="32" />
<input type="hidden" name="username_member" value="<?php echo $_SESSION['MM_Username'] ?>" size="32">
<input type="hidden" name='kota_asal' value="<?php echo $row_DetailRS1['kota_asal']; ?>" size="32"> <input type="hidden" name="kota_tujuan" value="<?php echo $row_DetailRS1['kota_tujuan']; ?>" size="32">
<input type="hidden" name="tanggal" value="<?php echo $row_DetailRS1['tanggal']; ?>" size="32"> <input type="hidden" name="tipe_tiket" value="<?php echo $_SESSION['kelas'] ?>" size="32"> <input type="hidden" name="MM_insert" value="form1">
<input type="hidden" name="MM_update" value="form1" />
<input type="hidden" name="nama_penerbangan" value="<?php echo $row_DetailRS1['nama_penerbangan']; ?>" />
</form> <br>
<a href="plan.login.php">I Want To Choose Again</a> |
<?php
$_SESSION['nama_penerbangan']=$row_DetailRS1['nama_penerbangan']; $_SESSION['kota_asal']=$row_DetailRS1['kota_asal'];
$_SESSION['kota_tujuan']=$row_DetailRS1['kota_tujuan']; $_SESSION['tanggal']=$row_DetailRS1['tanggal'];
$_SESSION['jumlah_duduk_v']=$jumlah_v; $_SESSION['jumlah_duduk_b']=$jumlah_b; $_SESSION['jumlah_duduk_e']=$jumlah_e; ?>
(32)
UNIVERSITAS KRISTEN MARANATHA
</div><div class="cleaner"></div></div> <?php include ('template/footer.php');?> </div></div>
</body></html> <?php
(33)
UNIVERSITAS KRISTEN MARANATHA
Halaman Admin Login
Admin.login.php
Jika ID yang melakukan login adalah admin, maka akan terhubung ke halaman
admin
<?php
// *** Validate request to login to this site. if (!isset($_SESSION)) {
session_start(); }
$loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck']; }
if (isset($_POST['id'])) { $loginUsername=$_POST['id']; $password=$_POST['password']; $MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "admin/admin.login.php"; $MM_redirectLoginFailed = "login.fails.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_koneksi, $koneksi);
$LoginRS__query=sprintf("SELECT * from admin WHERE admin_name='admin'");
$LoginRS = mysql_query($LoginRS__query, $koneksi) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS);
if ($LoginRS>0) { }
header("Location: " . $MM_redirectLoginSuccess );
}
(34)
UNIVERSITAS KRISTEN MARANATHA
header("Location: ". $MM_redirectLoginFailed ); }
?>
Halaman Cek.login
Cek.login.php
Mengecek apakah ID yang login adalah admin atau user
<?php
require_once('Connections/koneksi.php'); $username=$_POST['id'];
$pass=$_POST['password'];
$sql=mysql_query("SELECT * FROM member WHERE username_member='$username' AND password_member='$pass'");
$level=mysql_num_rows($sql);
$sqladmin=mysql_query("SELECT * FROM admin WHERE admin_name='$username' AND admin_password='$pass'");
$leveladmin=mysql_num_rows($sqladmin); $r=mysql_fetch_array($sql);
if ($leveladmin > 0){ include('admin.login.php');} else{
if($level > 0){
include('template/login.php') ;}
(35)
UNIVERSITAS KRISTEN MARANATHA
Halaman Contact Us (Anonymous)
Contactus.notlogin.php
Halaman untuk mengirimkan
feedback
jika user belum melakukan registrasi /
login
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php';
include 'template/recordset/recordset.insert.feedback.php'; ?>
<head>
<title>HOME</title> </head>
<body>
<div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<div id="contact_form"> <h4>Send us Your Feedback</h4>
<form method="POST" name="contact" action="<?php echo $editFormAction; ?>"> <input type="hidden" name="username" value="Anonymous" />
Subject : <select name="subject" value="Select Subject"> <option value="Service">Service</option>
<option value="Pre-Flight">Pre-Flight</option> <option value="Post-Flight">Post-Flight</option> <option value="In-Flight">In-Flight</option> </select>
(36)
UNIVERSITAS KRISTEN MARANATHA
<div class="cleaner h10"></div>
<label for="text">Message:</label> <textarea id="text" name="text" rows="0" cols="0"></textarea> <div class="cleaner h10"></div>
<input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" /> <input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Reset" /> <input type="hidden" name="tanggal_kirim" value="now()" />
<input type="hidden" name="MM_insert" value="contact" /> </form>
</div>
</div><!-- end of content --> <div class="cleaner"></div> </div> <!-- end of main -->
<?php include ('template/footer.php')?> </div></div>
</body></html>
(37)
UNIVERSITAS KRISTEN MARANATHA
Halaman Contact Us (User)
Contactus.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php';
include 'template/recordset/recordset.select.member.php'; include 'template/recordset/recordset.insert.feedback.login.php'; ?>
<head>
<title>HOME</title> </head>
<body> <div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<div id="contact_us">
<h2>Contact Us</h2> <div id="contact_form"> <h4>Send us Your Feedback</h4>
<form method="POST" name="contact" action="<?php echo $editFormAction; ?>"> <input type="hidden" name="username" value="<?php echo $_SESSION['MM_Username']; ?>"/>
<input type="hidden" name="post" value="Send" />
Subject : <select name="subject" value="Select Subject"> <option value="Service">Service</option> <option value="Pre-Flight">Pre-Flight</option> <option value="Post-Flight">Post-Flight</option>
(38)
UNIVERSITAS KRISTEN MARANATHA
<option value="In-Flight">In-Flight</option> </select>
<div class="cleaner h10"></div>
<label for="text">Message:</label> <textarea id="text" name="text" rows="0" cols="0"></textarea>
<div class="cleaner h10"></div>
<input type="hidden" name="tanggal_kirim" value="NOW()" />
<input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" />
<input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Reset" />
<input type="hidden" name="MM_insert" value="contact" /> </form>
</div></div></div><div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?></div></div>
</body> </html>
(39)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kirim Feedback (User)
Contactus.kirim.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head>
<title>HOME</title> </head>
<body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<center><H2>Your Feedback has Been Sent,<br>Thank You! :)</h2></center>
</div><!-- end of content -->
<div class="cleaner"></div> </div> <!-- end of main --> <?php include ('template/footer.php')?> </div></div>
</body> </html>
(40)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kirim Feedback (Anonymous)
Contactus.notlogin.kirim.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head>
<title>HOME</title> </head>
<body>
<div id="body">
<div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<center><h4>Your Feedback Has Been Sent<br>As Anonymous :)</h4></center>
</div><!-- end of content -->
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?></div></div>
</body> </html> <?php
mysql_free_result($login); ?>
(41)
UNIVERSITAS KRISTEN MARANATHA
Halaman Experience
Experience.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<div class="content_box">
<a href="highlight.php">Where You Can Go</a><br> <a href="gallery.php">At A Glance</a><br>
<a href="dining.php">Fine Dining</a><br> </div>
</div><div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body></html> <?php
(42)
UNIVERSITAS KRISTEN MARANATHA
Halaman Experience (Login)
Experience.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<div class="content_box">
<a href="highlight.login.php">Where You Can Go</a></br> <a href="gallery.login.php">At A Glance</a><br> <a href="dining.login.php">Fine Dining</a><br>
</div> </div><!-- end of content -->
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body></html>
(43)
UNIVERSITAS KRISTEN MARANATHA
Halaman At A Glance
Gallery.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<div class="content_box"> <div id="gallery"> <ul>
<li> <!--VIP-->
<a href="images/gallery/1st_class.jpg" class="lightbox" title="VIP Suit"> <img src="images/gallery/1st_class.jpg" height="90px" width="130px"/> </a>
<span><a href="vip.class.php">VIP Class</a></span>
The most luxurious way to fly for business or pleasure - on our narrow - bodied aircraft. <br>
<a href="login.attempt.php">Book Now</a> </li>
<li><!--Business-->
<a href="images/gallery/business_class.jpg" class="lightbox" title="Business">
<img src="images/gallery/business_class.jpg" alt="Experience our Business Class"height="90px" width="130px" />
(44)
UNIVERSITAS KRISTEN MARANATHA
<span><a href="business.class.php">Business Class</a></span>
Discover a style and space like no other, in the World's Best Business Class as voted by Skytrax 2009. <br>
<a href="login.attempt.php">Book Now</a> </li>
<li><!--Economy-->
<a href="images/gallery/economy_class.jpg" class="lightbox" title="Economy Class on Boeing 747">
<img src="images/gallery/economy_class.jpg" alt="Experience our Economy Class"height="90px" width="130px" />
</a>
<span><a href="economy.class.php">Economy Class</a></span>
Welcome to our Economy Class. Offering warm hospitality, individual attention and award-winning cuisine, discover why the best things in life don't always come at a huge price. <br> <a href="login.attempt.php">Book Now</a>
</li>
</ul></div></div></div><!-- end of content --> <div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body></html>
(45)
UNIVERSITAS KRISTEN MARANATHA
Halaman At A Glance (Login)
Gallery.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<div class="content_box"> <div id="gallery">
<ul> <li>
<a href="images/gallery/1st_class.jpg" class="lightbox" title="VIP Suit"> <img src="images/gallery/1st_class.jpg" height="90px" width="130px"/> </a>
<span><a href="vip.class.login.php">VIP Class</a></span>
The most luxurious way to fly for business or pleasure - on our narrow - bodied aircraft. <br>
<a href="plan.login.php">Book Now</a> </li>
<li>
<a href="images/gallery/business_class.jpg" class="lightbox" title="Business">
<img src="images/gallery/business_class.jpg" alt="Experience our Business Class"height="90px" width="130px" />
(46)
UNIVERSITAS KRISTEN MARANATHA
</a>
<span><a href="business.class.login.php">Business Class</a></span>
Discover a style and space like no other, in the World's Best Business Class as voted by Skytrax 2009. <br>
<a href="plan.login.php">Book Now</a> </li><li>
<a href="images/gallery/economy_class.jpg" class="lightbox" title="Economy Class on Boeing 747">
<img src="images/gallery/economy_class.jpg" alt="Experience our Economy Class"height="90px" width="130px" />
</a>
<span><a href="economy.class.login.php">Economy Class</a></span>
Welcome to our Economy Class. Offering warm hospitality, individual attention and award-winning cuisine, discover why the best things in life don't always come at a huge price. <br>
<a href="plan.login.php">Book Now</a> </li>
</ul>
</div></div></div><!-- end of content --> <div class="cleaner"></div></div> <?php include ('template/footer.php')?> </div></div>
(47)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas VIP
Vip.class.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<center><h3>VIP Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/1st_class.jpg" height="300" width="600"alt="Image 1" title="Suite" /></a>
<a href="#"><img src="images/gallery/1st_class2.jpg" height="300" width="600"alt="Image 2" title="Comfort Sleep" /></a>
<a href="#"><img src="images/gallery/1st_class3.jpg" height="300" width="600"alt="Image 3" title="VIP Class Experience " /></a>
<a href="#"><img src="images/gallery/1st_class4.jpg" height="300" width="600"alt="Image 3" title="Delicious Food " /></a>
</div>
<div class="content_box"> <div id="gallery">
<center>The most luxurious way to fly for business or pleasure - on our narrow - bodied aircraft.</center> <br>
<a href="login.attempt.php"> <h5>Book Now >></h5></a> </div></div></div><!-- end of content -->
(48)
UNIVERSITAS KRISTEN MARANATHA
</div> <!-- end of main -->
<?php include ('template/footer.php')?> </div></div>
</body> </html> <?php
mysql_free_result($login); ?>
(49)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas VIP (Login)
Vip.class.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<center><h3>VIP Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/1st_class.jpg" height="300" width="600"alt="Image 1" title="Suite" /></a>
<a href="#"><img src="images/gallery/1st_class2.jpg" height="300" width="600"alt="Image 2" title="Comfort Sleep" /></a>
<a href="#"><img src="images/gallery/1st_class3.jpg" height="300" width="600"alt="Image 3" title="VIP Class Experience " /></a>
<a href="#"><img src="images/gallery/1st_class4.jpg" height="300" width="600"alt="Image 3" title="Delicious Food " /></a>
</div><div class="content_box">
<div id="gallery">
<center>The most luxurious way to fly for business or pleasure - on our narrow - bodied aircraft.</center> <br>
<a href="plan.login.php"> <h5>Book Now >></h5></a> </div></div></div><!-- end of content -->
(50)
UNIVERSITAS KRISTEN MARANATHA
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body> </html>
(51)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas Bisnis
Business.class.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<center><h3>Bussiness Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/business_class.jpg" height="300" width="600"alt="Image 1" title="Seats." /></a>
<a href="#"><img src="images/gallery/business_class2.jpg" height="300" width="600"alt="Image 2" title="Seats." /></a>
<a href="#"><img src="images/gallery/business_class3.jpg" height="300" width="600"alt="Image 3" title="14 inch LED Screen on your front. " /></a>
</div>
<div class="content_box"> <div id="gallery">
<center> Discover a style and space like no other, in the World's Best Business Class as voted by Skytrax 2009.</center><br>
<a href="login.attempt.php"> <h5>Book Now >></h5></a> </div></div></div><!-- end of content -->
(52)
UNIVERSITAS KRISTEN MARANATHA
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body> </html> <?php
mysql_free_result($login); ?>
(53)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas Bisnis (Login)
Business.class.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<center><h3>Bussiness Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/business_class.jpg" height="300" width="600"alt="Image 1" title="Seats." /></a>
<a href="#"><img src="images/gallery/business_class2.jpg" height="300" width="600"alt="Image 2" title="Seats." /></a>
<a href="#"><img src="images/gallery/business_class3.jpg" height="300" width="600"alt="Image 3" title="14 inch LED Screen on your front. " /></a>
</div>
<div class="content_box"> <div id="gallery">
<center>
Discover a style and space like no other, in the World's Best Business Class as voted by Skytrax 2009.</center>
(54)
UNIVERSITAS KRISTEN MARANATHA
<div class="cleaner"></div></div> <!-- end of main --> <?php include ('template/footer.php')?>
</div></div> </body> </html>
(55)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas Ekonomi
Economy.class.php
<?php
require_once('Connections/koneksi.php');
include 'template/recordset/recordset.select.member.php'; include 'template/login.php';
include 'template/css&js.php'; ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/sidebar.php')?> <div id="content">
<center><h3>Economy Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/economy_class.jpg" height="300" width="600"alt="Image 1" title="Seats." /></a>
<a href="#"><img src="images/gallery/economy_class2.jpg" height="300" width="600"alt="Image 2" title="Seats." /></a>
<a href="#"><img src="images/gallery/economy_class3.jpg" height="300" width="600"alt="Image 3" title="14 inch LED Screen on your front." /></a>
</div>
<div class="content_box"> <div id="gallery">
<center> Welcome to our Economy Class. Offering warm hospitality, individual attention and award-winning cuisine, discover why the best things in life don't always come at a huge price.</center> <br>
<a href="login.attempt.php"> <h5>Book Now >></h5></a> </div></div></div><!-- end of content -->
<div class="cleaner"></div></div> <?php include ('template/footer.php')?> </div></div></body></html> <?php mysql_free_result($login); ?>
(56)
UNIVERSITAS KRISTEN MARANATHA
Halaman Kelas Ekonomi (Login)
Economy.class.login.php
<?php
require_once('Connections/koneksi.php'); include 'template/session.php';
include 'template/css&js.php'; include 'template/logout.php' ?>
<head><title>HOME</title></head> <body>
<div id="body"> <div id="wrapper">
<?php include ('template/header.php') ?> <div id="main">
<?php include ('template/login.sidebar.php')?> <div id="content">
<center><h3>Economy Class</h3></center> <div id="slider">
<a href="#"><img src="images/gallery/economy_class.jpg" height="300" width="600"alt="Image 1" title="Seats." /></a>
<a href="#"><img src="images/gallery/economy_class2.jpg" height="300" width="600"alt="Image 2" title="Seats." /></a>
<a href="#"><img src="images/gallery/economy_class3.jpg" height="300" width="600"alt="Image 3" title="14 inch LED Screen on your front." /></a>
</div>
<div class="content_box"> <div id="gallery">
<center>Welcome to our Economy Class. Offering warm hospitality, individual attention and award-winning cuisine, discover why the best things in life don't always come at a huge price.</center>
</div></div></div><!-- end of content --> <div class="cleaner"></div></div> <?php include ('template/footer.php')?> </div></div></body></html>
(57)
UNIVERSITAS KRISTEN MARANATHA
Halaman Admin
HOME.ADMIN.PHP
<?php//initialize the session if (!isset($_SESSION)) { session_start();}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles $_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL; $_SESSION['PrevUrl'] = NULL; unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']); unset($_SESSION['PrevUrl']);
$logoutGoTo = "../home.php"; if ($logoutGoTo) {
header("Location: $logoutGoTo"); exit; }} ?>
<?php
if (!isset($_SESSION)) { session_start();}?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<link href="../menu/menu.css" rel="stylesheet" type="text/css" /> <head>
(58)
UNIVERSITAS KRISTEN MARANATHA
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WELCOME ADMIN</title>
</head> <body>
<div id ="halaman"><br><br> welcome, admin<br><br> <table border="1" align="center">
<tr> <td><a href="input.tiket.pesan.php">INPUT DATA TIKET</a></td> </tr> <tr> <td><a href="view.input.php">LIHAT DATA TIKET</a></td></tr>
<tr> <td><a href="delete.php">HAPUS DATA</a></td></tr>
<tr><td><a href="log.pesan.tiket.php">DATA PEMESAN</a></td></tr> <tr><td><a href="view.feedback.php">KOMENTAR</a></tr></td></tr> <tr><td><a href="promosi.php">HARGA PROMOSI</a></tr></td></tr> <tr><td><a href="history.php">LIHAT RIWAYAT</a></tr></td></tr> </table>
<a href="<?php echo $logoutAction ?>"><h5>| Log out | </h5></a> </div> </body></html>
(59)
UNIVERSITAS KRISTEN MARANATHA
INPUT.TIKET.PESAN.PHP
<?php require_once('../Connections/koneksi.php'); ?> <?php
//initialize the session if (!isset($_SESSION)) { session_start(); }
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles $_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL; $_SESSION['PrevUrl'] = NULL; unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']); unset($_SESSION['PrevUrl']);
$logoutGoTo = "home.php"; if ($logoutGoTo) {
header("Location: $logoutGoTo"); exit; }} ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
(60)
UNIVERSITAS KRISTEN MARANATHA
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; }
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) { case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "long": case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : theNotDefinedValue;
break; } return $theValue; }} $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO detail_tiket (nama_penerbangan, kota_asal, kota_tujuan, harga_e_class, harga_b_class, harga_v_class, duduk_e, duduk_b, duduk_v, harga_anak, tanggal, jam) VALUES (%s, %s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['nama_penerbangan'], "text"), GetSQLValueString($_POST['kota_asal'], "text"),
GetSQLValueString($_POST['kota_tujuan'], "text"), GetSQLValueString($_POST['harga_e_class'], "int"), GetSQLValueString($_POST['harga_b_class'], "int"),
(61)
UNIVERSITAS KRISTEN MARANATHA
GetSQLValueString($_POST['harga_v_class'], "int"), GetSQLValueString($_POST['duduk_e'], "int"),
GetSQLValueString($_POST['duduk_b'], "int"), GetSQLValueString($_POST['duduk_v'], "int"), GetSQLValueString($_POST['harga_anak'], "int"), GetSQLValueString($_POST['tanggal'], "text"),
GetSQLValueString($_POST['jam'], "text")); mysql_select_db($database_koneksi, $koneksi);
$Result1 = mysql_query($insertSQL, $koneksi) or die(mysql_error()); $insertGoTo = "view.input.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } mysql_select_db($database_koneksi, $koneksi); $query_data_kota = "SELECT * FROM data_kota";
$data_kota = mysql_query($query_data_kota, $koneksi) or die(mysql_error()); $row_data_kota = mysql_fetch_assoc($data_kota);
$totalRows_data_kota = mysql_num_rows($data_kota); ?>
<html>
<head><title>WELCOME</title>
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="../jQuery/jquery.js" type="text/javascript"></script>
<script src="../jQuery/jQuery.ui.core.js" type="text/javascript"></script>
<script src="../jQuery/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script> <link rel="stylesheet" href="../datepicker/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../jQuery/jquery-1.6.2.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.core.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.datepicker.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.widget.js"></script> <link href="../menu/menu.css" rel="stylesheet" type="text/css" />
(62)
UNIVERSITAS KRISTEN MARANATHA
<style type="text/css"> div#registermenu a{
position:relative; margin:0 20px 0 30px;} div#registermenu p{
position:relative; margin:0 10px 0 0;} </style></head> <body>
<div id="menu"> <ul class="menu">
<li><a href="home.admin.php"><span>HOME</span></a></li>
<li><a href="input.tiket.pesan.php"><span>INPUT DATA TIKET</span></a></li> <li><a href="view.input.php"><span>LIHAT DATA TIKET</span></a></li> </ul>
</div>
<div id="registermenu"><p>Welcome,ADMIN</p> </div>
<div id="halaman">
<form action="<?php echo $editFormAction?>" method="post" name="form1" id="form1"> <CENTER>DATA TIKET</CENTER><BR>
<table align="center"> <tr valign="baseline">
<td nowrap="nowrap" align="right">Nama_penerbangan:</td>
<td><input type="text" name="nama_penerbangan" value="" size="32" /> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Kota Asal:</td> <td><select name="kota_asal" id="kota_asal"> <option value="" selected="selected"></option>
(63)
UNIVERSITAS KRISTEN MARANATHA
<?php do { ?>
<option value="<?php echo $row_data_kota['nama_kota']?>"><?php echo
$row_data_kota['nama_kota'] ;$kode_airport=$row_data_kota['nama_kota']; ?></option> <?php
} while ($row_data_kota = mysql_fetch_assoc($data_kota));
$rows = mysql_num_rows($data_kota);
if($rows > 0) {
mysql_data_seek($data_kota, 0);
$row_data_kota = mysql_fetch_assoc($data_kota); } ?>
</select></td> <tr valign="baseline">
<td nowrap="nowrap" align="right">Kota Tujuan:</td> <td><select name="kota_tujuan">
<option value=""></option> <?php
do { ?>
<option value="<?php echo $row_data_kota['nama_kota']?>"><?php echo $row_data_kota['nama_kota']?></option>
<?php
} while ($row_data_kota = mysql_fetch_assoc($data_kota));
$rows = mysql_num_rows($data_kota);
if($rows > 0) {
mysql_data_seek($data_kota, 0);
$row_data_kota = mysql_fetch_assoc($data_kota); } ?> </select></td>
</tr>
<tr valign="baseline">
(64)
UNIVERSITAS KRISTEN MARANATHA
<td><input type="text" name="harga_e_class" value="" size="32" /></td> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Harga Kelas Bisnis:</td>
<td><input type="text" name="harga_b_class" value="" size="32" /></td> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Harga Kelas VIP:</td>
<td><input type="text" name="harga_v_class" value="" size="32" /></td> </tr>
<tr valign="baseline">
<td height="27" align="right" nowrap="nowrap">Jumlah Tempat duduk Ekonomi:</td> <td><input type="text" name="duduk_e" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td height="27" align="right" nowrap="nowrap">Jumlah Tempat duduk Bisnis:</td> <td><input type="text" name="duduk_b" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td height="27" align="right" nowrap="nowrap">Jumlah Tempat duduk VIP:</td> <td><input type="text" name="duduk_v" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Diskon Anak:</td>
<td><input type="text" name="harga_anak" value="" size="32" /></td> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Tanggal Berangkat:</td> <td align="left" colspan="2"><input type="text" name="tanggal"> <font size="-3">yyyy-mm-dd</font></td>
</tr>
(65)
UNIVERSITAS KRISTEN MARANATHA
<td nowrap="nowrap" align="right">Jam:</td>
<td align="left" colspan="2"><input type="text" name="jam" /><font size="-3">hh:mm:ss</font></td> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="Insert record" /></td> </tr>
</table>
<input type="hidden" name="MM_insert" value="form1" /> </form>
</div></div><div id="footer_wrapper"> <div id="footer">
Copyright © 2012 <a href="http://apycom.com">myairlines.com</a> | <a href="<?php echo $logoutAction ?>">Log out</a>
<div class="cleaner"></div> </div></div> </body></html>
<?php mysql_free_result($data_kota); ?>
VIEW.INPUT.PHP
Melihat data penerbangan
<?php require_once('../Connections/koneksi.php'); ?> <?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; }
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) { case "text":
(66)
UNIVERSITAS KRISTEN MARANATHA
break; case "long": case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break;
} return $theValue; }} $maxRows_detail = 10; $pageNum_detail = 0;
if (isset($_GET['pageNum_detail'])) {
$pageNum_detail = $_GET['pageNum_detail']; }
$startRow_detail = $pageNum_detail * $maxRows_detail; mysql_select_db($database_koneksi, $koneksi);
$query_detail = "SELECT * FROM detail_tiket";
$query_limit_detail = sprintf("%s LIMIT %d, %d", $query_detail, $startRow_detail, $maxRows_detail); $detail = mysql_query($query_limit_detail, $koneksi) or die(mysql_error());
$row_detail = mysql_fetch_assoc($detail); if (isset($_GET['totalRows_detail'])) {
$totalRows_detail = $_GET['totalRows_detail']; } else {
$all_detail = mysql_query($query_detail); $totalRows_detail = mysql_num_rows($all_detail); }
(67)
UNIVERSITAS KRISTEN MARANATHA
$totalPages_detail = ceil($totalRows_detail/$maxRows_detail)-1; $queryString_detail = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_detail") == false && stristr($param, "totalRows_detail") == false) { array_push($newParams, $param);
} }
if (count($newParams) != 0) {
$queryString_detail = "&" . htmlentities(implode("&", $newParams)); } }
$queryString_detail = sprintf("&totalRows_detail=%d%s", $totalRows_detail, $queryString_detail); ?> <html>
<head>
<title>WELCOME ADMIN</title>
<link href="../menu/menu.css" rel="stylesheet" type="text/css" />
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="../jQuery/jquery.js" type="text/javascript"></script>
<script src="../jQuery/jQuery.ui.core.js" type="text/javascript"></script>
<script src="../jQuery/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script> <link rel="stylesheet" href="../datepicker/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../jQuery/jquery-1.6.2.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.core.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.datepicker.js"></script> <script type="text/javascript" src="../jQuery/jquery.ui.widget.js"></script> });
</script>
<link href="../menu/menu.css" rel="stylesheet" type="text/css" /> </head>
(68)
UNIVERSITAS KRISTEN MARANATHA
<div id="menu"> <ul class="menu">
<li><a href="home.admin.php"><span>HOME</span></a></li>
<li><a href="input.tiket.pesan.php"><span>INPUT DATA TIKET</span></a></li> <li><a href="view.input.php"><span>LIHAT DATA TIKET</span></a></li> </ul>
</div>
welcome, admin<br><br>
<center>DATA JADWAL PENERBANGAN</center><br> <table border="1" align="center">
<tr>
<td>No. Penerbangan</td> <td>Asal</td>
<td>Tujuan</td> <td>Harga Ekonomi</td> <td>Harga Bisnis</td> <td>Harga VIP</td> <td>Jumlah Ekonomi</td> <td>Jumlah Bisnis</td> <td>Jumlah VIP</td> <td>Diskon Anak</td> <td>tanggal</td> <td>jam</td>
</tr> <?php do { ?> <tr>
<td><a href="detail.penerbangan.php?recordID=<?php echo $row_detail['nama_penerbangan']; ?>"> <?php echo $row_detail['nama_penerbangan']; ?> </a></td>
<td><?php echo $row_detail['kota_asal']; ?> </td> <td><?php echo $row_detail['kota_tujuan']; ?> </td>
(69)
UNIVERSITAS KRISTEN MARANATHA
<td><?php echo $row_detail['harga_e_class']; ?> </td> <td><?php echo $row_detail['harga_b_class']; ?> </td> <td><?php echo $row_detail['harga_v_class']; ?> </td> <td><?php echo $row_detail['duduk_e']; ?> </td> <td><?php echo $row_detail['duduk_b']; ?> </td> <td><?php echo $row_detail['duduk_v']; ?> </td> <td><?php echo $row_detail['harga_anak']; ?> </td> <td><?php echo $row_detail['tanggal']; ?> </td> <td><?php echo $row_detail['jam']; ?> </td> </tr>
<?php } while ($row_detail = mysql_fetch_assoc($detail)); ?> </table>
<br />
<table border="0"> <tr>
<td><?php if ($pageNum_detail > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_detail=%d%s", $currentPage, 0, $queryString_detail); ?>">First</a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_detail > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_detail=%d%s", $currentPage, max(0, $pageNum_detail - 1), $queryString_detail); ?>">Previous</a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_detail < $totalPages_detail) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_detail=%d%s", $currentPage, min($totalPages_detail, $pageNum_detail + 1), $queryString_detail); ?>">Next</a>
<?php } // Show if not last page ?></td>
<td><?php if ($pageNum_detail < $totalPages_detail) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_detail=%d%s", $currentPage, $totalPages_detail, $queryString_detail); ?>">Last</a>
<?php } // Show if not last page ?></td> </tr>
(1)
UNIVERSITAS KRISTEN MARANATHA RECORDSET.UPDATE.JUMLAHDUDUK.V.PHP
Mengupdate tempat duduk kelas VIP
<?php
$napen=$_SESSION['nama_penerbangan']; $jumlah_v=$_SESSION['jumlah_duduk_v']; echo $jumlah_v;
echo $napen;
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE detail_tiket SET duduk_v=$jumlah_v WHERE nama_penerbangan='$napen'", GetSQLValueString($_POST['duduk_v'], "int"));
mysql_select_db($database_koneksi, $koneksi);
$Result1 = mysql_query($updateSQL, $koneksi) or die(mysql_error());} mysql_select_db($database_koneksi, $koneksi);
$query_jumlahduduk = "SELECT nama_penerbangan, jumlah_duduk, duduk_e, duduk_b, duduk_v FROM detail_tiket WHERE nama_penerbangan='$napen'";
$jumlahduduk = mysql_query($query_jumlahduduk, $koneksi) or die(mysql_error()); $row_jumlahduduk = mysql_fetch_assoc($jumlahduduk);
$totalRows_jumlahduduk = mysql_num_rows($jumlahduduk); mysql_free_result($jumlahduduk);?>
(2)
Universitas Kristen Maranatha
BAB I
PENDAHULUAN
1.1
Latar Belakang
Pada era globalisasi ini, penggunaan internet sudah berkembang pesat, karena internet sangat membantu orang-orang dalam mencari informasi. Internet juga semakin mudah didapatkan.
Karena itu, banyak perusahaan yang menggunakan internet untuk membangun bisnis dan mempromosikannya. Ini juga memudahkan pembeli untuk mencari barang / jasa yang diinginkan secara efisien, sementara dari sisi penjual, cakupan penjualannya dapat menjadi sangat luas.
Tugas akhir ini bertujuan untuk membuat sistem pemesanan tiket pesawat secara online. Pemesanan tiket secara online ini sangat memudahkan pembeli untuk memesan, karena mereka dapat dengan mudah memesan tiket tanpa harus pergi ke
airport atau kantor maskapai penerbangan. Selain itu, pembeli juga dapat melihat
jadwal penerbangan satu / dua bulan setelahnya, sehingga dapat merencanakan pembelian tiket jauh-jauh hari. Pembeli juga dapat melihat layanan apa saja yang didapatkan dari maskapai penerbangan tersebut.
1.2
Identifikasi Masalah
Faktor-faktor yang diinginkan oleh pembeli dalam memesan tiket pesawat antara lain : kemudahan mendapatkan tiket, layanan yang didapatkan, serta jadwal penerbangan sehingga dapat melakukan perencanaan jauh-jauh hari sebelumnya.
Website pemesanan tiket pesawat dapat memberikan kemudahan dalam pemesanan tiket dan memiliki fitur layanan apa saja yang ada pada maskapai pemesanan tiket pesawat tersebut.
(3)
Universitas Kristen Maranatha
1.3
Tujuan
1. Membuat Website Pemesanan Tiket Pesawat.
2. Membuat website pemesanan tiket yang berisi informasi tentang maskapai
penerbangan tersebut.
1.4
Batasan Masalah
Menggunakan Adobe Dreamweaver CS5 untuk menulis script PHP dan mendesain web. Web ini juga tidak menyertakan tentang muatan (baggage
fees).
Selain itu web ini juga tidak menyertakan sistem pembayaran.
1.5
Sistematika Penulisan
Bab I : Pendahuluan
Membahas tentang latar belakang, rumusan masalah, identifikasi masalah, tujuan, dan batasan masalah
Bab II : Landasan Teori
Penjelasan tentang software apa saja yang digunakan untuk membuat
website ini, serta kegunaannya.
Bab III : Perancangan
Berisi tentang cara pembuatan website, desain, serta ERD.
Bab IV : Analisis Data
Berisi tampilan website yang sudah jadi, sistem yang diusulkan, serta implementasi
(4)
Universitas Kristen Maranatha
Bab V : Kesimpulan dan Saran
Membahas tentang kesimpulan yang didapatkan setelah membuat
website ini, kekurangan & kelebihan, serta apa saja yang dapat
(5)
Universitas Kristen Maranatha
BAB V
KESIMPULAN DAN SARAN
5.1.
Kesimpulan
Setelah melakukan pembuatan website, dapat ditarik kesimpulan sebagai berikut :
• Website pemesanan tiket telah berhasil dibuat
User dapat melakukan pemesanan tiket pesawat dengan menggunakan website ini
• Di dalam website terdapat Informasi tentang maskapai penerbangan
Pada website sudah terdapat informasi-informasi yang dibutuhkan oleh user tentang maskapai penerbangan tersebut, seperti jadwal penerbangan, kelas-kelas, serta fasilitas yang didapatkan selama penerbangan
5.2.
Saran
Dalam pengembangannya web ini dapat ditambahkan fitur lain untuk meningkatkan efisiensi dan lebih membantu user, seperti :
1. Air Baggage Fees
2. Mengikutsertakan pembayaran
(6)
Universitas Kristen Maranatha
DAFTAR PUSTAKA
Adelheid, Andrea, Khairil Nst. 2012. “Buku PintarMenguasai PHP MySQL”. Jakarta, MediaKita.
Arief, M. Rudyanto. 2011. “Pemrograman Web Dinamis menggunakan PHP dan MySQL”.
Yogyakarta, Andi.
F.K Sibero, Alexander. 2011. “Kitab SuciWeb Programming”. Yogyakarta, MediaKom,.
Hakim, Lukmanul. 2010. “Bikin Website Super Keren dengan PHP & jQuery”. Yogyakarta, Lokomedia.
Kadir, Abdul. 2011. Buku Pintar jQuery dan PHP. Yogyakarta, MediaKom.
Saputra, Agus, Feni Agustin, Asfa Solution. 2012. 62 Trik dan Plugin Terbaik jQuery. Jakarta, Elex Media Komputindo.
Wahana Komputer. 2011 “Adobe Dreamweaver CS5 untuk Beragam Desain Website Interaktif”.
Yogyakarta, Andi. www.adobe.com.