Changeset 16234 for branches/feature-module-update/data/class/pages/mypage/LC_Page_Mypage_History.php
- Timestamp:
- 2007/10/02 19:40:37 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/mypage/LC_Page_Mypage_History.php
r16102 r16234 92 92 } 93 93 94 /** 95 * モバイルページを初期化する. 96 * 97 * @return void 98 */ 99 function mobileInit() { 100 $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . 'mypage/history.tpl'; 101 $this->tpl_title = 'MYページ/購入履歴一覧'; 102 $this->allowClientCache(); 103 } 104 105 /** 106 * Page のプロセス(モバイル). 107 * 108 * @return void 109 */ 110 function mobileProcess() { 111 define ("HISTORY_NUM", 5); 112 113 $objView = new SC_MobileView(); 114 $objQuery = new SC_Query(); 115 $objCustomer = new SC_Customer(); 116 $pageNo = isset($_GET['pageno']) ? (int) $_GET['pageno'] : 0; // TODO 117 118 // ログインチェック 119 if(!isset($_SESSION['customer'])) { 120 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 121 } 122 123 $col = "order_id, create_date, payment_id, payment_total"; 124 $from = "dtb_order"; 125 $where = "del_flg = 0 AND customer_id=?"; 126 $arrval = array($objCustomer->getvalue('customer_id')); 127 $order = "order_id DESC"; 128 129 $linemax = $objQuery->count($from, $where, $arrval); 130 $this->tpl_linemax = $linemax; 131 132 // 取得範囲の指定(開始行番号、行数のセット) 133 $objQuery->setlimitoffset(HISTORY_NUM, $pageNo); 134 // 表示順序 135 $objQuery->setorder($order); 136 137 //購入履歴の取得 138 $this->arrOrder = $objQuery->select($col, $from, $where, $arrval); 139 140 // next 141 if ($pageNo + HISTORY_NUM < $linemax) { 142 $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>"; 143 } else { 144 $next = ""; 145 } 146 147 // previous 148 if ($pageNo - HISTORY_NUM > 0) { 149 $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>←前へ</a>"; 150 } elseif ($pageNo == 0) { 151 $previous = ""; 152 } else { 153 $previous = "<a href='history.php?pageno=0'>←前へ</a>"; 154 } 155 156 // bar 157 if ($next != '' && $previous != '') { 158 $bar = " | "; 159 } else { 160 $bar = ""; 161 } 162 163 $this->tpl_strnavi = $previous . $bar . $next; 164 $objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納 165 $objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行 166 } 167 94 168 //受注詳細データの取得 95 169 function lfGetOrderData($order_id) {
Note: See TracChangeset
for help on using the changeset viewer.