SURAT KETERANGAN
Hasil Uji Program Tugas Akhir
Yang bertanda tangan dibawah ini, menerangkan bahwa mahasiswa Tugas Akhir Program D 3 Teknik Informatika :
Nama : CHRYSTOFEL L.GAOL
NIM : 132406093
Prog. Studi : D3 Teknik Informatika
Judul TA : SISTEM PEMESANAN MOBIL RENTAL BERBASIS
WEBSIDE DENGAN MENGGUNAKAN MYSQL DAN PHP
Telah melaksanakan test program Tugas Akhir Mahasiswa tersebut diatas pada tanggal. . .
Dengan Hasil : SUKSES / GAGAL
Demikian diterangkan untuk digunakan melengkapi syarat pendaftaran Ujian Meja Hijau Tugas Akhir Mahasiswa bersangkutan di Departemen Matematika FMIPA USU Medan.
Medan, Juli 2016
KARTU BIMBINGAN TUGAS AKHIR MAHASISWA
Nama Mahasiswa : Chrystofel L. Gaol
Nomor Stambuk : 13240693
Judul Tugas Akhir :Sistem Pemesanan mobil rental di Ratu Rosario berbasis web menggunakan PHP dan Mysql
Dosen Pembimbing : Dr. Pasukat Sembiring , M,Si. Tanggal Mulai Bimbingan :
Tanggal Selesai Bimbingan :
No. Tanggal Asisten Bimbingan
Pembahasan pada Asistensi Mengenai, pada Bab :
Paraf Dosen
Pembimbing Keterangan 1.
2. 3. 4. 5. 6.
Kartu ini harap dikembalikan ke Departemen Matematika bila bimbingan telah selesai.
Diketahui, Disetujui,
Ketua Program Studi D3 Teknik Informatika, Pembimbing,
Dr. Elly Rosmaini , M.Si Dr. Pasukat Sembiring , M,Si.
LIST PROGRAM
Cek .php
<?php
session_start(); // Memulai Session
include "koneksi.php" ; // Memanggil config.php untuk konfigurasi database
$username = $_POST['username'];
$password = $_POST['password'];
$passwordhash = md5($password); // Mengenkripsikannya untuk dicocokan dengan database
$sql = "select username, password from login where username = '$username' and password =
'$passwordhash'";
$sqlrun = mysql_query($sql);
$cek = mysql_num_rows($sqlrun);
if ($cek >= 1 )
{
$_SESSION['username'] = $username;
header("location:main.php");
}
else
header("location: login.php");
?>
Daftar.php
<style type="text/css">
.style1 {font-size: 24px}
-->
</style>
<form name="form1" method="post" action="input_daftar.php">
<table width="400" border="0" align="center">
<tr>
<td colspan="2" align="center"><span class="style1" >Halaman Registrasi</span></td>
</tr>
<tr>
<td>Username : </td>
<td><input name="txtnama" type="text" id="txtnama"></td>
</tr>
<tr>
<td>Password : </td>
<td><input name="txtpassword" type="password" id="txtpassword"></td>
</tr>
<tr>
<td >Ulangi Password : </td>
<td><input name="txtc_password" type="password" id="txtc_password"></td>
</tr>
<tr>
</tr>
<tr>
<td>Sudah punya akun?<a href="login.php">Login</a></td>
</tr>
<tr>
<td align="right" colspan="2">
</td>
</tr>
</table>
</form>
Edit rental.php
<?php
session_start(); // Memulai Session
if (ISSET($_SESSION['username']))
{
?>
<html>
<head>
<title>EDIT RENTAL</title>
<style type="text/css">
body{background:#ebebeb; font-family:Arial;color:#fff;}
#login{
color:#fff;
width:340px;
padding:20px;
margin:60px auto;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
-o-border-radius:5px;
background: -webkit-linear-gradient(#0066CC, #5EACFB); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(#0066CC, #5EACFB); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(#0066CC, #5EACFB); /* For Firefox 3.6 to 15 */
background: linear-gradient(#0066CC, #5EACFB); /* Standard syntax */
}
input{
padding:4px;
}
.tombol{
padding:4px 10px;
background:url(images/bgmenu.gif) repeat-x;
text-decoration:none;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
-o-border-radius:5px;
color:#fff;
margin:5px;
.tombol:hover{
background:#706157;
}
.th{
background:url(images/bgmenu.gif) repeat-x;
color:#fff;
border:1px solid #fff;
}
table{margin:0;}
</style>
</head>
<body>
<div id="login">
<?php
include("koneksi.php");
$id=$_GET['id'];
echo "<form method='post' action='update_rental.php?id=$id'> ";
$query="SELECT * FROM `tbl_pesanmobil` WHERE id='$id'";
$eksekusi=mysql_query($query);
$data=mysql_fetch_array($eksekusi); ?>
<form method="POST" action="update_rental.php?id=$id">
<table width="100%" cellpadding="4px" align="center">
<tr>
<th class="th" colspan="2">Edit Pemesanan Mobil</th>
</tr>
<tr>
<tr>
<td>ID Pendaftar</td>
<td><?php echo $data['id']; ?></td>
</tr>
<td>Nama</td>
<td><?php echo $data['nama']; ?></td>
</tr>
<td>NIK KTP</td>
<td><?php echo $data['nik']; ?></td>
</tr>
<tr><td>Konfirmasi</td><td>
<select name="konfirmasi">
<option value="<?php echo $data['konfirmasi']; ?>"><?php echo $data['konfirmasi']; ?></option>
<option value="Sudah">Sudah</option>
<option value="Belum">Belum</option>
</select>
</tr>
<td> </td>
<td align="right"><input class="tombol" type="submit" value="SIMPAN"/></td>
</tr>
<tr>
<td> </td>
<td align="right"><input class="tombol" type="reset" value="RESET"/></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
}
else
header("location: login.php");
?>
Hapus Buku Tamu.php
<?php
include("../koneksi.php");
$id=$_GET['id'];
if(mysql_query($q)){
?><script>alert('Berhasil dihapus');</script><?php
?><script>document.location.href='tampil_bukutamu.php';</script><?php
}
else{
echo"data gagal dihapus: ".mysql_error();
}
?>
Hapus Rental.php
<?php
include("../koneksi.php");
$id=$_GET['id'];
$q="DELETE FROM `tbl_pesanmobil` WHERE id='$id'";
if(mysql_query($q)){
?><script>alert('Berhasil dihapus');</script><?php
?><script>document.location.href='tampil_rental.php';</script><?php
}
else{
echo"data gagal dihapus: ".mysql_error();
?>
Input daftar .php
<?php
include "koneksi.php";
$txtnama = trim(strip_tags(mysql_real_escape_string($_POST['txtnama'])));
$txtpassword =
trim(strip_tags(mysql_real_escape_string($_POST['txtpassword'])));
$txtc_password =
trim(strip_tags(mysql_real_escape_string($_POST['txtc_password'])));
$passmd5 = md5($txtpassword); //Mengenkripsi $txtpassword
if(strlen($txtnama)<1)
{
echo "Nama Masih Kosong";
}
else if(strlen($txtpassword)<1)
{
echo "Password Masih Kosong";
}
else if(strlen($txtc_password)<1)
{
echo "Password Masih Kosong";
}
else if($txtpassword != $txtc_password)
{
print "<script>alert('Konfirmasi password harus sama dengan password !');
exit;
}
else {
$cek_data="Select * from login where username='$txtnama'"; // Melakukan Pemeriksaan pada Username di tabel tbl_user
$hasil=mysql_query($cek_data);
$hasil_cek = mysql_num_rows($hasil);
if ($hasil_cek==0){ //Jika Data Tidak Ditemukan Maka
$sqlSimpan = "INSERT INTO login(username,password)
values('$txtnama', '$passmd5')";
mysql_query($sqlSimpan, $koneksi)
or die ("Gagal Perintah SQL".mysql_error());
echo "PENYIMPANAN BERHASIL SILAHKAN <a href='login.php'>LOGIN</a>";
}
else
{
echo "Data / Username Sudah Ada <a href='daftar.php'>Kembali</a>";
}}
?>
Login.php
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Login Administrator</title>
<link rel="stylesheet" href="../page/rincian.css">
</head>
<body>
<div class="login-page">
<div class="form">
<form class="login-form" action="cek.php" method="POST">
<h2>Login Admin Ratu Rosario Transport</h2>
<input type="text" name="username" placeholder="username"/>
<input type="password" name="password" placeholder="password"/>
<button>login</button>
</form>
</div>
</div>
</body>
</html>
Logout.php
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Login Administrator</title>
</head>
<body>
<div class="login-page">
<div class="form">
<form class="login-form" action="cek.php" method="POST">
<h2>Login Admin Ratu Rosario Transport</h2>
<input type="text" name="username" placeholder="username"/>
<input type="password" name="password" placeholder="password"/>
<button>login</button>
</form>
</div>
</div>
</body>
</html>
Tampilan Buku Tamu.php
<?php
session_start(); // Memulai Session
if (ISSET($_SESSION['username']))
{ ?>
<!DOCTYPE html>
<html>
<meta charset='UTF-8'>
<title>ADMINISTRATOR</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/table.css">
<!--[if !IE]><!-->
<style>
/*
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr { border: 1px solid #ccc; }
td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
white-space: nowrap;
}
/*
Label the data
*/
td:nth-of-type(1):before { content: "First Name"; }
td:nth-of-type(2):before { content: "Last Name"; }
td:nth-of-type(3):before { content: "Job Title"; }
td:nth-of-type(4):before { content: "Favorite Color"; }
td:nth-of-type(5):before { content: "Wars of Trek?"; }
td:nth-of-type(6):before { content: "Porn Name"; }
td:nth-of-type(7):before { content: "Date of Birth"; }
td:nth-of-type(8):before { content: "Dream Vacation City"; }
td:nth-of-type(9):before { content: "GPA"; }
td:nth-of-type(10):before { content: "Arbitrary Data"; }
}
/* Smartphones (portrait and landscape) --- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
body {
padding: 0;
margin: 0;
}
/* iPads (portrait and landscape) --- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
body {
width: 495px;
}
}
</style>
<!--<![endif]-->
</head>
<body>
<div class="bingkai">
<div id="kepala">
<div id="logo">
<img src="../image/rr.gif">
</div>
<div id="judul">
<h1>Ratu Rosario Transport</h1>
<div id="subjudul">
<h1>Jalan Pemasyarakatan No.1 Medan, Sumatera Utara, Indonesia</h1>
<div id="subjudul2">
<h1>Nomor Telepon : (0634) 21709, E-mail : raturosario@yahoo.com, <br>website :www.raturosario.com</h1>
</div>
</div>
</div>
<div class="menu">
<ul>
<li><a href="main.php">Beranda</a></li>
<li><a href="tampil_rental.php">Data Pesan Mobil</a></li>
<li><a href="tampil_bukutamu.php">Data Buku Tamu</a></li>
<li><a href="logout.php?logout=yes">Keluar</a></li>
</ul>
</div>
<div id="page-wrap">
<h1>Pesan Masuk</h1>
<table>
<thead>
<tr>
<th>No</th>
<th>Kode</th>
<th>Tanggal Pesan</th>
<th>Nama</th>
<th>Email</th>
<th>Pesan</th>
<th>HAPUS</th>
</tr>
</thead>
<tbody>
<?php
include ('../koneksi.php');
$query=mysql_query("select * from tbl_bukutamu");
$no=1;
while ($data=mysql_fetch_array($query))
{
echo "<tr id=\"wrna\">
<td>".$no."</td>
<td>".$data['id']."</td>
<td>".$data['tanggal_pesan']."</td>
<td>".$data['nama']."</td>
<td>".$data['email']."</td>
<td>".$data['telepon']."</td>"; ?>
<td><textarea name="" id="" cols="17" rows="10"><?php echo $data['pesan'];?></textarea></td>
<td><a href="hapus_dokter.php?id=<?php echo $data['id'];?>">Hapus</a></td>
<?php
echo"
$no++;
} ?>
</tr>
</tbody>
</table>
</div>
<div class="footer">Ratu Rosario Transport Medan copyright © 2016 by: Chrystofel 132406093
</div>
</div>
</body>
<?php
}
else
header("location: form_login.php");
?>
Tampilan rental.php
<?php
session_start(); // Memulai Session
if (ISSET($_SESSION['username']))
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>ADMINISTRATOR</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/table.css">
<!--[if !IE]><!-->
<style>
/*
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr { border: 1px solid #ccc; }
td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}
/*
Label the data
*/
td:nth-of-type(1):before { content: "First Name"; }
td:nth-of-type(2):before { content: "Last Name"; }
td:nth-of-type(3):before { content: "Job Title"; }
td:nth-of-type(4):before { content: "Favorite Color"; }
td:nth-of-type(5):before { content: "Wars of Trek?"; }
td:nth-of-type(6):before { content: "Porn Name"; }
td:nth-of-type(7):before { content: "Date of Birth"; }
td:nth-of-type(8):before { content: "Dream Vacation City"; }
td:nth-of-type(9):before { content: "GPA"; }
td:nth-of-type(10):before { content: "Arbitrary Data"; }
}
/* Smartphones (portrait and landscape) --- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
padding: 0;
margin: 0;
width: 320px; }
}
/* iPads (portrait and landscape) --- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
body {
width: 495px;
}
}
</style>
<!--<![endif]-->
</head>
<body>
<div class="bingkai">
<div id="kepala">
<div id="logo">
<img src="../image/rr.gif">
</div>
<div id="judul">
<h1>Ratu Rosario Transport</h1>
<div id="subjudul">
<div id="subjudul2">
<h1>Nomor Telepon : (0634) 21709, E-mail : raturosario@yahoo.com, <br>website :www.raturosario.com</h1>
</div>
</div>
</div>
</div>
<div class="menu">
<ul>
<li><a href="main.php">Beranda</a></li>
<li><a href="tampil_rental.php">Data Pesan Mobil</a></li>
<li><a href="tampil_bukutamu.php">Data Buku Tamu</a></li>
<li><a href="logout.php?logout=yes">Keluar</a></li>
</ul>
</div>
<div id="page-wrap">
<h1>Data Pemesanan Mobil</h1>
<table>
<thead>
<tr>
<th>No</th>
<th>NIK KTP</th>
<th>Alamat</th>
<th>Telepon</th>
<th>Tgl</th>
<th>Jangka</th>
<th>Status</th>
<th>Tipe Mobil</th>
<th>Supir Mobil</th>
<th>Pembayaran</th>
<th>Konfirmasi</th>
<th>HAPUS</th>
<th>EDIT</th>
</tr>
</thead>
<tbody>
<?php
include ('../koneksi.php');
$query=mysql_query("select * from tbl_pesanmobil");
$no=1;
while ($data=mysql_fetch_array($query))
{
echo "<tr id=\"wrna\">
<td>".$no."</td>
<td>".$data['nama']."</td>
<td><textarea name="" id="" cols="15" rows="5"><?php echo $data['alamat'];?></textarea></td>
<?php
echo "
<td>".$data['telepon']."</td>
<td>".$data['tanggalpemakaian']."</td>
<td>".$data['jangka']."</td> ";?>
<td><textarea name="" id="" cols="10" rows="5"><?php echo $data['statusmobil'];?></textarea></td>
<td><textarea name="" id="" cols="10" rows="5"><?php echo $data['tipemobil'];?></textarea></td>
<?php
echo"
<td>".$data['supirmobil']."</td>
<td>".$data['pembayaran']."</td>
<td>".$data['konfirmasi']."</td>"; ?>
<td><a href="hapus_rental.php?id=<?php echo $data['id'];?>">Hapus</a></td>
<td><a href="edit_rental.php?id=<?php echo $data['id'];?>">EDIT</a></td>
<?php
</tr>";
$no++;
} ?>
</tr>
</tbody>
</table>
</div>
<div class="footer">Ratu Rosario Transport Medan copyright © 2016 by: Chrystofel 132406093
</div>
</div>
</body>
<?php
}
else
header("location: form_login.php");
?>
Koneksi.php
<?php
// Jangan Lupa Sesuaikan <?php
include("../koneksi.php");
$konfirmasi = $_POST['konfirmasi'];
$q="UPDATE `tbl_pesanmobil` SET
konfirmasi ='$konfirmasi'
WHERE id='$id'";
if (mysql_query($q)) {
?><script>alert('SUDAH DIPERBARUI');</script><?php
?><script>document.location.href='tampil_rental.php';</script><?php
}
else{
echo"data gagal diinput: ".mysql_error();
}
?>Dengan Settingan Komputer Kita
$my['host'] = "localhost";
$my['user'] = "root";
$my['pass'] = "";
$my['dbs'] = "topel";
$koneksi = mysql_connect($my['host'], $my['user'], $my['pass']);
if (! $koneksi) {
echo "Gagal Koneksi Bro....";
mysql_error();
}
mysql_select_db($my['dbs'])
or die ("Database Gak Ada".mysql_error());