session_start();
header('Content-Type: text/html; charset=gb2312');
require "../inc/global.php";
require "../inc/function.php";
$pageID = empty($_REQUEST["pageID"]) ? 30 : $_REQUEST["pageID"];
$card_num=$_SESSION["thiscard_num"];
$checkout=$_SESSION["checkout"];
//echo $card_num."
";
if ($card_num!="") {
$db= new db();
$sql="select * from cy_shopcard where card_num=".$card_num ;
$query = $db->query($sql);
$i = 0;
while($forum = $db->fetch_array($query)) {
$shopcard[$i][cardid]=$forum["cardid"];//echo $forum["id"]."
";
$prog=$db->IDtoCatalog($forum["product_type"]);
$shopcard[$i][product_type]=$prog['Title'];
$shopcard[$i][product_name]=$forum["product_name"];//echo $forum["product_name"]."
";
$shopcard[$i][qty]=$forum["qty"];
$shopcard[$i][price]="£¤".number_format($forum["price"])."Ôª ";
$shopcard[$i][unit]=$forum["unit"];
$sale=$sale+($forum["price"]*$forum["qty"]);
$i++;
}
$sql="select remark from cy_checkout where shopcardid='".$card_num."'";
$query = $db->query($sql);
$check = $db->fetch_array($query);
}
$viewdata = array("pageID" => $pageID ,
"siteinfo" => $siteinfo,
"sitename" => $sitename,
"checkout" => $checkout,
"card_num" => $card_num,
"shopcard" => $shopcard,
"check" => $check,
"sale" => number_format($sale),
"menu" => showmenu($pageID)
);
$tplname= CModel($_SERVER["SCRIPT_NAME"]);
callview($viewdata,$tplname);
?>