+ All Categories
Home > Documents > 14.Lampiran Program

14.Lampiran Program

Date post: 16-Nov-2014
Category:
Upload: parwisart
View: 69 times
Download: 0 times
Share this document with a friend
Description:
penulisan ilmiah
92
LAMPIRAN LISTING PROGRAM Halaman Sisi User koneksi .php <?php //koneksi dengan server database mysql mysql_connect("localhost","root",""); //memilih database toko_buku mysql_select_db ("zero_hero"); ?> index.php <HTML> <HEAD> <TITLE \>ZERO_HERO.COM</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <SCRIPT TYPE="text/javascript"> <!-- function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images && (preloadFlag == true)) { L-1
Transcript
Page 1: 14.Lampiran Program

LAMPIRAN

LISTING PROGRAM

Halaman Sisi User

koneksi .php

<?php

//koneksi dengan server database mysql

mysql_connect("localhost","root","");

//memilih database toko_buku

mysql_select_db ("zero_hero");

?>

index.php

<HTML>

<HEAD>

<TITLE \>ZERO_HERO.COM</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html;

charset=iso-8859-1">

<SCRIPT TYPE="text/javascript">

<!--

function newImage(arg) {

if (document.images) {

rslt = new Image();

rslt.src = arg;

return rslt;

}

}

function changeImages() {

if (document.images && (preloadFlag

== true)) {

for (var i=0;

i<changeImages.arguments.length; i+=2) {

document[changeImages.arguments[i]].src =

changeImages.arguments[i+1];

L-1

Page 2: 14.Lampiran Program

}

}

}

var preloadFlag = false;

function preloadImages() {

if (document.images) {

index_01_index_06_over =

newImage("images/index_01-index_06_over.jpg");

index_01_index_05_over =

newImage("images/index_01-index_05_over.jpg");

index_01_index_03_over =

newImage("images/index_01-index_03_over.jpg");

index_01_index_04_over =

newImage("images/index_01-index_04_over.jpg");

index_03_over =

newImage("images/index_03-over.jpg");

index_04_index_03_over =

newImage("images/index_04-index_03_over.jpg");

index_04_over =

newImage("images/index_04-over.jpg");

index_05_over =

newImage("images/index_05-over.jpg");

index_05_index_04_over =

newImage("images/index_05-index_04_over.jpg");

index_06_over =

newImage("images/index_06-over.jpg");

index_06_index_05_over =

newImage("images/index_06-index_05_over.jpg");

index_07_index_06_over =

newImage("images/index_07-index_06_over.jpg");

index_08_index_06_over =

newImage("images/index_08-index_06_over.jpg");

index_09_over =

newImage("images/index_09-over.jpg");

index_11_index_06_over =

newImage("images/index_11-index_06_over.jpg");

L-2

Page 3: 14.Lampiran Program

index_15_index_03_over =

newImage("images/index_15-index_03_over.jpg");

index_16_index_06_over =

newImage("images/index_16-index_06_over.jpg");

index_21_index_03_over =

newImage("images/index_21-index_03_over.jpg");

index_22_index_03_over =

newImage("images/index_22-index_03_over.jpg");

index_22_index_26_over =

newImage("images/index_22-index_26_over.jpg");

index_22_over =

newImage("images/index_22-over.jpg");

index_23_index_03_over =

newImage("images/index_23-index_03_over.jpg");

index_24_index_03_over =

newImage("images/index_24-index_03_over.jpg");

index_24_over =

newImage("images/index_24-over.jpg");

index_25_index_03_over =

newImage("images/index_25-index_03_over.jpg");

index_26_index_03_over =

newImage("images/index_26-index_03_over.jpg");

index_26_over =

newImage("images/index_26-over.jpg");

index_27_index_03_over =

newImage("images/index_27-index_03_over.jpg");

preloadFlag = true;

}

}

// -->

</SCRIPT>

<!-- End Preload Script -->

<style type="text/css">

<!--

#Layer1 {

position:absolute;

left:295px;

top:864px;

L-3

Page 4: 14.Lampiran Program

width:490px;

height:117px;

z-index:1;

}

#Layer2 {

position:absolute;

left:293px;

top:823px;

width:493px;

height:41px;

z-index:2;

}

#Layer3 {

position:absolute;

left:102px;

top:191px;

width:366px;

height:176px;

z-index:3;

}

.style4 {font-family: "Kristen ITC"}

.style7 {font-family: "Kristen ITC"; color: #FF0000; }

-->

</style>

</HEAD>

<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0

MARGINHEIGHT=0 ONLOAD="preloadImages();">

<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/dir

ector/sw.cab#version=8,5,0,0" width="32" height="32"

title="suara">

<param name="src" value="../../../../My Music/J@p@n

An!Me/Kamen Rider/KR 1/01 - Track.MP3">

<embed src="../../../../My Music/J@p@n An!Me/Kamen Rider/KR

1/01 - Track.MP3"

pluginspage="http://www.macromedia.com/shockwave/download/"

width="32" height="32"></embed>

</object>

L-4

Page 5: 14.Lampiran Program

<!-- ImageReady Slices (index.psd) -->

<tr></tr><tr>

<td colspan="6" height="144"><span class="style4"></span>

<TABLE WIDTH=814 BORDER=0 CELLPADDING=0 CELLSPACING=0

align="center">

<TR>

<TD COLSPAN=11>

<IMG NAME="index_01" SRC="images/index_01.jpg"

WIDTH=792 HEIGHT=138 ALT=""></TD>

<TD width="22">

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=138 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2 ROWSPAN=7 align="right" valign="bottom"

background="images/index_02.jpg">&nbsp;</TD>

<TD COLSPAN=2 ROWSPAN=5>

<A HREF="#"

ONMOUSEOVER="changeImages('index_01',

'images/index_01-index_03_over.jpg', 'index_03',

'images/index_03-over.jpg', 'index_04', 'images/index_04-

index_03_over.jpg', 'index_15', 'images/index_15-

index_03_over.jpg', 'index_21', 'images/index_21-

index_03_over.jpg', 'index_22', 'images/index_22-

index_03_over.jpg', 'index_23',

'images/index_23-index_03_over.jpg', 'index_24',

'images/index_24-index_03_over.jpg', 'index_25',

'images/index_25-index_03_over.jpg', 'index_26',

'images/index_26-index_03_over.jpg', 'index_27',

'images/index_27-index_03_over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_01',

'images/index_01.jpg', 'index_03', 'images/index_03.jpg',

'index_04', 'images/index_04.jpg', 'index_15',

'images/index_15.jpg', 'index_21', 'images/index_21.jpg',

'index_22', 'images/index_22.jpg', 'index_23',

'images/index_23.jpg', 'index_24', 'images/index_24.jpg',

'index_25',

L-5

Page 6: 14.Lampiran Program

'images/index_25.jpg', 'index_26', 'images/index_26.jpg',

'index_27', 'images/index_27.jpg'); return true;">

<IMG NAME="index_03"

SRC="images/index_03.jpg" WIDTH=82 HEIGHT=40 BORDER=0

ALT=""></A></TD>

<TD width="88" ROWSPAN=5>

<A HREF="about us.php"

ONMOUSEOVER="changeImages('index_01',

'images/index_01-index_04_over.jpg', 'index_04',

'images/index_04-over.jpg', 'index_05', 'images/index_05-

index_04_over.jpg', 'index_21', 'images/index_21-

index_03_over.jpg', 'index_22', 'images/index_22-

index_03_over.jpg', 'index_23', 'images/index_23-

index_03_over.jpg', 'index_24',

'images/index_24-index_03_over.jpg', 'index_25',

'images/index_25-index_03_over.jpg', 'index_26',

'images/index_26-index_03_over.jpg', 'index_27',

'images/index_27-index_03_over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_01',

'images/index_01.jpg', 'index_04', 'images/index_04.jpg',

'index_05', 'images/index_05.jpg', 'index_21',

'images/index_21.jpg', 'index_22', 'images/index_22.jpg',

'index_23', 'images/index_23.jpg', 'index_24',

'images/index_24.jpg', 'index_25', 'images/index_25.jpg',

'index_26',

'images/index_26.jpg', 'index_27', 'images/index_27.jpg');

return true;">

<IMG NAME="index_04"

SRC="images/index_04.jpg" WIDTH=88 HEIGHT=40 BORDER=0

ALT=""></A></TD>

<TD width="87" ROWSPAN=6>

<A href="login_dulu.php"

ONMOUSEOVER="changeImages('index_01',

'images/index_01-index_05_over.jpg', 'index_05',

'images/index_05-over.jpg', 'index_06', 'images/index_06-

index_05_over.jpg', 'index_21', 'images/index_21-

index_03_over.jpg', 'index_22', 'images/index_22-

L-6

Page 7: 14.Lampiran Program

index_03_over.jpg', 'index_23', 'images/index_23-

index_03_over.jpg', 'index_24',

'images/index_24-index_03_over.jpg', 'index_25',

'images/index_25-index_03_over.jpg', 'index_26',

'images/index_26-index_03_over.jpg', 'index_27',

'images/index_27-index_03_over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_01',

'images/index_01.jpg', 'index_05', 'images/index_05.jpg',

'index_06', 'images/index_06.jpg', 'index_21',

'images/index_21.jpg', 'index_22', 'images/index_22.jpg',

'index_23', 'images/index_23.jpg', 'index_24',

'images/index_24.jpg', 'index_25', 'images/index_25.jpg',

'index_26',

'images/index_26.jpg', 'index_27', 'images/index_27.jpg');

return true;">

<IMG NAME="index_05"

SRC="images/index_05.jpg" WIDTH=87 HEIGHT=42 BORDER=0

ALT=""></A></TD>

<TD width="87" ROWSPAN=6>

<A HREF="contact.php"

ONMOUSEOVER="changeImages('index_01',

'images/index_01-index_06_over.jpg', 'index_06',

'images/index_06-over.jpg', 'index_07', 'images/index_07-

index_06_over.jpg', 'index_08', 'images/index_08-

index_06_over.jpg', 'index_11', 'images/index_11-

index_06_over.jpg', 'index_16', 'images/index_16-

index_06_over.jpg', 'index_21',

'images/index_21-index_03_over.jpg', 'index_22',

'images/index_22-index_03_over.jpg', 'index_23',

'images/index_23-index_03_over.jpg', 'index_24',

'images/index_24-index_03_over.jpg', 'index_25',

'images/index_25-index_03_over.jpg', 'index_26',

'images/index_26-index_03_over.jpg', 'index_27',

'images/index_27-index_03_over.jpg');

return true;"

ONMOUSEOUT="changeImages('index_01',

'images/index_01.jpg', 'index_06', 'images/index_06.jpg',

'index_07', 'images/index_07.jpg', 'index_08',

L-7

Page 8: 14.Lampiran Program

'images/index_08.jpg', 'index_11', 'images/index_11.jpg',

'index_16', 'images/index_16.jpg', 'index_21',

'images/index_21.jpg', 'index_22', 'images/index_22.jpg',

'index_23',

'images/index_23.jpg', 'index_24', 'images/index_24.jpg',

'index_25', 'images/index_25.jpg', 'index_26',

'images/index_26.jpg', 'index_27', 'images/index_27.jpg');

return true;">

<IMG NAME="index_06"

SRC="images/index_06.jpg" WIDTH=87 HEIGHT=42 BORDER=0

ALT=""></A></TD>

<TD COLSPAN=4>

<IMG NAME="index_07"

SRC="images/index_07.jpg" WIDTH=205 HEIGHT=9 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=9 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<IMG NAME="index_08" SRC="images/index_08.jpg"

WIDTH=106 HEIGHT=2 ALT=""></TD>

<TD width="46" ROWSPAN=3>

<A HREF="#"

ONMOUSEOVER="changeImages('index_09',

'images/index_09-over.jpg', 'index_21', 'images/index_21-

index_03_over.jpg', 'index_22', 'images/index_22-

index_03_over.jpg', 'index_23', 'images/index_23-

index_03_over.jpg', 'index_24', 'images/index_24-

index_03_over.jpg', 'index_25', 'images/index_25-

index_03_over.jpg', 'index_26',

'images/index_26-index_03_over.jpg', 'index_27',

'images/index_27-index_03_over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_09',

'images/index_09.jpg', 'index_21', 'images/index_21.jpg',

'index_22', 'images/index_22.jpg', 'index_23',

'images/index_23.jpg', 'index_24', 'images/index_24.jpg',

'index_25', 'images/index_25.jpg', 'index_26',

L-8

Page 9: 14.Lampiran Program

'images/index_26.jpg', 'index_27', 'images/index_27.jpg');

return true;">

<IMG NAME="index_09"

SRC="images/index_09.jpg" WIDTH=46 HEIGHT=27 BORDER=0

ALT=""></A></TD>

<TD width="53" ROWSPAN=18

background="images/index_10.jpg">&nbsp;</TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=2 ALT=""></TD>

</TR>

<TR>

<TD width="21" ROWSPAN=6>

<IMG NAME="index_11" SRC="images/index_11.jpg"

WIDTH=21 HEIGHT=118 ALT=""></TD>

<TD width="85">

<IMG SRC="images/index_12.jpg"

WIDTH=85 HEIGHT=21 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=21 ALT=""></TD>

</TR>

<TR>

<TD ROWSPAN=5>

<IMG SRC="images/index_13.jpg" WIDTH=85 HEIGHT=97

ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=4 ALT=""></TD>

</TR>

<TR>

<TD ROWSPAN=4>

<IMG SRC="images/index_14.jpg" WIDTH=46 HEIGHT=93

ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=4 ALT=""></TD>

</TR>

L-9

Page 10: 14.Lampiran Program

<TR>

<TD COLSPAN=3 ROWSPAN=2

background="images/index_15.jpg">&nbsp;</TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=2 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2 ROWSPAN=2

background="images/index_16.jpg">&nbsp;</TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=35 ALT=""></TD>

</TR>

<TR>

<TD width="48" ROWSPAN=12>

<IMG SRC="images/index_17.jpg" WIDTH=48 HEIGHT=713

ALT=""></TD>

<TD COLSPAN=2 ROWSPAN=2

align="center" background="images/index_18.jpg"></TD>

<TD COLSPAN=2>

<IMG SRC="images/index_19.jpg"

WIDTH=157 HEIGHT=52 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=52 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=7 ROWSPAN=12 align="center" valign="bottom"

background="images/index_20.jpg"><table width="479">

<tr>

<td><span class="style4">

<marquee>

</marquee>

</span> <marquee

truespeed="truespeed">

<div align="center"><blink><? include "wel.html";?

></blink></div>

L-10

Page 11: 14.Lampiran Program

</marquee></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td> </td>

</tr>

<tr>

<td><img src="images/iklan.jpg" width="455"

height="255"></td>

</tr>

<tr>

<td><table width="449">

<tr>

<td width="48">&nbsp;</td>

<td width="156"><div align="center"> <a

href="detail.php"></a> </div></td>

<td width="67">&nbsp;</td>

<td width="160"><div

align="center"></div></td>

</tr>

</table></td>

</tr>

<tr>

<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-

444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=5,0,0,0" width="107" height="18"

title="KATALOG">

<param name="movie" value="button6.swf">

<param name="quality" value="high">

L-11

Page 12: 14.Lampiran Program

<embed src="button6.swf" quality="high"

pluginspage="http://www.macromedia.com/shockwave/download/index

.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-

shockwave-flash" width="107" height="18" ></embed>

</object></td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

</tr>

<tr>

<td><? include "hero.html";?></td>

</tr>

</table></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=85 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<IMG NAME="index_21" SRC="images/index_21.jpg"

WIDTH=208 HEIGHT=14 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=14 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<A href="login_dulu.php"

ONMOUSEOVER="changeImages('index_22',

'images/index_22-over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_22',

'images/index_22.jpg'); return true;">

L-12

Page 13: 14.Lampiran Program

<IMG NAME="index_22" SRC="images/index_22.jpg"

WIDTH=208 HEIGHT=26 BORDER=0 ALT=""></A></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=26 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<IMG NAME="index_23" SRC="images/index_23.jpg"

WIDTH=208 HEIGHT=26 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=26 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<A href="login_dulu.php"

ONMOUSEOVER="changeImages('index_24',

'images/index_24-over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_24',

'images/index_24.jpg'); return true;">

<IMG NAME="index_24" SRC="images/index_24.jpg"

WIDTH=208 HEIGHT=24 BORDER=0 ALT=""></A></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=24 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<IMG NAME="index_25" SRC="images/index_25.jpg"

WIDTH=208 HEIGHT=23 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=23 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<A href="login_dulu.php"

L-13

Page 14: 14.Lampiran Program

ONMOUSEOVER="changeImages('index_22',

'images/index_22-index_26_over.jpg', 'index_26',

'images/index_26-over.jpg'); return true;"

ONMOUSEOUT="changeImages('index_22',

'images/index_22.jpg', 'index_26', 'images/index_26.jpg');

return true;">

<IMG NAME="index_26" SRC="images/index_26.jpg"

WIDTH=208 HEIGHT=27 BORDER=0 ALT=""></A></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=27 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2>

<IMG NAME="index_27" SRC="images/index_27.jpg"

WIDTH=208 HEIGHT=15 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=15 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2 bgcolor="#FF0000"><table width="208"

border="0">

<tr>

<td><div align="center"><img

src="images/button.jpg" width="165" height="25"></div></td>

</tr>

<tr>

<td><div align="center"><? include "login.html";?

></div></td>

</tr>

</table></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=188 ALT=""></TD>

</TR>

<TR>

L-14

Page 15: 14.Lampiran Program

<TD COLSPAN=2 background="images/index_29.jpg"><img

src="images/nnqi53.gif" width="203" height="161"></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=174 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=2

background="images/index_30.jpg"><marquee><? include

"iklan2.php";?></marquee></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=59 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=3 ROWSPAN=2

background="images/index_31.jpg">&nbsp;</TD>

<TD ROWSPAN=2>

<IMG SRC="images/index_32.jpg"

WIDTH=53 HEIGHT=64 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=37 ALT=""></TD>

</TR>

<TR>

<TD COLSPAN=7>

<IMG SRC="images/index_33.jpg" WIDTH=483 HEIGHT=27

ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=1 HEIGHT=27 ALT=""></TD>

</TR>

<TR>

<TD>

<IMG SRC="images/spacer.gif" WIDTH=48 HEIGHT=1

ALT=""></TD>

<TD width="195">

L-15

Page 16: 14.Lampiran Program

<IMG SRC="images/spacer.gif"

WIDTH=195 HEIGHT=1 ALT=""></TD>

<TD width="13">

<IMG SRC="images/spacer.gif"

WIDTH=13 HEIGHT=1 ALT=""></TD>

<TD width="69">

<IMG SRC="images/spacer.gif"

WIDTH=69 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=88 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=87 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=87 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=21 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=85 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=46 HEIGHT=1 ALT=""></TD>

<TD>

<IMG SRC="images/spacer.gif"

WIDTH=53 HEIGHT=1 ALT=""></TD>

<TD></TD>

</TR>

</TABLE>

<!-- End ImageReady Slices -->

</BODY>

</HTML>

L-16

Page 17: 14.Lampiran Program

daftar.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>ZEROHERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

<style type="text/css">

<!--

.style1 {

font-family: Arial, Helvetica, sans-serif;

font-weight: bold;

font-size: 18px;

}

.style7 {font-family: "Kristen ITC"; color: #0000CC; }

.style8 {

color: #FF0000;

font-family: "Kristen ITC";

}

-->

</style>

</head>

<body>

<div align="center">

<p align="center" class="style1">&nbsp;</p>

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

<table width="100" border="0" align="center"

cellspacing="3">

<tr>

<td><div align="left"

class="style7">Username</div></td>

<td><input name="username" type="text"

id="username2"></td>

</tr>

<tr>

<td><span class="style7">Password</span></td>

L-17

Page 18: 14.Lampiran Program

<td><input name="password" type="text"

id="password"></td>

</tr>

<tr>

<td><div align="left" class="style7">Nama</div></td>

<td><input name="nama" type="text" id="nama"></td>

</tr>

<tr>

<td><div align="left" class="style7">Alamat</div></td>

<td><input name="alamat" type="text" id="alamat"></td>

</tr>

<tr>

<td><div align="left" class="style7">Email</div></td>

<td><input name="email" type="text" id="email"></td>

</tr>

<tr>

<td><div align="left" class="style7">No.Telp</div></td>

<td><input name="no_telp" type="text"

id="no_telp"></td>

</tr>

<tr>

<td><div align="left" class="style7">Kota</div></td>

<td><input name="kota" type="text" id="kota"></td>

</tr>

<tr>

<td><input name="daftar" type="submit" id="daftar"

value="Daftar" class="style7"></td>

<td><a href="index.php" class="style8">kembali</a></td>

</tr>

</table>

</form>

<div align="justify"></div>

<p align="justify">&nbsp;</p>

</div>

</body></html>

L-18

Page 19: 14.Lampiran Program

proses-daftar.php

<html>

<head>

<body background="images/backg.JPG">

<div align="center">

<?php

include "koneksi.php";

if (!empty ($username) AND !empty ($password) AND !empty

($nama) AND !empty ($alamat) AND !empty ($email) AND !empty

($no_telp) AND !empty ($kota))

{

$perintah="INSERT INTO

anggota(username,password,level,nama,alamat,email,no_telp,kota)

VALUES

('$username','$password','2','$nama','$alamat','$email','$no_te

lp','$kota')";

$hasil=mysql_query($perintah);

if ($hasil)

{

echo "<script>

alert('Daftar Berhasil');

</script>";

echo("Selamat bergabung,<B> $nama </B><BR>");

echo("Anda telah terdaftar menjadi anggota kami<BR>");

echo("<A HREF=index.php>Login sekarang?</A><br>");

}

else

{

echo "<script>

alert('Daftar Gagal');

parent.location = 'daftar_gagal.php';

</script>";

}

}

else

{

echo "<script>

L-19

Page 20: 14.Lampiran Program

alert('Data Tidak Lengkap ');

parent.location = 'data_gk_lengkap.php';

</script>";

}

?>

</div>

</body>

</head>

</html>

login.html

<HTML>

<link rel="copyright" href="images/images/anbu2.gif">

<BR>

<FORM METHOD=post ACTION='login.php'>

<div align=center><font size=1 face=Arial>USERNAME:

<INPUT NAME=username TYPE=text id="username" size=13 >

<br><br>

PASSWORD: <INPUT NAME=password TYPE=password size=13><br><br>

<INPUT NAME=login TYPE=image VALUE=login

src="images/tombollogin_01-over.gif" size="1">

<!--login dulu doong -->

</font></div>

</FORM>

<div align=center><font size=1 face=Arial>DAFTAR GRATIS,

<a href=daftar.php>KLIK DISINI</a></font></div>

</HTML>

login.php

<?php

include "koneksi.php";

$perintah="SELECT * FROM anggota WHERE username='$username' AND

password='$password'";

$hasil=mysql_query($perintah);

$row=mysql_fetch_array($hasil);

if ($row[username]==$username AND $row[password]=$password)

{

session_start();

session_register("namauser");

L-20

Page 21: 14.Lampiran Program

session_register("passuser");

$namauser=$row[username];

$passuser=$row[password];

if ($row[level]=='1')

{header("location:cms.php");}

else

{echo "<script>

alert('Selamat Datang Di zerohero.com');

parent.location = 'usr_tampil.php';

</script>";}

}else

{

echo "<script>

alert('username atau password yang anda masukan

salah!');

parent.location = 'login_gagal.php';

</script>";

}

?>

logout.html

<HTML>

<HEAD>

<TITLE>ZEROHERO.COM</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html;

charset=iso-8859-1">

</HEAD>

<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0

MARGINHEIGHT=0 ONLOAD="preloadImages();">

<!-- ImageReady Slices (tombollogin.gif) -->

<A href="index.php"

ONMOUSEOVER="changeImages('logout_01', 'images/logout_01-

over.gif'); return true;"

ONMOUSEOUT="changeImages('logout_01',

'images/logout_01.gif'); return true;">

<IMG NAME="logout_01" SRC="images/logout_01.gif" WIDTH=113

HEIGHT=30 BORDER=0 ALT=""></A>

<!-- End ImageReady Slices -->

L-21

Page 22: 14.Lampiran Program

</BODY>

</HTML>

logout.php

<?php

session_start ();

session_destroy ();

header("location:index.php");

?>

detail.php

<?php

include "koneksi.php";

$perintah="SELECT * FROM barang WHERE id_barang=$id";

$hasil=mysql_query($perintah);

$row=mysql_fetch_row($hasil);

do

{

list($id_barang,$nm_barang,$jenis,$nm_gambar,$produksi,

$harga)=$row;

echo("<font size=6><CENTER>$nm_barang</font><HR>");

echo("Produksi:<I> $produksi</I><br> jenis : <I>$jenis</I>");

echo("<img src='images/$nm_gambar' align=left hspace=4

vspace=7>");

}

while($row=mysql_fetch_row($hasil));

?>

lihat_detail.php

<?

if ($back_index != "") {

setcookie("basket", "");

}

?>

<?php include"session.inc.php"; ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>ZEROHERO.COM</title>

L-22

Page 23: 14.Lampiran Program

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

<link rel="shortcut icon" href="logo.ico">

<style type="text/css">

</style>

<script language="JavaScript">

function buka(page) {

w = (screen.width-400) / 2;

h = (screen.height-250) / 2;

args =

"width=400,height=300,left="+w+",top="+h+",scrollbars,resizable

";

browser = window.open(page,"new",args);

browser.focus();

}

</script>

<link href="BT.css" rel="stylesheet" type="text/css">

<link href="BUTTON.css" rel="stylesheet" type="text/css">

</head>

<body>

<?php include"config.inc.php"; ?>

<table width="350">

<tr>

<td width="350" background="images/backg.JPG"

align="center"><p align="center"><br>

<br>

</p>

<table width="350">

<tr>

<td align="center" valign="middle"

class="BUTTON">

<?php include"detail.php"; ?>

</td>

</tr>

<tr>

<td><form action="" method="post" name="form1">

<a href="javascript:buka('buy.php?<?

=$id_barang?>')"> </a>

L-23

Page 24: 14.Lampiran Program

<label> <a href="javascript:buka('buy.php?<?

=$id_barang?>')"> </a></label>

<label>

<div align="center"><a

href="javascript:buka('buy.php?<?=$id_barang?>')"> <img

src="images/beli.gif" alt="beli" width="102" height="53"></a>

</div>

</label>

<br>

<label>

</label>

</form> </td>

</tr>

</table>

<p><br>

<br>

</p>

</td>

</tr>

<tr bgcolor="#336699">

<td height="2">

</table></td>

</body>

</html>

buy.php

<?

$items = explode("&", "$basket");

$tot = count($items) - 1;

setcookie("basket", "$basket$QUERY_STRING&");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>ZERO_HERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

</head>

L-24

Page 25: 14.Lampiran Program

<body>

<p align="center"> <img src="../image/hot.gif" width="250"

height="150" border="1">

</p>

<script language="javascript">

this.close();

opener.history.go(0);

</script>

<form action="shopcart.php" method="get">

<label>

<input type="submit" name="submit" value="lihat keranjang">

</label>

</form>

</body>

</html>

shopcart.php

<? include "session.inc.php";?>

<?

include "koneksi.php";

include "session.inc.php";

setcookie("basket", "$basket");

$items = explode("&", "$basket");

$tot = count($items) - 1;

//remove all

if ($removeall != "")

{

setcookie("basket", "");

header("Location:shopcart.php");

}

//erase item

if ($remove != 0)

{

for ($u=0;$u<$tot;$u++) {

if ($remove != $u+1) {

$newBasket = $newBasket.$items[$u]."&";

}

}

L-25

Page 26: 14.Lampiran Program

setcookie("basket", "$newBasket");

header("Location:shopcart.php");

}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>ZEROHERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

<link rel="shortcut icon" href="logo.ico">

<style type="text/css">

<!--

.style1 {color: #0000FF}

.style4 {color: #FFFF00; font-weight: bold; }

-->

</style>

</head>

<body background="images/backg.bmp">

<p><? include "session.inc.php";?></p>

<p>

<? if ($tot > 0) { ?>

</p>

<form name="form2" method="post" action="">

<div align="left">

<input name="removeall" type="hidden" id="empty"

value="true">

<input name="empty" type="submit" id="empty2" value="Batal

Belanja">

</div>

</form>

<p>

<? } ?>

<br>

<table width="200" border="0">

<tr>

L-26

Page 27: 14.Lampiran Program

<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-

444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=5,0,0,0" width="107" height="18"

title="belanja lagi">

<param name="BGCOLOR" value="#FF0000">

<param name="movie" value="button4.swf">

<param name="quality" value="high">

<embed src="button4.swf" width="107" height="18"

quality="high"

pluginspage="http://www.macromedia.com/shockwave/download/index

.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-

shockwave-flash" bgcolor="#FF0000" ></embed>

</object></td>

</tr>

</table>

</p>

<p align="right">&nbsp;</p>

<p></p>

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

<table width="100%" border="1" cellpadding="4"

cellspacing="0" bordercolor="#E8E8E8">

<tr bgcolor="#FFCCCC">

<td width="26%" bgcolor="#FF0000"><span

class="style4">Nama Barang</span></td>

<td width="23%" bgcolor="#FF0000"><span

class="style4">Harga</span></td>

<td width="7%" align="center" bgcolor="#FF0000"><span

class="style4">Jml</span></td>

<td width="32%" bgcolor="#FF0000"><span

class="style4">SubTotal</span></td>

<td width="12%" bgcolor="#FF0000"><span

class="style4">Remove</span></td>

</tr>

<?

$subtotal = 0;

for ($i=0;$i<$tot;$i++) {

//ambil nama produk dari database

L-27

Page 28: 14.Lampiran Program

$strSQL = "select * from barang

where id_barang='$items[$i]'";

$sqlResult = mysql_query($strSQL);

$row =

mysql_fetch_array($sqlResult);

$num =

mysql_num_rows($sqlResult);

$nm_barang = $row["nm_barang"];

$harga = $row["harga"];

$subtotal += $harga;

?>

<tr>

<td><?=$nm_barang?></td>

<td align="right"> <span class="style1">Rp</span>

<input type="text" name="jumlah<?=$i?>" class="input-

putih" size="15" readonly value="<?echo("$harga")?>">

</td>

<td align="center">

<input type="text" name="kuantity<?=$i?>" value="1"

class="input-putih" size="5" readonly>

</td>

<td align="right"><span class="style1">Rp</span>

<input name="subtotal<?=$i?>" type="text" value="<?

echo("$harga")?>" class="input-putih" size="18"> </td>

<td><a href="shopcart.php?remove=<?=$i+1?>"

class="style1">Hapus</a></td>

</tr>

<? } ?>

<tr>

<td colspan="3"><div align="right"

class="style1">Total</div></td>

<td align="right"><span class="style1">Rp</span>

<input name="totaly" type="text" value="<?

echo("$subtotal")?>" class="input-putih" size="18"> </td>

<td>&nbsp;</td>

</tr>

</table>

<p>

L-28

Page 29: 14.Lampiran Program

<input name="add_customer" type="submit" id="add_customer"

value="Proses">

</p>

</form>

<p><img src="images/maapdech.gif" alt="maap" width="67"

height="67">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="10" height="5">

<param name="movie" value="user_song.swf">

<param name="quality" value="high">

<param name="BGCOLOR" value="#FFFFFF">

<embed src="user_song.swf" width="10" height="5"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>

</object>

</p>

</body>

</html>

thanks.php

<?

include "koneksi.php";

include "session.inc.php";

if (!isset($basket)){

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

setcookie("basket", "$basket");

$items = explode("&", "$basket");

$tot = count($items) - 1;

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>ZEROHERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

L-29

Page 30: 14.Lampiran Program

<link rel="shortcut icon" href="logo.ico">

</head>

<body>

<? include "config.inc.php"; ?>

<br>

<br>

<font size="2" face="arial">Terima kasih atas kepercayaan

anda berbelanja melalui

situs kami.<br>

Data pesanan telah berhasil dikirimkan. Anda segera akan

menerima sebuah telepon mengenai pesanan ini, untuk konfirmasi

barang yang dipesan.</font></p>

<p><font size="2" face="arial">Anda bisa mengandalkan pada

komitmen kami untuk

memberikan perhatian penuh atas semua keperluan dan belanja

Anda.</font></p>

<p>&nbsp; </p>

<hr>

<p><strong><font color="#00CC00" size="6" face=" Comic Sans

MS">Barang Yang Dipesan</font></strong></p>

<table width="100%" border="1" cellpadding="4" cellspacing="0"

bordercolor="#E8E8E8">

<tr bgcolor="#FFCCCC">

<td bgcolor="#FF0000"><strong><font

color="#FFFF00">NamaBarang</font></strong></td>

<td width="25%" bgcolor="#FF0000"><strong><font

color="#FFFF00">Harga</font></strong></td>

<td width="1%" align="center"

bgcolor="#FF0000"><strong><font

color="#FFFF00">Jml</font></strong></td>

<td width="29%" bgcolor="#FF0000"><font

color="#FFFF00"><strong>SubTotal</strong></font></td>

</tr>

<?

$subtotal = 0;

$perintah="SELECT DISTINCT order_id

FROM pembeli";

$hasil=mysql_query($perintah);

L-30

Page 31: 14.Lampiran Program

$hasil2=mysql_num_rows($hasil);

$order_id=$hasil2+1;

$tanggal=date("d M Y");

for ($i=0;$i<$tot;$i++) {

//ambil nama produk dari database

$strSQL = "select * from barang

where id_barang='$items[$i]'";

$sqlResult = mysql_query($strSQL);

$row =

mysql_fetch_array($sqlResult);

$nama = $row["nm_barang"];

$harga = $row["harga"];

$kuanti = "kuantity".$i;

$kuan = $$kuanti;

$subtotal += ($harga * $kuan);

$perintah2="INSERT INTO pembeli

(order_id,username,id_barang,harga,jumlah,tanggal)

VALUES('$order_id','$namauser','$items[$i]','$harga','$kuan','$

tanggal')";

$hasil3=mysql_query($perintah2);

?>

<tr>

<td>

<?=$nama?>

&nbsp;</td>

<td>

<table width="100%" border="0">

<tr>

<td>Rp &nbsp;</td>

<td align="right">

<?echo("$harga")?>

</td>

</tr>

</table></td>

<td align="center"><?=$kuan?>

&nbsp;</td>

<td align="right">

<table width="100%" border="0">

L-31

Page 32: 14.Lampiran Program

<tr>

<td>Rp &nbsp;</td>

<td align="right">

<?echo("$subtotal")?>

</td>

</tr>

</table></td>

</tr>

<? } ?>

<tr>

<td> Biaya Pengiriman (JABOTABEK)&nbsp;</td>

<td>

<table width="100%" border="0">

<tr>

<td>Rp &nbsp;</td>

<td align="right"> 20000 </td>

</tr>

</table></td>

<td align="center">&nbsp;</td>

<td align="right">

<table width="100%" border="0">

<tr>

<td>Rp &nbsp;</td>

<td align="right">

<?$subtotal=$subtotal+20000;

echo("$subtotal");

$perintah3="UPDATE pembeli SET

total_harga='$subtotal' WHERE order_id='$order_id'";

$hasil4=mysql_query($perintah3); ?>

</td>

</tr>

</table></td>

</tr>

<tr bgcolor="#FFCC99">

<td colspan="3" bgcolor="#0000FF">

<div align="right"><strong><font color="#FFFF00">

Total</font></strong></div></td>

<td bgcolor="#0000FF">

L-32

Page 33: 14.Lampiran Program

<table width="100%" border="0">

<tr>

<td><font color="#FFFF00"><strong>Rp</strong>

&nbsp;</font></td>

<td align="right"><strong><font color="#FFFFFF"><?

echo("$subtotal")?></font></strong></td>

</tr>

</table></td>

</tr>

</table>

<p>&nbsp;</p>

<table width="80%" border="1" cellpadding="4" cellspacing="0"

bordercolor="#E8E8E8">

<tr bgcolor="#FFCCFF">

<?php $pembeli="SELECT * FROM anggota WHERE

username='$namauser'";

$hslpembeli=mysql_query($pembeli);

$hsl=mysql_fetch_array($hslpembeli);?>

<td height="23" colspan="2" bgcolor="#FF0000"><font

color="#FFFF00" size="3"><strong>Data

Pembeli</strong></font></td>

</tr>

<tr>

<td width="25%">Nama</td>

<td>

<?=$hsl[nama]?> </td>

</tr>

<tr>

<td>Alamat</td>

<td><textarea name="alamat" id="alamat" readonly><?

=$hsl[alamat]?>

</textarea></td>

</tr>

<tr>

<td>No.telp</td>

<td>

<?=$hsl[no_telp]?> </td>

</tr>

L-33

Page 34: 14.Lampiran Program

<tr>

<td>Kota</td>

<td>

<?=$hsl[kota]?> </td>

</tr>

<tr>

<td>Tanggal</td>

<td><? include "tanggal.php"; ?></td>

</tr>

</table>

<div align="left"><img src="images/maapdech.gif" alt="maap"

width="67" height="67"></div>

<p><a href = 'destcookies.php'>Kembali ke Home</a></p>

</body>

</html>

session.inc.php

<?php

session_start();

if (empty ($namauser) OR empty ($passuser)) {

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

?>

config.inc.php

<?

$dbUser = "root";

$dbPassword = "";

$dbName = "zero_hero";

$hostName = "localhost";

$conn = mysql_connect($hostName, $dbUser, $dbPassword);

mysql_select_db($dbName);

function check_item($basket)

{

$basket = explode("&", $basket);

$tot = count($basket) - 1;

if (($tot < 0) || ($tot == "")) {

echo "<font color='#000066'><b>0

item</b></font>";

} elseif ($tot == 1) {

L-34

Page 35: 14.Lampiran Program

echo "<font color='#000066'><b>$tot

item</b></font>";

} else {

echo "<font color='#000066'><b>$tot

items</b></font>";

}

}

function select_tanggal($tanggal)

{

echo "<select name='tanggal' id='tanggal'

class='box'>";

$now = date("d");

for ($i=1;$i<32;$i++) {

echo "<option value='$i'";

if (($i==$tanggal) && ($tanggal!=="")){

echo " selected";

} elseif (($i==$now) && ($tanggal=="")) {

echo " selected";

}

echo ">$i</option>";

}

echo "</select>";

}

function select_bulan($bulan)

{

echo "<select name='bulan' id='bulan' class='box'>";

$bulan1 = array("januari", "februari", "maret",

"april",

"mei", "juni", "juli",

"agustus",

"september", "oktober",

"november", "desember");

$bulan2 = array("01","02", "03", "04", "05", "06",

"07", "08", "09", "10", "11",

"12");

$now = date("m");

for ($i=0;$i<12;$i++) {

echo "<option value='$bulan2[$i]'";

L-35

Page 36: 14.Lampiran Program

if (($bulan2[$i]==$bulan) && ($bulan!=="")){

echo " selected";

} elseif (($bulan2[$i]==$now) && ($bulan=="")) {

echo " selected";

}

echo ">$bulan1[$i]</option>";

}

echo "</select>";

}

function select_tahun($tahun)

{

echo "<select name='tahun' id='tahun' class='box'>";

$now = date("Y");

for ($i=1995;$i<2020;$i++) {

echo "<option value='$i'";

if (($i==$tahun) && ($tahun!=="")){

echo " selected";

} elseif (($i==$now) && ($tahun=="")) {

echo " selected";

}

echo ">$i</option>";

}

echo "</select>";

}

function text_bulan($bulan)

{

$bulan1 = array("januari", "februari", "maret",

"april", "mei", "juni", "juli", "agustus","september",

"oktober", "november", "desember");

$bulan2 = array("01","02", "03", "04", "05", "06", "07","08",

"09", "10", "11", "12");

$now = date("m");

for ($i=0;$i<12;$i++) {

if (($bulan2[$i]==$bulan) && ($bulan!=="")){

echo "$bulan1[$i]";

} elseif (($bulan2[$i]==$now) && ($bulan=="")) {

echo "$bulan1[$i]";

}

L-36

Page 37: 14.Lampiran Program

}

}

function select_tahun2($tahun2)

{

echo "<select name='tahun2' id='tahun2'>";

$now = date("Y");

for ($i=1995;$i<2020;$i++) {

echo "<option value='$i'";

if ($i==$tahun2) {

echo " selected";

} elseif ($i==$now) {

echo " selected";

}

echo ">$i</option>";

}

echo "</select>";

}

function error()

{

echo "<center>

<table width='60%' height='350' border='1'

align='center' bgcolor='#CCFF99'>

<tr>

<td align='center'

valign='middle'><font color='#FF0000'>Data Tidak

Ditemukan!!</font>

<p></p>

<form action='admin_page.php'

method='post' name='back'>

<input name='back'

type='submit' value='Back'>

</form>

</td>

</tr>

</table>

</center>";

}

?>

L-37

Page 38: 14.Lampiran Program

kalendar.php

<?

// CALENDAR MARKING STYLE

// Setting '$calstyle' to 1 will mark calendar dates using

table background colors

// [Style 1 is default in any version before 2.0]

// Setting this to 2 will mark calendar dates using graphics

for background colors

// If using Style 2, all 'stat' graphics should be in the same

directory as this script

// You can edit the 'stat' graphics to meet your needs

if (!$calstyle) $calstyle = "1";

// CELL BACKGROUND COLORS

// Edit these colors to suit your needs [for Calendar Style 1]

$abc="ff9900"; // MARKED BACKGROUND COLOR

$tbc="ff9900"; // TODAY'S BACKGROUND COLOR

// DAY NAMES

// Edit the calendar day name column headers below

$day[0]="Su";

$day[1]="Mo";

$day[2]="Tu";

$day[3]="We";

$day[4]="Th";

$day[5]="Fr";

$day[6]="Sa";

// MONTH NAMES

// Edit the calendar month names below

$mth[1]="January";

$mth[2]="February";

$mth[3]="March";

$mth[4]="April";

$mth[5]="May";

$mth[6]="June";

$mth[7]="July";

$mth[8]="August";

$mth[9]="September";

$mth[10]="October";

L-38

Page 39: 14.Lampiran Program

$mth[11]="November";

$mth[12]="December";

// ON WHAT DAY DOES THE WEEK START?

// 0=Sunday; 1=Monday; 2=Tuesday; 3=Wednesday; 4=Thursday;

5=Friday; 6=Saturday

// This option can be set here or overridden by the command-

line option 'daystart='

if (!$daystart) $daystart=0;

// PRINT YEAR?

// Changing 0 to 1 will not display the year number after the

month name

// This option can be set here or overridden by the command-

line option 'ny='

if (!$ny) $ny=0;

// MARK TODAY?

// Changing 0 to 1 will not mark today's date

// This option can be set here or overridden by the command-

line option 'nt='

if (!$nt) $nt=0;

// HOURS TO OFFSET TIME +/-

// To add hours, enter a positive value. To substract hours,

enter a "-" negative value

// This option can be set here or overridden by the command-

line option 'ctime='

if (!$ctime) $ctime = "-0";

// CALENDAR WIDTH AND HEIGHT

// Set $tw to the width of the calendar table

// Set $ch to the height of the table cells for dates

// These options can be set here or overridden by the command-

line options 'tw=' and 'ch='

if (!$tw) $tw="170"; // Table Width

if (!$ch) $ch="0"; // Cell Height

// DATE NUMBER ALIGNMENT

// Set $algn to 0 [defult] to align the dates to the middle and

center of table cells.

// Set $algn to 1 to align the dates to the upper-right corner

of table cells.

L-39

Page 40: 14.Lampiran Program

// This option can be set here or overridden by the command-

line option 'algn='

if (!$algn) $algn="0";

// FONT SIZES AND WEIGHT

// These options can be set in the script or overridden by

command-line options of

// the same named variables. The sizes are in pixels.

if (!$fsm) $fsm="18"; // FONT SIZE MONTH

if (!$fsd) $fsd="9"; // FONT SIZE DAY NAMES

if (!$fsn) $fsn="11"; // FONT SIZE NUMBERS

if (!$fwm) $fwm="bold"; else $fwm="normal"; // FONT WEIGHT

MONTH

if (!$fwd) $fwd="normal"; else $fwd="bold"; // FONT WEIGHT DAY

NAMES

if (!$fwn) $fwn="normal"; else $fwn="bold"; // FONT WEIGHT

NUMBERS

// ONLY EDIT THE STYLE SHEET BELOW IF YOU WANT TO CHANGE THE

FONT FACE AND/OR COLOR

?>

<style TYPE="text/css">

<!--

.monthyear { font-family: Verdana, Arial, Helvetica, sans-

serif; font-size: <?echo$fsm?>px; font-weight: <?echo$fwm?>;

color: #0000fe}

.daynames { font-family: Arial, Helvetica, sans-serif; font-

size: <?echo$fsd?>px; font-weight: <?echo$fwd?>; color:

#0000ff}

.dates { font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: <?echo$fsn?>px; font-weight: <?echo$fwn?>; color:

#ff0000}

-->

</style>

<?

// CALCULATE COLUMN WIDTHS

$cw=$tw/7;

// DETERMINE AND SET DATE NUMBER CELL ALIGNMENT

if ($algn==0) $algn="align='center' valign='middle'";

else $algn="align='right' valign='top'";

L-40

Page 41: 14.Lampiran Program

// DETERMINE TODAYS DAY NUMBER

$ctime = $ctime*3600;

$tmo = date("m", time()+$ctime);

$tda = date("j", time()+$ctime);

$tyr = date("Y", time()+$ctime);

$tnum = (intval((date ("U",

mktime(20,0,0,$tmo,$tda,$tyr))/86400)))-$daystart; // TODAY'S

DAY NUMBER

// CHECK FOR COMMAND LINE DATE VARIABLES

if (!$mo) $mo=$tmo;

if (!$yr) $yr=$tyr;

$daycount = (intval((date ("U",

mktime(20,0,0,$mo,1,$yr))/86400)))-$daystart; // FIRST OF MONTH

DAY NUMBER

$mo=intval($mo);

$mn = $mth[$mo]; // SET MONTH NAME

if ($ny!=1) {$mn = $mn." ".$yr;} // ADD YEAR TO MONTH NAME?

// ON WHAT DAY DOES THE FIRST FALL

$sd = date ("w", mktime(0,0,0,$mo,1-$daystart,$yr));

$cd = 1-$sd;

// NUMBER OF DAYS IN MONTH

$nd = mktime (0,0,0,$mo+1,0,$yr);

$nd = (strftime ("%d",$nd))+1;

if ($mrks) {

$mrks = explode ("x",$mrks);

$smc = count ($mrks);

$mrke = explode ("x",$mrke);

$emc = count ($mrke);

if ($smc==1) {

$mrks[1]="3000-01-01";

$mrke[1]="3000-01-01";

}

}

$i=0;

while ($i < $smc) {

$rks[$i] = ereg_replace('-','/', $mrks[$i]);

$mrke[$i] = ereg_replace('-','/', $mrke[$i]);

$start = intval(strtotime ($mrks[$i])/86400)+1;

L-41

Page 42: 14.Lampiran Program

$end = intval(strtotime ($mrke[$i])/86400)+1;

if (!$mrke[$i]) $end=$start; // MARK SINGLE DAY WITH ONLY MRKS

VARIABLE

if (!$bgc[$start]) {$bgc[$start]=1;} else {$bgc[$start]=4;}

$bgc[$end]=3;

for ($n = ($start+1); $n < $end; $n++) {

$bgc[$n] = 2;}

$i++;

}

?>

<table WIDTH="<?echo$tw?>" BORDER="0" CELLSPACING="0"

CELLPADDING="2">

<tr>

<td CLASS="monthyear">

<div ALIGN="center">

<?echo "$mn";?>

</div>

</td>

</tr>

</table>

<table WIDTH= BORDER="0" CELLSPACING="2" CELLPADDING="1"

CLASS="daynames">

<tr ALIGN="center">

<?

for ($I=0;$I<7;$I++) {

$dayprint=$daystart+$I;

if ($dayprint>6) $dayprint=$dayprint-7;

echo"<td WIDTH=$cw>$day[$dayprint]</td>";

}

?>

</tr>

<?

// PRINT CALENDAR USING TABLE BACKGROUND COLORS [CALENDAR STYLE

1]

if ($calstyle==1) {

for ($i = 1; $i<7; $i++) {

if ($cd>$nd) break;

?>

L-42

Page 43: 14.Lampiran Program

<tr <?echo$algn?> CLASS="dates" height=<?echo$ch?>>

<?

for ($prow = 1; $prow<8; $prow++) {

if ($daycount==$tnum && $nt!="1" && $cd>0) {echo "<td width=$cw

bgcolor=$tbc>$cd</td>";$daycount++;$cd++;}

else { ?>

<td width="<?echo$cw?>"<?if ($cd>0 && $cd<$nd) {echo "

bgcolor=";if ($bgc[$daycount]) {echo $abc;} else {echo $nbc;}

echo ">$cd";$daycount++;} else {echo ">";} $cd++;?></td>

<? }} ?>

</tr>

<?

}

} // END [CALENDAR STYLE 1]

// PRINT CALENDAR USING GRAPHICS BACKGROUNDS [CALENDAR STYLE 2]

if ($calstyle==2) {

for ($i = 1; $i<7; $i++) {

if ($cd>$nd) break;

?>

<tr <?echo$algn?> CLASS="dates" height=<?echo$ch?>>

<?

for ($prow = 1; $prow<8; $prow++) {

if ($daycount==$tnum && $nt!="1" && $cd>0) {echo "<td

width=\"25\" background='stath$bgc[$daycount].gif'>$cd</td>";

$daycount++;$cd++;}

else { ?>

<td width="25"<?if ($cd>0 && $cd<$nd) {echo "

background='stat$bgc[$daycount].gif'>$cd";$daycount++;} else

{echo ">";} $cd++;?></td>

<? }} ?>

</tr>

<?

}

} // END [CALENDAR STYLE 2]

?></table>

tanggal.php

<?

L-43

Page 44: 14.Lampiran Program

$range=date("z");

echo(date("H:i "));

echo("<br>\n");

echo(date("l,d F Y"));

echo("<br>\n");

?>

cari.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>ZERO_HERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

<link rel="shortcut icon" href="logo.ico">

</head>

<body bgcolor="#000000">

<div align="center">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="997" height="168">

<param name="movie" value="images/banner.swf">

<param name="quality" value="high"><param name="BGCOLOR"

value="#000000">

<embed src="images/banner.swf" width="997" height="168"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object></div>

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

<p align="center"><font color="#000000" size="1"

face="Arial"></font></strong></font><font color="#000000"

face="Arial"><br>

<input name="kunci" type="text" id="kunci">

<br>

<br>

<input name="cari" type="image" id="cari" value="cari"

src="images/cari.gif" width="100" height="50">

L-44

Page 45: 14.Lampiran Program

</font> </p>

</form>

<table width="983">

<tr>

<td width="975"><div align="center">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-

444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=5,0,0,0" width="113" height="24">

<param name="movie" value="button11.swf">

<param name="quality" value="high">

<param name="BGCOLOR" value="#000000">

<embed src="button11.swf" width="113" height="24"

quality="high"

pluginspage="http://www.macromedia.com/shockwave/download/index

.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-

shockwave-flash" bgcolor="#000000" ></embed>

</object>

</div></td>

</tr>

</table>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="10" height="5">

<param name="movie" value="user_song.swf">

<param name="quality" value="high"><param name="BGCOLOR"

value="#000000">

<embed src="user_song.swf" width="10" height="5"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

</body></html>

cari1.php

L-45

Page 46: 14.Lampiran Program

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>ZERO_HERO.COM</title>

<meta http-equiv="Content-Type" content="text/html;

charset=iso-8859-1">

<link rel="shortcut icon" href="logo.ico">

<style type="text/css">

<!--

.style1 {

color: #FFFFFF;

font-family: Arial, Helvetica, sans-serif;

font-size: 12px;

font-weight: bold;

}

.style2 {

color: #FFFFFF;

font-weight: bold;

font-family: Alba;

}

-->

</style></head>

<body bgcolor="#000000">

<table width="608" border="2" align="center" bgcolor="#0000CC"

>

<tr>

<td width="792"><table width="600" border="0"

cellpadding="0" cellspacing="0">

<tr>

<td width="600"><img src="images/index_01.jpg"

alt="BANNER" width="620" height="138"></td>

</tr>

<tr>

<td bgcolor="#000000"><span class="style1"><marquee>

</marquee></span></td>

</tr>

<tr>

L-46

Page 47: 14.Lampiran Program

<td>

<div align="center">

<table width="619" bgcolor="#0033CC">

<tr>

<td>&nbsp;</td>

</tr>

</table>

<table width="619" height="24" bgcolor="#FF0000">

<tr>

<td width="461">

<div align="center">

<?php include"cari.php"; ?>

</div>

</tr>

</table>

</div>

<form action="" method="post" name="form1">

<br>

<label>

<input name="button" type="button"

onClick="window.history.back()" value="kembali">

</label>

</form> </td>

</tr>

<tr bgcolor="#336699">

<td bgcolor="#FF0000"><div align="center"><span

class="style2">Copyright &copy; 2009 ZERO_HERO.COM . All rights

reserved </span></div></td>

</tr>

</table></td>

</tr>

</table>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="461" height="8">

<param name="movie" value="cari.1.swf">

<param name="quality" value="high"><param name="BGCOLOR"

value="#000000">

L-47

Page 48: 14.Lampiran Program

<embed src="cari.1.swf" width="461" height="8" quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

</body>

</html>

1.2 SISI ADMIN

cms.php

<html>

<head>

<link href="SA.css" rel="stylesheet" type="text/css">

<body background="images/backg.JPG" >

<p align="center" class="okey">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="997" height="168">

<param name="movie" value="images/banner.swf">

<param name="quality" value="high">

<param name="BGCOLOR" value="#000000">

<embed src="images/banner.swf" width="997" height="168"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

<br><br>

<?php

session_start();

include"koneksi.php";

if (!empty ($namauser) AND !empty ($passuser))

{

echo("<FONT face=Alba size=8>");

echo("<TABLE><TR><TD COLSPAN=2 ALIGN=center></TD></TR>");

echo("<TR ALIGN=CENTER VALIGN=TOP><TD width=200 HEIGHT=400>");

echo(" <BR><BR><BR><BR>");

echo("<A HREF=cms.php><img

src='images/homeadmin.gif'width='143' height='42'>");

L-48

Page 49: 14.Lampiran Program

echo("<A HREF=data-barang.php><img src='images/data

admin.gif'width='143' height='42'></A>");

echo("<A HREF=anggota.php><img

src='images/anggotaadmin.gif'width='143' height='42'></A> ");

echo("<BR><A HREF=data-pembelian.php><img

src='images/pembelian.gif'width='143' height='42'></A>");

echo("<A HREF=logout.php><img

src='images/logoutadmin.gif'width='143'

height='42'></A></TD>");

echo("<TD width=600 HEIGHT=400><BR><BR>");

echo("<FONT face= Vassallo size=6 >Selamat Datang

Administrator!!</TD>");

echo("</TR></TABLE>");

}

else

{

echo("Maaf, Untuk mengakses halaman ini ");

echo("Anda harus login terlebih dahulu<BR><BR><HR>");

echo("<A HREF='index.php'>Login</A>");

}

?>

</p>

</body>

</head>

</html>

anggota.php

<html>

<head>

<link href="ok.css" rel="stylesheet" type="text/css" />

<body background="images/backg.JPG">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="997" height="168">

<param name="movie" value="images/banner.swf">

<param name="quality" value="high">

<param name="BGCOLOR" value="#000000">

L-49

Page 50: 14.Lampiran Program

<embed src="images/banner.swf" width="997" height="168"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

<?php

include "koneksi.php";

$perintah="SELECT * FROM anggota order by level";

$hasil=mysql_query($perintah);

session_start();

if (!empty ($namauser) AND !empty ($passuser))

{

echo("<FONT face= Courier =4>");

echo("<TABLE border=3><TR><TD COLSPAN=2 ALIGN=center>Master

Anggota</TD></TR>");

echo("<TR ALIGN=CENTER VALIGN=TOP><TD width=70 HEIGHT=400>");

echo(" <BR><BR><BR><BR>");

echo("<A HREF=cms.php><img

src='images/homeadmin.gif'width='143' height='42'></A>");

echo("<A HREF=data-barang.php><img src='images/data

admin.gif'width='143' height='42'></A>");

echo("<A HREF=anggota.php><img

src='images/anggotaadmin.gif'width='143' height='42'>");

echo("<B><A HREF=data-pembelian.php><img

src='images/pembelian.gif'width='143' height='42'></A>");

echo("<A HREF=logout.php><img

src='images/logoutadmin.gif'width='143'

height='42'></A></B></TD>");

echo("<TD width=800 HEIGHT=400>");

echo("<FONT face=Vampire size=6>");

echo("<p align = 'left'><font size = '2'><A HREF=tambah-

anggota.php>Tambah Data</A></font></p>");

echo("<TABLE BORDER=1>");

echo("<TR><TH>Username</TH><TH>Nama

Lengkap</TH><TH>Password</TH><TH>Status</TH><TH>Alamat</TH><TH>

email</TH><TH>No_telp</TH><TH>kota</TH></TR>");

while($row=mysql_fetch_array($hasil))

{

L-50

Page 51: 14.Lampiran Program

echo("<TR><TD>$row[username]</TD>");

echo("<TD>$row[nama]</TD>");

echo("<TD>$row[password]</TD>");

if ($row[level]=='1')

{echo("<TD>Administrator</TD>");}

else

{echo("<TD>User</TD>");}

echo("<TD>$row[alamat]</TD>");

echo("<TD>$row[email]</TD>");

echo("<TD>$row[no_telp]</TD>");

echo("<TD>$row[kota]</TD>");

echo("<TD><A

HREF='editanggota.php?id=$row[username]'>Edit</A></TD>");

echo("<TD><A HREF='hapusanggota.php?

user=$row[username]'>Hapus</A></TD></TR>");

}

echo("</TABLE>");

echo("</TD></TR></TABLE>");

}

else

{

echo("Maaf, Untuk mengakses halaman ini ");

echo("anda harus login terlebih dahulu<BR><BR><HR>");

echo("<A HREF='index.php'>Login</A>");

}

?>

</body>

</head>

</html>

tambah-anggota.php

<?php

session_start();

include "koneksi.php";

$perintah="SELECT * FROM anggota where username='$username'";

$hasil=mysql_query($perintah);

$row=mysql_fetch_array($hasil);

if (!empty ($namauser) AND !empty ($passuser))

L-51

Page 52: 14.Lampiran Program

{

echo("<FONT face=Verdana size=4>");

echo("<TABLE border=3><TR><TD COLSPAN=2 ALIGN=center>Edit

Anggota</TD></TR>");

echo("<TR ALIGN=CENTER VALIGN=TOP><TD width=200 HEIGHT=400>");

echo(" <BR><BR><BR><BR>");

echo("<A HREF=cms.php><B>Home</A><BR><BR>");

echo("<A HREF=data-barang.php>Data Barang</A>");

echo("<BR><BR>Anggota<BR><BR>");

echo("<A HREF=logout.php>Logout</A></B></TD>");

echo("<TD width=600 HEIGHT=400><BR><BR>");

echo("<FONT face=courier new size=6>");

echo("<FORM METHOD=POST ACTION=daftar_anggota.php>");

echo("<TABLE><TR><TD>Username</TD>");

echo("<TD><INPUT TYPE=text NAME=username></TD></TR>");

echo("<TR><TD>Password</TD>");

echo("<TD><INPUT TYPE=text NAME=password></TD></TR>");

echo("<TR><TD>Nama Lengkap</TD>");

echo("<TD><INPUT TYPE=text NAME=nama></TD></TR>");

echo("<TR><TD>Alamat</TD>");

echo("<TD><INPUT TYPE=text NAME=alamat></TD></TR>");

echo("<TR><TD>Email</TD>");

echo("<TD><INPUT TYPE=text NAME=email></TD></TR>");

echo("<TR><TD>No.Telp</TD>");

echo("<TD><INPUT TYPE=text NAME=no_telp></TD></TR>");

echo("<TR><TD>Kota</TD>");

echo("<TD><INPUT TYPE=text NAME=kota></TD></TR>");

echo("<TD></TD>");

echo("<TD ALIGN=RIGHT><INPUT TYPE=submit NAME=ok

VALUE=OK></TD></TR>");

echo("<TD></TD>");

echo("<TD ALIGN=RIGHT><A

HREF=anggota.php>Batal</A></TD></TR>");

echo("</TABLE>");

echo("</TD></TR></TABLE>");

}

else

{

L-52

Page 53: 14.Lampiran Program

echo("Maaf, Untuk mengakses halaman ini ");

echo("anda harus login terlebih dahulu<BR><BR><HR>");

echo("<A HREF='index.php'>Login</A>");

}

?>

daftar_anggota.php

<html>

<head>

<body background="images/backg.JPG">

<div align="center">

<?php

include "koneksi.php";

if (!empty ($username) AND !empty ($password) AND !empty

($nama) AND !empty ($alamat) AND !empty ($email) AND !empty

($no_telp) AND !empty ($kota))

{

$perintah="INSERT INTO

anggota(username,password,level,nama,alamat,email,no_telp,kota)

VALUES

('$username','$password','2','$nama','$alamat','$email','$no_te

lp','$kota')";

$hasil=mysql_query($perintah);

if ($hasil)

{

echo "<script>

alert('Data berhasil ditambahkan');

parent.location = 'anggota.php';

</script>";

}

else

{

header("location:tambah-anggota.php");

}

}

else

{

L-53

Page 54: 14.Lampiran Program

echo "<script>

alert('data tidak lengkap');

parent.location = 'tambah-anggota.php';

</script>";

}

?>

</div>

</body>

</head>

</html>

update-anggota.php

<?php

include "koneksi.php";

$perintah="UPDATE anggota SET nama

='$nama',password='$password',level='$level',alamat

='$alamat',email='$email',no_telp='$no_telp',kota = '$kota'

WHERE username='$username'";

$hasil=mysql_query($perintah);

if ($hasil)

{

header("location:anggota.php");

}

else

{

echo("Proses Edit Gagal!!<BR>");

echo("<A HREF=anggota.php>Kembali</A>");

}

?>

hapusanggota.php

<?php

include "koneksi.php";

$perintah="DELETE FROM anggota WHERE username='$user'";

mysql_query($perintah);

header("location:anggota.php");

?>

editanggota.php

<html>

L-54

Page 55: 14.Lampiran Program

<head>

<link href="sa.css" rel="stylesheet" type="text/css">

<body background="images/backg.JPG">

<div align="center" class="sa">

<?php

session_start();

include "koneksi.php";

$perintah="SELECT * FROM anggota where username='$id'";

$hasil=mysql_query($perintah);

$row=mysql_fetch_array($hasil);

if (!empty ($namauser) AND !empty ($passuser))

{

echo("<FONT face=Vassallo size=4>");

echo("<TABLE border=3><TR><TD COLSPAN=2 ALIGN=center>Edit

Anggota</TD></TR>");

echo("<TR ALIGN=CENTER VALIGN=TOP><TD width=200 HEIGHT=400>");

echo(" <BR><BR><BR><BR>");

echo("<A HREF=cms.php><B>Home</A><BR><BR>");

echo("<A HREF=data-barang.php>Data Barang</A>");

echo("<BR><BR>Anggota<BR><BR>");

echo("<A HREF=logout.php>Logout</A></B></TD>");

echo("<TD width=600 HEIGHT=400><BR><BR>");

echo("<FONT face=courier new size=6>");

echo("<FORM METHOD=POST ACTION=updateanggota.php>");

echo("<TABLE><TR><TD>Username</TD>");

echo("<TD><INPUT TYPE=text NAME=username

VALUE='$row[username]'></TD></TR>");

echo("<TR><TD>Nama Lengkap</TD>");

echo("<TD><INPUT TYPE=text NAME=nama

VALUE='$row[nama]'></TD></TR>");

echo("<TR><TD>Password</TD>");

echo("<TD><INPUT TYPE=text NAME=password

VALUE='$row[password]'></TD></TR>");

echo("<TR><TD>Level</TD>");

echo("<TD><INPUT TYPE=text NAME=level

VALUE='$row[level]'></TD></TR>");

echo("<TR><TD>Alamat</TD>");

L-55

Page 56: 14.Lampiran Program

echo("<TD><INPUT TYPE=text NAME=alamat

VALUE='$row[alamat]'></TD></TR>");

echo("<TR><TD>email</TD>");

echo("<TD><INPUT TYPE=text NAME=email

VALUE='$row[email]'></TD></TR>");

echo("<TR><TD>No_Telp</TD>");

echo("<TD><INPUT TYPE=text NAME=no_telp

VALUE='$row[no_telp]'></TD></TR>");

echo("<TR><TD>kota</TD>");

echo("<TD><INPUT TYPE=text NAME=kota

VALUE='$row[kota]'></TD></TR>");

echo("<TD></TD>");

echo("<TD ALIGN=RIGHT><INPUT TYPE=submit NAME=ok

VALUE=OK></TD></TR>");

echo("<TD></TD>");

echo("<TD ALIGN=RIGHT><A

HREF=anggota.php>Batal</A></TD></TR>");

echo("</TABLE>");

echo("</TD></TR></TABLE>");

}

else

{

echo("Maaf, Untuk mengakses halaman ini ");

echo("anda harus login terlebih dahulu<BR><BR><HR>");

echo("<A HREF='index.php'>Login</A>");

}

?>

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

data-barang.php

<html>

<head>

<body background="images/backg.JPG">

<?php

session_start();

include "koneksi.php";

if (empty ($namauser) OR empty ($passuser)) {

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

L-56

Page 57: 14.Lampiran Program

?>

<html>

<head>

<title></title>

<body i>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="997" height="168">

<param name="movie" value="images/banner.swf">

<param name="quality" value="high">

<param name="BGCOLOR" value="#000000">

<embed src="images/banner.swf" width="997" height="168"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

<center> <h2 align="center" class="style4">Pengelolaan

ZEROHERO.COM</h2>

</center>

<hr align="center">

<table width="960">

<tr>

<td width="952"><div align="center"><a href="cms.php"><img

src="images/homeadmin.gif" width="143" height="42"

border="0"></a><a href="data-barang.php"><img src="images/data

admin.gif"width="143" height="42" border="0"></a><a

href="anggota.php"><img src="images/anggotaadmin.gif"

width="149" height="42" border="0"></a><a href="data-

pembelian.php"><img src="images/pembelian.gif"width="143"

height="42" border="0"></a><img

src="images/logoutadmin.gif"width="143" height="42"

border="0"></div></td>

</tr>

</table>

<div align="center"><a href='kelola-barang.php?aksi=Tambah'

class="ex">Tambah Data</a>

L-57

Page 58: 14.Lampiran Program

<table width="485" border = 1 bordercolor="#FF0000"

class="style10">

<tr>

<th width="106" bgcolor="#FFFFFF" class="style4"><span

class="style15">NAMA BARANG </span></th>

<th width="51" bgcolor="#FFFFFF"

class="style13">JENIS</th>

<th width="106" bgcolor="#FFFFFF" class="style4 style12

style16">NAMA GAMBAR </th>

<th width="123" bgcolor="#FFFFFF" class="style4 style12

style16">PRODUKSI</th>

<th width="123" bgcolor="#FFFFFF" class="style4 style12

style16">HARGA</th>

<th width="8" bgcolor="#FFFFFF" class="style4 style12

style16">EDIT</th>

<th width="22" bgcolor="#FFFFFF" class="style4 style12

style16">REMOVE </th>

</tr>

<?php

include "koneksi.php";

$perintah = "SELECT * FROM barang ORDER BY nm_barang";

$hasil = mysql_query($perintah);

while($baris = mysql_fetch_array($hasil))

{

echo "

<tr>

<td>$baris[nm_barang]</td>

<td>$baris[jenis]</td>

<td>$baris[nm_gambar]</td>

<td>$baris[produksi]</td>

<td>Rp$baris[harga],00</td>

<td><a href='kelola-barang.php?

aksi=Ubah&id_barang=$baris[id_barang]'>Ubah</a></td>

<td><a href='proses-barang.php?

aksi=Hapus&id_barang=$baris[id_barang]'>Hapus</a></td>

</tr>";

}

?>

L-58

Page 59: 14.Lampiran Program

</table>

</div>

<hr align="center">

<div align="center"><a href='cms.php' class="style4">Menu

Admin</a></div>

</body>

</head>

</html>

kelola-barang.php

<html>

<head>

<title>Admin ZEROHERO.COM</title>

</head>

<body>

<center> <h2>Pengelolaan ZEROHERO.COM</h2>

<hr>

<h3><?php echo "$aksi";?> Data Barang</h3>

</center>

<form method="post" action = "proses-barang.php">

<?php

include "koneksi.php";

if ($aksi == "Tambah")

{

$baris[id_barang] = "";

$baris[nm_barang] = "";

$baris[jenis] = "";

$baris[nm_gambar] = "";

$baris[harga] = "";

}

elseif ($aksi == "Ubah")

{

$perintah = "SELECT * FROM barang WHERE id_barang =

'$id_barang'";

$hasil = mysql_query($perintah);

$baris = mysql_fetch_array($hasil);

}

echo "

L-59

Page 60: 14.Lampiran Program

<input type = hidden name = id_barang value =

'$baris[id_barang]'>

<input type = hidden name = aksi value = $aksi>

<br>nama barang :

<input type = text name = nm_barang value =

'$baris[nm_barang]'><br>

jenis :

<input type = text name = jenis value = '$baris[jenis]'><br>

<br>Nama Gambar :

<input type = text name = nm_gambar value =

'$baris[nm_gambar]'>

<br>Harga : Rp

<input type = text name = harga value = '$baris[harga]'>,00

<br>

<input type = submit value = 'Proses'>";

?>

</form>

<hr>

</body>

</html>

proses-barang.php

<html>

<head>

<title>Admin ZEROHERO.COM</title>

</head>

<body>

<center> <h2>Pengelolaan ZERO_HERO.COM</h2></center>

<hr>

<?php

include "koneksi.php";

$nol1 = "0";

$nol2 = "00";

switch($aksi)

{

case "Tambah" :

L-60

Page 61: 14.Lampiran Program

$perintah = "INSERT INTO barang

VALUES('$id_barang','$nm_barang','$jenis','$nm_gambar','$harga'

)";

$hasil = mysql_query($perintah);

$pesan = "Data berhasil ditambahkan";

break;

case "Ubah" :

$perintah = "UPDATE barang SET nm_barang =

'$nm_barang',jenis = '$jenis',nm_gambar = '$nm_gambar',harga =

'$harga',WHERE id_barang = '$id_barang'";

$hasil = mysql_query($perintah);

$pesan = "Data berhasil diubah";

break;

case "Hapus" :

$perintah = "DELETE FROM barang WHERE id_barang

= '$id_barang'";

$hasil = mysql_query($perintah);

$pesan = "Data berhasil dihapus";

break;

}

echo"<h3>$pesan</h3>";

echo"$hasil3";

?>

<a href=data-barang.php>Kembali ke halaman awal</a>

<hr>

</body>

</html>

data.pembelian.php

<html>

<head>

<link href="ok.css" rel="stylesheet" type="text/css">

<body background="images/backg.JPG">

<div align="center">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/fla

sh/swflash.cab#version=7,0,19,0" width="997" height="168">

<param name="movie" value="images/banner.swf">

L-61

Page 62: 14.Lampiran Program

<param name="quality" value="high">

<param name="BGCOLOR" value="#000000">

<embed src="images/banner.swf" width="997" height="168"

quality="high"

pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" bgcolor="#000000"></embed>

</object>

<?php

session_start();

include "koneksi.php";

if (empty ($namauser) OR empty ($passuser)) {

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

?>

<html>

<span class="style9 style10">PEMBELIAN </span></div>

<hr align="center">

<table width="960">

<tr>

<td width="952"><div align="center"><a href="cms.php"><img

src="images/homeadmin.gif" width="143" height="42"

border="0"></a><a href="data-barang.php"><img src="images/data

admin.gif"width="143" height="42" border="0"></a><a

href="anggota.php"><img src="images/anggotaadmin.gif"

width="149" height="42" border="0"></a><a href="data-

pembelian.php"><img src="images/pembelian.gif"width="143"

height="42" border="0"></a><a href="logout.php"><img

src="images/logoutadmin.gif"width="143" height="42"

border="0"></a></div></td>

</tr>

</table>

<div align="center">

<table border = 1 class="style16" >

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">No pesanan</span></th>

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Username</span></th>

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Kode barang</span></th>

L-62

Page 63: 14.Lampiran Program

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Harga</span></th>

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Jumlah</span></th>

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Total harga</span></th>

<th bgcolor="#FFFFFF" class="style24"><span

class="style24">Tanggal</span></th>

<th bgcolor="#FFFFFF"><span class="style25"></span>

</th>

<th bgcolor="#FFFFFF"><span class="style25"></span>

</th>

</tr>

<?php

include "koneksi.php";

$perintah = "SELECT * FROM pembeli ORDER BY order_id";

$hasil = mysql_query($perintah);

while($baris = mysql_fetch_array($hasil))

{

echo "

<tr>

<td>$baris[order_id]</td>

<td>$baris[username]</td>

<td>$baris[id_barang]</td>

<td>$baris[harga]</td>

<td>$baris[jumlah]</td>

<td>Rp $baris[total_harga],00</td>

<td>$baris[tanggal]</td>

<TD><A HREF='hapuspembelian.php?

user=$baris[username]'>Hapus</A></TD>

</TR>";

}

?>

</table>

</div>

<hr align="center">

<div align="center"><a href='../zeroherostore/cms.php'

class="style6 style26">Menu Admin</a></div>

L-63

Page 64: 14.Lampiran Program

</body>

</html>

</body>

hapuspembelian.php

<?php

include "koneksi.php";

$perintah="DELETE FROM pembelian WHERE username='$user'";

mysql_query($perintah);

header("location:data-pembelian.php");

?>

LAMPIRAN

L-64

Page 65: 14.Lampiran Program

OUTPUT PROGRAM

Tampilan Sisi User :

Halaman Index

Halaman Katalog

Halaman Login gagal

L-65

Page 66: 14.Lampiran Program

Halaman Daftar Anggota

Halaman Home

L-66

Page 67: 14.Lampiran Program

Halaman Cari

Halaman cari detail

L-67

Page 68: 14.Lampiran Program

Halaman About Us

Halaman Special

L-68

Page 69: 14.Lampiran Program

Halaman Contact

Halaman Western Super Hero

L-69

Page 70: 14.Lampiran Program

Halaman Japan Super Hero

Halaman Other Super hero

L-70

Page 71: 14.Lampiran Program

Halaman Detail Barang

Halaman Shopcart

L-71

Page 72: 14.Lampiran Program

Halaman Thanks

Tampilan Halaman Untuk Admin :

L-72

Page 73: 14.Lampiran Program

Halaman Home

Halaman Data Barang

Halaman Tambah Barang

L-73

Page 74: 14.Lampiran Program

Halaman Ubah Data Barang

Halaman Anggota

L-74

Page 75: 14.Lampiran Program

Halaman Tambah Data Anggota

Halaman Edit Data Anggota

L-75

Page 76: 14.Lampiran Program

Halaman Pembelian

L-76


Recommended