Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Include MySQL class
- require_once('inc/mysql.class.php');
- // Include database connection
- require_once('inc/global.inc.php');
- // Include functions
- require_once('inc/functions.inc.php');
- // Start the session
- session_start();
- ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Senarai Kek</title>
- <link rel="stylesheet" href="css/styles.css" />
- </head>
- <body>
- <div id="shoppingcart">
- <h1>Senarai Pesanan Anda | <a href="../logout.php">Keluar...</a></h1>
- <?php
- echo writeShoppingCart();
- ?>
- </div>
- <div id="booklist">
- <h1>Senarai Kek Dalam Kedai Kami</h1>
- <?php
- $myTable='senaraikek';
- $myJoin='hargakek';
- $medan='T.idkek, namakek, kategori, T.catatan,oum,saiz,harga';
- $sql='
- SELECT ' . $medan . ' FROM
- ' . $myTable . ' T RIGHT JOIN ' . $myJoin . ' J
- ON T.idkek = J.idkek ';
- $result = $db->query($sql);
- $output[] = '<table>' . "\r";
- while ($row = $result->fetch())
- {
- $output[] = '<tr><td>' . "\r" .
- '<img src="../images/' . $row['kategori'] . '/' . $row['idkek'] . '.jpg" ' .
- 'alt="' . $row['namakek'] . '" width="100" height="100">' .
- '</td><td><ul>' . "\r" .
- '<li>' . $row['idkek'] . '=' . $row['namakek'] . '</li>' . "\r" .
- '<li>'.$row['catatan'].'</li>' . "\r" .
- '<li> 1 ' . $row['oum'] . ' ' . $row['saiz'] . '=RM ' . $row['harga'] . '</li>' . "\r" .
- '<li><a href="cart.php?action=add&idkek=' . $row['idkek'] . '|' .
- $row['saiz'] . '">Tambah Dalam Bakul</a></li>' . "\r" .
- '</ul>' . "\r" .
- '</td></tr>' . "\r";
- }
- $output[] = '</table>' . "\r";
- echo join('',$output);
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment