Changeset 17953


Ignore:
Timestamp:
2009/04/03 12:28:01 (15 years ago)
Author:
Yammy
Message:

ちょこっと修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_MailView.php

    r17922 r17953  
    5555        $objView = new SC_SiteView(); 
    5656        $objSess = new SC_Session(); 
     57        $objCustomer = new SC_Customer(); 
    5758 
    58         // 認証可否の判定 
    59         SC_Utils_Ex::sfIsSuccess($objSess); 
     59        // ログインチェック 
     60        if(!$objCustomer->isLoginSuccess()) { 
     61            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
     62        } 
    6063 
    6164        if(SC_Utils_Ex::sfIsInt($_GET['send_id'])) { 
    6265            $objQuery = new SC_Query(); 
    6366            $col = "subject, mail_body"; 
    64             $where = "send_id = ?"; 
    65             $arrRet = $objQuery->select($col, "dtb_mail_history", $where, array($_GET['send_id'])); 
     67            $where = "send_id = ? AND customer_id = ?"; 
     68            $arrval = array($_GET['send_id'], $objCustomer->getValue('customer_id')); 
     69            $arrRet = $objQuery->select($col, "dtb_mail_history LEFT JOIN dtb_order USING(order_id)", $where, $arrval); 
     70 
     71            if (empty($arrRet)) { 
     72                SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 
     73            } 
    6674            $this->tpl_subject = $arrRet[0]['subject']; 
    6775            $this->tpl_body = $arrRet[0]['mail_body']; 
Note: See TracChangeset for help on using the changeset viewer.