Changeset 20148


Ignore:
Timestamp:
2011/02/11 18:57:58 (13 years ago)
Author:
kimoto
Message:

リファクタリング #981

Location:
branches/version-2_5-dev/data/class
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/SC_Product.php

    r20116 r20148  
    739739        return $sql; 
    740740    } 
    741      
     741 
    742742    /** 
    743743     * 商品規格ID1、2に紐づいた,product_class_idを取得する. 
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php

    r20147 r20148  
    288288 
    289289 
     290    /** 
     291     * 会員登録時フォーム初期化 
     292     * 
     293     * @param mixed $objFormParam 
     294     * @access public 
     295     * @return void 
     296     */ 
    290297    function sfCustomerEntryParam (&$objFormParam) { 
    291298        SC_Helper_Customer_Ex::sfCustomerCommonParam($objFormParam); 
    292299    } 
    293300 
     301    /** 
     302     * 会員情報変更フォーム初期化 
     303     * 
     304     * @param mixed $objFormParam 
     305     * @access public 
     306     * @return void 
     307     */ 
    294308    function sfCustomerMypageParam (&$objFormParam) { 
    295309        SC_Helper_Customer_Ex::sfCustomerCommonParam($objFormParam); 
     
    300314    } 
    301315 
     316    /** 
     317     * 会員フォーム共通 
     318     * 
     319     * @param mixed $objFormParam 
     320     * @access public 
     321     * @return void 
     322     */ 
    302323    function sfCustomerCommonParam (&$objFormParam) { 
    303324 
     
    336357    } 
    337358 
     359    /** 
     360     * 会員登録エラーチェック 
     361     * 
     362     * @param mixed $objFormParam 
     363     * @access public 
     364     * @return array エラーの配列 
     365     */ 
    338366    function sfCustomerEntryErrorCheck(&$objFormParam) { 
    339367        $objErr->arrErr = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck(&$objFormParam); 
     
    341369    } 
    342370 
     371    /** 
     372     * 会員情報変更エラーチェック 
     373     * 
     374     * @param mixed $objFormParam 
     375     * @access public 
     376     * @return array エラーの配列 
     377     */ 
    343378    function sfCustomerMypageErrorCheck(&$objFormParam) { 
    344379 
     
    359394 
    360395    /** 
    361      * 入力エラーチェック 
     396     * 会員エラーチェック共通 
    362397     * 
    363398     * @param mixed $objFormParam 
     
    390425        return $objErr->arrErr; 
    391426    } 
    392  
    393  
    394  
    395427} 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage.php

    r20116 r20148  
    2323 
    2424// {{{ requires 
    25 require_once(CLASS_REALDIR . "pages/LC_Page.php"); 
     25require_once(CLASS_REALDIR . "pages/mypage/LC_Page_AbstractMypage.php"); 
    2626 
    2727/** 
     
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_MyPage extends LC_Page { 
     34class LC_Page_MyPage extends LC_Page_AbstractMypage { 
    3535 
    3636    // {{{ properties 
     
    4949    function init() { 
    5050        parent::init(); 
    51         $this->tpl_title = 'MYページ'; 
     51        $this->tpl_title        = 'MYページ'; 
    5252        if (Net_UserAgent_Mobile::isMobile() === true){ 
    5353            $this->tpl_subtitle = 'MYページ'; 
     
    5555            $this->tpl_subtitle = '購入履歴一覧'; 
    5656        } 
    57         $this->tpl_navi = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 
    58         $this->tpl_mainno = 'mypage'; 
    59         $this->tpl_mypageno = 'index'; 
     57        $this->tpl_navi         = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 
     58        $this->tpl_mainno       = 'mypage'; 
     59        $this->tpl_mypageno     = 'index'; 
    6060        $this->httpCacheControl('nocache'); 
    6161    } 
     
    6868    function process() { 
    6969        parent::process(); 
    70         $this->action(); 
    71         $this->sendResponse(); 
    7270    } 
    73      
     71 
    7472    /** 
    7573     * Page のAction. 
     
    8179        $objQuery = new SC_Query(); 
    8280        $objCustomer = new SC_Customer(); 
    83          
    84         // 退会判定用情報の取得 
    85         $this->tpl_login = $objCustomer->isLoginSuccess(true); 
    86  
    87         // ログインチェック 
    88         if(!$objCustomer->isLoginSuccess(true)) { 
    89             SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
    90         }else { 
    91             //マイページトップ顧客情報表示用 
    92             $this->CustomerName1 = $objCustomer->getvalue('name01'); 
    93             $this->CustomerName2 = $objCustomer->getvalue('name02'); 
    94             $this->CustomerPoint = $objCustomer->getvalue('point'); 
    95         } 
    9681 
    9782        //ページ送り用 
     
    146131            $this->tpl_strnavi = $objNavi->strnavi;     // 表示文字列 
    147132            $startno = $objNavi->start_row; 
    148              
     133 
    149134            // 取得範囲の指定(開始行番号、行数のセット) 
    150135            $objQuery->setLimitOffset(SEARCH_PMAX, $startno); 
    151136        } 
    152          
     137 
    153138        // 表示順序 
    154139        $objQuery->setOrder($order); 
     
    171156        parent::destroy(); 
    172157    } 
    173  
    174     //エラーチェック 
    175  
    176     function lfErrorCheck() { 
    177         $objErr = new SC_CheckError(); 
    178         $objErr->doFunc(array("メールアドレス", "login_email", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","EMAIL_CHECK","MAX_LENGTH_CHECK")); 
    179         $objErr->dofunc(array("パスワード", "login_password", PASSWORD_LEN2), array("EXIST_CHECK","ALNUM_CHECK")); 
    180         return $objErr->arrErr; 
    181     } 
    182  
    183     /* パラメータ情報の初期化 */ 
    184     function lfInitParam(&$objFormParam) { 
    185  
    186         $objFormParam->addParam("記憶する", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 
    187         $objFormParam->addParam("メールアドレス", "login_email", MTEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    188         $objFormParam->addParam("パスワード", "login_pass", STEXT_LEN, "a", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    189     } 
    190  
    191158} 
    192 ?> 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_History.php

    r20144 r20148  
    6868     */ 
    6969    function action() { 
    70         $objQuery       = new SC_Query(); 
    7170        $objCustomer    = new SC_Customer(); 
    7271        $objDb          = new SC_Helper_DB_Ex(); 
     
    171170    } 
    172171} 
    173 ?> 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Login.php

    r20143 r20148  
    4444    function init() { 
    4545        parent::init(); 
    46         $this->tpl_title = 'MYページ(ログイン)'; 
    4746        $this->httpCacheControl('nocache'); 
    4847    } 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Order.php

    r20139 r20148  
    2323 
    2424// {{{ requires 
    25 require_once(CLASS_REALDIR . "pages/LC_Page.php"); 
     25require_once(CLASS_REALDIR . "pages/mypage/LC_Page_AbstractMypage.php"); 
    2626 
    2727/** 
     
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Mypage_Order extends LC_Page { 
     34class LC_Page_Mypage_Order extends LC_Page_AbstractMypage { 
    3535 
    3636    // }}} 
     
    5353    function process() { 
    5454        parent::process(); 
    55         $this->action(); 
    56         $this->sendResponse(); 
    5755    } 
    5856 
     
    6967 
    7068        //ログインしていない、またはDBに情報が無い場合 
    71         if (!$objCustomer->isLoginSuccess(true) || empty($arrOrderDetail)){ 
     69        if (empty($arrOrderDetail)){ 
    7270            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
    7371        } 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Refusal.php

    r20140 r20148  
    4444    function init() { 
    4545        parent::init(); 
    46         $this->tpl_title    = 'MYページ'; 
    4746        $this->tpl_subtitle = '退会手続き(入力ページ)'; 
    48         $this->tpl_navi     = TEMPLATE_REALDIR . 'mypage/navi.tpl'; 
    49         $this->tpl_mainno   = 'mypage'; 
    5047        $this->tpl_mypageno = 'refusal'; 
    5148    } 
     
    104101     */ 
    105102    function lfDeleteCustomer($customer_id){ 
    106         $objQuery       = SC_Query::getSingletonInstance(); 
     103        $objQuery = SC_Query::getSingletonInstance(); 
    107104 
    108105        $sqlval['del_flg']      = 1; 
Note: See TracChangeset for help on using the changeset viewer.