Created
April 13, 2019 06:07
-
-
Save gnh1201/be943c0a348a9ef992698d1f167064e7 to your computer and use it in GitHub Desktop.
orderdetail.php (Example of resaonbleframework)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = get_requested_value("id"); | |
$method = get_requested_value("method"); | |
$data = array(); | |
// get order detail | |
$bind = array( | |
"orderNum" => $id, | |
); | |
$sql = get_bind_to_sql_select("ndk_po_order", $bind, array( | |
"fieldnames" => array( | |
"orderNum", | |
"bDate", | |
"agencyNm" | |
), | |
)); | |
$detail = exec_db_fetch($sql, $bind); | |
// get order items | |
$bind = array( | |
"orderNum" => $id, | |
); | |
$sql = get_bind_to_sql_select("ndk_po_cart", $bind, array( | |
"fieldnames" => array( | |
"item_cd", | |
"item_nm" | |
), | |
)); | |
$items = exec_db_fetch_all($sql, $bind); | |
// export to data | |
$data['method'] = $method; | |
$data['detail'] = $detail; | |
$data['items'] = $items; | |
// rendering view | |
if($method == "ajax") { | |
renderView("order/view_orderdetail", $data); | |
} else { | |
renderView("templates/mincss/header", $data); | |
renderView("order/view_orderdetail", $data); | |
renderView("templates/mincss/footer", $data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment