- Timestamp:
- 2010/09/27 11:49:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php
r18820 r18824 58 58 $order_id = $_GET['order_id']; 59 59 $product_id = $_GET['product_id']; 60 $classcategory_id1 = $_GET['classcategory_id1']; 61 $classcategory_id2 = $_GET['classcategory_id2']; 60 $product_class_id = $_GET['product_class_id']; 62 61 63 62 // ID の数値チェック … … 66 65 || !is_numeric($order_id) 67 66 || !is_numeric($product_id) 68 || !is_numeric($classcategory_id1) 69 || !is_numeric($classcategory_id2)) { 67 || !is_numeric($product_class_id)) { 70 68 SC_Utils_Ex::sfDispSiteError(""); 71 69 } … … 79 77 //DBから商品情報の読込 80 78 81 $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $ classcategory_id1, $classcategory_id2);79 $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id); 82 80 83 81 //ステータスが支払済み以上である事 … … 125 123 * @param integer $order_id 受注ID 126 124 * @param integer $product_id 商品ID 125 * @param integer $product_class_id 商品規格ID 127 126 * @return array 商品情報の配列 128 127 */ 129 function lfGetRealFileName($customer_id, $order_id, $product_id, $ classcategory_id1, $classcategory_id2) {128 function lfGetRealFileName($customer_id, $order_id, $product_id, $product_class_id) { 130 129 $objQuery = new SC_Query(); 131 $col = "*"; 132 $table = "vw_download_class AS T1"; 130 $col = <<< __EOS__ 131 pc.product_id AS product_id, 132 pc.product_class_id AS product_class_id, 133 pc.down_realfilename AS down_realfilename, 134 pc.down_filename AS down_filename, 135 o.order_id AS order_id, 136 o.customer_id AS customer_id, 137 o.payment_date AS payment_date, 138 o.status AS status 139 __EOS__; 140 141 $table = <<< __EOS__ 142 dtb_products_class pc, 143 dtb_order_detail od, 144 dtb_order o 145 __EOS__; 146 133 147 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 134 $where = " T1.customer_id = ? AND T1.order_id = ? AND T1.product_id = ? AND T1.classcategory_id1 = ? AND T1.classcategory_id2= ?";135 $where .= " AND " . $dbFactory->getDownloadableDaysWhereSql( "T1");148 $where = "o.customer_id = ? AND o.order_id = ? AND pc.product_id = ? AND pc.product_class_id = ?"; 149 $where .= " AND " . $dbFactory->getDownloadableDaysWhereSql(); 136 150 $where .= " = 1"; 137 151 $arrRet = $objQuery->select($col, $table, $where, 138 array($customer_id, $order_id, $product_id, $ classcategory_id1, $classcategory_id2));152 array($customer_id, $order_id, $product_id, $product_class_id)); 139 153 return $arrRet[0]; 140 154 }
Note: See TracChangeset
for help on using the changeset viewer.