Changeset 23518 for branches/version-2_13-dev/data
- Timestamp:
- 2014/06/04 00:11:08 (12 years ago)
- Location:
- branches/version-2_13-dev/data
- Files:
-
- 2 edited
-
Smarty/templates/default/mypage/history.tpl (modified) (1 diff)
-
class/pages/mypage/LC_Page_Mypage_DownLoad.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/Smarty/templates/default/mypage/history.tpl
r23494 r23518 83 83 <!--{if $orderDetail.product_type_id == $smarty.const.PRODUCT_TYPE_DOWNLOAD}--> 84 84 <!--{if $orderDetail.is_downloadable}--> 85 <a target="_self" href="<!--{$smarty.const.ROOT_URLPATH}-->mypage/download.php?order_id=<!--{$tpl_arrOrderData.order_id}-->&product_ id=<!--{$orderDetail.product_id}-->&product_class_id=<!--{$orderDetail.product_class_id}-->">ダウンロード</a>85 <a target="_self" href="<!--{$smarty.const.ROOT_URLPATH}-->mypage/download.php?order_id=<!--{$tpl_arrOrderData.order_id}-->&product_class_id=<!--{$orderDetail.product_class_id}-->">ダウンロード</a> 86 86 <!--{else}--> 87 87 <!--{if $orderDetail.payment_date == "" && $orderDetail.effective == "0"}--> -
branches/version-2_13-dev/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php
r23508 r23518 113 113 $customer_id = $_SESSION['customer']['customer_id']; 114 114 $order_id = $_GET['order_id']; 115 $product_id = $_GET['product_id'];116 115 $product_class_id = $_GET['product_class_id']; 117 116 118 117 //DBから商品情報の読込 119 $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_ id, $product_class_id);118 $arrForm = $this->lfGetRealFileName($customer_id, $order_id, $product_class_id); 120 119 121 120 //ファイル情報が無い場合はNG … … 159 158 * @param integer $customer_id 会員ID 160 159 * @param integer $order_id 受注ID 161 * @param integer $product_id 商品ID162 160 * @param integer $product_class_id 商品規格ID 163 161 * @return array 商品情報の配列 164 162 */ 165 public function lfGetRealFileName($customer_id, $order_id, $product_ id, $product_class_id)163 public function lfGetRealFileName($customer_id, $order_id, $product_class_id) 166 164 { 167 165 $objQuery =& SC_Query_Ex::getSingletonInstance(); 168 166 $col = <<< __EOS__ 169 pc.product_id AS product_id,170 pc.product_class_id AS product_class_id,171 167 pc.down_realfilename AS down_realfilename, 172 pc.down_filename AS down_filename, 173 o.order_id AS order_id, 174 o.customer_id AS customer_id, 175 o.payment_date AS payment_date, 176 o.status AS status 168 pc.down_filename AS down_filename 177 169 __EOS__; 178 170 179 171 $table = <<< __EOS__ 180 dtb_ products_class pc,181 dtb_order_detail od,182 dtb_order o172 dtb_order AS o 173 JOIN dtb_order_detail AS od USING(order_id) 174 JOIN dtb_products_class AS pc USING(product_id, product_class_id) 183 175 __EOS__; 184 176 185 177 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 186 $where = 'o.customer_id = ? AND o.order_id = ? AND pc.product_id = ? AND pc.product_class_id = ?'; 187 $where .= ' AND od.product_id = ? AND od.product_class_id = ?'; 178 $where = 'o.customer_id = ? AND o.order_id = ? AND od.product_class_id = ?'; 188 179 $where .= ' AND ' . $dbFactory->getDownloadableDaysWhereSql('o'); 189 180 $where .= ' = 1'; 190 $arr Ret = $objQuery->select($col, $table, $where,191 array($customer_id, $order_id, $product_id, $product_class_id, $product_id, $product_class_id));181 $arrWhereVal = array($customer_id, $order_id, $product_class_id); 182 $arrRet = $objQuery->select($col, $table, $where, $arrWhereVal); 192 183 193 184 return $arrRet[0]; … … 199 190 $objFormParam->addParam('customer_id', 'customer_id', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK')); 200 191 $objFormParam->addParam('order_id', 'order_id', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK')); 201 $objFormParam->addParam('product_id', 'product_id', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK'));202 192 $objFormParam->addParam('product_class_id', 'product_class_id', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK')); 203 193 }
Note: See TracChangeset
for help on using the changeset viewer.
