• Tidak ada hasil yang ditemukan

Pembuatan Website Pengelolaan Informasi Promo Kartu Kredit.

N/A
N/A
Protected

Academic year: 2017

Membagikan "Pembuatan Website Pengelolaan Informasi Promo Kartu Kredit."

Copied!
99
0
0

Teks penuh

(1)

ABSTRAK

Perkembangan teknologi dari seluruh dunia ternyata saat ini sangat

digemari oleh masyarakat atau pelaku bisnis. Informasi yang didapat selain cepat,

akurat juga dapat digunakan dan diperoleh dengan mudah. Teknologi berbasis

web telah banyak digunakan di berbagai negara dan bisa digunakan juga untuk

mencari sebuah informasi. Pembuatan Website pengelolaan informasi promo kartu

kredit merupakan website periklanan yang digunakan sebagai media bantu untuk

memberikan informasi tentang promosi-promosi kartu kredit yang sedang berlaku,

seperti promosi food & dining, fashion & clothing, electronics, travel & leisure.

Website periklanan ini juga menyediakan fasilitas untuk pengguna yang ingin

melakukan kerjasama atau ingin memasang iklan, dan pengguna atau user dapat

memasang iklan dengan mudah dan cepat.

(2)

ABSTRACT

(3)

DAFTAR ISI

ABSTRAK ………...………

.

….. i

ABSTRACT……….………....ii

DAFTAR ISI………

...

………..………..iii

DAFTAR TABEL………

...

……….………..

.vi

DAFTAR GAMBA

R………..……….….

.vii

BAB 1 PENDAHULUAN...1

1.1

Latar

Belakang…

...1

1.2

Rumusan Masalah...2

1.3

Tujuan………...

...2

1.4

Batasan Masalah...2

1.5

Sistematika Penulisan...2

BAB 2 LANDASAN TEORI……...

...4

2.1

Pengenalan PHP

…………...

...4

2.1.1

Cara Kerja PHP...4

2.1.2

Syntax PHP ...5

2.1.3

Variabel PHP

………...

...6

2.1.4

Tipe Data……

...7

2.1.5

Operator PHP

………..……….

....7

2.2 HTML

………..………

...9

2.3

Basis Data………....………..……

10

2.4 XAMPP

……….………

...11

2.4.1 PHP pada XAMPP

………..………

...12

2.4.2 MySQL pada XAMPP

………..………

.

..12

2.4.3 PhpMyAdmin pada XAMPP

………..…

...12

2.4.4 Apache pada XAMPP

……….13

2.5 Macromedia Dreamweaver

………...

13

(4)

3.1 Site Map

………..………

...14

3.2 Diagram Alir

………..………

...15

3.2.1 Diagram Alir Website User

…....

...16

3.2.1.1 Diagram Alir Sub Menu Home

………...

17

3.2.1.2 Diagram Alir Sub Menu About Us

………

.

…….

18

3.2.1.3 Diagram Alir Sub Menu Login/Register

.………...….

18

3.2.1.4 Diagram Alir Sub Menu Contact Us

……….…...…..20

3.2.2 Diagram Alir Website Administrator

………...…….…20

3.2.2.1 Diagram Alir Website Administrator Data User

……

21

3.2.2.2 Diagram Alir Website Administrator Data Iklan

Masuk...

……….

22

3.2.2.3 Diagram Alir Website Administrator Data

Feedback

……

.

………

....23

3.2.2.4 Diagram Alir Website Administrator Data

History....

……….…

...23

3.3 XAMPP

………

...

………

...24

3.4 Perancangan Web..

……….……

....

…………....………...

26

3.4.1 Perancangan Database

………....……

.

….

26

3.4.1.1

Pembuatan Tabel Admin

…………...…………..

...27

3.4.1.2

Pembuatan Tabel Custome

…………...

....

28

3.4.1.3

Pembuatan Tabel Feedback

……….……….….

28

3.4.1.4

Pembuatan Tabel History

………....…

...29

3.4.1.5

Pembuatan Tabel Iklan1

………

.

...

…...

30

3.4.1.6

Pe

mbuatan Tabel Kategori………..…...

30

3.4.1.7

Pembuatan Tabel Lokasi

………

31

3.4.1.8

Pembuatan Tabel Relasi

……….

31

3.5 Perancangan Index Website User

……….…3

2

BAB 4 PENGAMATAN DATA DAN ANALISA...52

4.1

Tampilan Website User Murah Promo

………..

52

(5)

4.3

Pengujian

……….….………...

68

BAB 5 KESIMPULAN DAN SARAN…………..

...72

DAFTAR PUSTAKA………

73

(6)

DAFTAR TABEL

Tabel 3.1 Field Tabel Admin

……….………

27

Tabel 3.2 Field Tabel Customer

……….…………

28

Tabel 3.3 Field Tabel Feedback

………

.

………

29

Tabel 3.4 Field Tabel History

………...

...29

Tabel 3.5 Field Tabel Iklan1

………

..

………

30

Tabel 3.6 Field Tabel Kategori

………

..30

Tabel 3.7 Field Tabel Lokasi

………

...31

(7)

DAFTAR GAMBAR

Gambar 3.1 Site Map dari Website User

……….………...14

Gambar 3.2 Site Map Website Administrator

………

.

……...15

Gambar 3.3 Diagram Alir Website User

….………

...16

Gambar 3.4 Diagram Alir Sub Menu Home

………...

17

Gambar 3.5 Diagram Alir Sub Menu About Us

…….………

18

Gambar 3.6 Diagram Alir sub menu Login/Register

…...

...

……….

19

Gambar 3.7 diagram Alir sub menu Contact Us

….………...………20

Gambar 3.8 Diagram Alir keseluruhan website

administrator………...

21

Gambar 3.9 Diagram Alir sub menu lihat data user

……….

.22

Gambar 3.10 Diagram Alir sub menu lihat data iklan masuk

………22

Gambar 3.11 Diagram Alir sub menu lihat data feedback

……….

23

Gambar 3.12 Diagram Alir sub menu lihat data history

………

24

Gambar 3.13 XAMPP Control Panel

……….………

...25

Gambar 3.14 Menjalankan Apache dan MySql

…….………

....25

Gambar 3.15 Tampilan Administrator XAMPP for Windows

……….

..26

Gambar 3.16 Membuat Database pada PhpMyAdmin

……….….………

27

Gambar 3.17 Tampilan Index Website Murah Promo

………….…

.

.

………….

35

Gambar 3.18 Tampilan Halaman Register

………

.

.

………

...38

Gambar 3.19 Tampilan Halaman Login User

………

..

…………

..41

Gambar 3.20 Tampilan Halaman Form iklan user

………….…………

.

………

..46

Gambar 3.21 Tampilan Halaman Iklan Masuk Admin………

...51

Gambar 4.1 Murah Promo Home.

……….………

.52

Gambar 4.2 Murah Promo About Us

……….………...

.53

Gambar 4.3 Murah Promo login/register

………...

54

Gambar 4.4 Form Register

………55

Gambar 4.5 Form

untuk Mengirim Iklan…………...

...55

Gambar 4.6 Tampilan Konfirmasi Iklan

…………

.

…………...

...56

(8)

Gambar 4.8 Iklan Food & Dining

………

.

……….58

Gambar 4.9 Tampilan Iklan Fashion & Clothing...59

Gambar 4.10 Tampilan Iklan Electronics

….……….

60

Gambar 4.11 Tampilan Iklan Travel & Leisure

…………

.

………

61

Gambar 4.12 Tampilan Isi Iklan

………

62

Gambar 4.13 Tampilan Halaman Admin Login

………

.

………

63

Gambar 4.14 Halaman Home Website Admin

………...

63

Gambar 4.15 Tampilan Menu Lihat Data User Admin

………….………

64

Gambar 4.16 Tampilan Lihat Iklan Masuk

………....…

65

Gambar 4.17 Tampilan Lihat Feedback

……….…………...…

66

Gambar 4.18 Tampilan Lihat History

………...……….

67

Gambar 4.19 Tampilan Otentikasi User

………...……….

68

Gambar 4.20 Tampilan Pe

ngisian Iklan………...….

68

Gambar 4.21 Ta

mpilan Konfirmasi Iklan………

..69

Gambar 4

.22 Tampilan Iklan Masuk………...………

..70

(9)

LAMPIRAN A

LISTING PROGRAM

1. Koneksi_user.php

<?php

$server = "localhost"; $username = "root"; $password ="root"; $database ="promo";

mysql_connect($server,$username,$password) or die("Koneksi gagal"); mysql_select_db($database) or die("Database tidak bisa dibuka"); ?>

2. Index.php

<?php

include "koneksi.php"; ?>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css">

body {

background-image: url(Proyek/old.jpg); background-color: #630;

margin:0px; padding:0px;

(10)

}

#apDiv1 {

position:relative; width:1348px; height:174px; z-index:1; left: -112px; top:0px; margin:auto; }

#apDiv2 {

position:absolute; width:89px; height:24px; z-index:2; left: 474px; top: 1341px; }

#apDiv3 {

position:absolute; width:995px; height:141px; z-index:3; left: 28px; top: 280px; }

#apDiv4 {

(11)

#apDiv5 {

position:absolute; width:168px; height:118px; z-index:3; left: 57px; top: 251px; }

#apDiv6 {

position:absolute; width:168px; height:118px; z-index:4; left: 319px; top: 252px; }

#apDiv7 {

position:absolute; width:168px; height:118px; z-index:5; left: 581px; top: 251px; }

#apDiv8 {

position:absolute; width:168px; height:118px; z-index:6; left: 839px; top: 251px; }

#apDiv9 {

(12)

width:168px; height:118px; z-index:7; left: 892px; top: 252px; }

#apDiv10 {

position:absolute; width:1037px; height:118px; z-index:8; left: 30px; top: 251px; }

#apDiv11 {

position:absolute; width:444px; height:281px; z-index:7; left: 87px; top: 392px; }

#apDiv12 {

position:absolute; width:448px; height:281px; z-index:8; left: 568px; top: 393px; }

#apDiv13 {

(13)

z-index:1; left: 0px; top: 309px; }

#apDiv14 {

position:absolute; width:274px; height:133px; z-index:9; left: 86px; top: 767px; }

#apDiv15 {

position:absolute; width:274px; height:133px; z-index:10; left: 396px; top: 768px; }

#apDiv16 {

position:absolute; width:274px; height:133px; z-index:11; left: 705px; top: 770px; }

#apDiv17 {

(14)

top: 917px; }

#apDiv18 {

position:absolute; width:274px; height:133px; z-index:13; left: 396px; top: 917px; }

#apDiv19 {

position:absolute; width:274px; height:133px; z-index:14; left: 707px; top: 918px; }

#apDiv20 {

position:absolute; width:1348px; height:172px; z-index:15; left: -112px; top: 1420px; }

#apDiv21 {

(15)

#apDiv22 { position:absolute; width:136px;

height:32px; z-index:16; left: 112px; top: 198px; }

#apDiv23 { position:absolute; width:136px;

height:32px; z-index:16; left: 112px; top: 198px; }

#apDiv24 {

position:absolute; width:126px; height:25px; z-index:17; left: 532px; top: 203px; }

#apDiv25 {

position:absolute; width:137px; height:24px; z-index:18; left: 701px; top: 206px; }

#apDiv26 {

(16)

z-index:19; left: 874px; top: 207px; }

--> </style>

<style type="text/css"> <!--

#apDiv27 {

position:absolute; width:216px; height:32px; z-index:17; left: 835px; top: 156px; }

--> </style>

<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

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

<!-- #apDiv28 {

position:absolute; width:282px; height:500px; z-index:17; left: -60px; top: 770px; color: #000; }

#apDiv29 {

(17)

width:286px; height:141px; z-index:18; left: 405px; top: 770px; }

#apDiv30 {

position:absolute; width:230px; height:115px; z-index:18; left: 1102px; top: 254px; }

body,td,th {

color: #000; }

ul.menu{

list-style:none; }

ul.menu li{

display:inline-block; padding:10px; width:200px; text-align:center; margin:0px;

background:url(Proyek/backgrounds-images-for-websites-3.jpg); }

ul.menu li a{

text-decoration:none; color:#963;

(18)

}

ul.menu li a:hover{ color:#960; }

#apDiv31 {

position:absolute; width:303px; height:138px; z-index:1; left: 330px; top: 1px; }

#apDiv32 {

position:absolute; width:866px; height:134px; z-index:1; left: 314px; top: 30px; }

#apDiv33 {

position:absolute; width:39px; height:39px; z-index:18; left: 530px; top: 1456px; }

#apDiv34 { position:absolute; width:39px;

(19)

}

#apDiv35 {

position:absolute; width:37px; height:37px; z-index:19; left: 705px; top: 1482px; }

#apDiv36 {

position:absolute; width:200px; height:94px; z-index:20; left: 156px; top: 1437px; }

--> </style> </head>

<body>

<div style="width:1125px; margin:auto; position:relative";>

<div id="apDiv1">

<img src="Proyek/templatemo_footer.jpg" alt="FOOD" width="1345" height="174" align="top" style="position:absolute; z-index:-10" border=1px />

<div id="apDiv32"><img src="Proyek/logo.png" width="676" height="123" /></div> <form method="get">

<font color="#FFFFFF">Search by </font> <select name="idkategori"/>

(20)

$q = mysql_query("SELECT * FROM `kategori`"); while($h = mysql_fetch_array($q)){

echo "<option value='$h[idkategori]'>$h[kategori]</option>"; }

?> </select>

<select name="idlokasi"/> <?php

$q = mysql_query("SELECT * FROM `lokasi`"); while($h = mysql_fetch_array($q)){

echo "<option value='$h[idlokasi]'>$h[lokasi]</option>"; }

?> </select>

<input type="submit" value="Search" /> </form>

</div>

<div id="apDiv5"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?idkategori=1"><img src="Proyek/food2.jpg" width="201" height="125" alt="FOOD" /></a></div>

<div id="apDiv6"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?idkategori=2"><img src="Proyek/fashion.jpg" width="201" height="125" alt="FASHION" /></a></div> <div id="apDiv7"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?idkategori=3"><img src="Proyek/electronics1.jpg" width="201" height="125" alt="ELECTRONICS" /></a></div> <div id="apDiv8"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?idkategori=4"><img src="Proyek/travel1.jpg" width="201" height="125" alt="TRAVEL" /></a></div>

<div id="apDiv11">

<div id="apDiv13"><img src="Proyek/hotpromo.jpg" width="395" height="45" alt="HOT PROMO" style="border : 5px solid #C90" /></div>

<img src="Proyek/iklan.gif" width="444" height="281" alt="iklan" style="border : 5px solid #FC6" /></div>

<div id="apDiv12"><img src="Proyek/IKLAN1.gif" width="448" height="281" alt="iklan1" style="border : 5px solid #FC6" /></div>

(21)

<div id="apDiv21"> <center> <ul class="menu">

<li><a href="index.php">HOME</a></li>

<li><a href="about_us.php">ABOUT US</a></li> <li><a href="login.php">LOGIN/REGISTER</a></li> <li><a href="contact_us.php">CONTACT US</a>

<div id="apDiv2"><a href="http://twitter.com"><img src="Proyek/icon_twitter.jpg" width="36" height="42" /></a></div>

</li> </ul> </center> </div>

<div id="apDiv28"> <?php

$tanggal = date("Y-m-d"); if(isset($_GET['idkategori'])){

$idkategori = $_GET['idkategori']; if(isset($_GET['idlokasi'])){

$idlokasi = $_GET['idlokasi'];

$q = mysql_query("SELECT * FROM `iklan1` WHERE `status`='1' AND `tanggalmulai`<='$tanggal' AND `tanggalselesai`>='$tanggal' AND `idkategori`=$idkategori AND `idlokasi`='$idlokasi' LIMIT 0, 9");

}else{

$q = mysql_query("SELECT * FROM `iklan1` WHERE `status`='1' AND

`tanggalmulai`<='$tanggal' AND `tanggalselesai`>='$tanggal' AND `idkategori`=$idkategori LIMIT 0, 9");

} }else{

$q = mysql_query("SELECT * FROM `iklan1` WHERE `status`='1' AND

(22)

$x = 0;

echo "<table cellspacing='5'>"; echo "<tr>";

while($r = mysql_fetch_array($q)){ if($x%3==0){

echo "</tr>"; echo "<tr>"; }

echo "<td>";

echo "<table border='5px' width='400px'>"; echo "<tr><td colspan='2'>$r[judul]</td></tr>";

echo "<tr><td><a href='iklanuser.php?idiklan=$r[idiklan]'><img src='gambar/$r[gambar]' width='200px' style='border:5px solid #000' /></a></td>";

$temp = $r['isi'];

$isi = substr($temp, 0, 100);

echo "<td valign='top'>$isi</td></tr>"; echo "</table>";

echo "</td>"; $x+=1; }

echo "</tr>"; echo "</table>"; ?>

</div>

<div id="apDiv33"><a href="http://facebook.com/"><img src="Proyek/icon_fb.jpg" width="37" height="41" /></a></div>

<div id="apDiv35">

<a href="ymsgr:sendim?lunoma_solunita@yahoo.com" border="0"><img

src="http://opi.yahoo.com/online?u=lunoma_solunita@yahoo.com&t=9"/></a></div>

<div id="apDiv36"><img src="Proyek/Untitled-2.png" width="227" height="123" style="border : 1px solid #333" /></div>

(23)

3. Iklanuser.php

<?php

include "koneksi.php";

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

$idiklan = $_GET['idiklan'];

$q = mysql_query("SELECT * FROM `iklan1` WHERE `idiklan`='$idiklan'"); $r = mysql_fetch_array($q);

}else{

header("location:index.php"); }

?>

<style type="text/css"> <!--

body {

background-color: #630;

background-image: url(Proyek/old.jpg); }

body,td,th {

color: #000; }

--> </style>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

</head>

(24)

<table border="2"> <?php

print("<table width = \"70%\" border=\"1\">\n"); print("<tr>\n");

print("<td width=\"10%\">IKLAN</td>\n"); print("<td width=\"50%\">ISI</td>\n");

echo "<tr><td>$r[judul]</td><td rowspan='2' valign='top'>$r[isi]</td></tr>"; echo "<tr><td><img src='gambar/$r[gambar]' width='300' /></td>";

echo "</tr>"; ?>

</table>

<form name="kembali ke home" method="POST" action="index.php"/> <input name="kembali ke home" type="submit" value="kembali ke home"/> </form>

</body> </html>

4. About us.PHP

<?php

include "koneksi.php"; ?>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css"> <!--

body {

background-image:url(Proyek/old.jpg); background-color: #630;

(25)

padding:0px;

font-family:Verdana, Geneva, sans-serif; }

#apDiv1 {

position:absolute; width:1032px; height:174px; z-index:1; left: -112px; top:0px; margin:auto; }

#apDiv2 {

position:absolute; width:36px; height:41px; z-index:16; left: 532px; top: 1578px; }

#apDiv3 {

position:absolute; width:995px; height:141px; z-index:3; left: 28px; top: 280px; }

#apDiv4 {

(26)

top: 166px; }

#apDiv5 {

position:absolute; width:168px; height:118px; z-index:3; left: 57px; top: 251px; }

#apDiv6 {

position:absolute; width:168px; height:118px; z-index:4; left: 319px; top: 252px; }

#apDiv7 {

position:absolute; width:168px; height:118px; z-index:5; left: 581px; top: 251px; }

#apDiv8 {

(27)

#apDiv9 {

position:absolute; width:168px; height:118px; z-index:7; left: 892px; top: 252px; }

#apDiv10 {

position:absolute; width:1037px; height:118px; z-index:8; left: 30px; top: 251px; }

#apDiv11 {

position:absolute; width:444px; height:281px; z-index:7; left: 87px; top: 392px; }

#apDiv12 {

position:absolute; width:448px; height:281px; z-index:8; left: 568px; top: 393px; }

#apDiv13 {

(28)

width:74px; height:23px; z-index:1; left: 0px; top: 309px; color: #000; }

#apDiv14 {

position:absolute; width:635px; height:115px; z-index:9; left: 86px; top: 767px; color: #000; }

#apDiv15 {

position:absolute; width:250px; height:115px; z-index:10; left: 396px; top: 768px; }

#apDiv16 {

position:absolute; width:250px; height:115px; z-index:11; left: 705px; top: 770px; }

#apDiv17 {

(29)

width:250px; height:115px; z-index:12; left: 84px; top: 902px; }

#apDiv18 {

position:absolute; width:251px; height:115px; z-index:13; left: 396px; top: 903px; }

#apDiv19 {

position:absolute; width:249px; height:115px; z-index:14; left: 707px; top: 904px; }

#apDiv20 {

position:absolute; width:122px; height:24px; z-index:10; left: 88px; top: 1011px; color: #000; }

#apDiv21 {

(30)

height:115px; z-index:11; left: 89px; top: 1068px; color: #000; }

#apDiv22 {

position:absolute; width:1032px; height:115px; z-index:1; left: -680px; top: 1093px; }

#apDiv23 {

position:absolute; width:1000px; height:41px; z-index:16; left: 30px; top: 170px; }

--> </style>

<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

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

<!-- body,td,th {

color: #09C; }

ul.menu{

(31)

}

ul.menu li{

display:inline-block; padding:10px; width:200px; text-align:center; margin:0px;

background:url(Proyek/backgrounds-images-for-websites-3.jpg); }

ul.menu li a{

text-decoration:none; color:#963;

margin:0px; font-weight:bold; }

ul.menu li a:hover{ color:#960; }

#apDiv32 { position:absolute; width:866px;

height:134px; z-index:1; left: 314px; top: 30px; }

#apDiv33 {

position:absolute; width:39px; height:39px; z-index:18; left: 531px; top: 1523px; }

(32)

position:absolute; width:200px; height:94px; z-index:20; left: 156px; top: 1503px; }

#apDiv35 {

position:absolute; width:37px; height:37px; z-index:19; left: 706px; top: 1548px; }

-->

</style></head>

<body>

<div style="width:1125px; margin:auto; position:relative">

<div id="apDiv1">

<img src="Proyek/templatemo_footer.jpg" alt="FOOD" width="1348" height="174" align="top" style="position:absolute; z-index:-10" border=1px />

<div id="apDiv32"><img src="Proyek/logo.png" width="676" height="123" /></div> </div>

<div id="apDiv5"><a href="index.php?idkategori=1"><img src="Proyek/food2.jpg" width="201" height="125" alt="FOOD" /></div>

<div id="apDiv6"><a href="index.php?idkategori=2"><img src="Proyek/fashion.jpg" width="201" height="125" alt="FASHION" /></a></div>

(33)

<div id="apDiv8"><a href="index.php?idkategori=4"><img src="Proyek/travel1.jpg" width="201" height="125" alt="TRAVEL" /></a></div>

<div id="apDiv11">

<img src="Proyek/IKLAN.gif" width="444" height="281" alt="iklan" style="border : 5px solid #FC6" /></div>

<div id="apDiv12"><img src="Proyek/IKLAN1.gif" width="448" height="281" alt="iklan1" style="border : 5px solid #FC6" /></div>

<div id="apDiv23"> <center> <ul class="menu">

<li><a href="index.php">HOME</a></li>

<li><a href="about_us.php">ABOUT US</a></li> <li><a href="login.php">LOGIN/REGISTER</a></li> <li><a href="contact_us.php">CONTACT US</a></li> </ul>

</center> </div>

<div id="apDiv14">Murahpromo.com adalah suatu website yang menyediakan berbagai macam tentang informasi-informasi promo kartu kredit yang sedang berlaku. website ini telah dibuat pada 3 maret 2013. Promosi kartu kredit banyak dilakukan kerjasama dengan beberapa tempat makan, bioskop, penjualan <em>gadget</em>, tiket pesawat terbang, pemesanan hotel, penjualan elektronik, <em>fashion</em> pakaian, <em>health </em>dan <em>beauty</em>. Dengan adanya pembuatan <em>website</em> pengelolaan informasi promo kartu kredit, dapat memudahkan para pengguna kartu kredit agar dapat dengan cepat mengetahui promosi-promosi kartu kredit yang sedang berlaku. Dengan adanya <em>website </em>promo kartu kredit banyak orang yang dapat memasangkan iklan pada <em>website</em> pengelolaan informasi promo kartu kredit ini.</div>

<div id="apDiv11">

<div id="apDiv13">HISTORY</div> </div>

<div id="apDiv12">

<div id="apDiv22"><img src="Proyek/footer.jpg" width="1348" height="174" alt="PENUTUP" style="border : 1px solid #FC6" /></div>

(34)

<div id="apDiv20">INFORMATION</div>

<div id="apDiv21">Website ini menyediakan berbagai macam informasi-informasi tentang promo kartu kredit dan bagi yang ingin melakukan kerjasama untuk memasang iklan promo kartu kredit dapat melakukan registrasi terlebih dahulu dan dapat mengikuti langkah-langkah yang sudah terdapat pada form website.</div>

<div id="apDiv33"><a href="http://facebook.com/"><img src="Proyek/icon_fb.jpg" width="37" height="41" /></a></div>

<div id="apDiv2"><a href="http://twitter.com"><img src="Proyek/icon_twitter.jpg" width="36" height="42" /></a></div>

<div id="apDiv36"><img src="Proyek/Untitled-2.png" width="227" height="123" style="border : 1px solid #333" /></div>

<div id="apDiv35"> <a href="ymsgr:sendim?lunoma_solunita@yahoo.com" border="0"><img src="http://opi.yahoo.com/online?u=lunoma_solunita@yahoo.com&amp;t=9"/></a></div> <script type="text/javascript">

</script> </body> </html>

5. Formulir.php

<?php

if(isset($_GET['pesan'])){ echo $_GET['pesan']; }

?>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css"> <!--

(35)

background-color: #630;

background-image: url(Proyek/old.jpg); }

body,td,th {

color: #000; }

-->

</style></head>

<body>

<form name = "formulir" method = "POST" action = "tambah.php"/> Register

<p> username : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "text" name = "user" /> </p> <p> password : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "password" name = "pass" /> </p>

<p> nama : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "text" name = "nama" /> </p>

<p> alamat : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "alamat" name = "alamat" /> </p>

<p> telepone : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "telepone" name = "telepone" /> </p>

<p> ktp :

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type = "ktp" name = "ktp" /> </p>

<p> npwp : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "text" name = "npwp" /> </p>

<input type = "submit" name = "simpan" value = "simpan" /> </form>

</body> </html>

6. Tambah.php

(36)

<head>

<title>tambah</title> </head>

<body>

<form name = "form tambah" method = "POST" action="login.php" onsubmit="return cekdata()">

<?php

include "koneksi.php"; $user = $_POST['user']; $pass = $_POST['pass']; $nama = $_POST['nama'];

$alamat= $_POST['alamat']; $telepone = $_POST['telepone']; $ktp = $_POST['ktp'];

$npwp = $_POST['npwp'];

if(empty($user)||empty($pass)||empty($nama)||empty($alamat)||empty($telepone)||empty($ktp )||empty($npwp)){

header("location:formulir.php?pesan=Tidak boleh kosong"); }

$q = mysql_query("SELECT * FROM `customer` WHERE `username`='$user'"); if(mysql_num_rows($q)==0) {

$sql = "INSERT INTO customer "." (username, password, nama, alamat, telepone, ktp, npwp) "." VALUES('$user', '$pass','$nama', '$alamat', '$telepone', '$ktp', '$npwp')";

$hasil = mysql_query($sql); if (empty($hasil))

print("gagal menyimpan data username='$nama'"); else

print("Data username='$nama' telah disimpan"); }else{

(37)

?> <?php

?> <br/>

<input type="submit" value="OK" /> </form>

<form name = "kembali" method = "POST" action="formulir.php" onsubmit="isi dengan username berbeda()">

<input type="submit" value="kembali ke halaman formulir registrasi" /> </form>

</body> </html>

7. Login.php

<?php

include "koneksi.php"; ?>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css"> <!--

body {

background-image:url(Proyek/old.jpg); background-color: #630;

margin:0px; padding:0px;

(38)

#apDiv1 {

position:absolute; width:1032px; height:174px; z-index:1; left: -112px; top:0px; margin:auto; }

#apDiv2 {

position:absolute; width:36px; height:41px; z-index:16; left: 532px; top: 1185px; }

#apDiv3 {

position:absolute; width:995px; height:141px; z-index:3; left: 28px; top: 280px; }

#apDiv4 {

position:absolute; width:345px; height:124px; z-index:1; left: 128px; top: 166px; }

(39)

position:absolute; width:168px; height:118px; z-index:3; left: 57px; top: 251px; }

#apDiv6 {

position:absolute; width:168px; height:118px; z-index:4; left: 319px; top: 252px; }

#apDiv7 {

position:absolute; width:168px; height:118px; z-index:5; left: 581px; top: 251px; }

#apDiv8 {

position:absolute; width:168px; height:118px; z-index:6; left: 839px; top: 251px; }

#apDiv9 {

(40)

height:118px; z-index:7; left: 892px; top: 252px; }

#apDiv10 {

position:absolute; width:1037px; height:118px; z-index:8; left: 30px; top: 251px; }

#apDiv11 {

position:absolute; width:444px; height:281px; z-index:7; left: 87px; top: 392px; }

#apDiv12 {

position:absolute; width:448px; height:281px; z-index:8; left: 568px; top: 393px; }

#apDiv13 {

(41)

left: 0px; top: 366px; }

#apDiv14 {

position:absolute; width:349px; height:37px; z-index:9; left: 86px; top: 767px; }

#apDiv15 {

position:absolute; width:250px; height:115px; z-index:10; left: 396px; top: 768px; }

#apDiv16 {

position:absolute; width:250px; height:115px; z-index:11; left: 705px; top: 770px; }

#apDiv17 {

(42)

}

#apDiv18 {

position:absolute; width:251px; height:115px; z-index:13; left: 396px; top: 903px; }

#apDiv19 {

position:absolute; width:249px; height:115px; z-index:14; left: 707px; top: 904px; }

#apDiv20 {

position:absolute; width:122px; height:24px; z-index:10; left: 87px; top: 941px; }

#apDiv21 {

position:absolute; width:1000px; height:41px; z-index:16; left: 30px; top: 170px; }

(43)

position:absolute; width:200px; height:33px; z-index:9; left: 90px; top: 759px; }

#apDiv23 {

position:absolute; width:199px; height:31px; z-index:10; left: 89px; top: 804px; }

#apDiv24 {

position:absolute; width:141px; height:24px; z-index:11; left: 90px; top: 848px; }

#apDiv25 {

position:absolute; width:1348px; height:115px; z-index:12; left: -112px; top: 1093px; }

#apDiv26 {

(44)

height:26px; z-index:1; left: -500px; top: 634px; }

--> </style>

<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

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

<!-- body,td,th {

color: #000; }

ul.menu{

list-style:none; }

ul.menu li{

display:inline-block; padding:10px; width:200px; text-align:center; margin:0px;

background:url(Proyek/backgrounds-images-for-websites-3.jpg); }

ul.menu li a{

text-decoration:none; color:#963;

margin:0px; font-weight:bold; }

(45)

#apDiv32 {position:absolute; width:866px; height:134px; z-index:1; left: 314px; top: 30px; }

#apDiv36 {

position:absolute; width:200px; height:94px; z-index:20; left: 156px; top: 1110px; }

#apDiv33 {

position:absolute; width:39px; height:39px; z-index:18; left: 531px; top: 1130px; }

#apDiv35 {

position:absolute; width:37px; height:37px; z-index:19; left: 706px; top: 1155px; }

(46)

</head>

<body>

<div style="width:1125px; margin:auto; position:relative">

<div id="apDiv1">

<img src="Proyek/templatemo_footer.jpg" alt="FOOD" width="1348" height="174" align="top" style="position:absolute; z-index:-10" border=1px />

<div id="apDiv32"><img src="Proyek/logo.png" width="676" height="123" /></div> </div>

<div id="apDiv5"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?kategori=food"><img src="Proyek/FOOD.jpg" width="168" height="119" alt="FOOD" /></a></div>

<div id="apDiv6"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?kategori=fashion"><img src="Proyek/FASHION&amp;CLOTHING.jpg" width="171" height="121" alt="FASHION" /></a></div>

<div id="apDiv7"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?kategori=elektronik"><img src="Proyek/ELECTRONICS.jpg" width="169" height="119" alt="ELECTRONICS" /></a></div> <div id="apDiv8"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?kategori=travel"><img src="Proyek/TRAVEL.jpg" width="175" height="121" alt="TRAVEL" /></a></div>

<div id="apDiv11">

<img src="Proyek/IKLAN.gif" width="444" height="281" alt="iklan" /></div>

<div id="apDiv12"><img src="Proyek/IKLAN1.gif" width="448" height="281" alt="iklan1" /></div>

<div id="apDiv21"> <center> <ul class="menu">

<li><a href="index.php">HOME</a></li>

<li><a href="about_us.php">ABOUT US</a></li> <li><a href="login.php">LOGIN/REGISTER</a></li> <li><a href="contact_us.php">CONTACT US</a></li> </ul>

(47)

<div id="apDiv5"><a href="index.php?idkategori=1"><img src="Proyek/food2.jpg" width="201" height="125" alt="FOOD" /></div>

<div id="apDiv6"><a href="index.php?idkategori=2"><img src="Proyek/fashion.jpg" width="201" height="125" alt="FASHION" /></a></div>

<div id="apDiv7"><a href="index.php?idkategori=3"><img src="Proyek/electronics1.jpg" width="201" height="125" alt="ELECTRONICS" /></a></div>

<div id="apDiv8"><a href="index.php?idkategori=4"><img src="Proyek/travel1.jpg" width="201" height="125" alt="TRAVEL" /></a></div>

<div id="apDiv11">

<div id="apDiv13">LOGIN / REGISTER<br /> <br />

<form id="form1" name="form1" method="post" action="proses_login_user.php">

username : <input type="text" name="nama" style="background-color:transparent"/><center><br /></center>

password : <input type="password" name="password" style="background-color:transparent"/><br /><br/>

<input type="submit" name="login" value="login"/> </form>

<form name="register" method ="post" action = "formulir.php"/> <input type="submit" name="register2" value="register"/> </form>

</div>

<img src="Proyek/iklan.gif" width="444" height="281" alt="iklan" style="border : 5px solid #FC6" /></div>

<div id="apDiv12"><img src="Proyek/IKLAN1.gif" width="448" height="281" alt="IKLAN1" style="border : 5px solid #FC6" /></div>

<div id="apDiv25"><img src="Proyek/footer.jpg" width="1348" height="174" alt="PENUTUP" style="border : 1px solid #FC6" /></div>

<div id="apDiv36"><img src="Proyek/Untitled-2.png" width="227" height="123" style="border : 1px solid #333" /></div>

(48)

<div id="apDiv2"><a href="http://twitter.com"><img src="Proyek/icon_twitter.jpg" width="36" height="42" /></a></div>

<div id="apDiv35"> <a href="ymsgr:sendim?lunoma_solunita@yahoo.com" border="0"><img src="http://opi.yahoo.com/online?u=lunoma_solunita@yahoo.com&amp;t=9"/></a></div> <script type="text/javascript">

</script> </body> </html>

8. Proses _login_user.php

<?php

include "koneksi.php"; function anti_injection($data){ $filter =

mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)))); return $filter;

}

$username = anti_injection($_POST['nama']); $pass = anti_injection(($_POST['password']));

// pastikan username dan password merupakan gabungan antara huruf atau angka. if (!ctype_alnum($username) OR !ctype_alnum($pass)){

echo "Maaf anda tidak dapat melakukan injection"; }

else{

$login=mysql_query("SELECT * FROM customer WHERE username ='$username' AND password='$pass'");

$ketemu=mysql_num_rows($login); $r=mysql_fetch_array($login);

// Apabila username dan password telah cocok atau ditemukan if ($ketemu > 0){

(49)

$_SESSION['idcust'] = $r['idcust'];

mysql_query("UPDATE users SET id_session='$sid_baru' WHERE username='$username'"); header('location:iklan.php');

} else{

echo "<link href=../config/adminstyle.css rel=stylesheet type=text/css>"; echo "<center>LOGIN GAGAL! <br>

Username atau Password Anda tidak benar.<br>";

echo "<a href=login.php><b>ULANGI LAGI</b></a></center>"; }

}?>

9. Iklan.php

<?php

include "koneksi.php"; session_start();

?>

<html> <head>

<title>Memunggah File</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css"> <!--

body {

background-color: #c90;

background-image: url(Proyek/old.jpg); }

#apDiv1 {

(50)

z-index:1; left: 12px; top: 144px; }

#apDiv2 {

position:absolute; width:151px; height:62px; z-index:2; left: 13px; top: 226px; }

#apDiv3 {

position:absolute; width:200px; height:115px; z-index:3; left: 14px; top: 299px; }

#apDiv14 {

position:absolute; width:188px; height:48px; z-index:8; left: 14px; top: 307px; }

#apDiv15 {

(51)

top: 368px; }

#apDiv13 {

position:absolute; width:54px; height:35px; z-index:7; left: 14px; top: 425px; }

#apDiv4 {

position:absolute; width:51px; height:23px; z-index:1; left: 104px; top: 302px; }

body,td,th {

color: #000; }

-->

</style></head> <body>

<form action="proses_up.php" method="post" enctype="multipart/form-data" id="idform"> <table>

<tr>

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

<td><input type="file" name="namafile"> <br>SIZE 100KB maksimal</td> </tr>

<tr>

(52)

<td>:</td>

<td><textarea name="textareaket" cols="50" rows="6"></textarea></td> </tr>

<tr>

<td>nama user</td> <td>:</td>

<td> <?php

$idcust = $_SESSION['idcust'];

$qcust = mysql_query("SELECT * FROM `customer` WHERE `idcust`='$idcust'"); $rcust = mysql_fetch_array($qcust);

echo $rcust['username']; ?>

<input type="hidden" name="idcust" value="<?php echo $_SESSION['idcust']; ?>" /> </td>

</tr> <tr>

<td>judul</td> <td>:</td>

<td><input type="text" name="judul"/></td> </tr>

<tr>

<td>Kategori</td> <td>:</td>

<td>

<select name="idkategori"/> <?php

$q = mysql_query("SELECT * FROM `kategori`"); while($h = mysql_fetch_array($q)){

echo "<option value='$h[idkategori]'>$h[kategori]</option>"; }

?> </select>

(53)

</tr> <tr>

<td>Lokasi</td> <td>:</td>

<td>

<select name="idlokasi"/> <?php

$q = mysql_query("SELECT * FROM `lokasi`"); while($h = mysql_fetch_array($q)){

echo "<option value='$h[idlokasi]'>$h[lokasi]</option>"; }

?> </select>

</td> </tr> <tr>

<td>Tanggal Mulai</td> <td>:</td>

<td><input type="text" maxlength="2" size="2" name="mulaitgl" /> <input type="text" maxlength="2" size="2" name="mulaibln" /> <input type="text" maxlength="4" size="4" name="mulaithn" /></td>

</tr> <tr>

<td>Tanggal Akhir</td> <td>:</td>

<td><input type="text" maxlength="2" size="2" name="akhirtgl" /> <input type="text" maxlength="2" size="2" name="akhirbln" /> <input type="text" maxlength="4" size="4" name="akhirthn" /></td>

</tr> <tr>

<td colspan="3">

(54)

<form name="logout" method="POST" action="logout.php"/> <input name="logout" type="submit" value="logout"/> </form>

</td> </tr> </table> </body> </html>

10. Proses_up.php

<html> <head>

<title>tambah</title>

</head> <body>

<form name = "form kembali ke halaman iklan" method = "POST" action="iklan.php" onsubmit="return kembali ke halaman iklan()">

<?php

include "koneksi.php";

$id_mysql = mysql_connect($server, $username, $password);

$db_promo = mysql_select_db("promo", $id_mysql);

$idcust = $_POST['idcust']; $judul = $_POST['judul']; $isi = $_POST['textareaket'];

$datafile = $_FILES["namafile"]; $namafile = $datafile["name"]; $ukuran = $datafile ["size"];

$file_sementara = $_FILES["namafile"]["tmp_name"];

(55)

$idkategori = $_POST['idkategori']; $idlokasi = $_POST['idlokasi'];

// cek ukuran file gambar if ($ukuran > 100 * 1024)

die("Ukuran file gambar tidak boleh lebih dari 100 KB");

// Copy

if (copy($file_sementara, $_SERVER['DOCUMENT_ROOT'] . "/murahpromo/gambar/$namafile"))

{

print("File $namafile telah berhasil dikirim"); unlink($file_sementara);

$sql = "INSERT INTO iklan1 (idcust, judul, isi, gambar, tanggalmulai, tanggalselesai, idlokasi, idkategori) VALUES ('$idcust','$judul', '$isi', '$namafile', '$tanggalmulai', '$tanggalselesai', '$idlokasi', '$idkategori')";

$hasil = mysql_query($sql); } else

print("GAGAL menyalin $namafile");

mysql_close($id_mysql);

?> <br/>

<input type="submit" value="kembali ke halaman iklan" /> </form>

</body> </html>

11. Logout.php

(56)

session_start(); session_destroy();

header ("Location: login.php?".

"pesan=Silahkan login"); exit();

?>

12. Contact_us.php

<?php

include "koneksi.php"; ?>

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css"> <!--

body {

background-image:url(Proyek/old.jpg); background-color: #630;

margin:0px; padding:0px;

font-family:Verdana, Geneva, sans-serif; }

#apDiv1 {

(57)

top:0px; margin:auto; }

#apDiv2 {

position:absolute; width:1000px; height:41px; z-index:16; left: 30px; top: 170px; }

#apDiv4 {

position:absolute; width:345px; height:124px; z-index:1; left: 128px; top: 166px; }

#apDiv5 {

position:absolute; width:168px; height:118px; z-index:3; left: 57px; top: 251px; }

#apDiv6 {

(58)

}

#apDiv7 {

position:absolute; width:168px; height:118px; z-index:5; left: 581px; top: 251px; }

#apDiv8 {

position:absolute; width:168px; height:118px; z-index:6; left: 839px; top: 251px; }

#apDiv9 {

position:absolute; width:168px; height:118px; z-index:7; left: 892px; top: 252px; }

#apDiv10 {

position:absolute; width:1037px; height:118px; z-index:8; left: 30px; top: 251px; }

(59)

position:absolute; width:444px; height:281px; z-index:7; left: 87px; top: 392px; }

#apDiv12 {

position:absolute; width:448px; height:281px; z-index:8; left: 568px; top: 393px; }

#apDiv13 {

position:absolute; width:350px; height:370px; z-index:1; left: 100px; top: 763px; }

#apDiv14 {

position:absolute; width:635px; height:115px; z-index:9; left: 86px; top: 767px; }

#apDiv15 {

(60)

height:115px; z-index:10; left: 396px; top: 768px; }

#apDiv16 {

position:absolute; width:250px; height:115px; z-index:11; left: 705px; top: 770px; }

#apDiv17 {

position:absolute; width:250px; height:115px; z-index:12; left: 84px; top: 902px; }

#apDiv18 {

position:absolute; width:251px; height:115px; z-index:13; left: 396px; top: 903px; }

#apDiv19 {

(61)

left: 707px; top: 904px; }

#apDiv20 {

position:absolute; width:122px; height:24px; z-index:10; left: 87px; top: 941px; }

#apDiv21 {

position:absolute; width:1000px; height:41px; z-index:16; left: 30px; top: 170px; }

#apDiv22 {

position:absolute; width:1348px; height:115px; z-index:1; left: -680px; top: 785px; }

--> </style>

<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

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

(62)

color: #000; }

ul.menu{

list-style:none; }

ul.menu li{

display:inline-block; padding:10px; width:200px; text-align:center; margin:0px;

background:url(Proyek/backgrounds-images-for-websites-3.jpg); }

ul.menu li a{

text-decoration:none; color:#963;

margin:0px; font-weight:bold; }

ul.menu li a:hover{ color:#960; }

#apDiv32 {position:absolute; width:866px; height:134px; z-index:1; left: 314px; top: 30px; }

#apDiv36 {

(63)

z-index:20; left: 156px; top: 1195px; }

#apDiv33 {

position:absolute; width:39px; height:39px; z-index:18; left: 531px; top: 1215px; }

#apDiv23 { position:absolute; width:36px;

height:41px; z-index:16; left: 532px; top: 1185px; }

#apDiv24 { position:absolute; width:36px;

height:41px; z-index:16; left: 532px; top: 1185px; }

#apDiv3 {

(64)

#apDiv35 {

position:absolute; width:37px; height:37px; z-index:19; left: 706px; top: 1240px; }

--> </style> </head>

<body>

<div style="width:1125px; margin:auto; position:relative">

<div id="apDiv1">

<img src="Proyek/templatemo_footer.jpg" alt="FOOD" width="1348" height="174" align="top" style="position:absolute; z-index:-10" border=1px />

<div id="apDiv32"><img src="Proyek/logo.png" width="676" height="123" /></div> </div>

<div id="apDiv11">

<img src="Proyek/IKLAN.gif" width="444" height="281" alt="iklan" style="border : 5px solid #FC6" /></div>

<div id="apDiv12"><img src="Proyek/IKLAN1.gif" width="448" height="281" alt="iklan1" style="border : 5px solid #FC6" /></div>

<div id="apDiv2"> <label> </label> <center>

<ul class="menu">

<li><a href="index.php">HOME</a></li>

(65)

<li><a href="login.php">LOGIN/REGISTER</a></li> <li><a href="contact_us.php">CONTACT US</a></li> </ul>

</center> </div>

<div id="apDiv5"><a href="index.php?idkategori=1"><img src="Proyek/food2.jpg" width="201" height="125" alt="FOOD" /></div>

<div id="apDiv6"><a href="index.php?idkategori=2"><img src="Proyek/fashion.jpg" width="201" height="125" alt="FASHION" /></a></div>

<div id="apDiv7"><a href="index.php?idkategori=3"><img src="Proyek/electronics1.jpg" width="201" height="125" alt="ELECTRONICS" /></a></div>

<div id="apDiv8"><a href="index.php?idkategori=4"><img src="Proyek/travel1.jpg" width="201" height="125" alt="TRAVEL" /></a></div>

<div id="apDiv11"></div> <div id="apDiv12">

<div id="apDiv22"><img src="Proyek/footer.jpg" width="1348" height="174" alt="PENUTUP" style="border : 1px solid #FC6" /></div>

</div>

<script type="text/javascript"> </script>

</form>

<form name="contact" method="POST" action="proses_feedback.php"> <?php

if(isset($_GET['pesan'])){ echo $_GET['pesan']; }

?>

<div id="apDiv13">CONTACT US<br /><br /> username :

(66)

<input type="text" name="subjek" style="background-color:transparent "/><br /><br/> isi :

<textarea name="textareaket" cols="40" rows="4" style="background-color:transparent "></textarea><br /><br />

<input name="kirim" type="submit" value="kirim" /> </form>

</div>

<div id="apDiv36"><img src="Proyek/Untitled-2.png" width="227" height="123" style="border : 1px solid #333" /></div>

<div id="apDiv33"><a href="http://facebook.com/"><img src="Proyek/icon_fb.jpg" width="37" height="41" /></a></div>

<div id="apDiv3"><a href="http://twitter.com"><img src="Proyek/icon_twitter.jpg" width="36" height="42" /></a></div>

<div id="apDiv35"> <a href="ymsgr:sendim?lunoma_solunita@yahoo.com" border="0"><img src="http://opi.yahoo.com/online?u=lunoma_solunita@yahoo.com&amp;t=9"/></a></div> </body>

</html>

13. Proses_feedback.php

<html> <head>

<title>feedback</title>

</head> <body>

<form name = "form feedback" method = "POST" action="contact_us.php" onsubmit="return cekdata()">

<?php

include "koneksi.php";

$nama = $_POST['nama'];

(67)

if(empty($nama)||empty($subjek)||empty($isi)){

header("location:contact_us.php?pesan=Tidak boleh kosong"); }

$sql = "INSERT INTO feedback "." (nama, subjek, isi) "." VALUES('$nama', '$subjek','$isi')"; $hasil = mysql_query($sql);

if (empty($hasil))

print("gagal menyimpan data username='$nama'"); else

print("Data username='$nama' telah disimpan"); ?>

<br/>

<input type="submit" value="cek" /> </form>

</body> </html>

14. Koneksi.php

<?php

$server = "localhost"; $username = "root"; $password ="root"; $database ="promo";

mysql_connect($server,$username,$password) or die("Koneksi gagal"); mysql_select_db($database) or die("Database tidak bisa dibuka"); ?>

15. Adminlogin.php

(68)

include "koneksi.php"; ?>

<style type="text/css"> <!--

body {

background-image:url(Proyek/old.jpg); background-color: #630;

margin:0px; padding:0px;

font-family:Verdana, Geneva, sans-serif; }

#apDiv3 {position:absolute; width:168px; height:118px; z-index:4; left: 600px; top: 252px; }

--> </style>

<div id="apDiv3">KHUSUS ADMIN LOGIN<br /> <br />

username :

<form id="form1" name="form1" method="post" action="proses_login.php">

<input type="text" name="nama" style="background-color:transparent "/><center><br /></center> password :

<input type="password" name="password" style="background-color:transparent "/><br /><br/> <input type="submit" name="login" value="login"/>

</form> </div>

16. Proses_login.php

(69)

include "koneksi.php"; function anti_injection($data){ $filter =

mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)))); return $filter;

}

$username = anti_injection($_POST['nama']); $pass = anti_injection(($_POST['password']));

// pastikan username dan password merupakan gabungan antara huruf atau angka. if (!ctype_alnum($username) OR !ctype_alnum($pass)){

echo "Maaf anda tidak dapat melakukan injection"; }

else{

$login=mysql_query("SELECT * FROM admin WHERE username ='$username' AND password='$pass'");

$ketemu=mysql_num_rows($login); $r=mysql_fetch_array($login);

// Apabila username dan password telah cocok atau ditemukan if ($ketemu > 0){

session_start();

$_SESSION[namauser] = $r[username]; $_SESSION[password] = $r[password];

mysql_query("UPDATE users SET id_session='$sid_baru' WHERE username='$username'"); header('location:homeadmin.php');

} else{

echo "<link href=../config/adminstyle.css rel=stylesheet type=text/css>"; echo "<center>LOGIN GAGAL! <br>

Username atau Password Anda tidak benar.<br>";

(70)

} ?>

17. Homeadmin.php

<!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"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>

<style type="text/css"> <!--

body {

background-color: #630;

background-image: url(Proyek/old.jpg); }

#apDiv1 {

position:absolute; width:471px; height:440px; z-index:1; left: 412px; top: 83px; }

#apDiv2 {

position:absolute; width:200px; height:55px; z-index:1; left: 134px; top: 150px; }

(71)

position:absolute; width:52px; height:45px; z-index:2; left: 203px; top: 274px; }

#apDiv1 #apDiv2 table tr td a { color: #000;

}

body,td,th {

color: #000; }

#apDiv5 {

position:absolute; width:342px; height:20px; z-index:2; left: 474px; top: 98px; }

-->

</style></head>

<body>

<div id="apDiv1"> <div id="apDiv2">

<table width="200" border="1"> <tr>

</tr> <tr>

<td><a href="media.php">LIHAT DATA USER</a></td> </tr>

(72)

<td><a href="iklanmasuk.php">LIHAT IKLAN MASUK</a></td> </tr>

<tr>

<td><a href="feedback.php">LIHAT FEEDBACK</a></td> </tr>

<tr>

<td><a href="history.php">LIHAT HISTORY</a></td> </tr>

</table> </div>

<div id="apDiv3"> <div id="apDiv4">

<form name="logout" method="POST" action="logoutadmin.php"/> <input name="logout" type="submit" value="logout"/>

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

<div id="apDiv5"> <div align="center"> <p>KHUSUS ADMIN</p> <p>Data Admin</p> </div>

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

18. Logout_admin.php

<?php

session_start(); session_destroy();

(73)

"pesan=Silahkan login"); exit();

?>

19. Media.php

<style type="text/css"> <!--

body {

background-color: #630;

background-image: url(Proyek/old.jpg); }

#apDiv2 {

position:absolute; width:342px; height:20px; z-index:2; left: 500px; top: 20px; color: #000; }

#apDiv6 {

position:absolute; width:200px; height:115px; z-index:4; left: 400px; top: 100px; color: #000; }

body,td,th {

(74)

#apDiv6 {

color: #000; }

--> </style>

<div id="apDiv2"> <div align="center"> <p>KHUSUS ADMIN</p>

<p>Data user yang sudah terdafar</p> </div>

</div>

<div id="apDiv6"> <?php

$server = "localhost"; $user = "root"; $password = "root";

$id_mysql = mysql_connect($server, $user, $password); if (! $id_mysql)

die("Tak dapat melakukan koneksi ke server MySQL");

$db_promo = mysql_select_db("promo", $id_mysql); if (! $db_promo)

die("Tak dapat mengakses database identitas");

// Bagian untuk membaca data

$sql = "SELECT username, password, nama, alamat, telepone, ktp, npwp FROM customer"; $hasil = mysql_query($sql, $id_mysql);

if (! $hasil)

die("Salah SQL");

$nomor = 0;

(75)

print("<tr>\n");

print("<td width=\"10%\">No</td>\n"); print("<td width=\"15%\">Username</td>\n"); print("<td width=\"40%\">Password</td>\n"); print("<td width=\"35%\">Nama</td>\n"); print("<td width=\"35%\">Alamat</td>\n"); print("<td width=\"35%\">Telepone</td>\n"); print("<td width=\"35%\">Ktp</td>\n"); print("<td width=\"35%\">Npwp</td>\n"); print("</tr>\n");

while ($baris = mysql_fetch_row($hasil)) {

$nomor++;

$username = $baris[0]; $password = $baris[1]; $nama = $baris[2];

$alamat = $baris[3]; $telepone = $baris[4]; $ktp = $baris[5]; $npwp = $baris[6];

print("<tr>\n");

print("<td>$nomor</td>\n"); print("<td>$username</td>\n"); print("<td>$password</td>\n"); print("<td>$nama</td>\n"); print("<td>$alamat</td>\n"); print("<td>$telepone</td>\n"); print("<td>$ktp</td>\n"); print("<td>$npwp</td>\n"); }

(76)

?> <tr>

<td colspan="8">

<form name="kembali ke homeadmin" method="POST" action="homeadmin.php"/> <input name="kembali ke homeadmin" type="submit" value="kembali ke homeadmin"/> </form>

</td> </tr> </table> </div>

20. Iklanmasuk.php

<?php

include "koneksi.php";

if(isset($_POST['simpan'])){ $a_idiklan = array(); $a_status = array();

$a_idiklan = $_POST['id']; $a_status = $_POST['status'];

$jumlah = sizeof($a_idiklan);

for($x=1; $x<=$jumlah; $x++){ $idiklan = $a_idiklan[$x]; $status = $a_status[$x];

mysql_query("UPDATE `iklan1` SET `status`='$status' WHERE `idiklan`='$idiklan'");

(77)

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

$idiklan = $_GET['id'];

$q = mysql_query("SELECT * FROM `iklan1` WHERE `idiklan`='$idiklan'"); $r = mysql_fetch_array($q);

$idcust = $r['idcust']; $judul = $r['judul'];

$idlokasi = $r['idlokasi'];

$q1 = mysql_query("SELECT * FROM `lokasi` WHERE `idlokasi`='$idlokasi'"); $r1 = mysql_fetch_array($q1);

$lokasi = $r1['lokasi'];

$idkategori = $r['idkategori'];

$q1 = mysql_query("SELECT * FROM `kategori` WHERE `idkategori`='$idkategori'"); $r1 = mysql_fetch_array($q1);

$kategori = $r1['kategori'];

$isi = $r['isi'];

$gambar = $r['gambar'];

mysql_query("INSERT INTO `history` (`idcust`, `judul`, `lokasi`, `kategori`, `isi`, `gambar`) VALUES ('$idcust', '$judul', '$lokasi', '$kategori', '$isi', '$gambar')");

mysql_query("DELETE FROM `iklan1` WHERE `idiklan`='$idiklan'"); }

?>

<style type="text/css"> <!--

body {

background-color: #630;

background-image: url(Proyek/old.jpg); }

#apDiv2 {

(78)

width:342px; height:20px; z-index:2; left: 500px; top: 30px; }

#apDiv3 {

position:absolute; width:1300px; height:115px; z-index:4; left: 35px; top: 96px; }

body,td,th {

color: #000; }

#apDiv3 {

color: #000; }

--> </style>

<div id="apDiv2"> <div align="center"> <p>KHUSUS ADMIN</p>

<p>Data iklan yang sudah masuk</p> </div>

</div>

<div id="apDiv3">Tampilkan Iklan :

<form action="" method="post" name="form1" id="form1"> <table border="1">

<tr>

(79)

<th>Username</th> <th>Judul</th>

<th>Lokasi</th> <th>Kategori</th> <th>Isi</th> <th>Gambar</th> <th>Tampil</th> <th>Tanggal</th> <th>Hapus</th> </tr>

<?php

$q = mysql_query("SELECT * FROM `iklan1`"); $x = 1;

while($r = mysql_fetch_array($q)){

echo "<input type='hidden' value='$r[idiklan]' name='id[$x]' />"; echo "<tr>";

echo "<td>$r[idcust]</td>"; echo "<td>";

$idcust = $r['idcust'];

$qcust = mysql_query("SELECT * FROM `customer` WHERE `idcust`='$idcust'"); $rcust = mysql_fetch_array($qcust);

echo $rcust['username']; echo "</td>";

echo "<td>$r[judul]</td>";

$idlokasi = $r['idlokasi'];

$q1 = mysql_query("SELECT * FROM `lokasi` WHERE `idlokasi`='$idlokasi'"); $h1 = mysql_fetch_array($q1);

echo "<td>$h1[lokasi]</td>";

$idkategori = $r['idkategori'];

$q1 = mysql_query("SELECT * FROM `kategori` WHERE `idkategori`='$idkategori'");

(80)

echo "<td>$h1[kategori]</td>";

echo "<td>$r[isi]</td>";

echo "<td><img src='gambar/$r[gambar]' width='100' /></td>"; echo "<td>";

if($r['status']==0){

echo "<input type='radio' name='status[$x]' value='1' />Y <input type='radio' name='status[$x]' checked='checked' value='0' />N</td>";

}else{

echo "<input type='radio' name='status[$x]' checked='checked' value='1' />Y <input type='radio' name='status[$x]' value='0' />N</td>";

}

echo "<td>$r[tanggalmulai] - $r[tanggalselesai]</td>";

echo "<td><a href='iklanmasuk.php?id=$r[idiklan]'>Hapus</a></td>"; echo "</tr>";

$x+=1; }

?> <tr>

<td colspan="10">

<input name="simpan" type="submit" value="Simpan" />

<form name="kembali" method="POST" action="homeadmin.php"/> </form>

<form name="kembali" method="POST" action="homeadmin.php"/>

<input name="kembali ke homeadmin" type="submit" value="kembali ke homeadmin" /> </form>

</td>

Gambar

Gambar 1 Diagram Alir Website User Sumber : Pribadi
Gambar 2 Diagram Alir  Sub Menu Home Sumber : Pribadi
Gambar 5 diagram alir keseluruhan  website administrator Sumber : Pribadi
Gambar 6 diagram alir sub menu lihat data user Sumber : Pribadi
+3

Referensi

Dokumen terkait

Berdasarkan kesimpulan, saran yang dapat diajukan dalam meningkatkan loyalitas karyawan pada PTPN IV Medan adalah, untuk pencapaian tujuan perusahaan dimasa

Sehingga solusi pemantauan kadar kekeruhan tersebut dapat menggunakan metode wireless sensor system dimana dapat dilakukan pemantauan pada titik-titik pengukuran tanpa

Purwiyatno Hariyadi hariyadi@seafast.org Wadah Pengisian &amp; Penutupan Sterilisasi (pemanasan) Retort/ pemasak SUSU steril dalam wadah SUSU.. 1840an: Susu dalam kaleng/botol

Sebagai contoh, untuk mendapatkan pemahaman mengenai konsep Fotosintesis dan Respirasi Tumbuhan, siswa dihadapkan pada konsepsi khusus yakni konsepsi mengenai tumbuhan

Salinan dari pernyataan ini sama kuat dan sah seperti aslinya; dan (ii) pihak yang ditunjuk memberikan kuasa yang tidak dapat ditarik kembali dan persetujuan kepada PT AJ

kepuasan pasien terhadap pelayanan makanan RS dapat ditentukan didasarkan pada beberapa indikator yaitu cita rasa makanan, besar porsi, variasi menu, penampilan

Jenis kamar paling mahal dalam suatu hotel, tersedia untuk 2-3 atau lebih penghuni dengan kondisi berisi dua atau tiga kamar lebih dengan ukuran kamar lebih

Infeksi TB menimbulkan respon inflamasi dengan melepaskan sitokin inflamasi dengan mestimulasi terjadinya lipolisis dan proteolisis.(1) Selain dari pengobatan