KEMENTERIAN PENDIDIKAN DAN KEBUDAYAAN
UNIVERSITAS SUMATERA UTARA
FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
Jln. Bioteknologi No.1 Kampus USU Padang Bulan Medan-20155Telp. (061) 8211050, 8214290, Fax. (061) 8214290
KARTU BIMBINGAN TUGAS AKHIR MAHASISWA
Nama Mahasiswa
: M HAFIZH HILMY
Nomor Stambuk
:132406003
Judul Tugas Akhir
:
SISTEM
INFORMASI
GEOGRAFIS
PENYEBARAN
WISATA DI KOTA MEDAN MENGGUNAKAN GOOGLE
MAPS API BERBASIS WEB MOBILE
Dosen Pembimbing
: Dr. Sawaluddin M.IT
Tanggal Mulai Bimbingan
:
Tanggal Selesai Bimbingan
:
No.
Tanggal Asisten
Bimbingan
Pembahasan pada
Asistensi Mengenai,
pada Bab :
Paraf Dosen
Pembimbing
Keterangan
1
*Kartu ini harap dikembalikan ke Departemen Matematika bila bimbingan telah selesai
Diketahui,
Disetujui,
Ketua
Pembimbing Utama
Program Studi D3 Teknik Informatika
Dr. Elly Rosmaini, M.Si. Dr. Sawaluddin, M.IT
KEMENTERIAN PENDIDIKAN DAN KEBUDAYAAN
UNIVERSITAS SUMATERA UTARA
FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
Jln. Bioteknologi No.1 Kampus USU Padang Bulan Medan-20155Telp. (061) 8211050, 8214290, Fax. (061) 8214290
SURAT KETERANGAN
Hasil Uji Program Tugas Akhir
Yang bertanda tangan dibawah ini, menerangkan bahwa Tugas Akhir Mahasiswa Program
Diploma 3 Teknik Informatika :
Nama
: M HAFIZH HILMY
NIM
: 132406003
Program Studi
: TEKNIK INFORMATIKA
Judul TA
: SISTEM INFORMASI GEOGRAFIS PENYEBARAN WISATA DI
KOTA MEDAN MENGGUNAKAN GOOGLE MAPS API BERBASIS
WEB MOBILE
Telah melaksanakan test program Tugas Akhir Mahasiswa tersebut diatas tanggal...Juni 2016
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
Program Studi D3 Teknik Informatika
Ketua,
LAMPIRAN
Listing Program
index.php
<?php
header("location: home.php"); ?>
home.php
<html> <head>
<title>square</title>
<link rel="stylesheet" type="text/css"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min .css">
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="wrapper">
<div class="navbar-header">
<span class="navbar-brand">Square</span>
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"><img
style="margin-top:-5%;width:80%" src="img/toggle-icon.png"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="home.php">home</a></li>
<li><a href="place.php">place</a></li>
<li><a href="about.php">about</a></li>
</ul>
</div>
</div>
<div class="row-1">
<div class="row-1-1">
<div class="col-lg-12 col-xs-12">
<form>
<input type="text" name="search"
<button type="button" class="btn btn-default">
<span class="glyphicon
glyphicon-search"></span> Search
</button>
</form>
</div>
</div>
<div class="row-1-2">
<div class="col-lg-12 col-xs-12">
<p class="2">we make your wonderfull life in
medan city</p>
</div>
<img src="img/square.png">
</div>
</div>
<div class="row-2">
<div class="content">
<div class="col-lg-12 col-xs-12">
<div class="col-xs-12 col-lg-4 rad">
<a href="
view.php?ID=Mesjid%20Raya%20Medan"><img src="img/wisata_medan/Mesjid Raya Medan1.jpg" id="img" ></a>
<div class="col-xs-12 col-lg-4 rad">
<a href="view.php?ID=Istana%20Maimun"><img
src="img/wisata_medan/istana maimun2.jpg"></a>
</div>
<div class="col-xs-12 col-lg-4 rad">
<a href="
view.php?ID=Museum%20Sumatera%20Utara"><img
src="img/wisata_medan/museum sumatera utara2.jpg"></a>
</div>
</div>
<div class="col-lg-12 col-xs12">
<div class="col-xs-12 col-lg-4 rad">
<a href="
view.php?ID=Rumah%20Tjong%20A%20Fie"><img src="img/wisata_medan/rumah tjong a fie2.jpg"></a>
</div>
<div class="col-xs-12 col-lg-4 rad">
<a href=" view.php?ID=Tip%20Top"><img
src="img/wisata_medan/tip top2.jpg"></a>
</div>
<div class="col-xs-12 col-lg-4 rad">
<a href="view.php?ID=Merdeka%20Walk"><img
src="img/wisata_medan/merdeka walk2.jpg"></a>
</div>
</div> </div>
<div class="row-3">
<div class="col-lg-12 col-xs-12">
<div class="col-lg-4 col-xs-4"></div>
<div class="col-lg-4 col-xs-4"></div>
<div class="col-lg-4 col-xs-4"></div>
</div>
<div class="copyright">
<p>copyright @ 2016 square</p>
</div>
</div> </div>
<scrip ttype="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js "></script>
<script type="text/javascript"
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.j s"></script>
</body> </html>
place.php
error_reporting(0); ?>
<html> <head>
<title>square</title>
<link rel="stylesheet" type="text/css"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min .css">
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="wrapper">
<div class="navbar" role="navigation">
<div class="navbar-header">
<span class="navbar-brand">Square</span>
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"><img
style="margin-top:-5%;width:80%" src="img/toggle-icon.png"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<li><a href="home.php">home</a></li>
<li><a href="place.php">place</a></li>
<li><a href="about.php">about</a></li>
</ul>
</div>
</div>
<div class="row-1p">
<div class="row-1-1">
<div class="col-lg-12 col-xs-12">
<form>
<input type="text" name="search"
placeholder="search place">
<button type="button" class="btn
btn-default">
<span class="glyphicon
glyphicon-search"></span> Search
</button>
</form>
</div>
</div>
</div>
<div class="row-2p">
<div id="row-2p-1">
<div class="place">
<table
style="width:90%;padding-top:2%;margin-left:auto;margin-right:auto;margin-top:2%;">
<?php
include ('koneksi.php');
$batas = 4;
$pg = isset( $_GET['pg'] ) ?
$_GET['pg'] : "";
if ( empty( $pg ) ) {
$posisi = 0;
$pg = 1;
}
else {
$posisi = ( $pg - 1 ) *
$batas;
}
$que = "SELECT * FROM `data`
limit $posisi, $batas";
$no = 1+$posisi;
while ($qq = mysql_fetch_assoc($q)) {
?>
<tr>
<th><?php echo $qq['nama']
?></th>
</tr>
<tr>
<td><?php echo
$qq['alamat'] ?></td>
</tr>
<tr>
<td><?php echo "<img
style='width:180px;height:180px;'src=img/wisata_medan/".$qq['gambar']. ">" ?></td>
</tr>
<tr>
<td
style="padding-bottom:3%;padding-top:1%"><div class="button"><a
href="view.php?ID=<?php echo $qq['nama'];?>">VIEW</a></div></td>
</tr>
<?php $no++;} ?>
</table>
<table style="text-align:
<tr>
<td colspan="4">
<?php
$jml_data =
mysql_num_rows(mysql_query("SELECT * FROM `data`"));
$JmlHalaman =
ceil($jml_data/$batas);
if ( $pg > 1 ) {
$link = $pg-1;
$prev = "<a
href='?pg=$link'>Sebelumnya </a>";
}
else {
$prev = "< ";
}
for ( $i = 1; $i<=
$JmlHalaman; $i++ ){
if ( $i == $pg )
{
$nmr .= $i
. " ";
}
$nmr .= "<a href='?pg=$i'>$i</a> ";
}
}
if ( $pg <
$JmlHalaman ) {
$link = $pg + 1;
$next = " <a
href='?pg=$link'>Selanjutnya</a>";
}
else {
$next = " >";
}
echo $prev . $nmr .
$next;
?>
</td>
</tr>
</table>
</div>
</div>
</div> </div>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js "></script>
<script type="text/javascript"
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.j s"></script>
</body> </html>
about.php
<?php
error_reporting(0); ?>
<html> <head>
<title>square</title>
<link rel="stylesheet" type="text/css"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min .css">
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="navbar" role="navigation">
<div class="navbar-header">
<span class="navbar-brand">Square</span>
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"><img
style="margin-top:-5%;width:80%" src="img/toggle-icon.png"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="home.php">home</a></li>
<li><a href="place.php">place</a></li>
<li><a href="about.php">about</a></li>
</ul>
</div>
</div>
<div class="row-1a">
<div class="row-1a-1">
<div class="col-lg-4"></div>
<div class="col-lg-4 col-xs-12">
<p>we made this square for you who live in the
visit in the medan city, and we need the support of you to share with us for promote good place</p>
</div>
<div class="col-lg-4"></div>
</div>
<div class="row-1a-2">
<div class="col-lg-12 col-xs-12">
<div class="line"></div>
<div class="faq">
<h1>Saran Tempat Wisata Kota Medan</h1>
<form >
<table>
<tr>
<td><input type="text"
placeholder="email" name="email"></td>
<td rowspan="2"><input
type="submit" value="send"></td>
</tr>
<tr>
<td><input type="text"
placeholder="nama tempat" name="nama_tempat"></td>
</tr>
<textarea row="500" cols="36" name="review_tempat" placeholder="berikan review tempat yang anda bagikan disini..."></textarea>
<span style="color:white"><?php echo
$_GET['error']; ?></span>
</form>
</div>
</div>
</div>
</div> </div>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js "></script>
<script type="text/javascript"
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.j s"></script>
</body> </html>
style.css *{
@media only screen and (min-width: 320px) { .navbar{
border-radius: 0px; }
.row-1{
background: url("img/32.jpg")repeat center; }
.row-1p{
background: url("img/32.jpg")repeat center; }
.row-1a{
background: url("img/imageedit_7_8427303109.jpg")no-repeat center;
}
.row-1 form{
margin-top: 3.5%; }
.row-1 form input[type=text]{ width: 190px;
height: 33px;
border-radius: 2px; border: none;
.row-1p form{
margin-top: 3.5%; }
.row-1p form input[type=text]{ width: 190px;
height: 33px;
border-radius: 2px; border: none;
}
.row-1a-1 p{
margin-top: 15%; font-size: 10px; font-weight: bold; color: white;
text-align: center; }
.row-1a{
margin-top: -20px; width: 100%;
height: 30%; opacity: 0.75;
.btn-default{ width: 90px; }
.row-1-2 img{ width: 30%;
margin-left: 35%; margin-top: 7%; }
.row-1-2 p{
margin-top: 5%; }
.row-2{
width: 100%; height: 800px;
background: rgb(229,119,22); }
a img{
margin-top: 0.5%; width: 100%; height: 100%; }
}
.content{
padding-top: 4%; }
.copyright p{
text-align:center; color:white;
padding-top:80%; }
.faq h1{
color: white; margin-bottom: 3%; }
.faq input[type='text']{ width: 100%;
height: 28px; color: black; border: none; margin-bottom: 1%; }
.faq input[type='submit']{ width: 74px;
color: white; background: black; border: none; margin-left: 3%; margin-bottom: 1%; }
.faq input[type='submit']:hover{ background: #1a1a1a;
} }
@media screen and (min-width: 360px) { .navbar{
border-radius: 0px; }
.row-1{
background: url("img/32.jpg")repeat center; }
.row-1p{
background: url("img/32.jpg")repeat center; }
.row-1a{
}
.row-1 form{
margin-top: 3%; }
.row-1 form input[type=text]{ width: 235px;
height: 33px;
border-radius: 2px; border: none;
}
.row-1p form{
margin-top: 3%; }
.row-1p form input[type=text]{ width: 235px;
height: 33px;
border-radius: 2px; border: none;
}
.btn-default{ width: 90px; }
width: 30%;
margin-left: 35%; margin-top: 2%; }
.row-1a{
margin-top: -20px; width: 100%;
height: 30%; opacity: 0.75;
filter: alpha(opacity=60); }
.row-1a-1 p{
margin-top: 15%; font-size: 18px; font-weight: bold; color: white;
text-align: center; }
.post img{
margin-left: 20%; width: 60%;
.row-2{
width: 100%; height: 200%;
background: #4d4d4d; }
.post{
width: 80%; height: 50%;
margin-bottom: 5%; }
.faq{
width: 600px; margin: 0 auto; }
.faq h1{
color: white; margin-bottom: 3%; }
.faq input[type='text']{ width: 300px;
margin-bottom: 1%; }
.faq input[type='submit']{ width: 74px;
height: 60px; color: white; background: black; border: none; margin-left: 3%; margin-bottom: 1%; }
.faq input[type='submit']:hover{ background: #1a1a1a;
}
.faq form{
width: 380px; margin: 0 auto; }
}
@media only screen and (min-width: 768px) { .navbar{
.row-1{
background: url("img/32.jpg")repeat center; }
.row-1p{
background: url("img/32.jpg")repeat center; }
.row-1a{
background: url("img/imageedit_7_8427303109.jpg")no-repeat center;
}
.row-1 form{
margin-top: 3%; }
.row-1 form input[type=text]{ width: 235px;
height: 33px;
border-radius: 2px; border: none;
}
.row-1p form{
margin-top: 3%; }
width: 235px; height: 33px;
border-radius: 2px; border: none;
}
.row-1a-1 p{
margin-top: 15%; font-size: 18px; font-weight: bold; color: white;
text-align: center; }
.row-1a{
margin-top: -20px; width: 100%;
height: 70%; opacity: 0.75;
filter: alpha(opacity=60); }
.btn-default{ width: 90px; }
width: 30%;
margin-left: 35%; margin-top: 2%; }
.post img{
margin-left: 27.5%; width: 45%;
height: 45%; }
.post{
width: 75%; height: 50%;
margin-bottom: 5%; }
.row-2{
width: 100%; height: 70%;
background: #4d4d4d; }
.faq{
.faq h1{
color: white; margin-bottom: 3%; }
.faq input[type='text']{ width: 300px;
height: 28px; color: black; border: none; margin-bottom: 1%; }
.faq input[type='submit']{ width: 74px;
height: 60px; color: white; background: black; border: none; margin-left: 3%; margin-bottom: 1%; }
.faq input[type='submit']:hover{ background: #1a1a1a;
.faq form{
width: 380px; margin: 0 auto; }
}
@media only screen and (min-width: 1024px) { .navbar{
border-radius: 0px; }
.row-1{
background: url("img/32.jpg")repeat center; }
.row-1p{
background: url("img/32.jpg")repeat center; }
.row-1a{
background: url("img/imageedit_7_8427303109.jpg")no-repeat center;
}
.row-1 form{
margin-top: 13px; }
width: 380px; }
.row-1p form{
margin-top: 13px; }
.row-1p form input[type=text]{ width: 380px;
}
.row-1-2 img{ width: 10%;
margin-left: 45%; margin-top: -3.5px; }
.row-1a-1 p{
margin-top: 15%; font-size: 18px; font-weight: bold; color: white;
text-align: center; }
.row-1a{
height: 40%; opacity: 0.75;
filter: alpha(opacity=60); }
.post img{
width: 107.2%; height: 100%; }
a img{
width: 107%; height: 100%;
margin-left: -3.5%; }
a img:hover{
background: #000000; opacity: 0.75;
filter: alpha(opacity=60); }
.post{
.row-1-2 p{
margin-top: -20px; }
.row-2{
width: 100%; height: 80%;
background: rgb(229,119,22); }
.row-2 a img{ height: 40%; }
.copyright p{
text-align:center; color:white;
padding-top:21%; }
.faq{
width: 600px; margin: 0 auto; }
.faq h1{
}
.faq input[type='text']{ width: 100%;
height: 28px; color: black; border: none; margin-bottom: 1%; }
.faq input[type='submit']{ width: 74px;
height: 60px; color: white; background: black; border: none; margin-left: 3%; margin-bottom: 1%; }
.faq input[type='submit']:hover{ background: #1a1a1a;
}
.faq form{
} }
.wrapper{
width: 100%; }
.navbar{
background: rgb(229,119,22); }
.navbar-header span{ color: #ffffff; }
.navbar .navbar-header a{ color: #ffffff;
}
.navbar .navbar-collapse ul li a{ color: #ffffff;
}
.navbar .navbar-collapse ul li a:hover{ color: #000;
} .row-1{
width: 100%; height: 50%; }
.row-1-2 p{
margin-top: 3%; font-size: 18px; font-weight: bold; color: #ff9900; text-align: center;
} .row-1p{
margin-top: -20px; width: 100%;
height: 15%; opacity: 0.75;
filter: alpha(opacity=60); }
.row-1-2 p{
} .row-3{
width: 100%; height: 300px;
background: url("img/background2.jpg")center; }
.row-1a{
width: 100%; height: 92.6%; }
.line{
background: rgb(229,119,22); width: 500px;
height: 2px; margin: 0 auto; margin-top: 5%; margin-bottom: 5%; }
koneksi.php
<?php
mysql_connect("localhost","root","");
?>
admin/index.php
<?php
error_reporting(0); ?>
<html> <head>
<title>Login Admin</title>
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="wrapper">
<button><a href="../index.php"><img src="../img/Arrows-Left-icon.png"></a></button>
<div class="box">
<form action="proses_login.php" method="POST">
<table>
<tr>
<td>
<input type="text" name="username"
placeholder="username">
</tr>
<tr>
<td>
<input type="password" name="password"
placeholder="password">
</td>
</tr>
<tr>
<td><input type="submit"
value="login"></td>
</tr>
<tr>
<td><span style="color:red"><?php echo
$_GET['error']; ?></span></td>
</tr>
</table>
</form>
</div> </div> </body> </html>
admin/home.php
error_reporting(0); ?>
<html> <head>
<title>Home Admin</title>
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="container"> <div class="menu">
<nav>
<li><a href="home.php">Home</a></li>
<li><a href="create.php">Create Data</a></li>
<li><a href="account.php">account</a></li>
</nav>
<button><a href="logout.php">logout</a></button>
</div>
<div class="content">
<table
style="width:90%;margin-left:auto;margin-right:auto;background:#d16c15;margin-top: 30px">
<tr style="background:#ea862e">
<th>NO</th>
<th>Nama Tempat</th>
<th>Review Tempat</th>
<th>Alamat</th>
<th>Gambar</th>
<th>Lat</th>
<th>Lng</th>
<th>Title</th>
<th>Action</th>
</tr>
<?php
include ('../koneksi.php');
$batas = 2;
$pg = isset( $_GET['pg'] ) ? $_GET['pg'] : "";
if ( empty( $pg ) ) {
$posisi = 0;
$pg = 1;
}
else {
$posisi = ( $pg - 1 ) * $batas;
}
$que = "SELECT * FROM `data` limit $posisi,
$batas";
$q = mysql_query($que);
while ($qq = mysql_fetch_assoc($q)) {
?>
<tr style="background:white">
<td><?php echo $no ?></td>
<td><?php echo $qq['ID'] ?></td>
<td><?php echo $qq['nama'] ?></td>
<td><?php echo $qq['review'] ?></td>
<td><?php echo $qq['alamat'] ?></td>
<td><?php echo "<img
style='width:180px;height:180px;'src=../img/wisata_medan/".$qq['gambar '].">" ?></td>
<td><?php echo $qq['lat'] ?></td>
<td><?php echo $qq['lng'] ?></td>
<td><?php echo $qq['title'] ?></td>
<td style="text-align:center"><a
href="edit.php?nama=<?php echo $qq['nama'];?>"><input type="submit" value="edit"></a>||<a href="proses-delete.php?nama=<?php echo
$qq['nama'];?>"><input type="submit" value="delete"></a></td>
</tr>
<?php $no++;} ?>
<table style="text-align:
center;background:#d16c15;color:white;width:90%;margin-left:auto;margin-right:auto">
<tr>
<td colspan="4">
<?php
$jml_data =
mysql_num_rows(mysql_query("SELECT * FROM `data`"));
$JmlHalaman = ceil($jml_data/$batas);
if ( $pg > 1 ) {
$link = $pg-1;
$prev = "<a
href='?pg=$link'>Perv </a>";
}
else {
$prev = "Prev ";
}
for ( $i = 1; $i<= $JmlHalaman; $i++
){
if ( $i == $pg ) {
$nmr .= $i . " ";
}
else {
$nmr .= "<a href='?pg=$i'>$i</a>
}
}
if ( $pg < $JmlHalaman ) {
$link = $pg + 1;
$next = " <a
href='?pg=$link'>Next</a>";
}
else {
$next = "Next";
}
echo $prev . $nmr . $next;
?>
</td>
</tr>
</table>
</div> </div> </body> </html>
admin/create.php
<?php
?> <html> <head>
<title>Home Admin</title>
<link rel="stylesheet" type="text/css" href="style.css"> </head>
<body>
<div class="container"> <div class="menu">
<nav>
<li><a href="home.php">Home</a></li>
<li><a href="create.php">Create Data</a></li>
<li><a href="account.php">account</a></li>
</nav>
<button><a href="logout.php">logout</a></button>
</div>
<div class="content">
<div class="box-create">
<h1>Create new data</h1>
<form action="proses-tambah.php" method="POST"
enctype="multipart/form-data">
<table>
<td><input type="text" name="nama" placeholder="nama tempat"></td>
</tr>
<tr>
<td><textarea name="review"
placeholder="review tempat" cols="50" rows="5"></textarea></td>
</tr>
<tr>
<td><input type="text" name="alamat"
placeholder="alamat tempat"></td>
</tr>
<tr>
<td><input type="file"
name="gambar"><p>*minimal photo ukuran 1260 x 720 atau lebih</p></td>
</tr>
<tr>
<td><input type="text" name="lat"
placeholder="latitude tempat"></td>
</tr>
<tr>
<td><input type="text" name="lng"
placeholder="longitude tempat"></td>
</tr>
<td><textarea name="title"
placeholder="title untuk dimap" cols="50" rows="5"></textarea></td>
</tr>
<tr>
<td><input type="submit"
value="Input"></td>
</tr>
</table>
</form>
</div>
</div> </div> </body> </html>
admin/create-account.php
<?php
error_reporting(0); ?>
<html> <head>
<title>Home Admin</title>
<body>
<div class="container"> <div class="menu">
<nav>
<li><a href="home.php">Home</a></li>
<li><a href="create.php">Create Data</a></li>
<li><a href="account.php">account</a></li>
</nav>
<button><a href="logout.php">logout</a></button>
</div>
<div class="content">
<div class="box-create">
<h1>Create new data</h1>
<form action="proses-tambah-account.php"
method="POST">
<table>
<tr>
<td><input type="text" name="username"
placeholder="username yang baru"></td>
</tr>
<tr>
<td><input type="password"
name="password" placeholder="password yang baru"></td>
<tr>
<td><input type="submit"
value="Input"></td>
</tr>
</table>
</form>
</div>
</div> </div> </body> </html>
admin/logout.php
<?php
header("location: index.php"); ?>
admin/proses_login.php <?php
$querry="SELECT `username`, `password` FROM `admin` WHERE username='$username' and password='$pass'";
$eq=mysql_query($querry); $numb=mysql_num_rows($eq); if($numb == 1){
echo "Berhasil login";
header("location:home.php"); }
else{
$error = "username valid";
header("location: index.php?error=$error"); }
?>
admin/proses-tambah.php
<?php
$photo = $_FILES['gambar']['name']; $lat = $_POST['lat'];
$lng = $_POST['lng']; $title = $_POST['title'];
$sql = mysql_query("INSERT INTO `data` (`nama`, `review`, `alamat`, `gambar`, `lat`, `lng`, `title`) VALUES
('$nama','$review','$alamat','$photo','$lat','$lng','$title')"); move_uploaded_file($_FILES['gambar']['tmp_name'],
"../img/wisata_medan/".$_FILES['gambar']['name']); header('location:home.php');
?>
admin/proses-tambah-account.php
<?php
include ('../koneksi.php'); $username = $_POST['username']; $password = $_POST['password'];
$sql = mysql_query("INSERT INTO `admin` (`username`, `password`) VALUES ('$username','$password')");
header('location:account.php'); ?>
include ('../koneksi.php'); $nama = $_GET['nama'];
$que = "DELETE FROM `data` WHERE nama='$nama'"; $q = mysql_query($que);
if ($q) {
header('location:home.php'); }
else{
echo die(mysql_error()); }
?>
admin/proses-delete-account.php
<?php
include ('../koneksi.php'); $nama = $_GET['username'];
$que = "DELETE FROM `admin` WHERE username='$nama'"; $q = mysql_query($que);
if ($q) {
header('location:account.php'); }
else{
} ?>
admin/style.css *{
margin: 0; padding: 0;
font-family: sans-serif; }
.wrapper{
width: 100%; height: 100%;
background: url("../img/background3.jpg"); }
.wrapper button{ width: 50px; height: 50px; margin: 10px;
background: #efa15d; border: none;
}
}
.wrapper img{ width: 50px; height: 50px; }
.container{ width: 100%; height: 100%;
background: url("../img/background3.jpg"); }
.box{
width: 30%; height: 30%;
background: #ea862e; position: fixed; top: 35%;
left: 35%;
border-radius: 20px; }
.box table{
position: fixed; top: 43%;
}
.box table tr td input[type='text']{ width: 200px;
height: 30px; background: white; border-radius: 5px; border: none;
}
.box table tr td input[type='password']{ width: 200px;
height: 30px; background: white; border-radius: 5px; border: none;
}
.box table tr td input[type='submit']{ width: 200px;
height: 30px; color: white;
background: #5cd65c; border-radius: 5px; border: none;
.box table tr td input[type='submit']:hover{ background: #47d147;
} .menu{
width: 100%; height: 10%;
background: white; }
.menu button{ float: right; width: 80px; height: 40px; margin: 10px;
background: #ff3300; border: none;
border-radius: 10px; }
.menu button:hover{ background: #cc2900; }
.menu button a{ color: white;
}
.menu nav li{ float: left; list-style: none; }
.menu nav li{ float: left; list-style: none; padding-left: 10px; padding-right: 10px; margin-top: 25px; }
.menu nav li a{ color: black;
text-decoration: none; }
.menu nav li a:hover{ font-weight: bold; }
.contet{
width: 100%; }
position: fixed; margin-left: 2%; background: #d16c15; width: 100px;
height: 100px; border: none; }
.content button:hover{ background: #ba6012; }
.content button a{ color: white;
text-decoration: none; }
.box-create{ width: 30.5%;
background: #ea862e; position: fixed; top: 14%;
left: 35%;
border-radius: 20px; }
margin: 3%; }
.box-create table{ margin: 3%; }
.box-create input[type="text"]{ width: 368px;
height: 30px; background: white; border-radius: 5px; border: none;
margin-bottom: 1%; }
.box-create input[type="password"]{ width: 368px;
height: 30px; background: white; border-radius: 5px; border: none;
margin-bottom: 1%; }
background: white; border-radius: 5px; border: none;
margin-bottom: 1%; }
.box-create input[type="submit"]{ width: 368px;
height: 30px; color: white;
background: #5cd65c; border-radius: 5px; border: none;
margin-bottom: 1%; }
.box-create input[type="submit"]:hover{ background: #47d147;
}
.box-create textarea{ background: white; border-radius: 5px; border: none;
proses/index.php
<?php
include ("koneksi.php"); $ID = $_GET['ID'];
$querry = "SELECT * FROM `data` nama='$ID'"; $exe = mysql_query($querry);
while ($row = mysql_fetch_assoc($exe)) { $arr[] = $row;
}
echo json_encode($arr); ?>
Proses/koneksi.php
<?php
mysql_connect("localhost","root",""); mysql_select_db("square");