Ignore:
Timestamp:
2007/09/27 16:35:54 (15 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/delivery.php

    r15532 r16092  
    55 * http://www.lockon.co.jp/ 
    66 */ 
     7 
     8// {{{ requires 
    79require_once("../require.php"); 
     10require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Delivery_Ex.php"); 
    811 
    9 class LC_Page{ 
    10     function LC_Page(){ 
    11         $this->tpl_mainpage = USER_PATH . 'templates/mypage/delivery.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 = 'delivery'; 
    16         global $arrPref; 
    17         $this->arrPref= $arrPref; 
    18         session_cache_limiter('private-no-expire'); 
    19     } 
    20 } 
     12// }}} 
     13// {{{ generate page 
    2114 
    22 $objPage = new LC_Page(); 
    23 $objView = new SC_SiteView(); 
    24 $objCustomer = new SC_Customer(); 
    25 $objQuery = new SC_Query(); 
    26 $objConn = new SC_DBConn(); 
    27  
    28 //ログイン判定 
    29 if(!$objCustomer->isLoginSuccess()) { 
    30     sfDispSiteError(CUSTOMER_ERROR); 
    31 }else { 
    32     //マイページトップ顧客情報表示用 
    33     $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 
    34     $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 
    35     $objPage->CustomerPoint = $objCustomer->getvalue('point'); 
    36 } 
    37  
    38  
    39 // レイアウトデザインを取得 
    40 $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 
    41  
    42 //削除 
    43 if($_POST['mode'] == 'delete') { 
    44     //不正アクセス判定 
    45     $flag = $objQuery->count("dtb_other_deliv", "customer_id=? AND other_deliv_id=?", array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id'])); 
    46     if($flag > 0) { 
    47         //削除 
    48         $objQuery->delete("dtb_other_deliv", "other_deliv_id=?", array($_POST['other_deliv_id'])); 
    49     } else { 
    50         sfDispSiteError(CUSTOMER_ERROR); 
    51     } 
    52 } 
    53  
    54 $objPage->tpl_pageno = $_POST['pageno']; 
    55  
    56 $from = "dtb_other_deliv"; 
    57 $where = "customer_id=?"; 
    58 $arrval = array($objCustomer->getValue('customer_id')); 
    59 $order = "other_deliv_id DESC"; 
    60  
    61 //お届け先登録件数取得 
    62 $linemax = $objQuery->count($from, $where, $arrval); 
    63  
    64 $objPage->tpl_linemax = $linemax; 
    65  
    66 // 表示順序 
    67 $objQuery->setorder($order); 
    68  
    69 //別のお届け先情報表示 
    70 $objPage->arrOtherDeliv = $objQuery->select("*", $from, $where, $arrval); 
    71  
    72 //お届け先登録数をテンプレートに渡す 
    73 $objPge->deliv_cnt = count($objPage->arrOtherDeliv); 
    74  
    75 $objView->assignobj($objPage); 
    76 $objView->display(SITE_FRAME); 
    77  
    78 //----------------------------------------------------------------------------------------------------------------------------------- 
    79  
     15$objPage = new LC_Page_Mypage_Delivery_Ex(); 
     16$objPage->init(); 
     17$objPage->process(); 
     18register_shutdown_function(array($objPage, "destroy")); 
    8019?> 
Note: See TracChangeset for help on using the changeset viewer.