Changeset 36851

Show
Ignore:
Timestamp:
03/30/08 11:44:23 (3 months ago)
Author:
GamerZ
Message:

Major Update

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-email/trunk/email-manager.php

    r36676 r36851  
    168168      <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> 
    169169      <p><?php printf(__('Sorted By <strong>%s</strong> In <strong>%s</strong> Order', 'wp-email'), $email_sortby_text, $email_sortorder_text); ?></p> 
    170       <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    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       </tr> 
     170      <table class="widefat"> 
     171            <thead> 
     172            <tr> 
     173                  <th width="5%"><?php _e('ID', 'wp-email'); ?></th> 
     174                  <th width="17%"><?php _e('From', 'wp-email'); ?></th> 
     175                  <th width="17%"><?php _e('To', 'wp-email'); ?></th> 
     176                  <th width="17%"><?php _e('Date / Time', 'wp-email'); ?></th> 
     177                  <th width="17%"><?php _e('IP / Host', 'wp-email'); ?></th> 
     178                  <th width="17%"><?php _e('Post Title', 'wp-email'); ?></th> 
     179                  <th width="10%"><?php _e('Status', 'wp-email'); ?></th> 
     180            </tr> 
     181      </thead> 
    180182      <?php 
    181183            if($email_logs) { 
     
    183185                  foreach($email_logs as $email_log) { 
    184186                        if($i%2 == 0) { 
    185                               $style = 'style=\'background: none\'';                           
     187                              $style = '';                             
    186188                        }  else { 
    187                               $style = 'style=\'background-color: #eee\''; 
     189                              $style = 'class="alternate"'; 
    188190                        } 
    189191                        $email_id = intval($email_log->email_id); 
     
    310312      </form> 
    311313</div> 
     314<p>&nbsp;</p> 
    312315 
    313316<!-- E-Mail Stats --> 
    314317<div class="wrap"> 
    315318      <h2><?php _e('E-Mail Logs Stats', 'wp-email'); ?></h2> 
    316       <table border="0" cellspacing="3" cellpadding="3"> 
     319      <br style="clear" /> 
     320      <table class="widefat"> 
    317321      <tr> 
    318             <th align="left"><?php _e('Total E-Mails:', 'wp-email'); ?></th> 
    319             <td align="left"><?php echo number_format_i18n($total_email); ?></td> 
     322            <th><?php _e('Total E-Mails:', 'wp-email'); ?></th> 
     323            <td><?php echo number_format_i18n($total_email); ?></td> 
     324      </tr> 
     325      <tr class="alternate"> 
     326            <th><?php _e('Total E-Mail Sent:', 'wp-email'); ?></th> 
     327            <td><?php echo number_format_i18n($total_email_success); ?></td> 
    320328      </tr> 
    321329      <tr> 
    322             <th align="left"><?php _e('Total E-Mail Sent:', 'wp-email'); ?></th> 
    323             <td align="left"><?php echo number_format_i18n($total_email_success); ?></td> 
    324       </tr> 
    325       <tr> 
    326             <th align="left"><?php _e('Total E-Mail Failed:', 'wp-email'); ?></th> 
    327             <td align="left"><?php echo number_format_i18n($total_email_failed); ?></td> 
     330            <th><?php _e('Total E-Mail Failed:', 'wp-email'); ?></th> 
     331            <td><?php echo number_format_i18n($total_email_failed); ?></td> 
    328332      </tr> 
    329333      </table> 
    330334</div> 
     335<p>&nbsp;</p> 
    331336 
    332337<!-- Delete E-Mail Logs --> 
    333338<div class="wrap"> 
    334339      <h2><?php _e('Delete E-Mail Logs', 'wp-email'); ?></h2> 
     340      <br style="clear" /> 
    335341      <div align="center"> 
    336342            <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post"> 
  • wp-email/trunk/email-options.php

    r36676 r36851  
    162162</script> 
    163163<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> 
     164<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">  
    164165<div class="wrap">  
    165       <h2><?php _e('E-Mail Options', 'wp-email'); ?></h2>  
    166       <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">  
    167             <p class="submit"> 
    168                   <input type="submit" name="Submit" class="button" value="<?php _e('Update Options &raquo;', 'wp-email'); ?>" /> 
    169             </p> 
    170             <fieldset class="options"> 
    171                   <legend><?php _e('SMTP Settings', 'wp-email'); ?></legend> 
    172                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    173                          <tr valign="top"> 
    174                               <th align="left" width="20%"><?php _e('SMTP Username:', 'wp-email'); ?></th> 
    175                               <td align="left"><input type="text" name="email_smtp_name" value="<?php echo $emai_smtp['username']; ?>" size="30" /></td> 
    176                         </tr> 
    177                         <tr valign="top"> 
    178                               <th align="left" width="20%"><?php _e('SMTP Password:', 'wp-email'); ?></th> 
    179                               <td align="left"><input type="password" name="email_smtp_password" value="<?php echo $emai_smtp['password']; ?>" size="30" /></td> 
    180                         </tr> 
    181                         <tr valign="top"> 
    182                               <th align="left" width="20%"><?php _e('SMTP Server:', 'wp-email'); ?></th> 
    183                               <td align="left"><input type="text" name="email_smtp_server" value="<?php echo $emai_smtp['server']; ?>" size="30" /><br /><?php _e('You may leave the above fields blank if you do not use a SMTP server.', 'wp-email'); ?></td> 
    184                         </tr> 
    185                   </table> 
    186             </fieldset> 
    187             <?php ?> 
    188             <fieldset class="options"> 
    189                   <legend><?php _e('E-Mail Styles', 'wp-email'); ?></legend> 
    190                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    191                         <tr valign="top"> 
    192                               <th align="left" width="30%"><?php _e('E-Mail Text Link For Post', 'wp-email'); ?></th> 
    193                               <td align="left"> 
    194                                     <input type="text" name="email_post_text" value="<?php echo stripslashes($email_options['post_text']); ?>" size="30" /> 
    195                               </td> 
    196                         </tr> 
    197                         <tr valign="top"> 
    198                               <th align="left" width="30%"><?php _e('E-Mail Text Link For Page', 'wp-email'); ?></th> 
    199                               <td align="left"> 
    200                                     <input type="text" name="email_page_text" value="<?php echo stripslashes($email_options['page_text']); ?>" size="30" /> 
    201                               </td> 
    202                         </tr> 
    203                         <tr valign="top"> 
    204                               <th align="left" width="30%"><?php _e('E-Mail Icon', 'wp-email'); ?></th> 
    205                               <td align="left"> 
    206                                     <?php 
    207                                           $email_icon = $email_options['email_icon']; 
    208                                           $email_icon_url = get_option('siteurl').'/wp-content/plugins/wp-email/images'; 
    209                                           $email_icon_path = ABSPATH.'/wp-content/plugins/wp-email/images'; 
    210                                           if($handle = @opendir($email_icon_path)) {      
    211                                                 while (false !== ($filename = readdir($handle))) {   
    212                                                       if ($filename != '.' && $filename != '..' && $filename != 'loading.gif') { 
    213                                                             if(is_file($email_icon_path.'/'.$filename)) { 
    214                                                                   if($email_icon == $filename) { 
    215                                                                         echo '<input type="radio" name="email_icon" value="'.$filename.'" checked="checked" />'."\n";                                                          
    216                                                                   } else { 
    217                                                                         echo '<input type="radio" name="email_icon" value="'.$filename.'" />'."\n"; 
    218                                                                   } 
    219                                                                   echo '&nbsp;&nbsp;&nbsp;'; 
    220                                                                   echo '<img src="'.$email_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n"; 
    221                                                                   echo '&nbsp;&nbsp;&nbsp;('.$filename.')'; 
    222                                                                   echo '<br /><br />'."\n"; 
    223                                                             } 
    224                                                       }  
    225                                                 }  
    226                                                 closedir($handle); 
    227                                           } 
    228                                     ?> 
    229                               </td> 
    230                         </tr> 
    231                         <tr valign="top"> 
    232                               <th align="left" width="30%"><?php _e('E-Mail Link Type', 'wp-email'); ?></th> 
    233                               <td align="left"> 
    234                                     <select name="email_type" size="1"> 
    235                                           <option value="1"<?php selected('1', $email_options['email_type']); ?>><?php _e('E-Mail Standalone Page', 'wp-email'); ?></option> 
    236                                           <option value="2"<?php selected('2', $email_options['email_type']); ?>><?php _e('E-Mail Popup', 'wp-email'); ?></option> 
    237                                     </select> 
    238                               </td> 
    239                         </tr> 
    240                         <tr valign="top"> 
    241                               <th align="left" width="30%"><?php _e('E-Mail Text Link Style', 'wp-email'); ?></th> 
    242                               <td align="left"> 
    243                                     <select name="email_style" id="email_style" size="1" onchange="check_email_style();"> 
    244                                           <option value="1"<?php selected('1', $email_options['email_style']); ?>><?php _e('E-Mail Icon With Text Link', 'wp-email'); ?></option> 
    245                                           <option value="2"<?php selected('2', $email_options['email_style']); ?>><?php _e('E-Mail Icon Only', 'wp-email'); ?></option> 
    246                                           <option value="3"<?php selected('3', $email_options['email_style']); ?>><?php _e('E-Mail Text Link Only', 'wp-email'); ?></option> 
    247                                           <option value="4"<?php selected('4', $email_options['email_style']); ?>><?php _e('Custom', 'wp-email'); ?></option> 
    248                                     </select> 
    249                                     <div id="email_style_custom" style="display: <?php if(intval($email_options['email_style']) == 4) { echo 'block'; } else { echo 'none'; } ?>; margin-top: 20px;"> 
    250                                           <textarea rows="2" cols="80" name="email_html" id="email_template_html"><?php echo htmlspecialchars(stripslashes($email_options['email_html'])); ?></textarea><br /> 
    251                                           <?php _e('HTML is allowed.', 'wp-email'); ?><br /> 
    252                                           %EMAIL_URL% - <?php _e('URL to the email post/page.', 'wp-email'); ?><br /> 
    253                                           %EMAIL_POPUP% - <?php _e('It will produce the onclick html code which is nescassary for popup.', 'wp-email'); ?><br /> 
    254                                           <?php _e('Example Popup Template:', 'wp-email'); ?><br /> 
    255                                           <?php echo htmlspecialchars('<a href="%EMAIL_URL%" %EMAIL_POPUP% rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'); ?><br /> 
    256                                           %EMAIL_TEXT% - <?php _e('E-Mail text link of the post/page that you have typed in above.', 'wp-email'); ?><br /> 
    257                                           %EMAIL_ICON_URL% - <?php _e('URL to the email icon you have chosen above.', 'wp-email'); ?><br /> 
    258                                           <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('html');" class="button" /> 
    259                                     </div> 
    260                               </td> 
    261                         </tr> 
    262                   </table> 
    263             </fieldset> 
    264             <fieldset class="options"> 
    265                   <legend><?php _e('E-Mail Settings', 'wp-email'); ?></legend> 
    266                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    267                         <tr valign="top"> 
    268                               <th align="left" width="30%"><?php _e('E-Mail Fields:', 'wp-email'); ?></th> 
    269                                <td align="left"> 
    270                                     <input type="checkbox" name="email_field_yourname" value="1"<?php checked('1', $email_fields['yourname']); ?> />&nbsp;<?php _e('Your Name', 'wp-email'); ?><br /> 
    271                                     <input type="checkbox" name="email_field_youremail" value="1"<?php checked('1', $email_fields['youremail']); ?> />&nbsp;<?php _e('Your E-Mail', 'wp-email'); ?><br /> 
    272                                     <input type="checkbox" name="email_field_yourremarks" value="1"<?php checked('1', $email_fields['yourremarks']); ?> />&nbsp;<?php _e('Your Remarks', 'wp-email'); ?><br /> 
    273                                     <input type="checkbox" name="email_field_friendname" value="1"<?php checked('1', $email_fields['friendname']); ?> />&nbsp;<?php _e('Friend\'s Name', 'wp-email'); ?><br /> 
    274                                     <input type="checkbox" name="email_field_friendemail" value="1" checked="checked" disabled="disabled" />&nbsp;<?php _e('Friend\'s E-Mail', 'wp-email'); ?> 
    275                               </td> 
    276                         </tr> 
    277                          <tr valign="top"> 
    278                               <th align="left" width="30%"><?php _e('E-Mail Content Type:', 'wp-email'); ?></th> 
    279                                <td align="left"> 
    280                                     <select name="email_contenttype" size="1"> 
    281                                           <option value="text/plain"<?php selected('text/plain', get_option('email_contenttype')); ?>><?php _e('Plain Text', 'wp-email'); ?></option> 
    282                                           <option value="text/html"<?php selected('text/html', get_option('email_contenttype')); ?>><?php _e('HTML', 'wp-email'); ?></option> 
    283                                     </select> 
    284                               </td> 
    285                         </tr> 
    286                         <tr valign="top">  
    287                               <th align="left" width="30%"><?php _e('Method Used To Send E-Mail:', 'wp-email'); ?></th> 
    288                               <td align="left"> 
    289                                     <select name="email_mailer" size="1"> 
    290                                           <option value="mail"<?php selected('mail', get_option('email_mailer')); ?>><?php _e('PHP', 'wp-email'); ?></option> 
    291                                           <option value="sendmail"<?php selected('sendmail', get_option('email_mailer')); ?>><?php _e('SendMail', 'wp-email'); ?></option> 
    292                                           <option value="smtp"<?php selected('smtp', get_option('email_mailer')); ?>><?php _e('SMTP', 'wp-email'); ?></option> 
    293                                     </select> 
    294                                     <br /><?php _e('If you ARE NOT using a smtp server of if there is a problem sending out email using your smtp server. Please Choose PHP or Send Mail.', 'wp-email'); ?> 
    295                               </td>  
    296                         </tr> 
    297                         <tr valign="top">  
    298                               <th align="left" width="30%"><?php _e('No. Of Words Before Cutting Off:', 'wp-email'); ?></th> 
    299                               <td align="left"><input type="text" id="email_snippet" name="email_snippet" value="<?php echo  get_option('email_snippet'); ?>" size="5" maxlength="5" /><br /><?php _e('Setting this value more than 0 will enable the snippet feature. This feature will allow you to send a portion (defined by the text field above) of the article to your friend instead of the whole article.', 'wp-email'); ?></td>  
    300                         </tr> 
    301                         <tr valign="top">  
    302                               <th align="left" width="30%"><?php _e('Interval Between E-Mails:', 'wp-email'); ?></th> 
    303                               <td align="left"><input type="text" id="email_interval" name="email_interval" value="<?php echo  get_option('email_interval'); ?>" size="5" maxlength="5" /> <?php _e('Mins', 'wp-email'); ?><br /><?php _e('It allows you to specify the interval in minutes between each email sent per user based on IP to prevent spam and flood.', 'wp-email'); ?></td>  
    304                         </tr> 
    305                         <tr valign="top">  
    306                                     <th align="left" width="30%"><?php _e('Max Number Of Multiple E-Mails:', 'wp-email'); ?></th> 
    307                                     <td align="left"><input type="text" id="email_multiple" name="email_multiple" value="<?php echo  get_option('email_multiple'); ?>" size="5" maxlength="3" /><br /><?php _e('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.', 'wp-email'); ?></td>  
    308                         </tr>  
    309                         <tr valign="top">  
    310                               <th align="left" width="30%"><?php _e('Enable Image Verification:', 'wp-email'); ?></th> 
    311                               <td align="left"> 
    312                                     <select name="email_imageverify" size="1"> 
    313                                           <option value="1"<?php selected('1', get_option('email_imageverify')); ?>><?php _e('Yes', 'wp-email'); ?></option> 
    314                                           <option value="0"<?php selected('0', get_option('email_imageverify')); ?>><?php _e('No', 'wp-email'); ?></option> 
    315                                     </select><br /><?php _e('It is recommanded to choose <strong>Yes</strong> unless your server does not support PHP GD Library.', 'wp-email'); ?> 
    316                               </td>  
    317                         </tr> 
    318                   </table> 
    319             </fieldset> 
    320             <fieldset class="options"> 
    321                   <legend><?php _e('Template Variables', 'wp-email'); ?></legend> 
    322                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    323                         <tr> 
    324                               <td><strong>%EMAIL_YOUR_NAME%</strong> - <?php _e('Display the sender\'s name', 'wp-email'); ?></td> 
    325                               <td><strong>%EMAIL_POST_TITLE%</strong> - <?php _e('Display the post\'s title', 'wp-email'); ?></td> 
    326                         </tr> 
    327                         <tr> 
    328                               <td><strong>%EMAIL_YOUR_EMAIL%</strong> - <?php _e('Display the sender\'s email', 'wp-email'); ?></td> 
    329                               <td><strong>%EMAIL_POST_AUTHOR%</strong> - <?php _e('Display the post\'s author', 'wp-email'); ?></td> 
    330                         </tr> 
    331                         <tr> 
    332                               <td><strong>%EMAIL_YOUR_REMARKS%</strong> - <?php _e('Display the sender\'s remarks', 'wp-email'); ?></td> 
    333                               <td><strong>%EMAIL_POST_DATE%</strong> - <?php _e('Display the post\'s date', 'wp-email'); ?></td> 
    334                         </tr> 
    335                         <tr> 
    336                               <td><strong>%EMAIL_FRIEND_NAME%</strong> - <?php _e('Display the friend\'s name', 'wp-email'); ?></td> 
    337                               <td><strong>%EMAIL_POST_CATEGORY%</strong> - <?php _e('Display the post\'s category', 'wp-email'); ?></td> 
    338                         </tr> 
    339                         <tr> 
    340                               <td><strong>%EMAIL_FRIEND_EMAIL%</strong> - <?php _e('Display the friend\'s email', 'wp-email'); ?></td> 
    341                               <td><strong>%EMAIL_POST_EXCERPT%</strong> - <?php _e('Display the post\'s excerpt', 'wp-email'); ?></td> 
    342                         </tr> 
    343                         <tr> 
    344                               <td><strong>%EMAIL_ERROR_MSG%</strong> - <?php _e('Display the error message', 'wp-email'); ?></td> 
    345                               <td><strong>%EMAIL_POST_CONTENT%</strong> - <?php _e('Display the post\'s content', 'wp-email'); ?></td> 
    346                         </tr> 
    347                         <tr> 
    348                               <td><strong>%EMAIL_BLOG_NAME%</strong> - <?php _e('Display the blog\'s name', 'wp-email'); ?></td> 
    349                               <td><strong>%EMAIL_PERMALINK%</strong> - <?php _e('Display the permalink of the post', 'wp-email'); ?></td> 
    350                         </tr> 
    351                         <tr> 
    352                               <td><strong>%EMAIL_BLOG_URL%</strong> - <?php _e('Display the blog\'s url', 'wp-email'); ?></td> 
    353                               <td>&nbsp;</td> 
    354                         </tr> 
    355                   </table> 
    356             </fieldset> 
    357       <fieldset class="options"> 
    358                   <legend><?php _e('E-Mail Page Templates', 'wp-email'); ?></legend> 
    359                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    360                          <tr valign="top"> 
    361                               <td align="left" width="30%"> 
    362                                     <strong><?php _e('E-Mail Page Title:', 'wp-email'); ?></strong><br /><br /> 
    363                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    364                                     - %EMAIL_POST_TITLE%<br /> 
    365                                     - %EMAIL_POST_AUTHOR%<br /> 
    366                                     - %EMAIL_POST_DATE%<br /> 
    367                                     - %EMAIL_POST_CATEGORY%<br /> 
    368                                     - %EMAIL_BLOG_NAME%<br /> 
    369                                     - %EMAIL_BLOG_URL%<br /> 
    370                                     - %EMAIL_PERMALINK%<br /><br /> 
    371                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('title');" class="button" /> 
    372                               </td> 
    373                               <td align="left"><input type="text" id="email_template_title" name="email_template_title" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_title'))); ?>" size="82" /></td> 
    374                         </tr> 
    375                         <tr valign="top">  
    376                               <td align="left" width="30%"> 
    377                                     <strong><?php _e('E-Mail Page Subtitle:', 'wp-email'); ?></strong><br /><br /> 
    378                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    379                                     - %EMAIL_POST_TITLE%<br /> 
    380                                     - %EMAIL_POST_AUTHOR%<br /> 
    381                                     - %EMAIL_POST_DATE%<br /> 
    382                                     - %EMAIL_POST_CATEGORY%<br /> 
    383                                     - %EMAIL_BLOG_NAME%<br /> 
    384                                     - %EMAIL_BLOG_URL%<br /> 
    385                                     - %EMAIL_PERMALINK%<br /><br /> 
    386                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subtitle');" class="button" /> 
    387                               </td> 
    388                               <td align="left"><input type="text" id="email_template_subtitle" name="email_template_subtitle" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_subtitle'))); ?>" size="82" /></td>  
    389                         </tr> 
    390                   </table> 
    391             </fieldset> 
    392             <fieldset class="options"> 
    393                   <legend><?php _e('E-Mail Templates', 'wp-email'); ?></legend> 
    394                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    395                          <tr valign="top"> 
    396                               <td align="left" width="30%"> 
    397                                     <strong><?php _e('E-Mail Subject:', 'wp-email'); ?></strong><br /><br /> 
    398                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    399                                     - %EMAIL_YOUR_NAME%<br /> 
    400                                     - %EMAIL_YOUR_EMAIL%<br /> 
    401                                     - %EMAIL_POST_TITLE%<br /> 
    402                                     - %EMAIL_POST_AUTHOR%<br /> 
    403                                     - %EMAIL_POST_DATE%<br /> 
    404                                     - %EMAIL_POST_CATEGORY%<br /> 
    405                                     - %EMAIL_BLOG_NAME%<br /> 
    406                                     - %EMAIL_BLOG_URL%<br /> 
    407                                     - %EMAIL_PERMALINK%<br /><br /> 
    408                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('subject');" class="button" /> 
    409                               </td> 
    410                               <td align="left"><input type="text" id="email_template_subject" name="email_template_subject" value="<?php echo htmlspecialchars(stripslashes(get_option('email_template_subject'))); ?>" size="82" /></td> 
    411                         </tr> 
    412                         <tr valign="top">  
    413                               <td align="left" width="30%"> 
    414                                     <strong><?php _e('E-Mail Body:', 'wp-email'); ?></strong><br /><br /> 
    415                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    416                                     - %EMAIL_YOUR_NAME%<br /> 
    417                                     - %EMAIL_YOUR_EMAIL%<br /> 
    418                                     - %EMAIL_YOUR_REMARKS%<br /> 
    419                                     - %EMAIL_FRIEND_NAME%<br /> 
    420                                     - %EMAIL_FRIEND_EMAIL%<br /> 
    421                                     - %EMAIL_POST_TITLE%<br /> 
    422                                     - %EMAIL_POST_AUTHOR%<br /> 
    423                                     - %EMAIL_POST_DATE%<br /> 
    424                                     - %EMAIL_POST_CATEGORY%<br /> 
    425                                     - %EMAIL_POST_EXCERPT%<br /> 
    426                                     - %EMAIL_POST_CONTENT%<br /> 
    427                                     - %EMAIL_BLOG_NAME%<br /> 
    428                                     - %EMAIL_BLOG_URL%<br /> 
    429                                     - %EMAIL_PERMALINK%<br /><br /> 
    430                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('body');" class="button" /> 
    431                               </td> 
    432                               <td align="left"><textarea cols="80" rows="15" id="email_template_body" name="email_template_body"><?php echo htmlspecialchars(stripslashes(get_option('email_template_body'))); ?></textarea></td>  
    433                         </tr> 
    434                         <tr valign="top">  
    435                               <td align="left" width="30%"> 
    436                                     <strong><?php _e('E-Mail Alternate Body:', 'wp-email'); ?></strong><br /><br /> 
    437                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    438                                     - %EMAIL_YOUR_NAME%<br /> 
    439                                     - %EMAIL_YOUR_EMAIL%<br /> 
    440                                     - %EMAIL_YOUR_REMARKS%<br /> 
    441                                     - %EMAIL_FRIEND_NAME%<br /> 
    442                                     - %EMAIL_FRIEND_EMAIL%<br /> 
    443                                     - %EMAIL_POST_TITLE%<br /> 
    444                                     - %EMAIL_POST_AUTHOR%<br /> 
    445                                     - %EMAIL_POST_DATE%<br /> 
    446                                     - %EMAIL_POST_CATEGORY%<br /> 
    447                                     - %EMAIL_POST_EXCERPT%<br /> 
    448                                     - %EMAIL_POST_CONTENT%<br /> 
    449                                     - %EMAIL_BLOG_NAME%<br /> 
    450                                     - %EMAIL_BLOG_URL%<br /> 
    451                                     - %EMAIL_PERMALINK%<br /><br /> 
    452                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('bodyalt');" class="button" /> 
    453                               </td> 
    454                               <td align="left"><textarea cols="80" rows="15" id="email_template_bodyalt" name="email_template_bodyalt"><?php echo htmlspecialchars(stripslashes(get_option('email_template_bodyalt'))); ?></textarea></td>  
    455                         </tr> 
    456                   </table> 
    457             </fieldset> 
    458             <fieldset class="options"> 
    459                   <legend><?php _e('After Sending E-Mail Templates', 'wp-email'); ?></legend> 
    460                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    461                          <tr valign="top"> 
    462                               <td align="left" width="30%"> 
    463                                     <strong><?php _e('Sent Successfully:', 'wp-email'); ?></strong><br /><br /> 
    464                                     <?php _e('Allowed Variables:'); ?><br /> 
    465                                     - %EMAIL_FRIEND_NAME%<br /> 
    466                                     - %EMAIL_FRIEND_EMAIL%<br /> 
    467                                     - %EMAIL_POST_TITLE%<br /> 
    468                                     - %EMAIL_BLOG_NAME%<br /> 
    469                                     - %EMAIL_BLOG_URL%<br /> 
    470                                     - %EMAIL_PERMALINK%<br /><br /> 
    471                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('sentsuccess');" class="button" /> 
    472                               </td> 
    473                               <td align="left"><textarea cols="80" rows="10" id="email_template_sentsuccess" name="email_template_sentsuccess"><?php echo htmlspecialchars(stripslashes(get_option('email_template_sentsuccess'))); ?></textarea></td> 
    474                         </tr> 
    475                         <tr valign="top">  
    476                               <td align="left" width="30%"> 
    477                                     <strong><?php _e('Sent Failed:', 'wp-email'); ?></strong><br /><br /> 
    478                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    479                                     - %EMAIL_FRIEND_NAME%<br /> 
    480                                     - %EMAIL_FRIEND_EMAIL%<br /> 
    481                                     - %EMAIL_ERROR_MSG%<br /> 
    482                                     - %EMAIL_POST_TITLE%<br /> 
    483                                     - %EMAIL_BLOG_NAME%<br /> 
    484                                     - %EMAIL_BLOG_URL%<br /> 
    485                                     - %EMAIL_PERMALINK%<br /><br /> 
    486                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('sentfailed');" class="button" /> 
    487                               </td> 
    488                               <td align="left"><textarea cols="80" rows="10" id="email_template_sentfailed" name="email_template_sentfailed"><?php echo htmlspecialchars(stripslashes(get_option('email_template_sentfailed'))); ?></textarea></td>  
    489                         </tr> 
    490                   </table> 
    491             </fieldset> 
    492             <fieldset class="options"> 
    493                   <legend><?php _e('E-Mail Misc Templates', 'wp-email'); ?></legend> 
    494                   <table width="100%"  border="0" cellspacing="3" cellpadding="3"> 
    495                          <tr valign="top"> 
    496                               <td align="left" width="30%"> 
    497                                     <strong><?php _e('E-Mail Error:', 'wp-email'); ?></strong><br /><br /> 
    498                                     <?php _e('Allowed Variables:', 'wp-email'); ?><br /> 
    499                                     - %EMAIL_ERROR_MSG%<br /> 
    500                                     - %EMAIL_BLOG_NAME%<br /> 
    501                                     - %EMAIL_BLOG_URL%<br /> 
    502                                     - %EMAIL_PERMALINK%<br /><br /> 
    503                                     <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('error');" class="button" /> 
    504                               </td> 
    505                               <td align="left"><textarea cols="80" rows="10" id="email_template_error" name="email_template_error"><?php echo htmlspecialchars(stripslashes(get_option('email_template_error'))); ?></textarea></td> 
    506                         </tr> 
    507                   </table> 
    508             </fieldset> 
    509             <p class="submit"> 
    510                   <input type="submit" name="Submit" class="button" value="<?php _e('Update Options &raquo;', 'wp-email'); ?>" /> 
    511             </p> 
    512       </form>  
     166      <h2><?php _e('E-Mail Options', 'wp-email'); ?></h2>    
     167      <h3><?php _e('SMTP Settings', 'wp-email'); ?></h3> 
     168      <table class="form-table"> 
     169             <tr> 
     170                  <th align="left" width="20%"><?php _e('SMTP Username:', 'wp-email'); ?></th> 
     171                  <td><input type="text" name="email_smtp_name" value="<?php echo $emai_smtp['username']; ?>" size="30" /></td> 
     172            </tr> 
     173            <tr> 
     174                  <th align="left" width="20%"><?php _e('SMTP Password:', 'wp-email'); ?></th> 
     175                  <td><input type="password" name="email_smtp_password" value="<?php echo $emai_smtp['password']; ?>" size="30" /></td> 
     176            </tr> 
     177            <tr> 
     178                  <th align="left" width="20%"><?php _e('SMTP Server:', 'wp-email'); ?></th> 
     179                  <td><input type="text" name="email_smtp_server" value="<?php echo $emai_smtp['server']; ?>" size="30" /><br /><?php _e('You may leave the above fields blank if you do not use a SMTP server.', 'wp-email'); ?></td> 
     180            </tr> 
     181      </table> 
     182      <h3><?php _e('E-Mail Styles', 'wp-email'); ?></h3> 
     183      <table class="form-table"> 
     184            <tr> 
     185                  <th scope="row" valign="top"><?php _e('E-Mail Text Link For Post', 'wp-email'); ?></th> 
     186                  <td> 
     187                        <input type="text" name="email_post_text" value="<?php echo stripslashes($email_options['post_text']); ?>" size="30" /> 
     188                  </td> 
     189            </tr> 
     190            <tr> 
     191                  <th scope="row" valign="top"><?php _e('E-Mail Text Link For Page', 'wp-email'); ?></th> 
     192                  <td> 
     193                        <input type="text" name="email_page_text" value="<?php echo stripslashes($email_options['page_text']); ?>" size="30" /> 
     194                  </td> 
     195            </tr> 
     196            <tr> 
     197                  <th scope="row" valign="top"><?php _e('E-Mail Icon', 'wp-email'); ?></th> 
     198                  <td> 
     199                        <?php 
     200                              $email_icon = $email_options['email_icon']; 
     201                              $email_icon_url = get_option('siteurl').'/wp-content/plugins/wp-email/images'; 
     202                              $email_icon_path = ABSPATH.'/wp-content/plugins/wp-email/images'; 
     203                              if($handle = @opendir($email_icon_path)) {      
     204                                    while (false !== ($filename = readdir($handle))) {   
     205                                          if ($filename != '.' && $filename != '..' && $filename != 'loading.gif') { 
     206                                                if(is_file($email_icon_path.'/'.$filename)) { 
     207                                                      if($email_icon == $filename) { 
     208                                                            echo '<input type="radio" name="email_icon" value="'.$filename.'" checked="checked" />'."\n";                                                          
     209                                                      } else { 
     210                                                            echo '<input type="radio" name="email_icon" value="'.$filename.'" />'."\n"; 
     211                                                      } 
     212                                                      echo '&nbsp;&nbsp;&nbsp;'; 
     213                                                      echo '<img src="'.$email_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n"; 
     214                                                      echo '&nbsp;&nbsp;&nbsp;('.$filename.')'; 
     215                                                      echo '<br /><br />'."\n"; 
     216                                                } 
     217                                          }  
     218                                    }  
     219                                    closedir($handle); 
     220                              } 
     221                        ?> 
     222                  </td> 
     223            </tr> 
     224            <tr> 
     225                  <th scope="row" valign="top"><?php _e('E-Mail Link Type', 'wp-email'); ?></th> 
     226                  <td> 
     227                        <select name="email_type" size="1"> 
     228                              <option value="1"<?php selected('1', $email_options['email_type']); ?>><?php _e('E-Mail Standalone Page', 'wp-email'); ?></option> 
     229                              <option value="2"<?php selected('2', $email_options['email_type']); ?>><?php _e('E-Mail Popup', 'wp-email'); ?></option> 
     230                        </select> 
     231                  </td> 
     232            </tr> 
     233            <tr> 
     234                  <th scope="row" valign="top"><?php _e('E-Mail Text Link Style', 'wp-email'); ?></th> 
     235                  <td> 
     236                        <select name="email_style" id="email_style" size="1" onchange="check_email_style();"> 
     237                              <option value="1"<?php selected('1', $email_options['email_style']); ?>><?php _e('E-Mail Icon With Text Link', 'wp-email'); ?></option> 
     238                              <option value="2"<?php selected('2', $email_options['email_style']); ?>><?php _e('E-Mail Icon Only', 'wp-email'); ?></option> 
     239                              <option value="3"<?php selected('3', $email_options['email_style']); ?>><?php _e('E-Mail Text Link Only', 'wp-email'); ?></option> 
     240                              <option value="4"<?php selected('4', $email_options['email_style']); ?>><?php _e('Custom', 'wp-email'); ?></option> 
     241                        </select> 
     242                        <div id="email_style_custom" style="display: <?php if(intval($email_options['email_style']) == 4) { echo 'block'; } else { echo 'none'; } ?>; margin-top: 20px;"> 
     243                              <textarea rows="2" cols="80" name="email_html" id="email_template_html"><?php echo htmlspecialchars(stripslashes($email_options['email_html'])); ?></textarea><br /> 
     244                              <?php _e('HTML is allowed.', 'wp-email'); ?><br /> 
     245                              %EMAIL_URL% - <?php _e('URL to the email post/page.', 'wp-email'); ?><br /> 
     246                              %EMAIL_POPUP% - <?php _e('It will produce the onclick html code which is nescassary for popup.', 'wp-email'); ?><br /> 
     247                              <?php _e('Example Popup Template:', 'wp-email'); ?><br /> 
     248                              <?php echo htmlspecialchars('<a href="%EMAIL_URL%" %EMAIL_POPUP% rel="nofollow" title="%EMAIL_TEXT%">%EMAIL_TEXT%</a>'); ?><br /> 
     249                              %EMAIL_TEXT% - <?php _e('E-Mail text link of the post/page that you have typed in above.', 'wp-email'); ?><br /> 
     250                              %EMAIL_ICON_URL% - <?php _e('URL to the email icon you have chosen above.', 'wp-email'); ?><br /> 
     251                              <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-email'); ?>" onclick="email_default_templates('html');" class="button" /> 
     252                        </div> 
     253                  </td> 
     254            </tr> 
     255      </table> 
     256      <h3><?php _e('E-Mail Settings', 'wp-email'); ?></h3> 
     257      <table class="form-table"> 
     258            <tr> 
     259                  <th scope="row" valign="top"><?php _e('E-Mail Fields:', 'wp-email'); ?></th> 
     260                   <td> 
     261                        <input type="checkbox" name="email_field_yourname" value="1"<?php checked('1', $email_fields['yourname']); ?> />&nbsp;<?php _e('Your Name', 'wp-email'); ?><br /> 
     262                        <input type="checkbox" name="email_field_youremail" value="1"<?php checked('1', $email_fields['youremail']); ?> />&nbsp;<?php _e('Your E-Mail', 'wp-email'); ?><br /> 
     263                        <input type="checkbox" name="email_field_yourremarks" value="1"<?php checked('1', $email_fields['yourremarks']); ?> />&nbsp;<?php _e('Your Remarks', 'wp-email'); ?><br /> 
     264                        <input type="checkbox" name="email_field_friendname" value="1"<?php checked('1', $email_fields['friendname']); ?> />&nbsp;<?php _e('Friend\'s Name', 'wp-email'); ?><br /> 
     265                        <input type="checkbox" name="email_field_friendemail" value="1" checked="checked" disabled="disabled" />&nbsp;<?php _e('Friend\'s E-Mail', 'wp-email'); ?> 
     266                  </td> 
     267            </tr> 
     268             <tr> 
     269                  <th scope="row" valign="top"><?php _e('E-Mail Content Type:', 'wp-email'); ?></th> 
     270                   <td> 
     271                        <select name="email_contenttype" size="1"> 
     272                              <option value="text/plain"<?php selected('text/plain', get_option('email_contenttype')); ?>><?php _e('Plain Text', 'wp-email'); ?></option> 
     273                              <option value="text/html"<?php selected('text/html', get_option('email_contenttype')); ?>><?php _e('HTML', 'wp-email'); ?></option> 
     274                        </select> 
     275                  </td> 
     276            </tr> 
     277            <tr>  
     278                  <th scope="row" valign="top"><?php _e('Method Used To Send E-Mail:', 'wp-email'); ?></th> 
     279                  <td> 
     280                        <select name="email_mailer" size="1"> 
     281                              <option value="mail"<?php selected('mail', get_option('email_mailer')); ?>><?php _e('PHP', 'wp-email'); ?></option> 
     282                              <option value="sendmail"<?php selected('sendmail', get_option('email_mailer')); ?>><?php _e('SendMail', 'wp-email'); ?></option> 
     283                              <option value="smtp"<?php selected('smtp', get_option('email_mailer')); ?>><?php _e('SMTP', 'wp-email'); ?></option> 
     284                        </select> 
     285                        <br /><?php _e('If you ARE NOT using a smtp server of if there is a problem sending out email using your smtp server. Please Choose PHP or Send Mail.', 'wp-email'); ?> 
     286                  </td>  
     287            </tr> 
     288            <tr>  
     289                  <th scope="row" valign="top"><?php _e('No. Of Words Before Cutting Off:', 'wp-email'); ?></th> 
     290                  <td><input type="text" id="email_snippet" name="email_snippet" value="<?php echo  get_option('email_snippet'); ?>" size="5" maxlength="5" /><br /><?php _e('Setting this value more than 0 will enable the snippet feature. This feature will allow you to send a portion (defined by the text field above) of the article to your friend instead of the whole article.', 'wp-email'); ?></td>  
     291            </tr> 
     292            <tr>  
     293                  <th scope="row" valign="top"><?php _e('Interval Between E-Mails:', 'wp-email'); ?></th> 
     294                  <td><input type="text" id="email_interval" name="email_interval" value="<?php echo  get_option('email_interval'); ?>" size="5" maxlength="5" /> <?php _e('Mins', 'wp-email');