Home . php ?php Config. Php ?php
td width=150 height=400 id=leftnav ?php
require_once includeleftNav.php; ?
td td
?php if pdId {require_once includeproductDetail.php;}
else if catId {require_once includeproductList.php;} else {require_once includecategoryList.php;}
? td
td width=130 align=center?php require_once includeminiCart.php; ?td tr
table ?php
require_once includefooter.php; ?
3. Home . php ?php
require_once libraryconfig.php; require_once librarycategory-functions.php;
require_once libraryproduct-functions.php; require_once librarycart-functions.php;
_SESSION[shop_return_url] = _SERVER[REQUEST_URI]; catId = isset_GET[c] _GET[c] = 1 ? _GET[c] : 0;
pdId = isset_GET[p] _GET[p] = ? _GET[p] : 0; all= isset_GET[all] _GET[all] = ? _GET[all] : 0;
? -- menu header --
?php include includeheader.php; ? -- menu--
?php include includemenu.php; ? tr
td valign=top width=50div align=center ?php
if pdId {require_once includeproductDetail.php;} else if catId {require_once includeproductList.php;}
else if all==1 {require_once includecategoryList.php;} else {name=_REQUEST[name];
ifname= { require_once name;}
else {
Universitas Sumatera Utara
? d align=center class=style1pimg src=imagesopen.jpg alt=openp
p class=style1 align=leftSekarang telah hadir quot;Distro Rock n Rollquot; di kota Medan. Kamu mau cari pakaian gaul?? Buat Cewek Cowok ada DISINI br
Buruan belanja disini, dijamin kamu bakal puas dan g ketinggalan jaman dechhh....Jangan bilang kamu gauL,kalau kamu belum pakai produk distro ini... br
Karena Distro Rock n Roll nyediain barang-barang uptodate dengan kualitas tinggi. So...tunggu apa lagi. Belanja Pakaian?? ya Distro Rock n
Rool aja .... : p
p class=style1 align=centerSurga Belanja Kamu...p p class=style1 align=centerimg src=imagessp_lady.jpg alt=belanja
width=371 height=432 p p class=style1 align=centernbsp;p
d div
?php } ? ?php } ?
?php echo div align=center;
include includebaner.php; echo div; ?
td ?php include includeright_bar.php; ?
tr tbodytable
divtd tr
tbodytabletd tr
tr td background=imagessliced3_19.jpg height=37img
src=imagessliced3_19.jpg alt= width=126 height=37td tr
tbodytable ?php include includefooter.php; ?
bodyhtml 4. About Us . php
style type=textcss --
.style1 {color: FFFFFF} --
Universitas Sumatera Utara
style img src=imagesBack.jpg alt=about_us img src=imagesdamama.jpg
5. Config. Php ?php
ini_setdisplay_errors, Off; ob_startob_gzhandler;
error_reportingE_ALL; start the session
session_start; database connection config
dbHost = localhost; dbUser = root;
dbPass = ; dbName = distro_rnr_1;
setting up the web root and server root for this shopping cart application
thisFile = str_replace\\, , __FILE__; docRoot = _SERVER[DOCUMENT_ROOT];
webRoot = str_replacearraydocRoot, libraryconfig.php, , thisFile; srvRoot = str_replacelibraryconfig.php, , thisFile;
defineWEB_ROOT, webRoot; defineSRV_ROOT, srvRoot;
these are the directories where we will store all category and product images
defineCATEGORY_IMAGE_DIR, imagescategory; definePRODUCT_IMAGE_DIR, imagesproduct;
some size limitation for the category and product images
all category image width must not exceed 75 pixels
defineMAX_CATEGORY_IMAGE_WIDTH, 75; do we need to limit the product image width?
setting this value to true is recommended defineLIMIT_PRODUCT_WIDTH, true;
maximum width for all product image defineMAX_PRODUCT_IMAGE_WIDTH, 300;
the width for product thumbnail defineTHUMBNAIL_WIDTH, 75;
if get_magic_quotes_gpc {if isset_POST {foreach _POST as key = value {_POST[key] = trimaddslashesvalue;}}
if isset_GET {foreach _GET as key = value {_GET[key] = trimaddslashesvalue;}}}
Universitas Sumatera Utara
since all page will require a database access and the common library is also used by all
its logical to load these library here require_once database.php;
require_once common.php; get the shop configuration name, addres, etc , all page need it
shopConfig = getShopConfig; ?
6. Login . php ?php