Changeset 16309


Ignore:
Timestamp:
2007/10/06 22:45:02 (16 years ago)
Author:
naka
Message:

メルマガ管理でPC用アドレスを検索した時に、
モバイルドメインを含めない

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/SC_CustomerList.php

    r15642 r16309  
    1212 
    1313    var $arrColumnCSV; 
    14  
     14             
    1515    function SC_CustomerList($array, $mode = '') { 
    1616        parent::SC_SelectSql($array); 
     17         
     18        $masterData = new SC_DB_MasterData_Ex(); 
     19        $arrMobileDomain = $masterData->getMasterData("mtb_mobile_domain"); 
     20         
    1721        $objDb = new SC_Helper_DB_Ex(); 
    1822 
     
    3539            $this->setWhere("(del_flg = 0 OR del_flg IS NULL)"); 
    3640            $this->setWhere("status = 2"); 
    37  
    38             /* 会員のみ対象とするため削除 
    39             if(is_array($this->arrSql['customer'])) { 
    40                 $tmp_where = ""; 
    41                 foreach($this->arrSql['customer'] as $val) { 
    42                     if($tmp_where != "") { 
    43                         $tmp_where.= " OR "; 
    44                     } 
    45                     switch($val) { 
    46                     // 会員 
    47                     case '1': 
    48                         $tmp_where.= "status = 2"; 
    49                         break; 
    50                     // メルマガ登録 
    51                     case '2': 
    52                         $tmp_where.= "customer_id IS NULL"; 
    53                         break; 
    54                     // CSV登録 
    55                     case '3': 
    56                         $tmp_where.= "customer_id IS NULL"; 
    57                         break; 
    58                     default: 
    59                         $tmp_where = ""; 
    60                         break; 
    61                     } 
    62                 } 
    63                 if($tmp_where != "") { 
    64                     $tmp_where = "(" . $tmp_where . ")"; 
    65                 } 
    66                 $this->setWhere($tmp_where); 
    67             } 
    68             */ 
    6941            // 登録日を示すカラム 
    7042            $regdate_col = 'dtb_customer.create_date'; 
     
    176148        // E-MAIL(mobile) 
    177149        if (!isset($this->arrSql['email_mobile'])) $this->arrSql['email_mobile'] = ""; 
     150         
    178151        if (strlen($this->arrSql['email_mobile']) > 0) { 
    179152            //カンマ区切りで複数の条件指定可能に 
     
    205178        if ( $mode == 'magazine' ){ 
    206179            if (!isset($this->arrSql['mail_type'])) $this->arrSql['mail_type'] = ""; 
    207             if ( strlen($this->arrSql['mail_type']) > 0 && $this->arrSql['mail_type'] == 2) { 
    208                 $this->setWhere( " dtb_customer.email_mobile <> ''  "); 
     180            // PCサイトメールが指定されている場合 
     181            if ( strlen($this->arrSql['mail_type']) > 0 && $this->arrSql['mail_type'] == 1) { 
     182                // 携帯ドメインを外す。 
     183                foreach($arrMobileDomain as $mobile_domain) { 
     184                    $this->setWhere(" dtb_customer.email NOT ILIKE '%$mobile_domain' ");                     
     185                } 
     186            // 携帯サイトメールが指定されている場合 
     187            } else if( strlen($this->arrSql['mail_type']) > 0 && $this->arrSql['mail_type'] == 2) { 
     188                $this->setWhere( " dtb_customer.email_mobile <> ''  "); 
    209189            } 
    210190        } 
Note: See TracChangeset for help on using the changeset viewer.