Anda Belum Memilih List Data Pembayaran

'; } else { // Parse the cart session variable $items = explode(',',$cart); $s = (count($items) > 1) ? 's':''; return '

Anda Telah Memilih '.count($items).' item'.$s.'

'; } } function showCart() { global $db; $cart = $_SESSION['cart']; if ($cart) { $items = explode(',',$cart); $contents = array(); foreach ($items as $item) { $contents[$item] = (isset($contents[$item])) ? $contents[$item] + 1 : 1; } $output[] = '
'; $output[] = ''; foreach ($contents as $id=>$qty) { $sql = 'SELECT * FROM m_tarif WHERE kode = '.$id; $result = $db->query($sql); $row = $result->fetch(); extract($row); $output[] = ''; $output[] = ''; $output[] = ''; $output[] = ''; $output[] = ''; $total += $row['tarif'] * $qty; $_SESSION['total'] = $total; $output[] = ''; } $output[] = '
'.$row['nama_jasa'].'Rp. '.number_format($row['tarif'],0).' '; $output[] = 'Rp. '.$row['tarif'] * $qty.'
'; $output[] = '

Grand total: Rp '.number_format($total, 0).'

'; $output[] = '
'; $output[] = '
'; } else { $output[] = '

Anda Belum Memilih List Data Pembayaran.

'; } return join('',$output); } ?>