Changeset 11741
- Timestamp:
- 2007/03/12 10:19:58 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/data/class/SC_CustomerList.php
r11643 r11741 140 140 //¡¡E-MAIL 141 141 if (strlen($this->arrSql['email']) > 0) { 142 143 $search_all = 'all';144 $search_pc = 'email';145 $search_mobile = 'email_mobile';146 147 142 //¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²Äǽ¤Ë 148 143 $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 170 144 $sql_where = ""; 171 145 foreach($this->arrSql['email'] as $val) { … … 173 147 //¸¡º÷¾ò·ï¤ò´Þ¤Þ¤Ê¤¤ 174 148 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 ? "; 182 151 } else { 183 $sql_where .= " dtb_customer.$search_patern NOT ILIKE ? ";152 $sql_where .= "AND dtb_customer.email NOT ILIKE ? "; 184 153 } 185 186 154 } 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 ? "; 189 159 } 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 }196 160 } 197 161 $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 } 207 164 $this->setWhere($sql_where); 208 165 }
Note: See TracChangeset
for help on using the changeset viewer.