Changeset 1062 in ExiteCMS for modules/common/newsletters/php-files/modules/newsletters/newsletters.php
- Timestamp:
- 11/05/07 21:46:49 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/common/newsletters/php-files/modules/newsletters/newsletters.php
r915 r1062 156 156 157 157 // build the query on the user table based on the selection made 158 $query = "SELECT * FROM ".$db_prefix."users WHERE ";158 $query = "SELECT * FROM ".$db_prefix."users WHERE user_status = 0 AND "; 159 159 $where = ""; 160 160 if ($send_to_myself) { … … 181 181 $result2 = dbquery($query); 182 182 183 184 $error = ""; $sc = 0; 183 // process the selected users 184 $error = ""; $sc = 0; $bad_email = 0; 185 185 if (dbrows($result2) == 0) { 186 186 $error = $locale['nl419']; … … 192 192 $error = array(); 193 193 while($data2 = dbarray($result2)) { 194 195 // check if this user has an invalid email address flag 196 if ($data2['user_bad_email'] != 0) { 197 // update the counter, and skip this user 198 $bad_email++; 199 continue; 200 } 201 202 // replace tags in the subject 194 203 $subject = stripslashes($data['newsletter_subject']); 195 // replace tags in the subject196 204 $subject = str_replace("{:USER_NAME:}", $data2['user_name'], $subject); 197 205 206 // replace tags in the body 198 207 $content = stripslashes($data['newsletter_content']); 199 // replace tags in the body200 208 $content = str_replace("{:USER_ID:}", $data2['user_id'], $content); 201 209 $content = str_replace("{:USER_NAME:}", $data2['user_name'], $content); … … 283 291 284 292 // process the error messages 285 $variables['message'] = " <b>";293 $variables['message'] = ""; 286 294 if (is_array($error)) { 287 295 if ($send_to_myself) { … … 300 308 } else { 301 309 $variables['message'] .= $error; 310 } 311 if ($bad_email) { 312 $variables['message'] .= "<br /><br />".sprintf($locale['nl425'], $bad_email); 302 313 } 303 314 $variables['bold'] = true;
Note: See TracChangeset
for help on using the changeset viewer.
