20) err_exit("Post the Form ERROR: Post times>20! Please Track Your Order Later..."); $_SESSION['subtimes']=$subtimes; $spid=$_POST['spid']; if(trim($spid)=="") err_exit("Not Allow blank!"); if(strlen($spid)!=10) err_exit("Incorrect Order ID#:It must be 10 numbers/characters."); $qry="SELECT spid,totalvalue,pay_stat,op_stat,ordertime,email FROM order_form WHERE spid='".addslashes($spid)."'"; $order=$db->get_results($qry,ARRAY_A); $order=$order[0]; if($order) { $order[ordertime]=date("d-M-Y H:i:s",intval($order[ordertime])); //op_stat:'undo','doing','done','out','guestcancel','hostcancel' switch($order[op_stat]) { case "undo": $order[op_stat]="Not been processed yet (We will look over your order soon.)"; break; case "doing": $order[op_stat]="Being processed (We will cantact to you soon.)"; break; case "done": $order[op_stat]="Checked out (We have delivered goods.)"; break; case "out": $order[op_stat]="Order is INVALID.(We will check the order.)"; break; case "guestcancel": $order[op_stat]="Order is canceled by the Guest."; break; case "hostcancel": $order[op_stat]="Order is canceled by the Host."; break; } //pay_stat: 'unpay','unconfirm','paid','arrearage','indemnity' switch($order[pay_stat]) { case "unpay": $order[pay_stat]="You have not paid!"; break; case "unconfirm": $order[pay_stat]="Payment is not confirmed to our account!"; break; case "paid": $order[pay_stat]="You have paid! Thank you!"; break; case "arrearage": $order[pay_stat]="Your payment is not enough!"; break; case "indemnity": $order[pay_stat]="Sorry,we will refund of fare as our mistake!"; break; } $tpl->assign("order",$order); } else $tpl->assign("emptyorder",1); } ########## //ad right_col(); ########## //Special Price $qry="SELECT id,name,specialcost FROM product WHERE specialcost != '0.00' ORDER BY addtime DESC LIMIT 0,$special_qty"; $sp_id=$db->get_col($qry,0); $sp_name=$db->get_col(null,1); $sp_price=$db->get_col(null,2); $tpl->assign("sp_id",$sp_id); $tpl->assign("sp_name",$sp_name); $tpl->assign("sp_price",$sp_price); unset($sp_id,$sp_name,$sp_price); ######### $output=$tpl->fetch("trackorder_,ahp2004.htm"); echo str_replace($tpl_imgdir_name, $tpl->template_dir.$tpl_imgdir_name,$output); ?>