Changeset 11741


Ignore:
Timestamp:
2007/03/12 10:19:58 (17 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

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

    r11643 r11741  
    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              
    147142            //¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²Äǽ¤Ë 
    148143            $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  
    170144            $sql_where = ""; 
    171145            foreach($this->arrSql['email'] as $val) { 
     
    173147                //¸¡º÷¾ò·ï¤ò´Þ¤Þ¤Ê¤¤ 
    174148                if($this->arrSql['not_emailinc'] == '1') { 
    175                      
    176                     if($sql_where != "") { 
    177                         $sql_where .= "AND "; 
    178                     }                        
    179                      
    180                     if($search_patern == $search_all) { 
    181                         $sql_where .= "(dtb_customer.$search_pc NOT ILIKE ? OR dtb_customer.$search_mobile NOT ILIKE ?) "; 
     149                    if($sql_where == "") { 
     150                        $sql_where .= "dtb_customer.email NOT ILIKE ? "; 
    182151                    } else { 
    183                         $sql_where .= "dtb_customer.$search_patern NOT ILIKE ? ";                        
     152                        $sql_where .= "AND dtb_customer.email NOT ILIKE ? "; 
    184153                    } 
    185                      
    186154                } else {                 
    187                     if($sql_where != "") { 
    188                         $sql_where .= "OR "; 
     155                    if($sql_where == "") { 
     156                        $sql_where .= "dtb_customer.email ILIKE ? "; 
     157                    } else { 
     158                        $sql_where .= "OR dtb_customer.email ILIKE ? "; 
    189159                    } 
    190                          
    191                     if($search_patern == $search_all) { 
    192                         $sql_where .= "(dtb_customer.$search_pc ILIKE ? OR dtb_customer.$search_mobile ILIKE ?) "; 
    193                     } else { 
    194                         $sql_where .= "dtb_customer.$search_patern ILIKE ?  "; 
    195                     } 
    196160                } 
    197161                $searchEmail = $this->addSearchStr($val); 
    198                  
    199                 if($search_patern == $search_all) { 
    200                     $this->arrVal[] = $searchEmail; 
    201                     $this->arrVal[] = $searchEmail; 
    202                 } else { 
    203                     $this->arrVal[] = $searchEmail;                  
    204                 } 
    205             } 
    206              
     162                $this->arrVal[] = $searchEmail; 
     163            } 
    207164            $this->setWhere($sql_where); 
    208165        } 
Note: See TracChangeset for help on using the changeset viewer.