Changeset 16107


Ignore:
Timestamp:
2007/09/27 21:27:54 (17 years ago)
Author:
nanasess
Message:

クラス化に伴う修正

Location:
branches/feature-module-update
Files:
2 added
1 edited

Legend:

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

    r15532 r16107  
    55 * http://www.lockon.co.jp/ 
    66 */ 
     7 
     8// {{{ requires 
    79require_once("../require.php"); 
     10require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Refusal_Ex.php"); 
    811 
    9 class LC_Page{ 
    10     function LC_Page(){ 
    11         $this->tpl_mainpage = USER_PATH . 'templates/mypage/refusal.tpl'; 
    12         $this->tpl_title = "MYページ/退会手続き(入力ページ)"; 
    13         $this->tpl_navi = USER_PATH . 'templates/mypage/navi.tpl'; 
    14         $this->tpl_mainno = 'mypage'; 
    15         $this->tpl_mypageno = 'refusal'; 
    16         //session_cache_limiter('private-no-expire'); 
    17     } 
    18 } 
     12// }}} 
     13// {{{ generate page 
    1914 
    20 $objPage = new LC_Page(); 
    21 $objView = new SC_SiteView(); 
    22 $objCustomer = new SC_Customer(); 
    23 $objQuery = new SC_Query(); 
    24 $objSiteSess = new SC_SiteSession(); 
    25  
    26 //ログイン判定 
    27 if (!$objCustomer->isLoginSuccess()){ 
    28     sfDispSiteError(CUSTOMER_ERROR); 
    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 switch ($_POST['mode']){ 
    41     case 'confirm': 
    42      
    43     $objPage->tpl_mainpage = USER_PATH . 'templates/mypage/refusal_confirm.tpl'; 
    44     $objPage->tpl_title = "MYページ/退会手続き(確認ページ)"; 
    45      
    46     // 確認ページを経由したことを登録 
    47     $objSiteSess->setRegistFlag(); 
    48     // hiddenにuniqidを埋め込む 
    49     $objPage->tpl_uniqid = $objSiteSess->getUniqId(); 
    50      
    51     break; 
    52      
    53     case 'complete': 
    54     // 正しい遷移かどうかをチェック 
    55     lfIsValidMovement($objSiteSess); 
    56      
    57     //会員削除 
    58     $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 
    59  
    60     $objCustomer->EndSession(); 
    61     //完了ページへ 
    62     header("Location: ./refusal_complete.php"); 
    63     exit; 
    64 } 
    65  
    66 $objView->assignobj($objPage); 
    67 $objView->display(SITE_FRAME); 
    68  
    69 // 正しい遷移かどうかをチェック 
    70 function lfIsValidMovement($objSiteSess) { 
    71     // 確認ページからの遷移かどうかをチェック 
    72     sfIsPrePage($objSiteSess); 
    73      
    74     // uniqid がPOSTされているかをチェック 
    75     $uniqid = $objSiteSess->getUniqId(); 
    76     if ( !empty($_POST['uniqid']) && ($_POST['uniqid'] === $uniqid) ) { 
    77         return; 
    78     } else { 
    79         sfDispSiteError(PAGE_ERROR, $objSiteSess); 
    80     } 
    81 } 
     15$objPage = new LC_Page_Mypage_Refusal_Ex(); 
     16$objPage->init(); 
     17$objPage->process(); 
     18register_shutdown_function(array($objPage, "destroy")); 
    8219?> 
Note: See TracChangeset for help on using the changeset viewer.