A-12
div class=cleardiv div id=footer
div class=left_foterimg src=imagesfooter_logo.gif alt= title= div div class=center_footer
a href=Shipping Termsa | a href=Terms amp; Conditionsa | a href=Privacy Policya | a href=Contacta
br By a href=http:csscreme.com style=color:9e1c50;csscremea div
div div
div body
html
8. Client check out
?php include_once controllerCategoryCtrl.php;
include_once header.php; include_once controllershoppingcart.php;
include_once controllerprodukCtrl.php; count = 1;
session_start; user = isset_SESSION[memberid] ? _SESSION[memberid] : ;
nama = isset_SESSION[nama] ? _SESSION[nama] : ; if user = {
controller = new shoppingCtrl; controllerProd = new produkCtrl;
allProduk = controller-getAllProduk; } else {
headerLocation:loginpage.php; }
? script type=textjavascript
function updateshopidshop{ var idku = jumlah-+idshop;
var jumk = document.getElementByIdidku.value; window.location = updateSC.php?shopid=+idshop+jum=+jumk;
} function alamatbaru{
var checkbox2 = document.getElementByIdradio2; ifcheckbox2.checked{
document.getElementByIdalamat.disabled = false; }else{
document.getElementByIdalamat.disabled = true; }
} function milih{
var checkbox = document.getElementByIdradio1 var checkbox2 = document.getElementByIdradio2;
ifcheckbox2.checked || checkbox.checked{ return true;
}else{ window.alertAnda belum memilih alamat pengiriman;
return false; }
} script
div id=center_content div class=titleimg src=imagescontact_title.gif alt= title= div
div class=product_box_big div
form action=confirmData.php method=POST onsubmit=return milih table
tr thAlamatth
tdinput type=radio id=radio1 name=group1 value=sama checked=true onclick=alamatbaruSesuai dengan alamat profile andatd
tr tr
A-13
thth tdinput type=radio id=radio2 name=group1 value=tdksama
onclick=alamatbaruAlamat barutd tdinput type=text name=alamat id=alamat disabled=truetd
tr tr
thType Shippingth tdinput type=radio id=radio3 name=group2 checked=true value=JNEJNEtd
tr tr
thth tdinput type=radio id=radio4 name=group2 value=TIKITIKItd
tr tr
tdinput type=submit id=submit name=submit value=Nexttd tr
table form
div div
div ?php
include_once footer.php; ?
9. Confirm Data
?php include_once controllerCategoryCtrl.php;
include_once controlleruserCtrl.php; include_once header.php;
include_once controllershoppingcart.php; include_once controllerprodukCtrl.php;
include_once controlleroptionProdukCtrl.php; count = 1;
session_start; user = isset_SESSION[memberid] ? _SESSION[memberid] : ;
nama = isset_SESSION[nama] ? _SESSION[nama] : ; alamat = isset_POST[alamat] ? _POST[alamat] : ;
group1 = isset_POST[group1] ? _POST[group1] : ; group2 = isset_POST[group2] ? _POST[group2] : ;
if user = { controller = new shoppingCtrl;
controllerProd = new produkCtrl; controllerUser = new userCtrl;
userke = controllerUser-findUserByIduser; allProduk = controller-getShoppingcartByIduser;
if group1 == sama { alamat = userke-getALamaT;
} else if alamat == { headerLocation:clientCheckout.php;
} } else {
headerLocation:loginpage.php; }
_SESSION[alamat] = alamat; _SESSION[ship] = group2;
? script type=textjavascript
function updateshopidshop{ var idku = jumlah-+idshop;
var jumk = document.getElementByIdidku.value; window.location = updateSC.php?shopid=+idshop+jum=+jumk;
} function alamatbaru{
var checkbox2 = document.getElementByIdradio2; ifcheckbox2.checked{
document.getElementByIdalamat.disabled = false; }else{
document.getElementByIdalamat.disabled = true;
A-14
} }
function milih{ var checkbox = document.getElementByIdradio1
var checkbox2 = document.getElementByIdradio2; ifcheckbox2.checked || checkbox.checked{
return true; }else{
window.alertAnda belum memilih alamat pengiriman; return false;
} }
script div id=center_content
div class=titleimg src=imagescontact_title.gif alt= title= div div class=product_box_big
div table class=MYTABLE cellpadding=4 cellspacing=4
CAPTION CLASS=MYTABLE?php echo nama; ?, List Belanja AndaCAPTION tr CLASS=MYTABLE
th CLASS=MYTABLENo.th th CLASS=MYTABLEProdukth
th CLASS=MYTABLEJumlahth th CLASS=MYTABLEHargath
th CLASS=MYTABLESubtotalth tr
?php Totalbelanja = 0;
ctrlOpt = new optionProdukCtrl; foreach allProduk as value {
addharga = 0; idopttemp = value-getIdOption;
if issetidopttemp idopttemp 0 { optionsByID = ctrlOpt-getOptionsByIDidopttemp;
addharga = optionsByID[0]-getHargaAdded; }
echo tr CLASS=MYTABLE; prod = controllerProd-findProdukByIdvalue-getIdProdUk;
Totalbelanja += prod-getHaRGa value-getJUmLaH+addharga; echo td CLASS=MYTABLE . count . td . td CLASS=MYTABLE . prod-
getNamAProdUk . td . td CLASS=MYTABLE . value-getJUmLaH . td . td CLASS=MYTABLERp. . number_formatprod-getHaRGa+addharga, 2, ,, . . td . td
CLASS=MYTABLERp. . number_formatprod-getHaRGa value-getJUmLaH+addharga, 2, ,, . . td;
echo tr; count++;
} ?
tr tdnbsp;tdtdnbsp;tdtdnbsp;tdtd CLASS=MYTABLE align=rightTotal
:tdtd CLASS=MYTABLERp.?php echo number_formatTotalbelanja, 2, ,, .; ?tdtdnbsp;td
tr tr
thNamath td?php echo userke-getNaMauser; ?td
tr tr
thAlamat Pengirimanth td?php echo alamat; ?td
tr tr
thType Pengirimanth td?php echo group2; ?td
tr tr
thSelesaith tda href=finishCheckout.phpinput type=Button value=Bayaratd
tr
A-15
table divz
div div
?php include_once footer.php;
?
10. Contact