Changeset 11627 for branches/dev/data/class
- Timestamp:
- 2007/03/08 23:50:35 (19 years ago)
- File:
-
- 1 edited
-
branches/dev/data/class/SC_CustomerList.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/data/class/SC_CustomerList.php
r11624 r11627 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 142 147 //¥«¥ó¥Þ¶èÀÚ¤ê¤ÇÊ£¿ô¤Î¾ò·ï»ØÄê²Äǽ¤Ë 143 148 $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 144 170 $sql_where = ""; 145 171 foreach($this->arrSql['email'] as $val) { … … 147 173 //¸¡º÷¾ò·ï¤ò´Þ¤Þ¤Ê¤¤ 148 174 if($this->arrSql['not_emailinc'] == '1') { 175 149 176 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 ?) "; 151 178 } 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 ?) "; 153 180 } 181 154 182 } else { 155 183 if($sql_where == "") { 156 $sql_where .= " dtb_customer.email ILIKE ?";184 $sql_where .= "(dtb_customer.email ILIKE ? OR dtb_customer.email_maile ILIKE ?) "; 157 185 } else { 158 $sql_where .= "OR dtb_customer.email ILIKE ?";186 $sql_where .= "OR (dtb_customer.email ILIKE ? OR dtb_customer.email_maile ILIKE ?) "; 159 187 } 160 188 } … … 164 192 $this->setWhere($sql_where); 165 193 } 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 185 195 //¡¡HTML-mail 186 196 if ( $mode == 'magazine' ){
Note: See TracChangeset
for help on using the changeset viewer.
