- Timestamp:
- 2011/01/18 20:06:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_History.php
r19912 r19959 52 52 $this->arrMAILTEMPLATE = $masterData->getMasterData("mtb_mail_template"); 53 53 $this->arrPref = $masterData->getMasterData('mtb_pref'); 54 55 $this->isMobile = Net_UserAgent_Mobile::isMobile();56 54 } 57 55 … … 63 61 function process() { 64 62 parent::process(); 65 if ( $this->isMobile === false ){ 66 $this->action(); 67 } else { 68 $this->mobileAction(); 69 } 63 $this->action(); 70 64 $this->sendResponse(); 71 65 } … … 130 124 function destroy() { 131 125 parent::destroy(); 132 }133 134 /**135 * Page のAction(モバイル).136 *137 * @return void138 */139 function mobileAction() {140 define ("HISTORY_NUM", 5);141 142 $objQuery = new SC_Query();143 $objCustomer = new SC_Customer();144 $pageNo = isset($_GET['pageno']) ? (int) $_GET['pageno'] : 0; // TODO145 146 // ログインチェック147 if(!isset($_SESSION['customer'])) {148 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);149 }150 151 $col = "order_id, create_date, payment_id, payment_total";152 $from = "dtb_order";153 $where = "del_flg = 0 AND customer_id=?";154 $arrval = array($objCustomer->getvalue('customer_id'));155 $order = "order_id DESC";156 157 $linemax = $objQuery->count($from, $where, $arrval);158 $this->tpl_linemax = $linemax;159 160 // 取得範囲の指定(開始行番号、行数のセット)161 $objQuery->setLimitOffset(HISTORY_NUM, $pageNo);162 // 表示順序163 $objQuery->setOrder($order);164 165 //購入履歴の取得166 $this->arrOrder = $objQuery->select($col, $from, $where, $arrval);167 168 // next169 if ($pageNo + HISTORY_NUM < $linemax) {170 $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>";171 } else {172 $next = "";173 }174 175 // previous176 if ($pageNo - HISTORY_NUM > 0) {177 $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>←前へ</a>";178 } elseif ($pageNo == 0) {179 $previous = "";180 } else {181 $previous = "<a href='history.php?pageno=0'>←前へ</a>";182 }183 184 // bar185 if ($next != '' && $previous != '') {186 $bar = " | ";187 } else {188 $bar = "";189 }190 191 $this->tpl_strnavi = $previous . $bar . $next;192 193 126 } 194 127
Note: See TracChangeset
for help on using the changeset viewer.