php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /var/www/html/b2b/ |
files >> /var/www/html/b2b/keranjang-belanja.php |
<?php $sid = session_id(); $sql = mysql_query("SELECT * FROM orders_temp WHERE id_session='$sid'"); $total = 0; $totaljumlah = 0; if (mysql_num_rows($sql) > 0) { while ($xsy = mysql_fetch_array($sql) ) { $rs = mysql_fetch_array(mysql_query("SELECT * FROM produk WHERE id_produk = '$xsy[id_produk]' ")); $ex_range = explode(',', $rs[range]); $jlh_range = count($ex_range); $ex_harga = explode(',', $rs[harga]); $jlh_harga = count($ex_range); if($xsy[jumlah] >= 1 AND $xsy[jumlah] <=$ex_range[0]) { $harga_tampilas = $ex_harga[0]; } for ($ii=1; $ii < $jlh_range; $ii++) { $pertama = $ex_range[$ii-1] + 1; if($pertama == $ex_range[$ii]) { if($xsy[jumlah] >= $ex_range[$ii]) { $harga_tampilas = $ex_harga[$ii]; } } else{ if($xsy[jumlah] >= $pertama AND $xsy[jumlah] <= $ex_range[$ii]) { $harga_tampilas = $ex_harga[$ii]; } } } echo $harga_tampil; $subtotalas = $harga_tampilas * $xsy[jumlah]; $totalas = $totalas + $subtotalas; $totaljumlah += $xsy[jumlah]; } } else { $totalas = 0; } $total_rpas = format_rupiah($totalas); echo "<a href='".$base_url."keranjang-belanja.html'> <span class='glyphicon glyphicon-shopping-cart'></span> $totaljumlah item | Total: Rp. $total_rpas </a>"; ?>y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`