Ignore:
Timestamp:
2007/03/08 23:50:35 (19 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/class/SC_CustomerList.php

    r11624 r11627  
    140140        //¡¡E-MAIL 
    141141        if (strlen($this->arrSql['email']) > 0) { 
     142 
     143            $search_all = 'all'; 
     144            $search_pc = 'email'; 
     145            $search_mobile = 'email_mobile'; 
     146             
    142147            //¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²Äǽ¤Ë 
    143148            $this->arrSql['email'] = explode(",", $this->arrSql['email']); 
     149             
     150            //¡¡¥á¡¼¥ë¼ïÊÌ 
     151            if ( is_array( $this->arrSql['mail_type'] ) ){ 
     152 
     153                if(in_array(MAIL_TYPE_PC, $this->arrSql['mail_type']) && !in_array(MAIL_TYPE_MOBILE, $this->arrSql['mail_type'])) { 
     154                    // PC¤Î¤ß¸¡º÷ 
     155                    $search_patern = $search_pc;             
     156                } else if(!in_array(MAIL_TYPE_PC, $this->arrSql['mail_type']) && in_array(MAIL_TYPE_MOBILE, $this->arrSql['mail_type'])) { 
     157                    // ¥â¥Ð¥¤¥ë¤Î¤ß¸¡º÷ 
     158                    $search_patern = $search_mobile; 
     159                } else { 
     160                    // Á´¸¡º÷ 
     161                    $search_patern = $search_all; 
     162                } 
     163                 
     164            } else { 
     165                // Á´¸¡º÷ 
     166                $search_patern = $search_all;                
     167            } 
     168 
     169 
    144170            $sql_where = ""; 
    145171            foreach($this->arrSql['email'] as $val) { 
     
    147173                //¸¡º÷¾ò·ï¤ò´Þ¤Þ¤Ê¤¤ 
    148174                if($this->arrSql['not_emailinc'] == '1') { 
     175                     
    149176                    if($sql_where == "") { 
    150                         $sql_where .= "dtb_customer.email NOT ILIKE ? "; 
     177                        $sql_where .= "(dtb_customer.email NOT ILIKE ? OR dtb_customer.email_maile NOT ILIKE ?) "; 
    151178                    } else { 
    152                         $sql_where .= "AND dtb_customer.email NOT ILIKE ? "; 
     179                        $sql_where .= "AND (dtb_customer.email NOT ILIKE ? OR dtb_customer.email_maile NOT ILIKE ?) "; 
    153180                    } 
     181                     
    154182                } else {                 
    155183                    if($sql_where == "") { 
    156                         $sql_where .= "dtb_customer.email ILIKE ? "; 
     184                        $sql_where .= "(dtb_customer.email ILIKE ? OR dtb_customer.email_maile ILIKE ?) "; 
    157185                    } else { 
    158                         $sql_where .= "OR dtb_customer.email ILIKE ? "; 
     186                        $sql_where .= "OR (dtb_customer.email ILIKE ? OR dtb_customer.email_maile ILIKE ?) "; 
    159187                    } 
    160188                } 
     
    164192            $this->setWhere($sql_where); 
    165193        } 
    166      
    167         //¡¡·ÈÂÓÍѥ᡼¥ë¥¢¥É¥ì¥¹ 
    168         if (strlen($this->arrSql['email_mobile']) > 0) { 
    169             //¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²Äǽ¤Ë 
    170             $this->arrSql['email_mobile'] = explode(",", $this->arrSql['email_mobile']); 
    171             $sql_where = ""; 
    172             foreach($this->arrSql['email_mobile'] as $val) { 
    173                 $val = trim($val); 
    174                 if($sql_where == "") { 
    175                     $sql_where .= "dtb_customer.email_mobile ILIKE ? "; 
    176                 } else { 
    177                     $sql_where .= "OR dtb_customer.email_mobile ILIKE ? "; 
    178                 } 
    179                 $this->arrVal[] = $this->addSearchStr($val); 
    180             } 
    181             $this->setWhere($sql_where); 
    182         } 
    183          
    184                  
     194                     
    185195        //¡¡HTML-mail 
    186196        if ( $mode == 'magazine' ){ 
Note: See TracChangeset for help on using the changeset viewer.