A-31
CAPTION CLASS=MYTABLE?php echo nama; ?, Shopping CartCAPTION tr CLASS=MYTABLE
th CLASS=MYTABLENo.th th CLASS=MYTABLEProdukth
th CLASS=MYTABLEJumlahth th CLASS=MYTABLEHargath
th CLASS=MYTABLESubtotalth th CLASS=MYTABLEToolsth
tr ?php
Totalbelanja = 0; ctrlOpt = new optionProdukCtrl;
if countallProduk 0 { foreach allProduk as value {
echo tr CLASS=MYTABLE; addharga = 0;
idopttemp = value-getIdOption; if issetidopttemp idopttemp 0 {
optionsByID = ctrlOpt-getOptionsByIDidopttemp; addharga = optionsByID[0]-getHargaAdded;
} prod = controllerProd-findProdukByIdvalue-getIdProdUk;
Totalbelanja += prod-getHaRGa value-getJUmLaH + addharga; echo td CLASS=MYTABLE . count . td . td CLASS=MYTABLE . prod-
getNamAProdUk . td . td CLASS=MYTABLEinput id=jumlah- . value-getIdShoppingCart . type=text value= . value-getJUmLaH . maxlength=3 size=3td . td
CLASS=MYTABLERp. . number_formatprod-getHaRGa + addharga, 2, ,, . . td . td CLASS=MYTABLERp. . number_formatprod-getHaRGa value-getJUmLaH + addharga, 2,
,, . . td . td CLASS=MYTABLEinput type=button value=Update onclick=updateshop . value-getIdShoppingCart . a href=deleteShoppingCart.php?shopid= . value-getIdShoppingCart .
input type=button value=Deleteatd; echo tr;
echo tr tdnbsp;tdtdnbsp;tdtdnbsp;tdtd CLASS=MYTABLE align=rightTotal
:tdtd CLASS=MYTABLERp. . number_formatTotalbelanja, 2, , , . . tdtdnbsp;tdtr; count++;
} } else {
echo tr CLASS=MYTABLE; echo td CLASS=MYTABLE colspan=6 Anda Belum Mempunyai Barang yang akan di beli.
Silahkan Belanja Terlebih dahulutd; echo tr;
} ?
tr thLanjut Belanjath
tda href=index.phpinput type=button value=Continueatd tr
?php if countallProduk 0 {
echo tr thCheckoutth
tda href=clientCheckout.phpinput type=button value=Nextatd tr;
} ?
table div
div div
?php include_once footer.php;
?
22. Unit png fix.js
var clear=imagesclear.gif path to clear.gif pngfix=function{var els=document.getElementsByTagName;var i_p=\.pngi;var i=els.length;while i--
0{var el=els[i];var es=el.style;ifel.srcel.src.matchi_pes.filter=={el.height = el.height;el.width = el.width;es.filter =
A-32
progid:DXImageTransform.Microsoft.AlphaImageLoadersrc=+el.src+,sizingMethod=crop;el.src = clear;}else{var elb=el.currentStyle.backgroundImage;ifelb.matchi_p{var path=elb.split;var
rep=el.currentStyle.backgroundRepeat==no- repeat?crop:scale;es.filter=progid:DXImageTransform.Microsoft.AlphaImageLoadersrc=+path[1]+,sizin
gMethod=+rep+;es.height=el.clientHeight+px;es.backgroundImage=none;}}if el.currentStyle.position=absolute es.filter el.tagName.matchbody|html|scriptgi
es.position=relative;if es.filterel.currentStyle.position==relative es.position=static;}} window.attachEventonload,pngfix;
23. Up date SC
?php session_start;
include_once controllershoppingcart.php; include_once controllerprodukCtrl.php;
user = isset_SESSION[memberid] ? _SESSION[memberid] : ; idprod = isset_GET[shopid] ? _GET[shopid] : ;
jum = isset_GET[jum] ? _GET[jum] : ; refer = _SERVER[HTTP_REFERER];
if user = { controllerCart = new shoppingCtrl;
controllerProd = new produkCtrl; if idprod = {
addProduk = controllerCart-updateJumlahidprod, jum; if addProduk == 1 {
headerLocation:shoppingcart.php; }
} else { headerLocation:refer;
} } else {
headerLocation:loginpage.php; }
24. Add category
DOCTYPE html PUBLIC -W3CDTD XHTML 1.0 StrictEN http:www.w3.orgTRxhtml1DTDxhtml1-strict.dtd
?php include_once controllerCategoryCtrl.php;
include_once controllerprodukCtrl.php; idProd = isset_GET[idProd] ? _GET[idProd] : ;
controllerProd = new produkCtrl; produkke;
if idProd = { produkke = controllerProd-findProdukByIdidProd;
} else { produkke = new vis_ProdUkModel;
} include header.php;
? -- start content-outer --
div id=content-outer -- start content --
div id=content div id=page-headingh1Add producth1div
table border=0 width=100 cellpadding=0 cellspacing=0 id=content-table tr
th rowspan=3 class=sizedimg src=imagessharedside_shadowleft.jpg width=20 height=300 alt= th
th class=topleftth td id=tbl-border-topnbsp;td
th class=toprightth th rowspan=3 class=sizedimg src=imagessharedside_shadowright.jpg width=20
height=300 alt= th tr
tr td id=tbl-border-lefttd
td
A-33
-- start content-table-inner -- div id=content-table-inner
table border=0 width=100 cellpadding=0 cellspacing=0 tr valign=top
td -- start step-holder --
div id=step-holder div class=step-no1div
div class=step-dark-lefta href=Tambah Produkadiv div class=step-dark-rightnbsp;div
div class=step-no-off2div div class=step-light-leftSelect related productsdiv
div class=step-light-rightnbsp;div div class=step-no-off3div
div class=step-light-leftPreviewdiv div class=step-light-roundnbsp;div
div class=cleardiv div
-- end step-holder -- -- start id-form --
form name=myform id=myform action=addProdukProcess.php method=POST onsubmit=
table border=0 cellpadding=0 cellspacing=0 id=id-form tr
th valign=topNama Produk:th tdinput type=text class=inp-form name=nameprod id=nameprod
value=?php echo produkke-getNamAProdUk; ?td tdtd
tr tr
th valign=topHarga Produk:th tdinput type=text class=inp-form name=hargaprod id=hargaprod
value=?php echo produkke-getHaRGa; ?td td
td tr
tr th valign=topCategory:th
td select class=styledselect_form_1 name=kateprod id=kateprod
?php controller = new categoryCtrl;
allCategory = controller-getAllCategory; foreach allCategory as value {
if produkke-getCategory == value-getNamA { echo option value= . value-getNamA . SELECTED=TRUE
. value-getNamA . option; } else {
echo option value= . value-getNamA . . value-getNamA . option;
} }
? select
td tdtd
tr tr
th valign=topUkuran:th tdinput type=text class=inp-form name=ukuranprod value=?php echo
produkke-getUkURan; ?td tdtd
tr tr
th valign=topKeterangan:th tdtextarea rows= cols= class=form-textarea name=ketprod
id=ketprod value=?php echo produkke-getKeTeraNGan; ?textareatd tdtd
tr
A-34
tr thImage:th
tdinput type=file class=file_1 name=fileToUpload id=fileToUpload onchange=ajaxFileUploadtd
td div class=bubble-leftdiv
div class=bubble-innerJPEG, GIF 5MB max per imagediv div class=bubble-rightdiv
td tdimg id=loading src=imagesloading.gif style=display:none;td
tr tr
td colspan=3img id=preview src=..uploads?php echo produkke- getImageLink; ? style=display:none; height=150 width=150td
tr tr
thnbsp;th td valign=top
input type=hidden value=?php echo produkke-getImageLink; ? name=linkImg id=linkImg
input type=hidden value=?php echo produkke-getIdProdUk; ? name=idprod id=idprod
input type=submit value= name=submit class=form-submit input type=reset value= class=form-reset
td tdtd
tr table
form div id=results
div -- end id-form --
td td
-- start related-activities -- -- end related-act-inner --
div class=cleardiv div
-- end related-act-bottom -- div
-- end related-activities -- td
tr tr
tdimg src=imagessharedblank.gif width=695 height=1 alt=blank td tdtd
tr table
div class=cleardiv div
-- end content-table-inner -- td
td id=tbl-border-righttd tr
tr th class=sized bottomleftth
td id=tbl-border-bottomnbsp;td th class=sized bottomrightth
tr table
div class=clearnbsp;div div
-- end content -- div class=clearnbsp;div
div -- end content-outer --
?php include footer.php;
A-35
?
25. Add category process