Ignore:
Timestamp:
2011/01/18 20:06:28 (13 years ago)
Author:
kotani
Message:

#880(mobile/sphoneディレクトリを削除)に対応。(mobile/mypageディレクトリ)

  • モバイルサイトのMYページをPCサイトの動作に合わせる。
  • mobileAction() を削除し、ビジネスロジック統一。
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_History.php

    r19912 r19959  
    5252        $this->arrMAILTEMPLATE = $masterData->getMasterData("mtb_mail_template"); 
    5353        $this->arrPref = $masterData->getMasterData('mtb_pref'); 
    54          
    55         $this->isMobile = Net_UserAgent_Mobile::isMobile(); 
    5654   } 
    5755 
     
    6361    function process() { 
    6462        parent::process(); 
    65         if ( $this->isMobile === false ){ 
    66             $this->action(); 
    67         } else { 
    68             $this->mobileAction(); 
    69         } 
     63        $this->action(); 
    7064        $this->sendResponse(); 
    7165    } 
     
    130124    function destroy() { 
    131125        parent::destroy(); 
    132     } 
    133  
    134     /** 
    135      * Page のAction(モバイル). 
    136      * 
    137      * @return void 
    138      */ 
    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; // TODO 
    145  
    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         // next 
    169         if ($pageNo + HISTORY_NUM < $linemax) { 
    170             $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>"; 
    171         } else { 
    172             $next = ""; 
    173         } 
    174  
    175         // previous 
    176         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         // bar 
    185         if ($next != '' && $previous != '') { 
    186             $bar = " | "; 
    187         } else { 
    188             $bar = ""; 
    189         } 
    190  
    191         $this->tpl_strnavi = $previous . $bar . $next; 
    192  
    193126    } 
    194127 
Note: See TracChangeset for help on using the changeset viewer.