Changeset 16238


Ignore:
Timestamp:
2007/10/02 21:43:36 (16 years ago)
Author:
nanasess
Message:

クラス化に伴う修正

Location:
branches/feature-module-update
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/mypage/LC_Page_Mypage_Refusal.php

    r16119 r16238  
    9595 
    9696    /** 
     97     * モバイルページを初期化する. 
     98     * 
     99     * @return void 
     100     */ 
     101    function mobileInit() { 
     102        $this->tpl_mainpage = 'mypage/refusal.tpl'; 
     103        $this->tpl_title = "MYページ/退会手続き(入力ページ)"; 
     104 
     105    } 
     106 
     107    /** 
     108     * Page のプロセス(モバイル). 
     109     * 
     110     * @return void 
     111     */ 
     112    function mobileProcess() { 
     113        $objView = new SC_MobileView(); 
     114        $objCustomer = new SC_Customer(); 
     115        $objQuery = new SC_Query(); 
     116 
     117        //ログイン判定 
     118        if (!$objCustomer->isLoginSuccess()){ 
     119            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
     120        }else { 
     121            //マイページトップ顧客情報表示用 
     122            $this->CustomerName1 = $objCustomer->getvalue('name01'); 
     123            $this->CustomerName2 = $objCustomer->getvalue('name02'); 
     124            $this->CustomerPoint = $objCustomer->getvalue('point'); 
     125        } 
     126 
     127        if (isset($_POST['no'])) { 
     128            $this->sendRedirect($this->getLocation(SC_Helper_Mobile_Ex::gfAddSessionId("index.php"))); 
     129            exit; 
     130        } elseif (isset($_POST['complete'])){ 
     131            //会員削除 
     132            $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 
     133 
     134            $where = "email = ?"; 
     135            $objCustomer->EndSession(); 
     136            //完了ページへ 
     137            $this->sendRedirect($this->getLocation(SC_Helper_Mobile_Ex::gfAddSessionId("refusal_complete.php"))); 
     138            exit; 
     139        } 
     140 
     141        $objView->assignobj($this); 
     142        $objView->display(SITE_FRAME); 
     143    } 
     144 
     145    /** 
    97146     * デストラクタ. 
    98147     * 
  • branches/feature-module-update/data/class/pages/mypage/LC_Page_Mypage_RefusalComplete.php

    r16117 r16238  
    5959 
    6060    /** 
     61     * モバイルページを初期化する. 
     62     * 
     63     * @return void 
     64     */ 
     65    function mobileInit() { 
     66        $this->tpl_mainpage = 'mypage/refusal_complete.tpl'; 
     67        $this->tpl_title = "MYページ/退会手続き(完了ページ)"; 
     68        $this->point_disp = false; 
     69    } 
     70 
     71    /** 
     72     * Page のプロセス(モバイル). 
     73     * 
     74     * @return void 
     75     */ 
     76    function mobileProcess() { 
     77        $objView = new SC_MobileView(); 
     78 
     79        $objCustomer = new SC_Customer(); 
     80        //マイページトップ顧客情報表示用 
     81        $this->CustomerName1 = $objCustomer->getvalue('name01'); 
     82        $this->CustomerName2 = $objCustomer->getvalue('name02'); 
     83        $this->CustomerPoint = $objCustomer->getvalue('point'); 
     84 
     85        $objView->assignobj($this); 
     86        $objView->display(SITE_FRAME); 
     87    } 
     88 
     89    /** 
    6190     * デストラクタ. 
    6291     * 
  • branches/feature-module-update/html/mobile/mypage/history.php

    r16170 r16238  
    77 * 
    88 * 
    9  * MyPage 
     9 * モバイルサイト/購入履歴 
    1010 */ 
    1111 
     12// {{{ requires 
    1213require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_History_Ex.php"); 
    1315 
    14 class LC_Page{ 
    15     function LC_Page() { 
    16         $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . 'mypage/history.tpl'; 
    17         $this->tpl_title = 'MYページ/購入履歴一覧'; 
    18         session_cache_limiter('private-no-expire'); 
    19     } 
    20 } 
     16// }}} 
     17// {{{ generate page 
    2118 
    22 define ("HISTORY_NUM", 5); 
    23  
    24 $objPage = new LC_Page(); 
    25 $objView = new SC_MobileView(); 
    26 $objQuery = new SC_Query(); 
    27 $objCustomer = new SC_Customer(); 
    28 $pageNo = isset($_GET['pageno']) ? $_GET['pageno'] : 0; 
    29  
    30 // レイアウトデザインを取得 
    31 //$objLayout = new SC_Helper_PageLayout_Ex(); 
    32 //$objLayout->sfGetPageLayout($objPage, false, "mypage/index.php"); 
    33  
    34 // ログインチェック 
    35 if(!isset($_SESSION['customer'])) { 
    36     SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
    37 } 
    38  
    39 $col = "order_id, create_date, payment_id, payment_total"; 
    40 $from = "dtb_order"; 
    41 $where = "del_flg = 0 AND customer_id=?"; 
    42 $arrval = array($objCustomer->getvalue('customer_id')); 
    43 $order = "order_id DESC"; 
    44  
    45 $linemax = $objQuery->count($from, $where, $arrval); 
    46 $objPage->tpl_linemax = $linemax; 
    47  
    48 // 取得範囲の指定(開始行番号、行数のセット) 
    49 $objQuery->setlimitoffset(HISTORY_NUM, $pageNo); 
    50 // 表示順序 
    51 $objQuery->setorder($order); 
    52  
    53 //購入履歴の取得 
    54 $objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval); 
    55  
    56 // next 
    57 if ($pageNo + HISTORY_NUM < $linemax) { 
    58     $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>"; 
    59 } else { 
    60     $next = ""; 
    61 } 
    62  
    63 // previous 
    64 if ($pageNo - HISTORY_NUM > 0) { 
    65     $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>←前へ</a>"; 
    66 } elseif ($pageNo == 0) { 
    67     $previous = ""; 
    68 } else { 
    69     $previous = "<a href='history.php?pageno=0'>←前へ</a>"; 
    70 } 
    71  
    72 // bar 
    73 if ($next != '' && $previous != '') { 
    74     $bar = " | "; 
    75 } else { 
    76     $bar = ""; 
    77 } 
    78  
    79 $objPage->tpl_strnavi = $previous . $bar . $next; 
    80 $objView->assignobj($objPage);              //$objpage内の全てのテンプレート変数をsmartyに格納 
    81 $objView->display(SITE_FRAME);              //パスとテンプレート変数の呼び出し、実行 
     19$objPage = new LC_Page_Mypage_History_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    8223?> 
  • branches/feature-module-update/html/mobile/mypage/history_detail.php

    r15532 r16238  
    11<?php 
    22/** 
    3  *  
     3 * 
    44 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
    55 * 
    66 * http://www.lockon.co.jp/ 
    7  *  
    87 * 
    9  * 履歴 
     8 * 
     9 * モバイルサイト/受注履歴詳細 
    1010 */ 
    1111 
     12// {{{ requires 
    1213require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_HistoryDetail_Ex.php"); 
    1315 
    14 class LC_Page { 
    15     function LC_Page() { 
    16         $this->tpl_mainpage = 'mypage/history_detail.tpl'; 
    17         $this->tpl_title = "MYページ/購入履歴詳細"; 
    18         session_cache_limiter('private-no-expire'); 
    19     } 
    20 } 
     16// }}} 
     17// {{{ generate page 
    2118 
    22 $objPage = new LC_Page(); 
    23 $objView = new SC_MobileView(); 
    24 $objQuery = new SC_Query(); 
    25 $objCustomer = new SC_Customer(); 
    26  
    27 // レイアウトデザインを取得 
    28 $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 
    29  
    30 //不正アクセス判定 
    31 $from = "dtb_order"; 
    32 $where = "del_flg = 0 AND customer_id = ? AND order_id = ? "; 
    33 $arrval = array($objCustomer->getValue('customer_id'), $_POST['order_id']); 
    34 //DBに情報があるか判定 
    35 $cnt = $objQuery->count($from, $where, $arrval); 
    36  
    37 //ログインしていない、またはDBに情報が無い場合 
    38 if (!$objCustomer->isLoginSuccess() or $cnt == 0){ 
    39     sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
    40 } else { 
    41     //受注詳細データの取得 
    42     $objPage->arrDisp = lfGetOrderData($_POST['order_id']); 
    43     // 支払い方法の取得 
    44     $objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 
    45     // 配送時間の取得 
    46     $arrRet = sfGetDelivTime($objPage->arrDisp['payment_id']); 
    47     $objPage->arrDelivTime = sfArrKeyValue($arrRet, 'time_id', 'deliv_time'); 
    48  
    49     //マイページトップ顧客情報表示用 
    50     $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 
    51     $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 
    52     $objPage->CustomerPoint = $objCustomer->getvalue('point'); 
    53 } 
    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  
     19$objPage = new LC_Page_Mypage_HistoryDetail_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    9023?> 
  • branches/feature-module-update/html/mobile/mypage/order.php

    r15532 r16238  
    11<?php 
    22/** 
    3  *  
     3 * 
    44 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
    55 * 
    66 * http://www.lockon.co.jp/ 
    7  *  
    87 * 
    9  * 履歴から注文を取得・登録し、カートに遷移する。 
     8 * 
     9 * モバイルサイト/購入履歴からカートへ 
    1010 */ 
     11 
     12// {{{ requires 
    1113require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Order_Ex.php"); 
    1215 
    13 $objCustomer = new SC_Customer(); 
    14 $objCartSess = new SC_CartSession(); 
     16// }}} 
     17// {{{ generate page 
    1518 
    16 //受注詳細データの取得 
    17 $arrDisp = lfGetOrderDetail($_POST['order_id']); 
    18  
    19 //ログインしていない、またはDBに情報が無い場合 
    20 if (!$objCustomer->isLoginSuccess() or count($arrDisp) == 0){ 
    21     sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
    22 } 
    23  
    24 for($num = 0; $num < count($arrDisp); $num++) { 
    25     $product_id = $arrDisp[$num]['product_id']; 
    26     $cate_id1 = $arrDisp[$num]['classcategory_id1']; 
    27     $cate_id2 = $arrDisp[$num]['classcategory_id2']; 
    28     $quantity = $arrDisp[$num]['quantity']; 
    29  
    30     $objCartSess->addProduct(array($product_id, $cate_id1, $cate_id2), $quantity); 
    31 } 
    32  
    33 header("Location: " . gfAddSessionId(MOBILE_URL_CART_TOP)); 
    34  
    35  
    36 //----------------------------------------------------------------------------------------------------------------------------------- 
    37 // 受注詳細データの取得 
    38 function lfGetOrderDetail($order_id) { 
    39     $objQuery = new SC_Query(); 
    40     $col = "product_id, classcategory_id1, classcategory_id2, quantity"; 
    41     $where = "order_id = ?"; 
    42     $objQuery->setorder("classcategory_id1, classcategory_id2"); 
    43     $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id)); 
    44     return $arrRet; 
    45 } 
    46  
     19$objPage = new LC_Page_Mypage_Order_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    4723?> 
  • branches/feature-module-update/html/mobile/mypage/refusal.php

    r16170 r16238  
    77 * 
    88 * 
    9  * 退会処理 
     9 * モバイルサイト/退会処理 
    1010 */ 
     11 
     12// {{{ requires 
    1113require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Refusal_Ex.php"); 
    1215 
    13 class LC_Page{ 
    14     function LC_Page(){ 
    15         $this->tpl_mainpage = 'mypage/refusal.tpl'; 
    16         $this->tpl_title = "MYページ/退会手続き(入力ページ)"; 
    17         //session_cache_limiter('private-no-expire'); 
    18     } 
    19 } 
     16// }}} 
     17// {{{ generate page 
    2018 
    21 $objPage = new LC_Page(); 
    22 $objView = new SC_MobileView(); 
    23 $objCustomer = new SC_Customer(); 
    24 $objQuery = new SC_Query(); 
    25  
    26 //ログイン判定 
    27 if (!$objCustomer->isLoginSuccess()){ 
    28     SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 
    29 }else { 
    30     //マイページトップ顧客情報表示用 
    31     $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 
    32     $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 
    33     $objPage->CustomerPoint = $objCustomer->getvalue('point'); 
    34 } 
    35  
    36  
    37 // レイアウトデザインを取得 
    38 //$objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 
    39  
    40 if (isset($_POST['no'])) { 
    41     header("Location: " . SC_Helper_Mobile_Ex::gfAddSessionId("index.php")); 
    42     exit; 
    43 } elseif (isset($_POST['complete'])){ 
    44     //会員削除 
    45     $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 
    46  
    47     $where = "email = ?"; 
    48     $objCustomer->EndSession(); 
    49     //完了ページへ 
    50     header("Location: " . SC_Helper_Mobile_Ex::gfAddSessionId("refusal_complete.php")); 
    51     exit; 
    52 } 
    53  
    54 $objView->assignobj($objPage); 
    55 $objView->display(SITE_FRAME); 
    56  
     19$objPage = new LC_Page_Mypage_Refusal_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    5723?> 
  • branches/feature-module-update/html/mobile/mypage/refusal_complete.php

    r16170 r16238  
    77 * 
    88 * 
    9  * 退会完了 
     9 * モバイルサイト/退会完了 
    1010 */ 
    1111 
     12// {{{ requires 
    1213require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_RefusalComplete_Ex.php"); 
    1315 
    14 class LC_Page{ 
    15     function LC_Page(){ 
    16         $this->tpl_mainpage = 'mypage/refusal_complete.tpl'; 
    17         $this->tpl_title = "MYページ/退会手続き(完了ページ)"; 
    18         $this->point_disp = false; 
    19     } 
    20 } 
     16// }}} 
     17// {{{ generate page 
    2118 
    22 $objPage = new LC_Page(); 
    23 $objView = new SC_MobileView(); 
    24  
    25 $objCustomer = new SC_Customer(); 
    26 //マイページトップ顧客情報表示用 
    27 $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 
    28 $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 
    29 $objPage->CustomerPoint = $objCustomer->getvalue('point'); 
    30  
    31 // レイアウトデザインを取得 
    32 //$objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 
    33  
    34 $objView->assignobj($objPage); 
    35 $objView->display(SITE_FRAME); 
    36  
     19$objPage = new LC_Page_Mypage_RefusalComplete_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    3723?> 
Note: See TracChangeset for help on using the changeset viewer.