Ignore:
Timestamp:
2007/09/27 20:34:35 (15 years ago)
Author:
nanasess
Message:

クラス化に伴う修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/html/mypage/history.php

    r15532 r16102  
    66 */ 
    77 
     8// {{{ requires 
    89require_once("../require.php"); 
     10require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_History_Ex.php"); 
    911 
    10 class LC_Page { 
    11     function LC_Page() { 
    12         $this->tpl_mainpage = USER_PATH . 'templates/mypage/history.tpl'; 
    13         $this->tpl_title = "MYページ/購入履歴詳細"; 
    14         $this->tpl_navi = USER_PATH . 'templates/mypage/navi.tpl'; 
    15         $this->tpl_mainno = 'mypage'; 
    16         $this->tpl_mypageno = 'index'; 
    17         session_cache_limiter('private-no-expire'); 
    18     } 
    19 } 
     12// }}} 
     13// {{{ generate page 
    2014 
    21 $objPage = new LC_Page(); 
    22 $objView = new SC_SiteView(); 
    23 $objQuery = new SC_Query(); 
    24 $objCustomer = new SC_Customer(); 
    25  
    26 // レイアウトデザインを取得 
    27 $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 
    28  
    29 //不正アクセス判定 
    30 $from = "dtb_order"; 
    31 $where = "del_flg = 0 AND customer_id = ? AND order_id = ? "; 
    32 $arrval = array($objCustomer->getValue('customer_id'), $_POST['order_id']); 
    33 //DBに情報があるか判定 
    34 $cnt = $objQuery->count($from, $where, $arrval); 
    35 //ログインしていない、またはDBに情報が無い場合 
    36 if (!$objCustomer->isLoginSuccess() || $cnt == 0){ 
    37     sfDispSiteError(CUSTOMER_ERROR); 
    38 } else { 
    39     //受注詳細データの取得 
    40     $objPage->arrDisp = lfGetOrderData($_POST['order_id']); 
    41     // 支払い方法の取得 
    42     $objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 
    43     // 配送時間の取得 
    44     $arrRet = sfGetDelivTime($objPage->arrDisp['payment_id']); 
    45     $objPage->arrDelivTime = sfArrKeyValue($arrRet, 'time_id', 'deliv_time'); 
    46  
    47     //マイページトップ顧客情報表示用 
    48     $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 
    49     $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 
    50     $objPage->CustomerPoint = $objCustomer->getvalue('point'); 
    51 } 
    52  
    53 $objPage->arrPref = $arrPref; 
    54  
    55 $objView->assignobj($objPage); 
    56 $objView->display(SITE_FRAME); 
    57 //----------------------------------------------------------------------------------------------------------------------------------- 
    58  
    59 //受注詳細データの取得 
    60 function lfGetOrderData($order_id) { 
    61     //受注番号が数字であれば 
    62     if(sfIsInt($order_id)) { 
    63         // DBから受注情報を読み込む 
    64         $objQuery = new SC_Query(); 
    65         $col = "order_id, create_date, payment_id, subtotal, tax, use_point, add_point, discount, "; 
    66         $col .= "deliv_fee, charge, payment_total, deliv_name01, deliv_name02, deliv_kana01, deliv_kana02, "; 
    67         $col .= "deliv_zip01, deliv_zip02, deliv_pref, deliv_addr01, deliv_addr02, deliv_tel01, deliv_tel02, deliv_tel03, deliv_time_id, deliv_date "; 
    68         $from = "dtb_order"; 
    69         $where = "order_id = ?"; 
    70         $arrRet = $objQuery->select($col, $from, $where, array($order_id)); 
    71         $arrOrder = $arrRet[0]; 
    72         // 受注詳細データの取得 
    73         $arrRet = lfGetOrderDetail($order_id); 
    74         $arrOrderDetail = sfSwapArray($arrRet); 
    75         $arrData = array_merge($arrOrder, $arrOrderDetail); 
    76     } 
    77     return $arrData; 
    78 } 
    79  
    80 // 受注詳細データの取得 
    81 function lfGetOrderDetail($order_id) { 
    82     $objQuery = new SC_Query(); 
    83     $col = "product_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate"; 
    84     $where = "order_id = ?"; 
    85     $objQuery->setorder("classcategory_id1, classcategory_id2"); 
    86     $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id)); 
    87     return $arrRet; 
    88 } 
    89  
     15$objPage = new LC_Page_Mypage_History_Ex(); 
     16$objPage->init(); 
     17$objPage->process(); 
     18register_shutdown_function(array($objPage, "destroy")); 
    9019?> 
Note: See TracChangeset for help on using the changeset viewer.