Changeset 6073
- Timestamp:
- 05/30/06 11:18:45 (2 years ago)
- Files:
-
- wp-email/trunk/email/email-image-verify.php (added)
- wp-email/trunk/email/email-manager.php (modified) (8 diffs)
- wp-email/trunk/email/email-options.php (modified) (6 diffs)
- wp-email/trunk/email/email.php (modified) (2 diffs)
- wp-email/trunk/email/wp-email-popup.php (modified) (5 diffs)
- wp-email/trunk/email/wp-email.php (modified) (5 diffs)
- wp-email/trunk/readme-install.txt (deleted)
- wp-email/trunk/readme-upgrade.txt (deleted)
- wp-email/trunk/readme.html (added)
- wp-email/trunk/readme.txt (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-email/trunk/email/email-manager.php
r5522 r6073 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2.0 Plugin: WP-EMail 2.0 4|5 | WordPress 2.0 Plugin: WP-EMail 2.05 | 6 6 | Copyright (c) 2005 Lester "GaMerZ" Chan | 7 7 | | … … 70 70 $email_sortby_text = 'To E-Mail'; 71 71 break; 72 case 'remarks':73 $email_sortby = 'email_yourremarks';74 $email_sortby_text = 'Remarks';75 break;76 72 case 'postid': 77 73 $email_sortby = 'email_postid'; … … 174 170 <table width="100%" border="0" cellspacing="3" cellpadding="3"> 175 171 <tr> 176 <th width="2%"><?php _e('ID'); ?></th> 177 <th width="16%"><?php _e('From'); ?></th> 178 <th width="16%"><?php _e('To'); ?></th> 179 <th width="15%"><?php _e('Remarks'); ?></th> 180 <th width="16%"><?php _e('Date / Time'); ?></th> 181 <th width="14%"><?php _e('IP / Host'); ?></th> 182 <th width="16%"><?php _e('Post Title'); ?></th> 183 <th width="5%"><?php _e('Status'); ?></th> 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> 184 179 </tr> 185 180 <?php … … 195 190 $email_yourname = stripslashes($email_log->email_yourname); 196 191 $email_youremail = stripslashes($email_log->email_youremail); 197 $email_yourremarks = stripslashes($email_log->email_yourremarks);198 192 $email_friendname = stripslashes($email_log->email_friendname); 199 193 $email_friendemail = stripslashes($email_log->email_friendemail); … … 209 203 echo "<td>$email_yourname<br />$email_youremail</td>\n"; 210 204 echo "<td>$email_friendname<br />$email_friendemail</td>\n"; 211 echo "<td>$email_yourremarks</td>\n";212 205 echo "<td>$email_date<br />$email_time</td>\n"; 213 206 echo "<td>$email_ip<br />$email_host</td>\n"; … … 218 211 } 219 212 } else { 220 echo '<tr><td colspan=" 8" align="center"><b>'.__('No E-Mail Logs Found').'</b></td></tr>';213 echo '<tr><td colspan="7" align="center"><b>'.__('No E-Mail Logs Found').'</b></td></tr>'; 221 214 } 222 215 ?> … … 283 276 <br /> 284 277 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"> 285 <input type="hidden" name="page" value="<?php echo $base_name; ?>" >278 <input type="hidden" name="page" value="<?php echo $base_name; ?>" /> 286 279 Sort Options: 287 280 <select name="by" size="1"> … … 291 284 <option value="toname"<?php if($email_sortby == 'email_friendname') { echo ' selected="selected"'; }?>>To Name</option> 292 285 <option value="toemail"<?php if($email_sortby == 'email_friendemail') { echo ' selected="selected"'; }?>>To E-Mail</option> 293 <option value="remarks"<?php if($email_sortby == 'email_yourremarks') { echo ' selected="selected"'; }?>>Remarks</option>294 286 <option value="date"<?php if($email_sortby == 'email_timestamp') { echo ' selected="selected"'; }?>>Date</option> 295 287 <option value="postid"<?php if($email_sortby == 'email_postid') { echo ' selected="selected"'; }?>>Post ID</option> wp-email/trunk/email/email-options.php
r5522 r6073 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2.0 Plugin: WP-EMail 2.0 4|5 | WordPress 2.0 Plugin: WP-EMail 2.05 | 6 6 | Copyright (c) 2005 Lester "GaMerZ" Chan | 7 7 | | … … 40 40 $email_interval = intval(trim($_POST['email_interval'])); 41 41 $email_multiple = intval(trim($_POST['email_multiple'])); 42 $email_imageverify = intval(trim($_POST['email_imageverify'])); 42 43 $email_template_subject = strip_tags(trim($_POST['email_template_subject'])); 43 44 $email_template_body = trim($_POST['email_template_body']); … … 54 55 $update_email_queries[] = update_option('email_interval', $email_interval); 55 56 $update_email_queries[] = update_option('email_multiple', $email_multiple); 57 $update_email_queries[] = update_option('email_imageverify', $email_imageverify); 56 58 $update_email_queries[] = update_option('email_template_subject', $email_template_subject); 57 59 $update_email_queries[] = update_option('email_template_body', $email_template_body); … … 66 68 $update_email_text[] = __('Interval Option'); 67 69 $update_email_text[] = __('Multiple E-Mails Option'); 70 $update_email_text[] = __('Image Verification Option'); 68 71 $update_email_text[] = __('Subject Template'); 69 72 $update_email_text[] = __('Body Template'); … … 86 89 87 90 ?> 88 <script language="JavaScript" type="text/javascript"> 89 function email_default_templates(template) { 90 var default_template; 91 switch(template) { 92 case "subject": 93 default_template = "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%"; 94 break; 95 case "body": 96 default_template = "<p>Hi <b>%EMAIL_FRIEND_NAME%</b>,<br />Your friend, <b>%EMAIL_YOUR_NAME%</b>, has recommended this article entitled '<b>%EMAIL_POST_TITLE%</b>' to you.</p><p><b>Here is his/her remarks:</b><br />%EMAIL_YOUR_REMARKS%</p><p><b>%EMAIL_POST_TITLE%</b><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>"; 97 break; 98 case "bodyalt": 99 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%"; 100 break; 101 case "sentsuccess": 102 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>Article: <b>%EMAIL_POST_TITLE%</b> Has Been Sent To <b>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</b></p></div>"; 103 break; 104 case "sentfailed": 105 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>An Error Has Occured When Trying To Send The E-Mail<br /><b>»</b> %EMAIL_ERROR_MSG%</p></div>"; 106 break; 107 case "error": 108 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>An Error Has Occured<br /><b>»</b> %EMAIL_ERROR_MSG%</p><p><a href=\"#\" onclick=\"javascript:history.go(-1); return false;\">« Go Back</a></p></div>"; 109 break; 110 } 111 document.getElementById("email_template_" + template).value = default_template; 91 <script type="text/javascript"> 92 /* <![CDATA[*/ 93 function email_default_templates(template) { 94 var default_template; 95 switch(template) { 96 case "subject": 97 default_template = "Recommended Article By %EMAIL_YOUR_NAME%: %EMAIL_POST_TITLE%"; 98 break; 99 case "body": 100 default_template = "<p>Hi <b>%EMAIL_FRIEND_NAME%</b>,<br />Your friend, <b>%EMAIL_YOUR_NAME%</b>, has recommended this article entitled '<b>%EMAIL_POST_TITLE%</b>' to you.</p><p><b>Here is his/her remarks:</b><br />%EMAIL_YOUR_REMARKS%</p><p><b>%EMAIL_POST_TITLE%</b><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>"; 101 break; 102 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%"; 104 break; 105 case "sentsuccess": 106 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>Article: <b>%EMAIL_POST_TITLE%</b> Has Been Sent To <b>%EMAIL_FRIEND_NAME% (%EMAIL_FRIEND_EMAIL%)</b></p></div>"; 107 break; 108 case "sentfailed": 109 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>An Error Has Occured When Trying To Send The E-Mail<br /><b>»</b> %EMAIL_ERROR_MSG%</p></div>"; 110 break; 111 case "error": 112 default_template = "<div id=\"content\" class=\"narrowcolumn\"><p>An Error Has Occured<br /><b>»</b> %EMAIL_ERROR_MSG%</p><p><a href=\"#\" onclick=\"javascript:history.go(-1); return false;\">« Go Back</a></p></div>"; 113 break; 114 } 115 document.getElementById("email_template_" + template).value = default_template; 112 116 } 117 /* ]]> */ 113 118 </script> 114 119 <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> … … 169 174 </tr> 170 175 <tr valign="top"> 171 <th align="left" width="30%"><?php _e('Max Number Of Multiple E-Mails:'); ?></th> 172 <td align="left"><input type="text" id="email_multiple" name="email_multiple" value="<?php echo get_settings('email_multiple'); ?>" size="5" maxlength="3"><br />Setting this value more than 1 will enable this feature. It allows the maximum number of multiple e-mails that can be send at one go.</td> 176 <th align="left" width="30%"><?php _e('Enable Image Verification:'); ?></th> 177 <td align="left"> 178 <select name="email_imageverify" size="1"> 179 <option value="1"<?php selected('1', get_settings('email_imageverify')); ?>><?php _e('Yes'); ?></option> 180 <option value="0"<?php selected('0', get_settings('email_imageverify')); ?>><?php _e('No'); ?></option> 181 </select><br />It is recommanded to choose <b>Yes</b> unless your server does not support PHP GD Library. 182 </td> 173 183 </tr> 174 184 </table> wp-email/trunk/email/email.php
r5596 r6073 4 4 Plugin URI: http://www.lesterchan.net/portfolio/programming.php 5 5 Description: Enable You To Send Your Webblog Entry To A Friend. 6 Version: 2.0 46 Version: 2.05 7 7 Author: GaMerZ 8 8 Author URI: http://www.lesterchan.net … … 479 479 add_option('email_snippet', 100, 'Enable Snippet Feature For Your E-Mail?'); 480 480 add_option('email_multiple', 5, 'Maximum Number Of Multiple E-Mails'); 481 // Version 2.05 Options 482 add_option('email_imageverify', 1, 'Enable Image Verification?'); 481 483 // Set 'manage_email' Capabilities To Administrator 482 484 $role = get_role('administrator'); wp-email/trunk/email/wp-email-popup.php
r5596 r6073 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2.0 Plugin: WP-EMail 2.0 4|5 | WordPress 2.0 Plugin: WP-EMail 2.05 | 6 6 | Copyright (c) 2005 Lester "GaMerZ" Chan | 7 7 | | … … 18 18 19 19 20 ### Session Start 21 session_start(); 22 20 23 ### Load wp-blog-header.php 21 24 require('../../../wp-blog-header.php'); 25 26 ### Image Verification 27 $email_image_verify = intval(get_settings('email_imageverify')); 22 28 23 29 ### Variables … … 58 64 $friendname = strip_tags(stripslashes(trim($_POST['friendname']))); 59 65 $friendemail = strip_tags(stripslashes(trim($_POST['friendemail']))); 66 $imageverify = $_POST['imageverify']; 60 67 $smtp_info = get_settings('email_smtp'); 61 68 $smtp_info = explode('|', $smtp_info); … … 118 125 } 119 126 if(sizeof($friends) > $multiple_max) { 120 $error .= '<br /><b>»</b> '.__('Maximum '.$multiple_max.' entries allowed'); 127 $error .= '<br /><b>»</b> '.__('Maximum '.$multiple_max.' entries allowed.'); 128 } 129 130 // Check Whether We Enable Image Verification 131 if($email_image_verify) { 132 if(empty($imageverify)) { 133 $error .= '<br /><b>»</b> '.__('Image verification is empty.'); 134 } else { 135 if($_SESSION['email_verify'] != md5($imageverify)) { 136 $error .= '<br /><b>»</b> '.__('Image verification failed.'); 137 } 138 } 121 139 } 122 140 … … 268 286 <p><b>* Required Field</b></p> 269 287 <p> 270 <b>Your Name: *</b><br /> 271 <input type="text" size="50" maxlength="50" name="yourname" class="Forms" /> 272 </p> 273 <p> 274 <b>Your E-Mail: *</b><br /> 275 <input type="text" size="50" maxlength="100" name="youremail" class="Forms" /> 276 </p> 277 <p> 278 <b>Your Remarks:</b><br /> 279 <textarea cols="49" rows="8" name="yourremarks" class="Forms"></textarea> 280 </p> 281 <p> 282 <b>Friend's Name: *</b><br /> 283 <input type="text" size="50" maxlength="100" name="friendname" class="Forms" /><?php email_multiple(); ?> 284 </p> 285 <p> 286 <b>Friend's E-Mail: *</b><br /> 287 <input type="text" size="50" maxlength="100" name="friendemail" class="Forms" /><?php email_multiple(); ?> 288 </p> 288 <b><label for="yourname">Your Name: *</label></b><br /> 289 <input type="text" size="50" id="yourname" name="yourname" class="Forms" /> 290 </p> 291 <p> 292 <b><label for="youremail">Your E-Mail: *</label></b><br /> 293 <input type="text" size="50" id="youremail" name="youremail" class="Forms" /> 294 </p> 295 <p> 296 <b><label for="yourremarks">Your Remarks:</label></b><br /> 297 <textarea cols="49" rows="8" id="yourremarks" name="yourremarks" class="Forms"></textarea> 298 </p> 299 <p> 300 <b><label for="friendname">Friend's Name: *</label></b><br /> 301 <input type="text" size="50" id="friendname" name="friendname" class="Forms" /><?php email_multiple(); ?> 302 </p> 303 <p> 304 <b><label for="friendemail">Friend's E-Mail: *</label></b><br /> 305 <input type="text" size="50" id="friendemail" name="friendemail" class="Forms" /><?php email_multiple(); ?> 306 </p> 307 <?php if($email_image_verify): ?> 308 <p> 309 <b><label for="imageverify">Image Verification: *</label></b><br /> 310 <img src="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/email/email-image-verify.php" width="60" height="22" alt="Image Verification" /><input type="text" size="5" maxlength="5" id="imageverify" name="imageverify" class="Forms" /> 311 </p> 312 <?php endif; ?> 289 313 <p style="text-align: center"> 290 314 <input type="submit" value=" Mail It! " name="wp-email" class="Buttons" /> wp-email/trunk/email/wp-email.php
r5596 r6073 3 3 +----------------------------------------------------------------+ 4 4 | | 5 | WordPress 2.0 Plugin: WP-EMail 2.0 4|5 | WordPress 2.0 Plugin: WP-EMail 2.05 | 6 6 | Copyright (c) 2005 Lester "GaMerZ" Chan | 7 7 | | … … 18 18 19 19 20 ### Session Start 21 session_start(); 22 23 ### Image Verification 24 $email_image_verify = intval(get_settings('email_imageverify')); 25 20 26 ### Variables 21 27 $did_email = get_query_var('wp-email'); … … 38 44 $friendname = strip_tags(stripslashes(trim($_POST['friendname']))); 39 45 $friendemail = strip_tags(stripslashes(trim($_POST['friendemail']))); 46 $imageverify = $_POST['imageverify']; 40 47 $smtp_info = get_settings('email_smtp'); 41 48 $smtp_info = explode('|', $smtp_info); … … 98 105 if(sizeof($friends) > $multiple_max) { 99 106 $error .= '<br /><b>»</b> '.__('Maximum '.$multiple_max.' entries allowed'); 107 } 108 109 // Check Whether We Enable Image Verification 110 if($email_image_verify) { 111 if(empty($imageverify)) { 112 $error .= '<br /><b>»</b> '.__('Image verification is empty.'); 113 } else { 114 if($_SESSION['email_verify'] != md5($imageverify)) { 115 $error .= '<br /><b>»</b> '.__('Image verification failed.'); 116 } 117 } 100 118 } 101 119 … … 258 276 <p><b>* Required Field</b></p> 259 277 <p> 260 <b>Your Name: *</b><br /> 261 <input type="text" size="50" maxlength="50" name="yourname" class="Forms" /> 262 </p> 263 <p> 264 <b>Your E-Mail: *</b><br /> 265 <input type="text" size="50" maxlength="100" name="youremail" class="Forms" /> 266 </p> 267 <p> 268 <b>Your Remarks:</b><br /> 269 <textarea cols="49" rows="8" name="yourremarks" class="Forms"></textarea> 270 </p> 271 <p> 272 <b>Friend's Name: *</b><br /> 273 <input type="text" size="50" maxlength="100" name="friendname" class="Forms" /><?php email_multiple(); ?> 274 </p> 275 <p> 276 <b>Friend's E-Mail: *</b><br /> 277 <input type="text" size="50" maxlength="100" name="friendemail" class="Forms" /><?php email_multiple(); ?> 278 </p> 278 <b><label for="yourname">Your Name: *</label></b><br /> 279 <input type="text" size="50" id="yourname" name="yourname" class="Forms" /> 280 </p> 281 <p> 282 <b><label for="youremail">Your E-Mail: *</label></b><br /> 283 <input type="text" size="50" id="youremail" name="youremail" class="Forms" /> 284 </p> 285 <p> 286 <b><label for="yourremarks">Your Remarks:</label></b><br /> 287 <textarea cols="49" rows="8" id="yourremarks" name="yourremarks" class="Forms"></textarea> 288 </p> 289 <p> 290 <b><label for="friendname">Friend's Name: *</label></b><br /> 291 <input type="text" size="50" id="friendname" name="friendname" class="Forms" /><?php email_multiple(); ?> 292 </p> 293 <p> 294 <b><label for="friendemail">Friend's E-Mail: *</label></b><br /> 295 <input type="text" size="50" id="friendemail" name="friendemail" class="Forms" /><?php email_multiple(); ?> 296 </p> 297 <?php if($email_image_verify): ?> 298 <p> 299 <b><label for="imageverify">Image Verification: *</label></b><br /> 300 <img src="<?php echo get_settings('siteurl'); ?>/wp-content/plugins/email/email-image-verify.php" width="60" height="22" alt="Image Verification" /><input type="text" size="5" maxlength="5" id="imageverify" name="imageverify" class="Forms" /> 301 </p> 302 <?php endif; ?> 279 303 <p align="center"> 280 304 <input type="submit" value=" Mail It! " name="wp-email" class="Buttons" />
