SURAT KETERANGAN Hasil Uji Program Tugas Akhir
Yang bertanda tangan dibawah ini, menerangkan bahwa Mahasiswa Tugas Akhir
Program Diploma 3 Teknik Informatika:
Nama
: DJOEL HASUDUNGAN SITORUS
NIM
: 132406073
Prog. Studi
: D3 Teknik Informatika
Judul TA
: Sistem informasi pengaduan kecelakaan berkendara di
kota Medan berbasis website menggunakan PHP dan MYSQL
Telah melaksanakan test program Tugas Akhir Mahasiswa tersebut di atas 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, Juni 2016
Dosen Pembimbing
KARTU BIMBINGAN TUGAS AKHIR MAHASISWA
Nama Mahasiswa
: Djoel Hasudungan Sitorus
Nomor Stambuk
: 132406073
Judul Tugas Akhir
: Sistem
informasi
pengaduan
kecelakaan
berkendara di kota Medan berbasis website
menggunakan PHP dan MYSQL
Dosen Pembimbing
: Drs.Henry Rani Sitepu,M,Si.
Tanggal Mulai Bimbingan
:
Tanggal Selesai Bimbingan :
No.
Tanggal
∗
Kartu ini harap dikembalikan ke Departemen Matematika bila bimbingan
telah selesai.
Diketahui,
Disetujui,
Ketua Program Studi D3 Teknik Informatika,
Pembimbing,
LAMPIRAN LISTING PROGRAM WEBSITE
1. index.php
<?php include "header.php" ?>
<section id="main-slider" class="no-margin">
<div class="carousel slide">
<div class="carousel-inner">
<div class="item active" style="background-image: url(images/slider/djoel.jpg)">
<div class="container">
<div class="row slide-margin">
<div class="col-sm-6">
<div class="carousel-content">
<h2 class="animation animated-item-1"><span>Hargai Hidupmu</span></h2>
<p class="animation animated-item-2">Banyak Orang Tercinta Menunggu Anda</p>
</div>
</div>
<div class="col-sm-6 hidden-xs animation animated-item-4">
<div class="slider-img">
</div>
</div>
</div>
</div>
</div><
</div><
</section>
<section id="conatcat-info">
<div class="container">
<div class="row">
<div class="col-sm-8">
<div class="media contact-info wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms">
<div class="pull-left">
<i class="fa fa-phone"></i>
</div>
<div class="media-body">
<h2>Bila ada pertanyaan ?</h2>
<p>Silahkan hubungi saya 081262344000</p>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include "footer.php" ?>
2. header.php
<!DOCTYPE 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">
<title>Pengaduan Kecelakaan Berkendara di Kota Medan</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/animate.css">
<link href="css/prettyPhoto.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<header>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse.collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a
href="index.php"><h1><span>Pengaduan </span>Kecelakaan</h1></a>
</div>
</div>
<div class="navbar-collapse collapse">
<div class="menu">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation"><a href="index.php" class="active">Beranda</a></li>
<li role="presentation"><a href="daftar_pengaduan.php">Daftar Pengaduan</a></li>
<li role="presentation"><a href="berita.php">Berita</a></li>
<li role="presentation"><a href="login_user.php">Login User</a></li>
<li role="presentation"><a href="login_admin.php" target="_blank">Login Admin</a></li>
</ul>
</div>
</div>
</div>
</div>
</nav>
</header>
3. footer.php
<div class="footer">
<div class="container">
<div class="social-icon">
<div class="col-md-4">
<ul class="social-network">
<li><a href="#" class="fb tool-tip" title="Facebook"><i class="fa fa-facebook"></i></a></li>
<li><a href="#" class="twitter tool-tip" title="Twitter"><i class="fa fa-twitter"></i></a></li>
<li><a href="#" class="gplus tool-tip" title="Google Plus"><i class="fa fa-google-plus"></i></a></li>
<li><a href="#" class="linkedin tool-tip" title="Linkedin"><i class="fa fa-linkedin"></i></a></li>
<li><a href="#" class="ytube tool-tip" title="You Tube"><i class="fa fa-youtube-play"></i></a></li>
</ul>
</div>
</div>
<div class="col-md-4 col-md-offset-4">
<div class="copyright">
© Januari 2016 by Djoel Sitorus.Keselamatan Berlalulintas .
</div>
</div>
</div>
<div class="pull-right">
<a href="#home" class="scrollup"><i class="fa fa-angle-up fa-3x"></i></a>
</div>
</footer>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.prettyPhoto.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/wow.min.js"></script>
<script src="js/functions.js"></script>
</body>
</html>
4. daftar_pengaduan.php
<?php include "header.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="daftar_pengaduan.php">Data Pengaduan</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Data Daftar Pengaduan</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><?php include "data_pengaduan.php" ?></h5>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
5. berita.php
<?php include "header.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="berita.php">Data Berita</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Data Daftar Berita</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<ul>
<?php
require_once("conn.php");
$tampil=mysql_query("SELECT * FROM tbl_informasi order by id_informasi DESC LIMIT 0,25");
while($row=mysql_fetch_object($tampil)){
?>
<div class="imgl"><img src="images/<?php echo ucwords("$row->photo"); ?>" alt="" width="160px" border="3" /></div>
<p><strong><?php echo ucwords("$row->judul_informasi"); ?></strong></p>
<?php
$kalimat="$row->isi_informasi";
$jumlahkarakter=400;
$cetak = substr($kalimat, 0, $jumlahkarakter);
echo "$cetak";echo "....";
?>
<?php
}
?>
</ul>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
6. login_user.php
<?php include "header.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li><a href="login_user.php">Login User</a></li>
</div>
</div>
</div>
<div class="aboutus">
<h3>Panel Login User</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><form id="form1" name="form1" method="post" action="proses_login_user.php">
<table width="50%" border="0" cellpadding="3" cellspacing="3">
<tr>
<th scope="row" align="left">Nama Pengguna </font></th>
<td><input name="username" type="text" id="user" size="13" value="Username" maxlength="20" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
</tr>
<tr>
<th scope="row" align="left">Kata Sandi </th>
<td><input name="password" type="password" id="pass" value="Password" size="13" maxlength="20" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
</tr>
<tr>
<th scope="row"> </th>
<tr>
<th colspan="2" scope="row">Bila belum punya ID, silahkan daftar <a href="daftar.php">disini ...</a></th>
</tr>
</table>
<br/>
</label>
</form>
<script language='javascript'>
function cek_isi(inputan)
{
if(inputan.value != "") {
inputan.value='';
}
}
function cek_isi2(inputan)
{
if( inputan.value== '') {
inputan.value='Username';
}}
</script>
<br/><br/><br/><br/><br/></h5>
</div>
</div>
</div>
<?php include "footer.php" ?>
7. Daftar.php
<?php include "header.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li>Pendaftaran</li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Formulir Pendaftaran</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><form id="form1" name="form1" method="post" action="proses_daftar_user.php">
<label>
<br/>
</label>
<br />
<table width="100%" border="0" cellpadding="3" cellspacing="3">
<tr>
<th width="23%" align="left" scope="row">Nama Pengguna </font></th>
<td width="77%"><input name="nama_pengguna" type="text" id="user" size="20" value="Username" maxlength="20" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
</tr>
<tr>
<th scope="row" align="left">Kata Sandi </th>
<td><input name="password" type="password" id="pass" value="Password" size="20" maxlength="20" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
</tr>
<tr>
<th scope="row" align="left">Alamat </th>
<td><input name="alamat" type="text" id="pass" value="Alamat " size="50" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
</tr>
<tr>
<th scope="row" align="left">Jenis Kelamin </th>
<td><label>
<select name="jenkel" id="jenkel">
<option value="Laki-laki">Laki-laki</option>
<option value="Perempuan">Perempuan</option>
</select>
</label></td>
</tr>
<tr>
<th align="left" scope="row">No Telepon</th>
<td><input name="notel" type="text" id="user2" size="20" value="Nomor Telepon" maxlength="20" onFocus="cek_isi(this)" onBlur="cek_isi2(this)" /></td>
<tr>
<th scope="row"> </th>
<td><input type="submit" name="login" id="login" value="Daftar" align="absmiddle"/></td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
<tr>
<th colspan="2" scope="row">Bila sudah punya ID, silahkan login <a href="login_user.php".php">disini ...</a></th>
</tr>
</table>
<br/>
</label>
</form>
<script language='javascript'>
function cek_isi(inputan)
{
if(inputan.value != "") {
inputan.value='';
}
}
function cek_isi2(inputan)
{
if( inputan.value== '') {
}}
</script>
<br/><br/><br/><br/><br/></h5>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
8. Upload_pengaduan.php
<?php
include("conn.php");
session_start();
$nm=$_SESSION['nama_pengirim'];
?>
<?php include "header_user.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Formulir Tambah Pengaduan</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><form id="form1" name="form1" enctype="multipart/form-data" method="post" action="proses_tambah_pengaduan.php">
<label> </label>
<table width="700" height="" cellspacing="3">
<tr>
<td>Judul</td>
<td><input name="judul" type="text" id="judul" size="40"></td>
</tr>
<tr>
<td>File Photo</td>
<td><input name="photo" type="file" id="photo" size="20" /></td>
</tr>
<tr>
<td height="24" >Keterangan Photo</td>
<td><textarea name="keterangan" cols="60" rows="4"></textarea></td>
</tr>
<tr>
<td width="236">Pengirim</td>
<td width="452"><input name="pengirim" type="text" id="pengirim" value="<?php echo ("$nm"); ?> " size="40" readonly="readonly"></td>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Tambah"></td>
</tr>
<tr>
<td height="78" colspan="2">Kehidupan Hanya Sekali , Berikan yang Terbaik.</td>
</tr>
</table>
<label><br/>
</label>
<br/>
<br />
<br/>
</label>
</form>
<script language='javascript'>
function cek_isi(inputan)
{
if(inputan.value != "") {
inputan.value='';
}
}
function cek_isi2(inputan)
{
if( inputan.value== '') {
}}
</script>
<br/><br/><br/><br/><br/></h5>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
9. berhasil_upload.php
<?php
include("conn.php");
session_start();
$nm=$_SESSION['nama_pengirim'];
?>
<?php include "header_user.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Formulir Tambah Pengaduan</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><form id="form1" name="form1" enctype="multipart/form-data" method="post" action="proses_tambah_pengaduan.php">
<label> </label>
Data berhasil ditambah, untuk mengupload lagi klik <a
href="upload_pengaduan.php">disini</a> atau log-out klik<a href="login_user.php"> disini </a>...
<label><br/>
</label>
<br/>
<br />
<br/>
</label>
</form>
<script language='javascript'>
function cek_isi(inputan)
{
if(inputan.value != "") {
inputan.value='';
}
function cek_isi2(inputan)
{
if( inputan.value== '') {
inputan.value='Username';
}}
</script>
<br/><br/><br/><br/><br/></h5>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
10. login_admin.php
<?php include "header.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li>Login Admin</li>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Panel Login Administrator</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h5><?php include "form_login.php" ?></h5>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
11. admin.php
<?php include "cek_session.php" ?>
<?php include "header_admin.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Selamat Datang Administrator</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<h2><a href="data_pengaduan_admin.php">Data Pengaduan</a></h2>
<h2><a href="data_berita_admin.php">Data Berita</a></h2>
<p> </p>
<p> </p>
<p> </p> <p> </p>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
12. data_pengaduan_admin.php
<?php include "cek_session.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li><a href="admin.php">Halaman Admin</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Data Pengaduan</h3>
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<?php
include "conn.php";
$tampil=mysql_query("SELECT * FROM data_pengaduan order by id_pengaduan desc");
while($row=mysql_fetch_object($tampil))
{
?>
<TABLE width="100%" align="left">
<TR>
<TD width="35%">
<TD>
<p align="left"><b>Judul : <?php echo ucwords("$row->judul"); ?></b> <br />
</TD>
<TD>
</TD>
</TR>
<TR >
<TD>
<p align="left"><img src="<?php echo("$row->file"); ?>" id="img-border" width="200px" ></p>
</TD>
</TR>
<TR>
<TD colspan="2">
<p align="left"> Keterangan Pengaduan: <?php echo "$row->keterangan"; ?></p>
</TD>
</TR>
<TR>
<TD colspan="2">
Pengirim : <?php echo "$row->nama_pengirim"; ?></p><p align="left">
<?php $status="$row->status"; ?>
<?php if($status=='1') { echo ("Diposting");} else echo ("Ditunda"); ?>
<form name="kirim" action="set_1.php" method="post">
<input type="hidden" value="<?php echo "$row->id_pengaduan"; ?>" name="idp">
<input type="submit" value="Posting"/>
</form>
<form name="kirim" action="set_0.php" method="post">
<input type="hidden" value="<?php echo "$row->id_pengaduan"; ?>" name="idp">
<input type="submit" value="Tunda"/>
</form>
<form name="kirim" action="set_hapus.php" method="post">
<input type="hidden" value="<?php echo "$row->id_pengaduan"; ?>" name="idp">
<input type="submit" value="Hapus"/>
</form>
</TD>
</TR>
<tr>
<td colspan="5"> <hr color="#006699" size="1">
</td>
</tr>
</TD>
</TR>
<?php
}
?>
</TABLE>
</div>
</div>
</div>
<?php include "footer.php" ?>
13. data_berita_admin.php
<?php include "cek_session.php" ?>
<?php include "header_admin.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li><a href="admin.php">Halaman Admin</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<h3>Tambah Berita</h3>
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<form action="proses_tambah_informasi.php" method="post" enctype="multipart/form-data">
<table width="637" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td height="19"><strong><font color="black">Judul Informasi</font></strong></td>
</tr>
<tr>
<td width="67%" height="22"><font face="Times New Roman" size="2">
<font color="black"><input type="text" name="judul" size="114"></font></td>
</tr>
<tr>
<td height="19"><strong><font color="black">File Photo</font></strong></td>
</tr>
<tr>
<td width="67%" height="30">
<input type="file" name="photo" />
</font></td>
</tr>
<tr>
<td height="19"><strong>Isi Informasi</strong></td>
</tr>
<tr>
<td width="67%" height="99"><font face="Times New Roman" size="2">
<textarea name="isi" cols="30" rows="6" id='elm2'></textarea></font></td>
</tr>
<tr>
<input type="button" name="batal" value="Batal" onClick="location.replace('admin.php');" /></td>
</tr>
</table>
<h3>Tambah Berita</h3>
<table width="80%" cellpadding="0" cellspacing="0">
<tr>
<td width=""><font color="black"><strong>Judul Informasi</font></strong></td>
<td width=""><font color="black"><strong>Tanggal Posting</font></strong></td>
<td width="" align=""><font color="black"><strong>Aksi</font></strong></td>
</div>
</div>
<?php include "footer.php" ?>
14. data_berita_admin.php
<?php include "cek_session.php" ?>
<?php include "header_admin.php" ?>
<div id="breadcrumb">
<div class="container">
<div class="breadcrumb">
<li><a href="index.php">Beranda</a></li>
<li><a href="admin.php">Halaman Admin</a></li>
</div>
</div>
</div>
<div class="aboutus">
<div class="container">
<div class="container">
<div class="col-md-7 wow fadeInDown" duration="1000ms" data-wow-delay="300ms">
<form action="proses_tambah_informasi.php" method="post" enctype="multipart/form-data">
<table width="637" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td height="19"><strong><font color="black">Judul Informasi</font></strong></td>
</tr>
<tr>
<td width="67%" height="22"><font face="Times New Roman" size="2">
<font color="black"><input type="text" name="judul" size="114"></font></td>
</tr>
<tr>
<td height="19"><strong><font color="black">File Photo</font></strong></td>
</tr>
<tr>
<td width="67%" height="30">
<input type="file" name="photo" />
</font></td>
</tr>
<tr>
<td height="19"><strong>Isi Informasi</strong></td>
</tr>
<tr>
<td width="67%" height="99"><font face="Times New Roman" size="2">
<textarea name="isi" cols="30" rows="6" id='elm2'></textarea></font></td>
</tr>
<td width="67%"><input type="submit" value="Entri" onClick="return cek();">
<input type="button" name="batal" value="Batal" onClick="location.replace('admin.php');" /></td>
</tr>
</table>
<h3>Tambah Berita</h3>
<table width="80%" cellpadding="0" cellspacing="0">
<tr>
<td width=""><font color="black"><strong>Judul Informasi</font></strong></td>
<td width=""><font color="black"><strong>Tanggal Posting</font></strong></td>
<td width="" align=""><font color="black"><strong>Aksi</font></strong></td>
</form>
</div>
</div>
</div>
</div>
<?php include "footer.php" ?>
15. log_out.php
<?php
session_start();
if ($_REQUEST['logout'] == "yes")
{
if(ISSET($_SESSION['username']))
{
UNSET($_SESSION['username']);
}}
header("location: login.php");
session_destroy();
?>
16. koneksi.php
<?php
$my['host'] = "localhost";
$my['user'] = "root";
$my['pass'] = "";
$my['dbs'] = "db_djoel";
$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());
?>
17. conn.php
<?php
mysql_connect("localhost","root","");
mysql_select_db("db_server_djoel");