Ignore:
Timestamp:
2012/02/15 19:56:17 (14 years ago)
Author:
Seasoft
Message:

#1625 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_Customer.php

    r21481 r21514  
    4242        } 
    4343        // 本登録された会員のみ 
    44         $sql = "SELECT * FROM dtb_customer WHERE (email = ?" . $sql_mobile . ") AND del_flg = 0 AND status = 2"; 
     44        $sql = 'SELECT * FROM dtb_customer WHERE (email = ?' . $sql_mobile . ') AND del_flg = 0 AND status = 2'; 
    4545        $objQuery = new SC_Query_Ex(); 
    4646        $result = $objQuery->getAll($sql, $arrValues); 
     
    100100            ) AS addrs 
    101101__EOS__; 
    102         $objQuery->setOrder("other_deliv_id IS NULL DESC, other_deliv_id DESC"); 
    103         return $objQuery->select("*", $from, "", array($customer_id, $customer_id)); 
     102        $objQuery->setOrder('other_deliv_id IS NULL DESC, other_deliv_id DESC'); 
     103        return $objQuery->select('*', $from, '', array($customer_id, $customer_id)); 
    104104    } 
    105105 
     
    122122        // 携帯端末IDが一致し、本登録された会員を検索する。 
    123123        $objQuery = new SC_Query_Ex(); 
    124         $exists = $objQuery->exists('dtb_customer', "mobile_phone_id = ? AND del_flg = 0 AND status = 2", array($_SESSION['mobile']['phone_id'])); 
     124        $exists = $objQuery->exists('dtb_customer', 'mobile_phone_id = ? AND del_flg = 0 AND status = 2', array($_SESSION['mobile']['phone_id'])); 
    125125        return $exists; 
    126126    } 
     
    183183    function setLogin($email) { 
    184184        // 本登録された会員のみ 
    185         $sql = "SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND del_flg = 0 AND status = 2"; 
     185        $sql = 'SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND del_flg = 0 AND status = 2'; 
    186186        $objQuery = new SC_Query_Ex(); 
    187187        $result = $objQuery->getAll($sql, array($email, $email)); 
    188         $data = isset($result[0]) ? $result[0] : ""; 
     188        $data = isset($result[0]) ? $result[0] : ''; 
    189189        $this->customer_data = $data; 
    190190        $this->startSession(); 
     
    193193    // セッション情報を最新の情報に更新する 
    194194    function updateSession() { 
    195         $sql = "SELECT * FROM dtb_customer WHERE customer_id = ? AND del_flg = 0"; 
     195        $sql = 'SELECT * FROM dtb_customer WHERE customer_id = ? AND del_flg = 0'; 
    196196        $customer_id = $this->getValue('customer_id'); 
    197197        $objQuery = new SC_Query_Ex(); 
    198198        $arrRet = $objQuery->getAll($sql, array($customer_id)); 
    199         $this->customer_data = isset($arrRet[0]) ? $arrRet[0] : ""; 
     199        $this->customer_data = isset($arrRet[0]) ? $arrRet[0] : ''; 
    200200        $_SESSION['customer'] = $this->customer_data; 
    201201    } 
     
    205205        $_SESSION['customer'] = $this->customer_data; 
    206206        // セッション情報の保存 
    207         GC_Utils_Ex::gfPrintLog("access : user=".$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE); 
     207        GC_Utils_Ex::gfPrintLog('access : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE); 
    208208    } 
    209209 
     
    217217        $objSiteSess->unsetUniqId(); 
    218218        // ログに記録する 
    219         GC_Utils_Ex::gfPrintLog("logout : user=".$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE); 
     219        GC_Utils_Ex::gfPrintLog('logout : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE); 
    220220    } 
    221221 
     
    270270    function isBirthMonth() { 
    271271        if (isset($_SESSION['customer']['birth'])) { 
    272             $arrRet = preg_split("|[- :/]|", $_SESSION['customer']['birth']); 
     272            $arrRet = preg_split('|[- :/]|', $_SESSION['customer']['birth']); 
    273273            $birth_month = intval($arrRet[1]); 
    274274            $now_month = intval(date('m')); 
     
    296296            return $_SERVER['REMOTE_ADDR']; 
    297297        } else { 
    298             return ""; 
     298            return ''; 
    299299        } 
    300300    } 
     
    303303    function updateOrderSummary($customer_id) { 
    304304        $objQuery = new SC_Query_Ex(); 
    305         $arrOrderSummary =  $objQuery->getRow("SUM( payment_total) as buy_total, COUNT(order_id) as buy_times,MAX( create_date) as last_buy_date, MIN(create_date) as first_buy_date",'dtb_order',"customer_id = ? AND del_flg = 0 AND status <> ?",array($customer_id,ORDER_CANCEL)); 
    306         $objQuery->update('dtb_customer',$arrOrderSummary,"customer_id = ?",array($customer_id)); 
     305        $arrOrderSummary =  $objQuery->getRow('SUM( payment_total) as buy_total, COUNT(order_id) as buy_times,MAX( create_date) as last_buy_date, MIN(create_date) as first_buy_date','dtb_order',"customer_id = ? AND del_flg = 0 AND status <> ?",array($customer_id,ORDER_CANCEL)); 
     306        $objQuery->update('dtb_customer',$arrOrderSummary,'customer_id = ?',array($customer_id)); 
    307307    } 
    308308} 
Note: See TracChangeset for help on using the changeset viewer.