A-62
Universitas Kristen Maranatha
} ?
17. Homeadmin.php
DOCTYPE html PUBLIC -W3CDTD XHTML 1.0 TransitionalEN http:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd
html xmlns=http:www.w3.org1999xhtml head
meta http-equiv=Content-Type content=texthtml; charset=utf-8 titleUntitled Documenttitle
style type=textcss --
body { background-color: 630;
background-image: urlProyekold.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; }
apDiv3 {
A-63
Universitas Kristen Maranatha
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;
} --
stylehead body
div id=apDiv1 div id=apDiv2
table width=200 border=1 tr
tr tr
tda href=media.phpLIHAT DATA USERatd tr
tr
A-64
Universitas Kristen Maranatha
tda href=iklanmasuk.phpLIHAT IKLAN MASUKatd tr
tr tda href=feedback.phpLIHAT FEEDBACKatd
tr tr
tda href=history.phpLIHAT HISTORYatd 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
pKHUSUS ADMINp pData Adminp
div div
body html
18.
Logout_admin.php
?php session_start;
session_destroy; header Location: adminlogin.php?.
A-65
Universitas Kristen Maranatha
pesan=Silahkan login; exit;
?
19. Media.php
style type=textcss --
body { background-color: 630;
background-image: urlProyekold.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 { color: 000;
}
A-66
Universitas Kristen Maranatha
apDiv6 { color: 000;
} --
style div id=apDiv2
div align=center pKHUSUS ADMINp
pData user yang sudah terdafarp div
div div id=apDiv6
?php server = localhost;
user = root; password = root;
id_mysql = mysql_connectserver, user, password; if id_mysql
dieTak dapat melakukan koneksi ke server MySQL; db_promo = mysql_select_dbpromo, id_mysql;
if db_promo dieTak dapat mengakses database identitas;
Bagian untuk membaca data sql = SELECT username, password, nama, alamat, telepone, ktp, npwp FROM customer;
hasil = mysql_querysql, id_mysql; if hasil
dieSalah SQL; nomor = 0;
printtable width = \80\ border=\1\\n;
A-67
Universitas Kristen Maranatha
printtr\n; printtd width=\10\Notd\n;
printtd width=\15\Usernametd\n; printtd width=\40\Passwordtd\n;
printtd width=\35\Namatd\n; printtd width=\35\Alamattd\n;
printtd width=\35\Teleponetd\n; printtd width=\35\Ktptd\n;
printtd width=\35\Npwptd\n; printtr\n;
while baris = mysql_fetch_rowhasil {
nomor++; username = baris[0];
password = baris[1]; nama = baris[2];
alamat = baris[3]; telepone = baris[4];
ktp = baris[5]; npwp = baris[6];
printtr\n; printtdnomortd\n;
printtdusernametd\n; printtdpasswordtd\n;
printtdnamatd\n; printtdalamattd\n;
printtdteleponetd\n; printtdktptd\n;
printtdnpwptd\n; }
Akhir pembacaan data
A-68
Universitas Kristen Maranatha
? 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