Changeset 7640
- Timestamp:
- 01/27/07 07:59:41 (1 year ago)
- Files:
-
- wp-email/trunk/email/email-css.css (added)
- wp-email/trunk/email/email-image-verify.php (modified) (1 diff)
- wp-email/trunk/email/email-manager.php (modified) (17 diffs)
- wp-email/trunk/email/email-options.php (modified) (12 diffs)
- wp-email/trunk/email/email.php (modified) (28 diffs)
- wp-email/trunk/email/images/email_famfamfam.gif (added)
- wp-email/trunk/email/wp-email-popup.php (modified) (5 diffs)
- wp-email/trunk/email/wp-email.php (modified) (3 diffs)
- wp-email/trunk/email/wp-email.pot (added)
- wp-email/trunk/readme.html (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-email/trunk/email/email-image-verify.php
r6557 r7640 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 0 Plugin: WP-EMail 2.08|6 | Copyright (c) 200 5Lester "GaMerZ" Chan |5 | WordPress 2.1 Plugin: WP-EMail 2.10 | 6 | Copyright (c) 2007 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | wp-email/trunk/email/email-manager.php
r6556 r7640 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 0 Plugin: WP-EMail 2.08|6 | Copyright (c) 200 5Lester "GaMerZ" Chan |5 | WordPress 2.1 Plugin: WP-EMail 2.10 | 6 | Copyright (c) 2007 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | … … 52 52 case 'id': 53 53 $email_sortby = 'email_id'; 54 $email_sortby_text = 'ID';54 $email_sortby_text = __('ID', 'wp-email'); 55 55 break; 56 56 case 'fromname': 57 57 $email_sortby = 'email_yourname'; 58 $email_sortby_text = 'From Name';58 $email_sortby_text = __('From Name', 'wp-email'); 59 59 break; 60 60 case 'fromemail': 61 61 $email_sortby = 'email_youremail'; 62 $email_sortby_text = 'From E-Mail';62 $email_sortby_text = __('From E-Mail', 'wp-email'); 63 63 break; 64 64 case 'toname': 65 65 $email_sortby = 'email_friendname'; 66 $email_sortby_text = 'To Name';66 $email_sortby_text = __('To Name', 'wp-email'); 67 67 break; 68 68 case 'toemail': 69 69 $email_sortby = 'email_friendemail'; 70 $email_sortby_text = 'To E-Mail';70 $email_sortby_text = __('To E-Mail', 'wp-email'); 71 71 break; 72 72 case 'postid': 73 73 $email_sortby = 'email_postid'; 74 $email_sortby_text = 'Post ID';74 $email_sortby_text = __('Post ID', 'wp-email'); 75 75 break; 76 76 case 'posttitle': 77 77 $email_sortby = 'email_posttitle'; 78 $email_sortby_text = 'Post Title';78 $email_sortby_text = __('Post Title', 'wp-email'); 79 79 break; 80 80 case 'ip': 81 81 $email_sortby = 'email_ip'; 82 $email_sortby_text = 'IP';82 $email_sortby_text = __('IP', 'wp-email'); 83 83 break; 84 84 case 'host': 85 85 $email_sortby = 'email_host'; 86 $email_sortby_text = 'Host';86 $email_sortby_text = __('Host', 'wp-email'); 87 87 break; 88 88 case 'status': 89 89 $email_sortby = 'email_status'; 90 $email_sortby_text = 'Status';90 $email_sortby_text = __('Status', 'wp-email'); 91 91 break; 92 92 case 'date': 93 93 default: 94 94 $email_sortby = 'email_timestamp'; 95 $email_sortby_text = 'Date';95 $email_sortby_text = __('Date', 'wp-email'); 96 96 } 97 97 … … 101 101 case 'asc': 102 102 $email_sortorder = 'ASC'; 103 $email_sortorder_text = 'Ascending';103 $email_sortorder_text = __('Ascending', 'wp-email'); 104 104 break; 105 105 case 'desc': 106 106 default: 107 107 $email_sortorder = 'DESC'; 108 $email_sortorder_text = 'Descending';108 $email_sortorder_text = __('Descending', 'wp-email'); 109 109 } 110 110 … … 115 115 $delete_logs = $wpdb->query("DELETE FROM $wpdb->email"); 116 116 if($delete_logs) { 117 $text = '<font color="green"> All E-Mail Logs Have Been Deleted.</font>';117 $text = '<font color="green">'.__('All E-Mail Logs Have Been Deleted.', 'wp-email').'</font>'; 118 118 } else { 119 $text = '<font color="red"> An Error Has Occured While Deleting All E-Mail Logs.</font>';119 $text = '<font color="red">'.__('An Error Has Occured While Deleting All E-Mail Logs.', 'wp-email').'</font>'; 120 120 } 121 121 } … … 124 124 125 125 ### Get E-Mail Logs Data 126 $total_email_success = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '".__('Success' )."'");127 $total_email_failed = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '".__('Failed' )."'");126 $total_email_success = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '".__('Success', 'wp-email')."'"); 127 $total_email_failed = $wpdb->get_var("SELECT COUNT(email_id) FROM $wpdb->email WHERE email_status = '".__('Failed', 'wp-email')."'"); 128 128 $total_email = $total_email_success+$total_email_failed; 129 129 … … 165 165 <!-- Manage E-Mail --> 166 166 <div class="wrap"> 167 <h2><?php _e('E-Mail Logs' ); ?></h2>168 <p><?php _e('Displaying'); ?> <strong><?php echo $display_on_page;?></strong> <?php _e('To'); ?> <strong><?php echo $max_on_page; ?></strong> <?php _e('Of'); ?> <strong><?php echo $total_email; ?></strong> <?php _e('E-Mail Logs'); ?></p>169 <p><?php _e('Sorted By'); ?> <strong><?php echo $email_sortby_text;?></strong> <?php _e('In'); ?> <strong><?php echo $email_sortorder_text;?></strong> <?php _e('Order'); ?></p>167 <h2><?php _e('E-Mail Logs', 'wp-email'); ?></h2> 168 <p><?php printf(__('Dispaying <strong>%s</strong> To <strong>%s</strong> Of <strong>%s</strong> E-Mail Logs', 'wp-email'), $display_on_page, $max_on_page, $total_email); ?></p> 169 <p><?php printf(__('Sorted By <strong>%s</strong> In <strong>%s</strong> Order', 'wp-email'), $email_sortby_text, $email_sortorder_text); ?></p> 170 170 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 171 <tr >172 <th width="5%"><?php _e('ID' ); ?></th>173 <th width="17%"><?php _e('From' ); ?></th>174 <th width="17%"><?php _e('To' ); ?></th>175 <th width="17%"><?php _e('Date / Time' ); ?></th>176 <th width="17%"><?php _e('IP / Host' ); ?></th>177 <th width="17%"><?php _e('Post Title' ); ?></th>178 <th width="10%"><?php _e('Status' ); ?></th>171 <tr class="thead"> 172 <th width="5%"><?php _e('ID', 'wp-email'); ?></th> 173 <th width="17%"><?php _e('From', 'wp-email'); ?></th> 174 <th width="17%"><?php _e('To', 'wp-email'); ?></th> 175 <th width="17%"><?php _e('Date / Time', 'wp-email'); ?></th> 176 <th width="17%"><?php _e('IP / Host', 'wp-email'); ?></th> 177 <th width="17%"><?php _e('Post Title', 'wp-email'); ?></th> 178 <th width="10%"><?php _e('Status', 'wp-email'); ?></th> 179 179 </tr> 180 180 <?php … … 183 183 foreach($email_logs as $email_log) { 184 184 if($i%2 == 0) { 185 $style = 'style=\'background: none\''; 186 } else { 185 187 $style = 'style=\'background-color: #eee\''; 186 } else {187 $style = 'style=\'background-color: none\'';188 188 } 189 189 $email_id = intval($email_log->email_id); … … 193 193 $email_friendemail = stripslashes($email_log->email_friendemail); 194 194 $email_postid = intval($email_log->email_postid); 195 $email_posttitle = stripslashes($email_log->email_posttitle);196 $email_date = gmdate( "jS F Y", $email_log->email_timestamp);197 $email_time = gmdate( "H:i", $email_log->email_timestamp);195 $email_posttitle = htmlspecialchars(stripslashes($email_log->email_posttitle)); 196 $email_date = gmdate(get_option('date_format'), $email_log->email_timestamp); 197 $email_time = gmdate(get_option('time_format'), $email_log->email_timestamp); 198 198 $email_ip = $email_log->email_ip; 199 199 $email_host = $email_log->email_host; … … 211 211 } 212 212 } else { 213 echo '<tr><td colspan="7" align="center"><strong>'.__('No E-Mail Logs Found' ).'</strong></td></tr>';213 echo '<tr><td colspan="7" align="center"><strong>'.__('No E-Mail Logs Found', 'wp-email').'</strong></td></tr>'; 214 214 } 215 215 ?> … … 225 225 <?php 226 226 if($email_page > 1 && ((($email_page*$email_log_perpage)-($email_log_perpage-1)) <= $total_email)) { 227 echo '<strong>«</strong> <a href="'.$base_page.'&emailpage='.($email_page-1).'" title="« '.__('Previous Page' ).'">'.__('Previous Page').'</a>';227 echo '<strong>«</strong> <a href="'.$base_page.'&emailpage='.($email_page-1).'" title="« '.__('Previous Page', 'wp-email').'">'.__('Previous Page', 'wp-email').'</a>'; 228 228 } else { 229 229 echo ' '; … … 234 234 <?php 235 235 if($email_page >= 1 && ((($email_page*$email_log_perpage)+1) <= $total_email)) { 236 echo '<a href="'.$base_page.'&emailpage='.($email_page+1).'" title="'.__('Next Page' ).' »">'.__('Next Page').'</a> <strong>»</strong>';236 echo '<a href="'.$base_page.'&emailpage='.($email_page+1).'" title="'.__('Next Page', 'wp-email').' »">'.__('Next Page', 'wp-email').'</a> <strong>»</strong>'; 237 237 } else { 238 238 echo ' '; … … 243 243 <tr> 244 244 <td colspan="2" align="center"> 245 <?php _e('Pages' ); ?> (<?php echo $total_pages; ?>):245 <?php _e('Pages', 'wp-email'); ?> (<?php echo $total_pages; ?>): 246 246 <?php 247 247 if ($email_page >= 4) { 248 echo '<strong><a href="'.$base_page.'&emailpage=1'.$email_sort_url.$email_sort_url.'" title="'.__('Go to First Page' ).'">« '.__('First').'</a></strong> ... ';248 echo '<strong><a href="'.$base_page.'&emailpage=1'.$email_sort_url.$email_sort_url.'" title="'.__('Go to First Page', 'wp-email').'">« '.__('First', 'wp-email').'</a></strong> ... '; 249 249 } 250 250 if($email_page > 1) { 251 echo ' <strong><a href="'.$base_page.'&emailpage='.($email_page-1).$email_sort_url.'" title="« '.__('Go to Page' ).' '.($email_page-1).'">«</a></strong> ';251 echo ' <strong><a href="'.$base_page.'&emailpage='.($email_page-1).$email_sort_url.'" title="« '.__('Go to Page', 'wp-email').' '.($email_page-1).'">«</a></strong> '; 252 252 } 253 253 for($i = $email_page - 2 ; $i <= $email_page +2; $i++) { … … 256 256 echo "<strong>[$i]</strong> "; 257 257 } else { 258 echo '<a href="'.$base_page.'&emailpage='.($i).$email_sort_url.'" title="'.__('Page' ).' '.$i.'">'.$i.'</a> ';258 echo '<a href="'.$base_page.'&emailpage='.($i).$email_sort_url.'" title="'.__('Page', 'wp-email').' '.$i.'">'.$i.'</a> '; 259 259 } 260 260 } 261 261 } 262 262 if($email_page < $total_pages) { 263 echo ' <strong><a href="'.$base_page.'&emailpage='.($email_page+1).$email_sort_url.'" title="'.__('Go to Page' ).' '.($email_page+1).' »">»</a></strong> ';263 echo ' <strong><a href="'.$base_page.'&emailpage='.($email_page+1).$email_sort_url.'" title="'.__('Go to Page', 'wp-email').' '.($email_page+1).' »">»</a></strong> '; 264 264 } 265 265 if (($email_page+2) < $total_pages) { 266 echo ' ... <strong><a href="'.$base_page.'&emailpage='.($total_pages).$email_sort_url.'" title="'.__('Go to Last Page' ).'">'.__('Last').' »</a></strong>';266 echo ' ... <strong><a href="'.$base_page.'&emailpage='.($total_pages).$email_sort_url.'" title="'.__('Go to Last Page', 'wp-email'), 'wp-email'.'">'.__('Last', 'wp-email').' »</a></strong>'; 267 267 } 268 268 ?> … … 275 275 ?> 276 276 <br /> 277 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">277 <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="get"> 278 278 <input type="hidden" name="page" value="<?php echo $base_name; ?>" /> 279 Sort Options: 279 <?php _e('Sort Options:', 'wp-email'); ?> 280 280 <select name="by" size="1"> 281 <option value="id"<?php if($email_sortby == 'email_id') { echo ' selected="selected"'; }?>> ID</option>282 <option value="fromname"<?php if($email_sortby == 'email_yourname') { echo ' selected="selected"'; }?>> From Name</option>283 <option value="fromemail"<?php if($email_sortby == 'email_youremail') { echo ' selected="selected"'; }?>> From E-Mail</option>284 <option value="toname"<?php if($email_sortby == 'email_friendname') { echo ' selected="selected"'; }?>> To Name</option>285 <option value="toemail"<?php if($email_sortby == 'email_friendemail') { echo ' selected="selected"'; }?>> To E-Mail</option>286 <option value="date"<?php if($email_sortby == 'email_timestamp') { echo ' selected="selected"'; }?>> Date</option>287 <option value="postid"<?php if($email_sortby == 'email_postid') { echo ' selected="selected"'; }?>> Post ID</option>288 <option value="posttitle"<?php if($email_sortby == 'email_posttitle') { echo ' selected="selected"'; }?>> Post Title</option>289 <option value="ip"<?php if($email_sortby == 'email_ip') { echo ' selected="selected"'; }?>> IP</option>290 <option value="host"<?php if($email_sortby == 'email_host') { echo ' selected="selected"'; }?>> Host</option>291 <option value="status"<?php if($email_sortby == 'email_status') { echo ' selected="selected"'; }?>> Status</option>281 <option value="id"<?php if($email_sortby == 'email_id') { echo ' selected="selected"'; }?>><?php _e('ID', 'wp-email'); ?></option> 282 <option value="fromname"<?php if($email_sortby == 'email_yourname') { echo ' selected="selected"'; }?>><?php _e('From Name', 'wp-email'); ?></option> 283 <option value="fromemail"<?php if($email_sortby == 'email_youremail') { echo ' selected="selected"'; }?>><?php _e('From E-Mail', 'wp-email'); ?></option> 284 <option value="toname"<?php if($email_sortby == 'email_friendname') { echo ' selected="selected"'; }?>><?php _e('To Name', 'wp-email'); ?></option> 285 <option value="toemail"<?php if($email_sortby == 'email_friendemail') { echo ' selected="selected"'; }?>><?php _e('To E-Mail', 'wp-email'); ?></option> 286 <option value="date"<?php if($email_sortby == 'email_timestamp') { echo ' selected="selected"'; }?>><?php _e('Date', 'wp-email'); ?></option> 287 <option value="postid"<?php if($email_sortby == 'email_postid') { echo ' selected="selected"'; }?>><?php _e('Post ID', 'wp-email'); ?></option> 288 <option value="posttitle"<?php if($email_sortby == 'email_posttitle') { echo ' selected="selected"'; }?>><?php _e('Post Title', 'wp-email'); ?></option> 289 <option value="ip"<?php if($email_sortby == 'email_ip') { echo ' selected="selected"'; }?>><?php _e('IP', 'wp-email'); ?></option> 290 <option value="host"<?php if($email_sortby == 'email_host') { echo ' selected="selected"'; }?>><?php _e('Host', 'wp-email'); ?></option> 291 <option value="status"<?php if($email_sortby == 'email_status') { echo ' selected="selected"'; }?>><?php _e('Status', 'wp-email'); ?></option> 292 292 </select> 293 293 294 294 <select name="order" size="1"> 295 <option value="asc"<?php if($email_sortorder == 'ASC') { echo ' selected="selected"'; }?>> Ascending</option>296 <option value="desc"<?php if($email_sortorder == 'DESC') { echo ' selected="selected"'; } ?>> Descending</option>295 <option value="asc"<?php if($email_sortorder == 'ASC') { echo ' selected="selected"'; }?>><?php _e('Ascending', 'wp-email'); ?></option> 296 <option value="desc"<?php if($email_sortorder == 'DESC') { echo ' selected="selected"'; } ?>><?php _e('Descending', 'wp-email'); ?></option> 297 297 </select> 298 298 … … 301 301 for($i=10; $i <= 100; $i+=10) { 302 302 if($email_log_perpage == $i) { 303 echo "<option value=\"$i\" selected=\"selected\"> Per Page: $i</option>\n";303 echo "<option value=\"$i\" selected=\"selected\">".__('Per Page', 'wp-email').": $i</option>\n"; 304 304 } else { 305 echo "<option value=\"$i\"> Per Page: $i</option>\n";305 echo "<option value=\"$i\">".__('Per Page', 'wp-email').": $i</option>\n"; 306 306 } 307 307 } 308 308 ?> 309 309 </select> 310 <input type="submit" value=" Sort" class="button" />310 <input type="submit" value="<?php _e('Sort', 'wp-email'); ?>" class="button" /> 311 311 </form> 312 312 </div> … … 314 314 <!-- E-Mail Stats --> 315 315 <div class="wrap"> 316 <h2><?php _e('E-Mail Logs Stats' ); ?></h2>316 <h2><?php _e('E-Mail Logs Stats', 'wp-email'); ?></h2> 317 317 <table border="0" cellspacing="3" cellpadding="3"> 318 318 <tr> 319 <th align="left"><?php _e('Total E-Mails:' ); ?></th>319 <th align="left"><?php _e('Total E-Mails:', 'wp-email'); ?></th> 320 320 <td align="left"><?php echo number_format($total_email); ?></td> 321 321 </tr> 322 322 <tr> 323 <th align="left"><?php _e('Total E-Mail Sent:' ); ?></th>323 <th align="left"><?php _e('Total E-Mail Sent:', 'wp-email'); ?></th> 324 324 <td align="left"><?php echo number_format($total_email_success); ?></td> 325 325 </tr> 326 326 <tr> 327 <th align="left"><?php _e('Total E-Mail Failed:' ); ?></th>327 <th align="left"><?php _e('Total E-Mail Failed:', 'wp-email'); ?></th> 328 328 <td align="left"><?php echo number_format($total_email_failed); ?></td> 329 329 </tr> … … 333 333 <!-- Delete E-Mail Logs --> 334 334 <div class="wrap"> 335 <h2><?php _e('Delete E-Mail Logs' ); ?></h2>335 <h2><?php _e('Delete E-Mail Logs', 'wp-email'); ?></h2> 336 336 <div align="center"> 337 <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">338 <strong> Are You Sure You Want To Delete All E-Mail Logs?</strong><br /><br />337 <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post"> 338 <strong><?php _e('Are You Sure You Want To Delete All E-Mail Logs?', 'wp-email'); ?></strong><br /><br /> 339 339 <input type="checkbox" name="delete_logs_yes" value="yes" /> Yes<br /><br /> 340 <input type="submit" name="delete_logs" value="Delete" class="button" onclick="return confirm(' You Are About To Delete All E-Mail Logs\nThis Action Is Not Reversible.\n\n Choose \'Cancel\' to stop, \'OK\' to delete.')" />340 <input type="submit" name="delete_logs" value="Delete" class="button" onclick="return confirm('<?php _e('You Are About To Delete All E-Mail Logs\nThis Action Is Not Reversible.\n\n Choose [Cancel] to stop, [OK] to delete.', 'wp-email'); ?>')" /> 341 341 </form> 342 342 </div> wp-email/trunk/email/email-options.php
r6556 r7640 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2. 0 Plugin: WP-EMail 2.08|6 | Copyright (c) 200 5Lester "GaMerZ" Chan |5 | WordPress 2.1 Plugin: WP-EMail 2.10 | 6 | Copyright (c) 2007 Lester "GaMerZ" Chan | 7 7 | | 8 8 | File Written By: | … … 35 35 $email_smtp_server = strip_tags(trim($_POST['email_smtp_server'])); 36 36 $email_smtp = "$email_smtp_name|$email_smtp_password|$email_smtp_server"; 37 $email_options = array(); 38 $email_options['post_text'] = addslashes(trim($_POST['email_post_text'])); 39 $email_options['page_text'] = addslashes(trim($_POST['email_page_text'])); 40 $email_options['email_icon'] = trim($_POST['email_icon']); 41 $email_options['email_type'] = intval($_POST['email_type']); 42 $email_options['email_style'] = intval($_POST['email_style']); 43 $email_options['email_html'] = trim($_POST['email_html']); 44 $email_fields = array(); 45 $email_fields['yourname'] = intval($_POST['email_field_yourname']); 46 $email_fields['youremail'] = intval($_POST['email_field_youremail']); 47 $email_fields['yourremarks'] = intval($_POST['email_field_yourremarks']); 48 $email_fields['friendname'] = intval($_POST['email_field_friendname']); 49 $email_fields['friendemail'] = intval($_POST['email_field_friendemail']); 37 50 $email_contenttype = strip_tags(trim($_POST['email_contenttype'])); 38 51 $email_mailer = strip_tags(trim($_POST['email_mailer'])); … … 50 63 $update_email_text = array(); 51 64 $update_email_queries[] = update_option('email_smtp', $email_smtp); 65 $update_email_queries[] = update_option('email_options', $email_options); 66 $update_email_queries[] = update_option('email_fields', $email_fields); 52 67 $update_email_queries[] = update_option('email_contenttype', $email_contenttype); 53 68 $update_email_queries[] = update_option('email_mailer', $email_mailer); … … 62 77 $update_email_queries[] = update_option('email_template_sentfailed', $email_template_sentfailed); 63 78 $update_email_queries[] = update_option('email_template_error', $email_template_error); 64 $update_email_text[] = __('SMTP Information'); 65 $update_email_text[] = __('E-Mail Content Type'); 66 $update_email_text[] = __('Send E-Mail Method'); 67 $update_email_text[] = __('Snippet Option'); 68 $update_email_text[] = __('Interval Option'); 69 $update_email_text[] = __('Multiple E-Mails Option'); 70 $update_email_text[] = __('Image Verification Option'); 71 $update_email_text[] = __('Subject Template'); 72 $update_email_text[] = __('Body Template'); 73 $update_email_text[] = __('Alternate Body Template'); 74 $update_email_text[] = __('Sent Success Template'); 75 $update_email_text[] = __('Sent Failed Template'); 76 $update_email_text[] = __('Error Template'); 79 $update_email_text[] = __('SMTP Information', 'wp-email'); 80 $update_email_text[] = __('E-Mail Style', 'wp-email'); 81 $update_email_text[] = __('E-Mail Fields', 'wp-email'); 82 $update_email_text[] = __('E-Mail Content Type', 'wp-email'); 83 $update_email_text[] = __('Send E-Mail Method', 'wp-email'); 84 $update_email_text[] = __('Snippet Option', 'wp-email'); 85 $update_email_text[] = __('Interval Option', 'wp-email'); 86 $update_email_text[] = __('Multiple E-Mails Option', 'wp-email'); 87 $update_email_text[] = __('Image Verification Option', 'wp-email'); 88 $update_email_text[] = __('Subject Template', 'wp-email'); 89 $update_email_text[] = __('Body Template', 'wp-email'); 90 $update_email_text[] = __('Alternate Body Template', 'wp-email'); 91 $update_email_text[] = __('Sent Success Template', 'wp-email'); 92 $update_email_text[] = __('Sent Failed Template', 'wp-email'); 93 $update_email_text[] = __('Error Template', 'wp-email'); 77 94 $i=0; 78 95 $text = ''; 79 96 foreach($update_email_queries as $update_email_query) { 80 97 if($update_email_query) { 81 $text .= '<font color="green">'.$update_email_text[$i].' '.__('Updated' ).'</font><br />';98 $text .= '<font color="green">'.$update_email_text[$i].' '.__('Updated', 'wp-email').'</font><br />'; 82 99 } 83 100 $i++; 84 101 } 85 102 if(empty($text)) { 86 $text = '<font color="red">'.__('No E-Mail Option Updated' ).'</font>';103 $text = '<font color="red">'.__('No E-Mail Option Updated', 'wp-email').'</font>'; 87 104 } 88 105 } 89 106 $email_options = get_option('email_options'); 107 $email_fields = get_option('email_fields'); 90 108 ?> 91 109 <script type="text/javascript"> … … 95 113 switch(template) { 96 114 case "subject": 97 default_template = " Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%";115 default_template = "<?php _e('Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%', 'wp-email'); ?>"; 98 116 break; 99 117 case "body": 100 default_template = "< p>Hi <strong>%EMAIL_FRIEND_NAME%</strong>,<br />Your friend, <strong>%EMAIL_YOUR_NAME%</strong>, has recommended this article entitled '<strong>%EMAIL_POST_TITLE%</strong>' to you.</p><p><strong>Here is his/her remarks:</strong><br />%EMAIL_YOUR_REMARKS%</p><p><strong>%EMAIL_POST_TITLE%</strong><br />Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%</p>%EMAIL_POST_CONTENT%<p>Article taken from %EMAIL_BLOG_NAME% - <a href=\"%EMAIL_BLOG_URL%\">%EMAIL_BLOG_URL%</a><br />URL to article: <a href=\"%EMAIL_PERMALINK%\">%EMAIL_PERMALINK%</a></p>";118 default_template = "<?php _e('<p>Hi <strong>%EMAIL_FRIEND_NAME%</strong>,<br />Your friend, <strong>%EMAIL_YOUR_NAME%</strong>, has recommended this article entitled \'<strong>%EMAIL_POST_TITLE%</strong>\' to you.</p><p><strong>Here is his/her remarks:</strong><br />%EMAIL_YOUR_REMARKS%</p><p><strong>%EMAIL_POST_TITLE%</strong><br />Posted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%</p>%EMAIL_POST_CONTENT%<p>Article taken from %EMAIL_BLOG_NAME% - <a href=\"%EMAIL_BLOG_URL%\">%EMAIL_BLOG_URL%</a><br />URL to article: <a href=\"%EMAIL_PERMALINK%\">%EMAIL_PERMALINK%</a></p>', 'wp-email'); ?>"; 101 119 break; 102 120 case "bodyalt": 103 default_template = " Hi %EMAIL_FRIEND_NAME%,\nYour friend, %EMAIL_YOUR_NAME%, has recommended this article entitled '%EMAIL_POST_TITLE%' to you.\n\nHere is his/her remarks:\n%EMAIL_YOUR_REMARKS%\n\n%EMAIL_POST_TITLE%\nPosted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%\n%EMAIL_POST_CONTENT%\nArticle taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%\nURL to article: %EMAIL_PERMALINK%";121 default_template = "<?php _e('Hi %EMAIL_FRIEND_NAME%,\nYour friend, %EMAIL_YOUR_NAME%, has recommended this article entitled \'%EMAIL_POST_TITLE%\' to you.\n\nHere is his/her remarks:\n%EMAIL_YOUR_REMARKS%\n\n%EMAIL_POST_TITLE%\nPosted By %EMAIL_POST_AUTHOR% On %EMAIL_POST_DATE% In %EMAIL_POST_CATEGORY%\n%EMAIL_POST_CONTENT%\nArticle taken from %EMAIL_BLOG_NAME% - %EMAIL_BLOG_URL%\nURL to article: %EMAIL_PERMALINK%', 'wp-email'); ?>"; 104 122 break; 105 123 case "sentsuccess": 106 default_template = "< div id=\"content\" class=\"narrowcolumn\"><p>Article: <strong>%EMAIL_POST_TITLE%</strong> Has Been Sent To <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong></p></div>";124 default_template = "<p><?php _e('Article: <strong>%EMAIL_POST_TITLE%</strong> Has Been Sent To <strong>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</strong>', 'wp-email'); ?></p>"; 107 125 break; 108 126 case "sentfailed": 109 default_template = "<p> An Error Has Occured When Trying To Send The E-Mail<br /><strong>»</strong> %EMAIL_ERROR_MSG%</p>";127 default_template = "<p><?php _e('An Error Has Occured When Trying To Send The E-Mail', 'wp-email'); ?><br /><strong>»</strong> %EMAIL_ERROR_MSG%</p>"; 110 128 break; 111 129 case "error": 112 default_template = "<p>An Error Has Occured<br /><strong>»</strong> %EMAIL_ERROR_MSG%</p>"; 130 default_template = "<p><?php _e('An Error Has Occured', 'wp-email'); ?><br /><strong>»</strong> %EMAIL_ERROR_MSG%</p>"; 131 break; 132 case "html": 133 default_template = '<a href="%EMAIL_URL%" rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'; 113 134 break; 114 135 } 115 136 document.getElementById("email_template_" + template).value = default_template; 116 } 137 } 138 function check_email_style() { 139 email_style_options = document.getElementById("email_style").value; 140 if (email_style_options == 4) { 141 document.getElementById("email_style_custom").style.display = 'block'; 142 } else { 143 if(document.getElementById("email_style_custom").style.display == 'block') { 144 document.getElementById("email_style_custom").style.display = 'none'; 145 } 146 } 147 } 117 148 /* ]]> */ 118 149 </script> 119 150 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> 120 151 <div class="wrap"> 121 <h2><?php _e('E-Mail Options' ); ?></h2>152 <h2><?php _e('E-Mail Options', 'wp-email'); ?></h2> 122 153 <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> 123 154 <fieldset class="options"> 124 <legend><?php _e('SMTP Settings' ); ?></legend>155 <legend><?php _e('SMTP Settings', 'wp-email'); ?></legend> 125 156 <?php 126 $smtp_info = get_ settings('email_smtp');157 $smtp_info = get_option('email_smtp'); 127 158 $smtp_info = explode('|', $smtp_info); 128 159 ?> 129 160 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 130 161 <tr valign="top"> 131 <th align="left" width="20%"><?php _e('SMTP Username:' ); ?></th>162 <th align="left" width="20%"><?php _e('SMTP Username:', 'wp-email'); ?></th> 132 163 <td align="left"><input type="text" name="email_smtp_name" value="<?php echo $smtp_info[0]; ?>" size="30" /></td> 133 164 </tr> 134 165 <tr valign="top"> 135 <th align="left" width="20%"><?php _e('SMTP Password:' ); ?></th>166 <th align="left" width="20%"><?php _e('SMTP Password:', 'wp-email'); ?></th> 136 167 <td align="left"><input type="text" name="email_smtp_password" value="<?php echo $smtp_info[1]; ?>" size="30" /></td> 137 168 </tr> 138 169 <tr valign="top"> 139 <th align="left" width="20%"><?php _e('SMTP Server:'); ?></th> 140 <td align="left"><input type="text" name="email_smtp_server" value="<?php echo $smtp_info[2]; ?>" size="30" /><br />You may leave the above fields blank if you do not use a SMTP server.</td> 141 </tr> 142 </table> 143 </fieldset> 144 <fieldset class="options"> 145 <legend><?php _e('E-Mail Settings'); ?></legend> 146 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 170 <th align="left" width="20%"><?php _e('SMTP Server:', 'wp-email'); ?></th> 171 <td align="left"><input type="text" name="email_smtp_server" value="<?php echo $smtp_info[2]; ?>" size="30" /><br /><?php _e('You may leave the above fields blank if you do not use a SMTP server.', 'wp-email'); ?></td> 172 </tr> 173 </table> 174 </fieldset> 175 <?php ?> 176 <fieldset class="options"> 177 <legend><?php _e('E-Mail Styles', 'wp-email'); ?></legend> 178 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 179 <tr valign="top"> 180 <th align="left" width="30%"><?php _e('E-Mail Text Link For Post', 'wp-email'); ?></th> 181 <td align="left"> 182 <input type="text" name="email_post_text" value="<?php echo stripslashes($email_options['post_text']); ?>" size="30" /> 183 </td> 184 </tr> 185 <tr valign="top"> 186 <th align="left" width="30%"><?php _e('E-Mail Text Link For Page', 'wp-email'); ?></th> 187 <td align="left"> 188 <input type="text" name="email_page_text" value="<?php echo stripslashes($email_options['page_text']); ?>" size="30" /> 189 </td> 190 </tr> 191 <tr valign="top"> 192 <th align="left" width="30%"><?php _e('E-Mail Icon', 'wp-email'); ?></th> 193 <td align="left"> 194 <?php 195 $email_icon = $email_options['email_icon']; 196 $email_icon_url = get_option('siteurl').'/wp-content/plugins/email/images'; 197 $email_icon_path = ABSPATH.'/wp-content/plugins/email/images'; 198 if($handle = @opendir($email_icon_path)) { 199 while (false !== ($filename = readdir($handle))) { 200 if ($filename != '.' && $filename != '..') { 201 if(is_file($email_icon_path.'/'.$filename)) { 202 if($email_icon == $filename) { 203 echo '<input type="radio" name="email_icon" value="'.$filename.'" checked="checked" />'."\n"; 204 } else { 205 echo '<input type="radio" name="email_icon" value="'.$filename.'" />'."\n"; 206 } 207 echo ' '; 208 echo '<img src="'.$email_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n"; 209 echo ' ('.$filename.')'; 210 echo '<br /><br />'."\n"; 211 } 212 } 213 } 214 closedir($handle); 215 } 216 ?> 217 </td> 218 </tr> 219 <tr valign="top"> 220 <th align="left" width="30%"><?php _e('E-Mail Link Type', 'wp-email'); ?></th> 221 <td align="left"> 222 <select name="email_type" size="1"> 223 <option value="1"<?php selected('1', $email_options['email_type']); ?>><?php _e('E-Mail Standalone Page', 'wp-email'); ?></option> 224 <option value="2"<?php selected('2', $email_options['email_type']); ?>><?php _e('E-Mail Popup', 'wp-email'); ?></option> 225 </select> 226 </td> 227 </tr> 228 <tr valign="top"> 229 <th align="left" width="30%"><?php _e('E-Mail Text Link Style', 'wp-email'); ?></th> 230 <td align="left"> 231 <select name="email_style" id="email_style" size="1" onchange="check_email_style();"> 232 <option value="1"<?php selected('1', $email_options['email_style']); ?>><?php _e('E-Mail Icon With Text Link', 'wp-email'); ?></option> 233 <option value="2"<?php selected('2', $email_options['email_style']); ?>><?php _e('E-Mail Icon Only', 'wp-email'); ?></option> 234 <option value="3"<?php selected('3', $email_options['email_style']); ?>><?php _e('E-Mail Text Link Only', 'wp-email'); ?></option> 235 <option value="4"<?php selected('4', $email_options['email_style']); ?>><?php _e('Custom', 'wp-email'); ?></option> 236 </select> 237 <div id="email_style_custom" style="display: <?php if(intval($email_options['email_style']) == 4) { echo 'block'; } else { echo 'none'; } ?>; margin-top: 20px;"> 238 <textarea rows="2" cols="80" name="email_html" id="email_template_html"><?php echo htmlspecialchars(stripslashes($email_options['email_html'])); ?></textarea><br /> 239 <?php _e('HTML is allowed.', 'wp-email'); ?><br /> 240 %EMAIL_URL% - <?php _e('URL to the email post/page.', 'wp-email'); ?><br /> 241 %EMAIL_POPUP% - <?php _e('It will produce the onclick html code which is nescassary for popup.', 'wp-email'); ?><br /> 242 <?php _e('Example Popup Template:', 'wp-email'); ?><br /> 243 <?php echo htmlspecialchars('<a href="%EMAIL_URL%" %EMAIL_POPUP% rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'); ?><br /> 244 %EMAIL_TEXT% - <?php _e('E-Mail text link of the post/page that you have typed in above.', 'wp-email'); ?><br /> 245 %EMAIL_ICON_URL% - <?php _e('URL to the email icon you have chosen above.', 'wp-email'); ?><br /> 246 <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="javascript: email_default_templates('html');" class="button" /> 247 </div> 248 </td> 249 </tr> 250 </table> 251 </fieldset> 252 <fieldset class="options"> 253 <legend><?php _e('E-Mail Settings', 'wp-email'); ?></legend> 254 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 255 <tr valign="top"> 256 <th align="left" width="30%"><?php _e('E-Mail Fields:', 'wp-email'); ?></th> 257 <td align="left"> 258 <input type="checkbox" name="email_field_yourname" value="1"<?php checked('1', $email_fields['yourname']); ?> /> <?php _e('Your Name', 'wp-email'); ?><br /> 259 <input type="checkbox" name="email_field_youremail" value="1"<?php checked('1', $email_fields['youremail']); ?> /> <?php _e('Your E-Mail', 'wp-email'); ?><br /> 260 <input type="checkbox" name="email_field_yourremarks" value="1"<?php checked('1', $email_fields['yourremarks']); ?> /> <?php _e('Your Remarks', 'wp-email'); ?><br /> 261 <input type="checkbox" name="email_field_friendname" value="1"<?php checked('1', $email_fields['friendname']); ?> /> <?php _e('Friend\'s Name', 'wp-email'); ?><br /> 262 <input type="checkbox" name="email_field_friendemail" value="1"<?php checked('1', $email_fields['friendemail']); ?> /> <?php _e('Friend\'s E-Mail', 'wp-email'); ?> 263 </td> 264 </tr> 147 265 <tr valign="top"> 148 <th align="left" width="30%"><?php _e('E-Mail Content Type:' ); ?></th>266 <th align="left" width="30%"><?php _e('E-Mail Content Type:', 'wp-email'); ?></th> 149 267 <td align="left"> 150 268 <select name="email_contenttype" size="1"> 151 <option value="text/plain"<?php selected('text/plain', get_ settings('email_contenttype')); ?>><?php _e('Plain Text'); ?></option>152 <option value="text/html"<?php selected('text/html', get_ settings('email_contenttype')); ?>><?php _e('HTML'); ?></option>269 <option value="text/plain"<?php selected('text/plain', get_option('email_contenttype')); ?>><?php _e('Plain Text', 'wp-email'); ?></option>
