Changeset 1062 in ExiteCMS
- Timestamp:
- 11/05/07 21:46:49 (4 years ago)
- Location:
- modules/common/newsletters/php-files/modules/newsletters
- Files:
-
- 2 edited
-
locale/English.php (modified) (1 diff)
-
newsletters.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/newsletters/php-files/modules/newsletters/locale/English.php
r902 r1062 28 28 $locale['nl423'] = "Newsletter Copied"; 29 29 $locale['nl424'] = "A preview of the newsletter has been sent successfully to your email address."; 30 $locale['nl425'] = "%s newsletters could not be sent due to an invalid email address."; 30 31 // Add/Edit Newsletter Form 31 32 $locale['nl430'] = "Subject:"; -
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.
