Plugin Directory

Changeset 3252678


Ignore:
Timestamp:
03/08/2025 11:01:06 PM (12 months ago)
Author:
marcusbs
Message:

Errors Fixed

Location:
wp-mailing-group/trunk/template
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • wp-mailing-group/trunk/template/mg_adminmessageadd.php

    r1752047 r3252678  
    5555            $status  = $row->status;
    5656
    57             $btn       = __("Update Message", 'mailing-group-module');
     57            $btn       = __("Update Message", 'wp-mailing-group');
    5858
    5959            $hidval    = 2;
     
    6565} else {
    6666
    67     $btn       = __("Submit", 'mailing-group-module');
     67    $btn       = __("Submit", 'wp-mailing-group');
    6868
    6969    $id        = "";
     
    107107    <h2 class="nav-tab-wrapper">
    108108
    109         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    110 
    111         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    112 
    113         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab nav-tab-active" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
     109        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     110
     111        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     112
     113        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab nav-tab-active" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
    114114
    115115       
    116116
    117         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     117        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    118118
    119119        <?php if($plugintype=='PAID') { ?>
    120120
    121             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     121            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    122122
    123123        <?php } ?>
    124124
    125         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     125        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    126126
    127127    </h2>
     
    131131    <div class="icon32" id="icon-edit"><br/></div>
    132132
    133     <h2><?php _e("Add/Edit Message", 'mailing-group-module'); ?> <a class='backlink' href='admin.php?page=wpmg_mailinggroup_adminmessagelist'><?php _e("Back to Admin Messages", 'mailing-group-module') ?></a></h2>
     133    <h2><?php esc_html_e("Add/Edit Message", 'wp-mailing-group'); ?> <a class='backlink' href='admin.php?page=wpmg_mailinggroup_adminmessagelist'><?php esc_html_e("Back to Admin Messages", 'wp-mailing-group') ?></a></h2>
    134134
    135135    <div id="col-left">
     
    145145                        <div class="form-field">
    146146
    147                             <label for="tag-name"><?php _e("Title", 'mailing-group-module'); ?> : </label>
     147                            <label for="tag-name"><?php esc_html_e("Title", 'wp-mailing-group'); ?> : </label>
    148148
    149149                            <input type="text" size="40" id="title" name="title" value="<?php echo $title; ?>"/>
     
    153153                        <div class="form-field">
    154154
    155                             <label for="tag-name"><?php _e("Subject", 'mailing-group-module'); ?> : </label>
     155                            <label for="tag-name"><?php esc_html_e("Subject", 'wp-mailing-group'); ?> : </label>
    156156
    157157                            <input type="text" size="40" id="message_subject" name="message_subject" value="<?php echo $message_subject; ?>"/>
     
    161161                        <div class="form-field">
    162162
    163                             <label for="tag-name"><?php _e("Description", 'mailing-group-module'); ?> : </label>
     163                            <label for="tag-name"><?php esc_html_e("Description", 'wp-mailing-group'); ?> : </label>
    164164
    165165                            <textarea name="description" rows="8" cols="50" id="description"><?php echo $description; ?></textarea>
     
    169169                        <div class="form-field">
    170170
    171                             <label for="tag-name"><?php _e("Available variables", 'mailing-group-module'); ?> : </label>
     171                            <label for="tag-name"><?php esc_html_e("Available variables", 'wp-mailing-group'); ?> : </label>
    172172
    173173                            <div class="variableslist">
    174174
    175                                 <p>{%displayname%} = <?php _e("User's Display Name", 'mailing-group-module'); ?>,</p>
    176 
    177                                 <p>{%name%} = <?php _e("User's Name", 'mailing-group-module'); ?>,</p>
    178 
    179                                 <p>{%email%} = <?php _e("User's Email", 'mailing-group-module'); ?></p>
    180 
    181                                 <p>{%password%} = <?php _e("User's Password", 'mailing-group-module'); ?></p>
    182 
    183                                 <p>{%activation_url%} = <?php _e("User's Activation URL", 'mailing-group-module'); ?></p>
    184 
    185                                 <p>{%login_url%} = <?php _e("User's Login URL", 'mailing-group-module'); ?></p>
    186 
    187                                 <p>{%site_email%} = <?php _e("Site's Email", 'mailing-group-module'); ?></p>
    188 
    189                                 <p>{%site_title%} = <?php _e("Site's Title", 'mailing-group-module'); ?></p>
    190 
    191                                 <p>{%site_url%} = <?php _e("Site's Web Address", 'mailing-group-module'); ?></p>
    192 
    193                                 <p>{%group_list%} = <?php _e("Current Group List", 'mailing-group-module'); ?></p>
    194 
    195                                 <p>{%group_name%} = <?php _e("Current Group Name", 'mailing-group-module'); ?></p>
     175                                <p>{%displayname%} = <?php esc_html_e("User's Display Name", 'wp-mailing-group'); ?>,</p>
     176
     177                                <p>{%name%} = <?php esc_html_e("User's Name", 'wp-mailing-group'); ?>,</p>
     178
     179                                <p>{%email%} = <?php esc_html_e("User's Email", 'wp-mailing-group'); ?></p>
     180
     181                                <p>{%password%} = <?php esc_html_e("User's Password", 'wp-mailing-group'); ?></p>
     182
     183                                <p>{%activation_url%} = <?php esc_html_e("User's Activation URL", 'wp-mailing-group'); ?></p>
     184
     185                                <p>{%login_url%} = <?php esc_html_e("User's Login URL", 'wp-mailing-group'); ?></p>
     186
     187                                <p>{%site_email%} = <?php esc_html_e("Site's Email", 'wp-mailing-group'); ?></p>
     188
     189                                <p>{%site_title%} = <?php esc_html_e("Site's Title", 'wp-mailing-group'); ?></p>
     190
     191                                <p>{%site_url%} = <?php esc_html_e("Site's Web Address", 'wp-mailing-group'); ?></p>
     192
     193                                <p>{%group_list%} = <?php esc_html_e("Current Group List", 'wp-mailing-group'); ?></p>
     194
     195                                <p>{%group_name%} = <?php esc_html_e("Current Group Name", 'wp-mailing-group'); ?></p>
    196196
    197197                            </div>
  • wp-mailing-group/trunk/template/mg_adminmessagelist.php

    r1355199 r3252678  
    4545if($info=="saved") {
    4646
    47     wpmg_showmessages("updated", __("Message has been added successfully.", 'mailing-group-module'));
     47    wpmg_showmessages("updated", esc_html__("Message has been added successfully.", 'wp-mailing-group'));
    4848
    4949} else if($info=="upd") {
    5050
    51     wpmg_showmessages("updated", __("Message has been updated successfully.", 'mailing-group-module'));
     51    wpmg_showmessages("updated", esc_html__("Message has been updated successfully.", 'wp-mailing-group'));
    5252
    5353} else if($info=="vis") {
    5454
    55     wpmg_showmessages("updated", __("Message has been set to visible successfully.", 'mailing-group-module'));
     55    wpmg_showmessages("updated", esc_html__("Message has been activated successfully.", 'wp-mailing-group'));
    5656
    5757} else if($info=="hid") {
    5858
    59     wpmg_showmessages("updated", __("Message has been  set to hidden successfully.", 'mailing-group-module'));
     59    wpmg_showmessages("updated", esc_html__("Message has been deactivated successfully.", 'wp-mailing-group'));
    6060
    6161} else if($info=="del") {
    6262
    63     $wpdb->query("delete from ".$table_name_message." where id=".$delid);
    64 
    65     wpmg_showmessages("updated", __("Message has been deleted successfully.", 'mailing-group-module'));
     63    $objMem->deleteRow($table_name_message, $delid);
     64
     65    wpmg_showmessages("updated", esc_html__("Message has been deleted successfully.", 'wp-mailing-group'));
    6666
    6767}
     
    9696
    9797    } );
    98 
    9998    /* ]]> */
    10099
     
    107106?>
    108107
     108<div class="wrap">
     109
     110    <h2 class="nav-tab-wrapper">
     111
     112        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     113
     114        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     115
     116        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab nav-tab-active" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
     117
     118        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
     119
     120        <?php if($plugintype=='PAID') { ?>
     121
     122            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
     123
     124        <?php } ?>
     125
     126        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
     127
     128    </h2>
     129
     130    <div>&nbsp;</div>
     131
     132    <!--<a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_adminmessageadd&act=add"><?php esc_html_e("New custom message", 'wp-mailing-group'); ?></a>--></h2>
     133
     134    <p>The following emails are sent out automatically by the plugin when the events described in the title column occur. You are welcome to customise the text according to your preference. The available dynamic variables are shown when you click to edit a message.</p>
     135
     136     <table class="wp-list-table widefat fixed" id="messagelist">
     137
     138        <thead>
     139
     140            <tr role="row" class="topRow">
     141
     142                <th width="35%" class="sort topRow_messagelist"><a href="#"><?php esc_html_e("Title", 'wp-mailing-group'); ?></a></th>
     143
     144                <th width="35%"><?php esc_html_e("Message", 'wp-mailing-group'); ?></th>
     145
     146                <th width="20%" class="hidetd"><?php esc_html_e("Hidden/Visible", 'wp-mailing-group'); ?></th>
     147
     148                <th width="8%"><?php esc_html_e("Actions", 'wp-mailing-group'); ?></th>
     149
     150            </tr>
     151
     152        </thead>
     153
     154        <tbody>
     155
     156<?php
     157
     158        if ($totcount > 0 )
     159
     160        {
     161
     162            foreach ($result as $row)
     163
     164            {
     165
     166               
     167
     168                /* //echo count($row);
     169
     170                //echo "<pre>";print_r($row);echo "</pre>"; */
     171
     172                $id = $row->id;
     173
     174                $title = wpmg_dbStripslashes($row->title);
     175
     176                $desc = wpmg_stringlength(wpmg_nl2brformat(wpmg_dbStripslashes($row->description)),50);
     177
     178                $status = $row->status;
     179
     180                $act = "hid";
     181
     182                $lablestatus = __("Visible", 'wp-mailing-group');
     183
     184                if($status==0) {
     185
     186                    $act = "vis";
     187
     188                    $lablestatus = __("Hidden", 'wp-mailing-group');
     189
     190                }
     191
     192    ?>
     193
     194            <tr>
     195
     196                <td width="40%"><?php echo esc_html($title); ?></td>
     197
     198                <td width="40%"><?php echo esc_html($desc); ?></td>
     199
     200                <td width="15%" class="hidetd"><a href="admin.php?page=wpmg_mailinggroup_messagelist&act=<?php echo esc_attr($act); ?>&id=<?php echo esc_attr($id);?>"><?php echo esc_html($lablestatus); ?></a></td>
     201
     202                <td width="10%" class="last"><a href="admin.php?page=wpmg_mailinggroup_adminmessageadd&act=upd&id=<?php echo esc_attr($id);?>" class="edit_record" title="<?php esc_html_e("Edit", 'wp-mailing-group'); ?>"></a></td>
     203
     204            </tr>
     205
     206<?php }
     207
     208    } else { ?>
     209
     210            <tr>
     211                <td colspan="3" align="center"><?php esc_html_e("No Message Found!", 'wp-mailing-group'); ?></td>
     212            </tr>
     213
     214    <?php } ?>
     215
     216    </tbody>
     217
     218    </table>
     219
     220</div>
    109221<?php } ?>
    110 
    111 <div class="wrap">
    112 
    113     <h2 class="nav-tab-wrapper">
    114 
    115         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    116 
    117         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    118 
    119         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab nav-tab-active" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
    120 
    121         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
    122 
    123         <?php if($plugintype=='PAID') { ?>
    124 
    125             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
    126 
    127         <?php } ?>
    128 
    129         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
    130 
    131     </h2>
    132 
    133     <div>&nbsp;</div>
    134 
    135     <!--<a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_adminmessageadd&act=add"><?php _e("New custom message", 'mailing-group-module'); ?></a>--></h2>
    136 
    137     <p>The following emails are sent out automatically by the plugin when the events described in the title column occur. You are welcome to customise the text according to your preference. The available dynamic variables are shown when you click to edit a message.</p>
    138 
    139      <table class="wp-list-table widefat fixed" id="messagelist">
    140 
    141         <thead>
    142 
    143             <tr role="row" class="topRow">
    144 
    145                 <th width="35%" class="sort topRow_messagelist"><a href="#"><?php _e("Title", 'mailing-group-module'); ?></a></th>
    146 
    147                 <th width="35%"><?php _e("Message", 'mailing-group-module'); ?></th>
    148 
    149                 <th width="20%" class="hidetd"><?php _e("Hidden/Visible", 'mailing-group-module'); ?></th>
    150 
    151                 <th width="8%"><?php _e("Actions", 'mailing-group-module'); ?></th>
    152 
    153             </tr>
    154 
    155         </thead>
    156 
    157         <tbody>
    158 
    159 <?php
    160 
    161         if ($totcount > 0 )
    162 
    163         {
    164 
    165             foreach ($result as $row)
    166 
    167             {
    168 
    169                
    170 
    171                 /* //echo count($row);
    172 
    173                 //echo "<pre>";print_r($row);echo "</pre>"; */
    174 
    175                 $id = $row->id;
    176 
    177                 $title = wpmg_dbStripslashes($row->title);
    178 
    179                 $desc = wpmg_stringlength(wpmg_nl2brformat(wpmg_dbStripslashes($row->description)),50);
    180 
    181                 $status = $row->status;
    182 
    183                 $act = "hid";
    184 
    185                 $lablestatus = __("Visible", 'mailing-group-module');
    186 
    187                 if($status==0) {
    188 
    189                     $act = "vis";
    190 
    191                     $lablestatus = __("Hidden", 'mailing-group-module');
    192 
    193                 }
    194 
    195     ?>
    196 
    197             <tr>
    198 
    199                 <td width="40%"><?php echo $title; ?></td>
    200 
    201                 <td width="40%"><?php echo $desc; ?></td>
    202 
    203                 <td width="15%" class="hidetd"><a href="admin.php?page=wpmg_mailinggroup_messagelist&act=<?php echo $act; ?>&id=<?php echo $id;?>"><?php echo $lablestatus; ?></a></td>
    204 
    205                 <td width="10%" class="last"><a href="admin.php?page=wpmg_mailinggroup_adminmessageadd&act=upd&id=<?php echo $id;?>" class="edit_record" title="<?php _e("Edit", 'mailing-group-module'); ?>"></a></td>
    206 
    207             </tr>
    208 
    209 <?php }
    210 
    211     } else { ?>
    212 
    213             <tr>
    214 
    215                 <td colspan="3" align="center"><?php _e("No Message Found!", 'mailing-group-module'); ?></td>
    216 
    217             <tr>
    218 
    219     <?php } ?>
    220 
    221     </tbody>
    222 
    223     </table>
    224 
    225 </div>
  • wp-mailing-group/trunk/template/mg_contact.php

    r1752047 r3252678  
    2121    <h2 class="nav-tab-wrapper">
    2222
    23         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
     23        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
    2424
    25         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
     25        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
    2626
    27         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     27        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    2828
    2929        <?php if($plugintype=='PAID') { ?>
    3030
    31             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab nav-tab-active" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     31            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab nav-tab-active" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    3232
    3333        <?php } ?>
    3434
    35         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     35        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    3636
    3737    </h2>
     
    3939    <div>
    4040
    41         <h3><?php _e("Our Address", 'mailing-group-module'); ?></h3>
     41        <h3><?php esc_html_e("Our Address", 'wp-mailing-group'); ?></h3>
    4242
    4343        <?php echo $contactaddress; ?>
     
    4747    <div>
    4848
    49         <h3><?php _e("Support", 'mailing-group-module'); ?></h3>
     49        <h3><?php esc_html_e("Support", 'wp-mailing-group'); ?></h3>
    5050
    51         <p><?php _e("You can contact us on following email address in case you need any asistance.", 'mailing-group-module');?></p>
     51        <p><?php esc_html_e("You can contact us on following email address in case you need any asistance.", 'wp-mailing-group');?></p>
    5252
    5353        <p><h3><?php echo $supportemail; ?></h3></p>
     
    6161    <div>
    6262
    63         <?php echo sprintf( __('<p>This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.<br /><br />This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.<br /><br />This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.</p><p><a target="_blank" href="%s">More info on website</a></p>'), $websiteurl ); ?>
     63        <?php
     64        /* translators: %s: plugin description */
     65        echo sprintf( __('<p>This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users. This plugin was developed to add functionality in wordpress to manager multiple mailing groups for users.</p>', 'wp-mailing-group'));
     66        ?>
    6467
    6568    </div>
  • wp-mailing-group/trunk/template/mg_formstyle.php

    r1752047 r3252678  
    99    update_option("WPMG_SETTINGS", $WPMG_SETTINGS);
    1010
    11     wpmg_showmessages("updated", __("Stylesheet has been updated successfully.", 'mailing-group-module'));
     11    wpmg_showmessages("updated", __("Stylesheet has been updated successfully.", 'wp-mailing-group'));
    1212
    1313}
     
    4141    <h2 class="nav-tab-wrapper">
    4242
    43         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    44 
    45         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    46 
    47         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
    48 
    49         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab nav-tab-active" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     43        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     44
     45        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     46
     47        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
     48
     49        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab nav-tab-active" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    5050
    5151        <?php if($plugintype=='PAID') { ?>
    5252
    53             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     53            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    5454
    5555        <?php } ?>
    5656
    57         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     57        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    5858
    5959    </h2>
    6060
    61     <p>You can show a registration form for your mailing groups on your website by using this shortcode: [mailing_group_form]
    62 
    63     To customise its appearance, you may input your own CSS styles in the text area below, to override the default styling for each class.</p>
     61    /* translators: %s: shortcode for mailing group form */
     62    <p><?php esc_html_e("You can show a registration form for your mailing groups on your website by using this shortcode: [mailing_group_form]", 'wp-mailing-group'); ?>
     63    <?php esc_html_e("To customise its appearance, you may input your own CSS styles in the text area below, to override the default styling for each class.", 'wp-mailing-group'); ?></p>
    6464
    6565    <div id="col-left">
     
    7575                        <div class="form-field">
    7676
    77                             <label for="tag-name"><?php _e("Override Form Style", 'mailing-group-module'); ?> : </label>
    78 
    79                             <textarea name="user_style" rows="20" cols="80" id="user_style"><?php echo $custom_style; ?></textarea>
     77                            <label for="tag-name"><?php esc_html_e("Override Form Style", 'wp-mailing-group'); ?> : </label>
     78
     79                            <textarea name="user_style" rows="20" cols="80" id="user_style"><?php echo esc_textarea($custom_style); ?></textarea>
    8080
    8181                        </div>
     
    8585                        <p class="submit">
    8686
    87                             <input type="submit" value="Submit" class="button" id="submit" name="submit"/>
     87                            <input type="submit" value="<?php esc_attr_e("Submit", 'wp-mailing-group'); ?>" class="button" id="submit" name="submit"/>
    8888
    8989                        </p>
     
    9393                        <div class="variableslist">
    9494
    95                             <p><strong>Default CSS used in Subscription Request forms.</strong>:</p>
     95                            <p><strong><?php esc_html_e("Default CSS used in Subscription Request forms.", 'wp-mailing-group'); ?></strong>:</p>
    9696
    9797                            <p><code class="lftcode">/* top main div */<br />
  • wp-mailing-group/trunk/template/mg_help.php

    r1752047 r3252678  
    4343    <h2 class="nav-tab-wrapper">
    4444
    45         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    46 
    47         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    48 
    49         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
    50 
    51         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     45        <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_intro')); ?>" title="<?php esc_attr_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     46
     47        <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_messagelist')); ?>" class="nav-tab" title="<?php esc_attr_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     48
     49        <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_adminmessagelist')); ?>" class="nav-tab" title="<?php esc_attr_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
     50
     51        <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_style')); ?>" class="nav-tab" title="<?php esc_attr_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    5252
    5353        <?php if($plugintype=='PAID') { ?>
    5454
    55             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     55            <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_contact')); ?>" class="nav-tab" title="<?php esc_attr_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    5656
    5757        <?php } ?>
    5858
    59         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab nav-tab-active" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     59        <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_help')); ?>" class="nav-tab nav-tab-active" title="<?php esc_attr_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    6060
    6161    </h2>
     
    6363   <div>
    6464
    65         <h3><?php echo sprintf( __('Mailing Group Module Help (Version : %s)','mailing-group-module'), $versionno ); ?></h3>
     65        <h3><?php
     66        /* translators: %s: plugin version number */
     67        echo sprintf( __('Mailing Group Module Help (Version : %s)','wp-mailing-group'), $versionno );
     68        ?></h3>
    6669
    6770    </div>
     
    179182<a href="#top">^Back to top</a><br>
    180183
    181 <br>'));
    182 
    183 
    184 
    185         echo __('<a name="upgrading"><h3>Upgrading to Premium version</h3></a>');
    186 
    187         echo __('<p>Upgrading to the Premium plugin version adds many extra benefits. You can host unlimited Mailing Groups on your WordPress installation, keep searchable Archives of the messages, find messages by the individual member who posted them, and import members from external .VCF files.<br /><br />To upgrade, please deactivate and delete the Free plugin. Do not worry about your existing Mailing Group settings: all the data will be saved - only the unnecessary Free plugin files will be deleted. After uploading the Premium plugin and activating it, your existing Mailing Group will be ready and waiting for you on the list!</p>');
    188 
    189         echo sprintf( __('<a href="%s" target="_blank">Upgrade Now ></a>') , $websiteurl );
     184<br>', 'wp-mailing-group'));
     185
     186
     187
     188        echo __('<a name="upgrading"><h3>Upgrading to Premium version</h3></a>', 'wp-mailing-group');
     189
     190        echo __('<p>Upgrading to the Premium plugin version adds many extra benefits. You can host unlimited Mailing Groups on your WordPress installation, keep searchable Archives of the messages, find messages by the individual member who posted them, and import members from external .VCF files.<br /><br />To upgrade, please deactivate and delete the Free plugin. Do not worry about your existing Mailing Group settings: all the data will be saved - only the unnecessary Free plugin files will be deleted. After uploading the Premium plugin and activating it, your existing Mailing Group will be ready and waiting for you on the list!</p>', 'wp-mailing-group');
     191
     192        /* translators: %s: website URL */
     193        echo sprintf( __('<a href="%s" target="_blank">Upgrade Now ></a>', 'wp-mailing-group') , $websiteurl );
    190194
    191195        ?>
  • wp-mailing-group/trunk/template/mg_importuser.php

    r1605246 r3252678  
    55/* get all variables */
    66
    7 $info   = (isset($_REQUEST["info"])? sanitize_text_field($_REQUEST["info"]): '');
    8 
    9 $gid    = (isset($_REQUEST["gid"])? sanitize_text_field($_REQUEST["gid"]): '');
     7$info   = (isset($_REQUEST["info"]) ? sanitize_text_field($_REQUEST["info"]) : '');
     8
     9$gid    = (isset($_REQUEST["gid"]) ? sanitize_text_field($_REQUEST["gid"]) : '');
    1010
    1111if(!$gid && !$info){die();}
    1212
    13 $actreq = (isset($_REQUEST["act"])? sanitize_text_field($_REQUEST["act"]): '');
    14 
    15 $id     = (isset($_REQUEST["id"])? sanitize_text_field($_REQUEST["id"]): '');
    16 
    17 $delid  = (isset($_GET["did"])? sanitize_text_field($_GET["did"]): '');
     13$actreq = (isset($_REQUEST["act"]) ? sanitize_text_field($_REQUEST["act"]) : '');
     14
     15$id     = (isset($_REQUEST["id"]) ? sanitize_text_field($_REQUEST["id"]) : '');
     16
     17$delid  = (isset($_GET["did"]) ? sanitize_text_field($_GET["did"]) : '');
    1818
    1919/* get all variables */
     
    3535        if($usercount>=$memberLimit) {
    3636
    37             wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'mailing-group-module'));
     37            /* translators: %d: Maximum number of members allowed per group */
     38            wpmg_showmessages("error", sprintf(__("You can only add %d member(s) per group, Please upgrade to paid version for more features.", 'wp-mailing-group'), $memberLimit));
    3839
    3940        } else {
     
    131132    }
    132133
    133     wpmg_showmessages("updated", sprintf( __( "%1s out of %2s users have been imported successfully.", 'mailing-group-module' ), $insertedCount, $originalCount ));
     134    /* translators: 1: Number of successfully imported users 2: Total number of users */
     135    wpmg_showmessages("updated", sprintf( __( "%1$d out of %2$d users have been imported successfully.", 'wp-mailing-group' ), $insertedCount, $originalCount ));
    134136
    135137    }else{
    136138
    137     wpmg_showmessages("error", __( "Please upload correct file type.", 'mailing-group-module'));
     139    wpmg_showmessages("error", __( "Please upload correct file type.", 'wp-mailing-group'));
    138140
    139141    }
     
    143145if($info=="suc") {
    144146
    145     wpmg_showmessages("updated", __( "Member(s) have been successfully added to selected groups.", 'mailing-group-module' ));
     147    wpmg_showmessages("updated", __( "Member(s) have been successfully added to selected groups.", 'wp-mailing-group' ));
    146148
    147149}
     
    181183    <h2 class="nav-tab-wrapper">
    182184
    183         <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php _e("Subscription Request Manager", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Subscription Request Manager", 'mailing-group-module'); ?></a>
    184 
    185         <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab" title="<?php _e("Add New Subscriber", 'mailing-group-module'); ?>"><?php _e("Add New Subscriber", 'mailing-group-module'); ?></a>
    186 
    187         <a href="admin.php?page=wpmg_mailinggroup_importuser" class="nav-tab nav-tab-active" title="<?php _e("Import Users", 'mailing-group-module'); ?>"><?php _e("Import Users", 'mailing-group-module'); ?></a>
     185        <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php esc_attr_e("Subscription Request Manager", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Subscription Request Manager", 'wp-mailing-group'); ?></a>
     186
     187        <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab" title="<?php esc_attr_e("Add New Subscriber", 'wp-mailing-group'); ?>"><?php esc_html_e("Add New Subscriber", 'wp-mailing-group'); ?></a>
     188
     189        <a href="admin.php?page=wpmg_mailinggroup_importuser" class="nav-tab nav-tab-active" title="<?php esc_attr_e("Import Users", 'wp-mailing-group'); ?>"><?php esc_html_e("Import Users", 'wp-mailing-group'); ?></a>
    188190
    189191    </h2>
     
    195197        <div class="check_div_fir">
    196198
    197             <h3><?php _e("Import Users from WordPress", 'mailing-group-module'); ?></h3>
     199            <h3><?php esc_html_e("Import Users from WordPress", 'wp-mailing-group'); ?></h3>
    198200
    199201        </div>
     
    201203    </div>
    202204
    203     <p class="pimportcsv"><?php echo _e( 'Any users you import to a mailing group below will have their subscription activated immediately, without any opt-in confirmation sent to their email address. Please only import users as subscribers here if you have their permission already.', 'mailing-group-module'); ?></p>
     205    <p class="pimportcsv"><?php esc_html_e('Any users you import to a mailing group below will have their subscription activated immediately, without any opt-in confirmation sent to their email address. Please only import users as subscribers here if you have their permission already.', 'wp-mailing-group'); ?></p>
    204206
    205207     <table class="wp-list-table widefat fixed" id="importuser">
     
    211213                <th width="8%" class="sort topRow_messagelist">&nbsp;</th>
    212214
    213                 <th><?php _e("Name", 'mailing-group-module'); ?></th>
    214 
    215                 <th><?php _e("Email Address", 'mailing-group-module'); ?></th>
     215                <th><?php esc_html_e("Name", 'wp-mailing-group'); ?></th>
     216
     217                <th><?php esc_html_e("Email Address", 'wp-mailing-group'); ?></th>
    216218
    217219            </tr>
     
    263265                    <td>
    264266
    265                     <input type="checkbox" id="selector" name="selectusers[]" value="<?php echo $id; ?>" id="" /></td>
    266 
    267                     <td><?php echo $display_name; ?></td>
    268 
    269                     <td><?php echo $user_email; ?></td>
     267                    <input type="checkbox" id="selector" name="selectusers[]" value="<?php echo esc_attr($id); ?>" id="" /></td>
     268
     269                    <td><?php echo esc_html($display_name); ?></td>
     270
     271                    <td><?php echo esc_html($user_email); ?></td>
    270272
    271273                </tr>
     
    285287            <tr>
    286288
    287                 <td colspan="3" align="center"><?php _e("There are currently no WordPress users available for import.", 'mailing-group-module'); ?></td>
     289                <td colspan="3" align="center"><?php esc_html_e("There are currently no WordPress users available for import.", 'wp-mailing-group'); ?></td>
    288290
    289291            <tr>
     
    305307                <div class="check_div_fir">
    306308
    307                     <h3><?php _e("Import Selected Users into:", 'mailing-group-module'); ?></h3>
     309                    <h3><?php esc_html_e("Import Selected Users into:", 'wp-mailing-group'); ?></h3>
    308310
    309311                </div>
     
    319321                <?php foreach($result_groups as $group) { ?>
    320322
    321                     <p class="inner_check_imp"><input type="checkbox" name="group_name[]" id="selectorgroup" value="<?php echo $group->id; ?>" />&nbsp;<?php echo $group->title; ?></p>
     323                    <p class="inner_check_imp"><input type="checkbox" name="group_name[]" id="selectorgroup" value="<?php echo esc_attr($group->id); ?>" />&nbsp;<?php echo esc_html($group->title); ?></p>
    322324
    323325                <?php } ?>
     
    329331            <p class="submit clear">
    330332
    331                 <input type="submit" value="<?php _e("Import", 'mailing-group-module'); ?>" class="button" id="importuserbtn" name="importuserbtn"/>
     333                <input type="submit" value="<?php esc_attr_e("Import", 'wp-mailing-group'); ?>" class="button" id="importuserbtn" name="importuserbtn"/>
    332334
    333335            </p>
     
    355357                <div class="check_div_fir">
    356358
    357                     <h3> <?php _e("Import from CSV file", 'mailing-group-module'); ?></h3>
     359                    <h3> <?php esc_html_e("Import from CSV file", 'wp-mailing-group'); ?></h3>
    358360
    359361                </div>
    360                 <p class="pimportcsv"><?php echo _e("Importing users will automatically create WordPress user accounts for them and email them a username and password. You will then need to add them to the mailing group(s) you select in the Import Users from WordPress section above.", 'mailing-group-module'); ?></p>
    361                 <p class="pimportcsv"><?php echo sprintf( __('If you would like to import users from a .VCF file, please upgrade to the <a href="%s">Premium version ></a>'), $websiteurl ); ?></p>
    362362
    363363            </div>
     
    369369                <div class="form-field">
    370370
    371                     <label for="tag-name"><?php _e("Browse CSV file", 'mailing-group-module'); ?> : </label>
     371                    <label for="tag-name"><?php esc_html_e("Browse CSV file", 'wp-mailing-group'); ?> : </label>
    372372
    373373                    <input type="file" name="fileupload" id="fileupload" />
     
    381381                </p>
    382382
    383                 <p class="clear"><?php _e("NB: The CSV file should be formatted as follows with no extra data, and each entry on a separate line:<br />Full Name, [email protected]", 'mailing-group-module'); ?></p>
     383                <p class="clear"><?php esc_html_e("NB: The CSV file should be formatted as follows with no extra data, and each entry on a separate line:<br />Full Name, [email protected]", 'wp-mailing-group'); ?></p>
    384384
    385385            </div>
     
    413413            "oLanguage": {
    414414
    415               "sZeroRecords": "<?php _e("There are no more members available to import.", 'mailing-group-module'); ?>"
     415              "sZeroRecords": "<?php esc_html_e("There are no more members available to import.", 'wp-mailing-group'); ?>"
    416416
    417417            },
     
    419419            "fnDrawCallback":function(){
    420420
    421                 if('<?php echo $cntr ?>' <= 5){
     421                if('<?php echo esc_js($cntr); ?>' <= 5){
    422422
    423423                    document.getElementById('importuser_paginate').style.display = "none";
     
    440440
    441441<?php } ?>
     442
     443<?php
     444
     445if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'action_name')) {
     446    wp_die(__('Invalid nonce', 'mailing-group'));
     447}
  • wp-mailing-group/trunk/template/mg_intro_text.php

    r3161041 r3252678  
    1919    update_option("WPMG_SETTINGS", $WPMG_SETTINGS);     
    2020
    21     wpmg_showmessages("updated", __("Settings have been updated successfully.", 'mailing-group-module'));
     21    wpmg_showmessages("updated", __("Settings have been updated successfully.", 'wp-mailing-group'));
    2222
    2323}
     
    5555    <h2 class="nav-tab-wrapper">
    5656
    57         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab nav-tab-active"><?php _e("Introduction", 'mailing-group-module'); ?></a>
     57        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab nav-tab-active"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
    5858
    59         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
     59        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
    6060
    61         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
     61        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
    6262
    63         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     63        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    6464
    6565        <?php if($plugintype=='PAID') { ?>
    6666
    67             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     67            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    6868
    6969        <?php } ?>
    7070
    71         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     71        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    7272
    7373    </h2>
     
    7575    <div>
    7676
    77         <h3><?php echo sprintf( __('WordPress Mailing Group - v.%s','mailing-group-module'), $versionno ); ?><i><br /><font size="2">- by <a href="http://axactsoft.com" target="_blank">Yamna Khawaja</a></font></i></h3>
     77        <h3><?php
     78        /* translators: %s: plugin version number */
     79        echo sprintf( __('WordPress Mailing Group - v.%s', 'wp-mailing-group'), $versionno );
     80        ?><i><br /><font size="2">- by <a href="http://axactsoft.com" target="_blank">Yamna Khawaja</a></font></i></h3>
    7881
    7982    </div>
     
    8184    <div class="div800">
    8285
    83         <?php echo sprintf( __('<p>The WP MailingGroup plugin allows you to run a Mailing Group, also known as a Listserv, right from your WordPress website. This means you can sign up your users, friends, neighbours, family and whoever else you want, directly from your WordPress administration area, and they can then all exchange emails via their favourite email software. This is a true Mailing Group, just like on Yahoo Groups or Google Groups, where there is an email address to send messages to, and everyone who is subscribed to the mailing group gets the message. They can then click Reply, and the whole list will receive their response.'), $websiteurl ); ?>
     86        <?php echo __('<p>The WP MailingGroup plugin allows you to run a Mailing Group, also known as a Listserv, right from your WordPress website. This means you can sign up your users, friends, neighbours, family and', 'wp-mailing-group'); ?>
    8487
    8588    </div>
     
    9194            <?php
    9295
    93              echo sprintf( __('<p>HOW GET STARTED? Check the FAQ here for a step-by-step tutorial: <a href="http://www.wpmailinggroup.com/faq/quick-start-in-6-steps/" target="_blank">www.wpmailinggroup.com/faq/quick-start-in-6-steps/</a></p>'), $websiteurl);
     96             echo __('<p>HOW GET STARTED? Check the FAQ here for a step-by-step tutorial: <a href="http://www.wpmailinggroup.com/faq/quick-start-in-6-steps/" target="_blank">www.wpmailinggroup.com/faq/quick-start-in-6-steps/</a></p>', 'wp-mailing-group');
    9497
    9598            ?>
     
    101104            <?php
    102105
    103              echo sprintf( __('<p>You are using the FREE version of this plugin - enjoy! A Premium version is available with more features too. See <a target="_blank" href="%s">WPMailingGroup.com</a> for more.</p>'), $websiteurl);
     106             /* translators: %s: website URL */
     107             echo sprintf( __('<p>You are using the FREE version of this plugin - enjoy! A Premium version is available with more features too. See <a target="_blank" href="%s">WPMailingGroup.com</a> for more.</p>', 'wp-mailing-group'), $websiteurl );
    104108
    105109            ?>
     
    123127                        <div class="form-field">
    124128
    125                             <label for="tag-name"><?php _e("Alert on new subscription", 'mailing-group-module'); ?> : </label>
     129                            <label for="tag-name"><?php esc_html_e("Alert on new subscription", 'wp-mailing-group'); ?> : </label>
    126130
    127                             <input type="checkbox" name="alert_on_subscription" id="selector" <?php echo ($subscriptioncheck=='1'?"checked":"") ?> value="1" />
     131                            <input type="checkbox" name="alert_on_subscription" id="selector" <?php echo esc_attr($subscriptioncheck=='1' ? 'checked' : ''); ?> value="1" />
    128132
    129133                        </div>
     
    131135                        <div class="form-field">
    132136
    133                             <label for="tag-name"><?php _e("Subscription alert email", 'mailing-group-module'); ?> : </label>
     137                            <label for="tag-name"><?php esc_html_e("Subscription alert email", 'wp-mailing-group'); ?> : </label>
    134138
    135                             <input type="text" size="40" id="subscription_email" name="subscription_email" value="<?php echo ($subscriptionemail!=''?$subscriptionemail:_e("e.g. [email protected]", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ <?php if($subscriptionemail!='') { ?>this.value='<?php echo $subscriptionemail; ?>'; <?php } else { ?> this.value='<?php _e("e.g. [email protected]", 'mailing-group-module'); ?>'; <?php } ?> }"/>
     139                            <input type="text" size="40" id="subscriptionemail" name="subscriptionemail" value="<?php echo esc_attr($subscriptionemail); ?>" onfocus="if(this.value=='<?php echo esc_js($subscriptionemail); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js($subscriptionemail); ?>'; }"/>
    136140
    137141                        </div>
     
    139143                        <div class="form-field">
    140144
    141                             <label for="tag-name"><?php _e("Email bounce alert", 'mailing-group-module'); ?> : </label>
     145                            <label for="tag-name"><?php esc_html_e("Email bounce alert", 'wp-mailing-group'); ?> : </label>
    142146
    143                             <input type="checkbox" name="email_bounce_alert" id="selector2" <?php echo ($bouncecheck=='1'?"checked":"") ?> value="1" />
     147                            <input type="checkbox" name="email_bounce_alert" id="selector2" <?php echo esc_attr($bouncecheck=='1' ? 'checked' : ''); ?> value="1" />
    144148
    145149                        </div>
     
    147151                        <div class="form-field">
    148152
    149                             <label for="tag-name"><?php _e("No. of bounces prior to alert", 'mailing-group-module'); ?> : </label>
     153                            <label for="tag-name"><?php esc_html_e("No. of bounces prior to alert", 'wp-mailing-group'); ?> : </label>
    150154
    151155                            <select name="bounce_no_times" id="bounce_no_times">
    152156
    153                                 <option value="1" <?php echo ($bouncealerttimes=='1'?"selected":"") ?>>1</option>
     157                                <option value="1" <?php echo esc_attr($bouncealerttimes=='1' ? 'selected' : ''); ?>>1</option>
    154158
    155                                 <option value="2" <?php echo ($bouncealerttimes=='2'?"selected":"") ?>>2</option>
     159                                <option value="2" <?php echo esc_attr($bouncealerttimes=='2' ? 'selected' : ''); ?>>2</option>
    156160
    157                                 <option value="3" <?php echo ($bouncealerttimes=='3'?"selected":"") ?>>3</option>
     161                                <option value="3" <?php echo esc_attr($bouncealerttimes=='3' ? 'selected' : ''); ?>>3</option>
    158162
    159163                            </select>
     
    163167                        <div class="form-field">
    164168
    165                             <label for="tag-name"><?php _e("Send bounce alert email to", 'mailing-group-module'); ?> : </label>
     169                            <label for="tag-name"><?php esc_html_e("Send bounce alert email to", 'wp-mailing-group'); ?> : </label>
    166170
    167                             <input type="text" size="40" id="bounce_alert_email" name="bounce_alert_email" value="<?php echo ($bouncecheckalertemail!=''?$bouncecheckalertemail:_e("e.g. [email protected]", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ <?php if($bouncecheckalertemail!='') { ?>this.value='<?php echo $bouncecheckalertemail; ?>'; <?php } else { ?> this.value='<?php _e("e.g. [email protected]", 'mailing-group-module'); ?>'; <?php } ?> }"/>
     171                            <input type="text" size="40" id="bounce_alert_email" name="bounce_alert_email" value="<?php echo esc_attr($bouncecheckalertemail); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ <?php if($bouncecheckalertemail!='') { ?>this.value='<?php echo esc_js($bouncecheckalertemail); ?>'; <?php } else { ?> this.value='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'; <?php } ?> }"/>
    168172
    169173                        </div>
  • wp-mailing-group/trunk/template/mg_mailinggroupadd.php

    r2724158 r3252678  
    66
    77/* Variables Initialization */
    8 $btn = __('Add Mailing Group', 'mailing-group-module');
     8$btn = __('Add Mailing Group', 'wp-mailing-group');
    99$pop_server_type = 'imap';
    1010$pop_server = '';
     
    8080           
    8181            $size_limit_value =$row->size_limit_value; 
    82             $btn = __("Update Mailing Group", 'mailing-group-module');
     82            $btn = __("Update Mailing Group", 'wp-mailing-group');
    8383
    8484            $hidval = 2;
     
    9999    jQuery('#addgroup').submit(function(){
    100100
    101         if(trim(jQuery("#title").val())=="" || trim(jQuery("#title").val())=='<?php _e("e.g. My Group Name", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter group name.", 'mailing-group-module'); ?>"); jQuery("#title").focus(); return false;}
    102 
    103         if(jQuery("#mail_group option:selected").val()=="") { alert("<?php _e("Please select email group.", 'mailing-group-module'); ?>"); jQuery("#mail_group").focus(); return false;}
    104 
    105         if(trim(jQuery("#email").val())=="" || trim(jQuery("#title").val())=='<?php _e("e.g. [email protected]", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter email address.", 'mailing-group-module'); ?>"); jQuery("#email").focus(); return false; }
    106 
    107         if(!checkemail(jQuery("#email").val())) { alert("<?php _e("Please enter valid email address.", 'mailing-group-module'); ?>"); jQuery("#email").focus(); return false;}
    108 
    109         if(trim(jQuery("#password").val())=="") { alert("<?php _e("Please enter password.", 'mailing-group-module'); ?>"); jQuery("#password").focus(); return false;}
    110 
    111         if(trim(jQuery("#pop_server").val())=="" || trim(jQuery("#pop_server").val())=='<?php _e("e.g. pop.mailserver.com", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter POP server.", 'mailing-group-module'); ?>"); jQuery("#pop_server").focus(); return false; }
    112 
    113         if(trim(jQuery("#pop_port").val())=="") { alert("<?php _e("Please enter POP port.", 'mailing-group-module'); ?>"); jQuery("#pop_port").focus(); return false; }
    114 
    115         if(jQuery('#pop_secure').is(':checked')) { if(trim(jQuery("#pop_username").val())=="") {alert("<?php _e("Please enter POP username.", 'mailing-group-module'); ?>");jQuery("#pop_username").focus();return false;} if(trim(jQuery("#pop_password").val())=="") {alert("<?php _e("Please enter POP password.", 'mailing-group-module'); ?>");jQuery("#pop_password").focus();return false;}} else { jQuery("#pop_username").val(""); jQuery("#pop_password").val(""); }
     101        if(trim(jQuery("#title").val())=="" || trim(jQuery("#title").val())=='<?php esc_html_e("e.g. My Group Name", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter group name.", 'wp-mailing-group'); ?>"); jQuery("#title").focus(); return false;}
     102
     103        if(jQuery("#mail_group option:selected").val()=="") { alert("<?php esc_html_e("Please select email group.", 'wp-mailing-group'); ?>"); jQuery("#mail_group").focus(); return false;}
     104
     105        if(trim(jQuery("#email").val())=="" || trim(jQuery("#title").val())=='<?php esc_html_e("e.g. [email protected]", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter email address.", 'wp-mailing-group'); ?>"); jQuery("#email").focus(); return false; }
     106
     107        if(!checkemail(jQuery("#email").val())) { alert("<?php esc_html_e("Please enter valid email address.", 'wp-mailing-group'); ?>"); jQuery("#email").focus(); return false;}
     108
     109        if(trim(jQuery("#password").val())=="") { alert("<?php esc_html_e("Please enter password.", 'wp-mailing-group'); ?>"); jQuery("#password").focus(); return false;}
     110
     111        if(trim(jQuery("#pop_server").val())=="" || trim(jQuery("#pop_server").val())=='<?php esc_html_e("e.g. pop.mailserver.com", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter POP server.", 'wp-mailing-group'); ?>"); jQuery("#pop_server").focus(); return false; }
     112
     113        if(trim(jQuery("#pop_port").val())=="") { alert("<?php esc_html_e("Please enter POP port.", 'wp-mailing-group'); ?>"); jQuery("#pop_port").focus(); return false; }
     114
     115        if(jQuery('#pop_secure').is(':checked')) { if(trim(jQuery("#pop_username").val())=="") {alert("<?php esc_html_e("Please enter POP username.", 'wp-mailing-group'); ?>");jQuery("#pop_username").focus();return false;} if(trim(jQuery("#pop_password").val())=="") {alert("<?php esc_html_e("Please enter POP password.", 'wp-mailing-group'); ?>");jQuery("#pop_password").focus();return false;}} else { jQuery("#pop_username").val(""); jQuery("#pop_password").val(""); }
    116116       
    117         if(jQuery("input[name=mail_type]:checked").val() =='smtp'){  if(trim(jQuery("#smtp_server").val())=="" || trim(jQuery("#smtp_server").val())=='<?php _e("e.g. smtp.mailserver.com", 'mailing-group-module'); ?>') {                 alert("<?php _e("Please enter SMTP server.", 'mailing-group-module'); ?>");             jQuery("#smtp_server").focus();             return false;           }       }
    118         /*if(trim(jQuery("#smtp_server").val())=="" || trim(jQuery("#smtp_server").val())=='<?php _e("e.g. smtp.mailserver.com", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter SMTP server.", 'mailing-group-module'); ?>"); jQuery("#smtp_server").focus(); return false; }*/
    119 
    120         if(trim(jQuery("#smtp_port").val())=="") { alert("<?php _e("Please enter SMTP port.", 'mailing-group-module'); ?>"); jQuery("#smtp_port").focus();return false; }
    121 
    122         if(jQuery('#smtp_secure').is(':checked')) { if(trim(jQuery("#smtp_username").val())=="") {alert("<?php _e("Please enter smtp username.", 'mailing-group-module'); ?>");jQuery("#smtp_username").focus();return false;} if(trim(jQuery("#smtp_password").val())=="") {alert("<?php _e("Please enter smtp password.", 'mailing-group-module'); ?>");jQuery("#smtp_password").focus();return false;}} else { jQuery("#smtp_username").val(""); jQuery("#smtp_password").val(""); }
    123 
    124         if(jQuery('#auto_delete_yes').is(':checked')) { if(trim(jQuery("#auto_delete_limit").val())!='' && trim(jQuery("#auto_delete_limit").val()) > '0') { if(!checknumber(jQuery("#auto_delete_limit").val())) { alert("<?php _e("Please enter valid number of days.", 'mailing-group-module'); ?>"); jQuery("#auto_delete_limit").focus(); return false; } } else { alert("<?php _e("Please enter number of days for auto-deletion.", 'mailing-group-module'); ?>"); jQuery("#auto_delete_limit").focus(); return false; } } else { jQuery("#auto_delete_limit").val('0');}
    125 
    126         if(trim(jQuery("#sender_name").val())=="" || trim(jQuery("#sender_name").val())=='<?php _e("e.g. Mailing Group Name Administrator", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter sender name.", 'mailing-group-module'); ?>"); jQuery("#sender_name").focus(); return false; }
    127 
    128         if(trim(jQuery("#sender_email").val())=="" || trim(jQuery("#sender_email").val())=='<?php _e("e.g. [email protected]", 'mailing-group-module'); ?>') { alert("<?php _e("Please enter sender email.", 'mailing-group-module'); ?>"); jQuery("#sender_email").focus(); return false; }
    129 
    130         if(!checkemail(jQuery("#sender_email").val())) { alert("<?php _e("Please enter valid email address.", 'mailing-group-module'); ?>"); jQuery("#sender_email").focus(); return false;}
     117        if(jQuery("input[name=mail_type]:checked").val() =='smtp'){  if(trim(jQuery("#smtp_server").val())=="" || trim(jQuery("#smtp_server").val())=='<?php esc_html_e("e.g. smtp.mailserver.com", 'wp-mailing-group'); ?>') {                 alert("<?php esc_html_e("Please enter SMTP server.", 'wp-mailing-group'); ?>");             jQuery("#smtp_server").focus();             return false;           }       }
     118        /*if(trim(jQuery("#smtp_server").val())=="" || trim(jQuery("#smtp_server").val())=='<?php esc_html_e("e.g. smtp.mailserver.com", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter SMTP server.", 'wp-mailing-group'); ?>"); jQuery("#smtp_server").focus(); return false; }*/
     119
     120        if(jQuery("input[name=mail_type]:checked").val() =='smtp'){
     121            if(trim(jQuery("#smtp_port").val())=="") { alert("<?php esc_html_e("Please enter SMTP port.", 'wp-mailing-group'); ?>"); jQuery("#smtp_port").focus();return false; }
     122        }
     123        if(jQuery('#smtp_secure').is(':checked')) { if(trim(jQuery("#smtp_username").val())=="") {alert("<?php esc_html_e("Please enter smtp username.", 'wp-mailing-group'); ?>");jQuery("#smtp_username").focus();return false;} if(trim(jQuery("#smtp_password").val())=="") {alert("<?php esc_html_e("Please enter smtp password.", 'wp-mailing-group'); ?>");jQuery("#smtp_password").focus();return false;}} else { jQuery("#smtp_username").val(""); jQuery("#smtp_password").val(""); }
     124
     125        if(jQuery('#auto_delete_yes').is(':checked')) { if(trim(jQuery("#auto_delete_limit").val())!='' && trim(jQuery("#auto_delete_limit").val()) > '0') { if(!checknumber(jQuery("#auto_delete_limit").val())) { alert("<?php esc_html_e("Please enter valid number of days.", 'wp-mailing-group'); ?>"); jQuery("#auto_delete_limit").focus(); return false; } } else { alert("<?php esc_html_e("Please enter number of days for auto-deletion.", 'wp-mailing-group'); ?>"); jQuery("#auto_delete_limit").focus(); return false; } } else { jQuery("#auto_delete_limit").val('0');}
     126
     127        if(trim(jQuery("#sender_name").val())=="" || trim(jQuery("#sender_name").val())=='<?php esc_html_e("e.g. Mailing Group Name Administrator", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter sender name.", 'wp-mailing-group'); ?>"); jQuery("#sender_name").focus(); return false; }
     128
     129        if(trim(jQuery("#sender_email").val())=="" || trim(jQuery("#sender_email").val())=='<?php esc_html_e("e.g. [email protected]", 'wp-mailing-group'); ?>') { alert("<?php esc_html_e("Please enter sender email.", 'wp-mailing-group'); ?>"); jQuery("#sender_email").focus(); return false; }
     130
     131        if(!checkemail(jQuery("#sender_email").val())) { alert("<?php esc_html_e("Please enter valid email address.", 'wp-mailing-group'); ?>"); jQuery("#sender_email").focus(); return false;}
    131132
    132133        if(jQuery('#att_auto_delete_yes').is(':checked')) {
    133134        if(trim(jQuery("#att_auto_delete_limit").val())!='' && trim(jQuery("#att_auto_delete_limit").val()) > '0') {
    134135        if(!checknumber(jQuery("#att_auto_delete_limit").val())) {
    135         alert("<?php _e("Please enter valid number of days.", 'mailing-group-module'); ?>");
     136        alert("<?php esc_html_e("Please enter valid number of days.", 'wp-mailing-group'); ?>");
    136137        jQuery("#att_auto_delete_limit").focus(); return false;
    137138        }
    138139        } else {
    139         alert("<?php _e("Please enter number of days for auto-deletion.", 'mailing-group-module'); ?>");
     140        alert("<?php esc_html_e("Please enter number of days for auto-deletion.", 'wp-mailing-group'); ?>");
    140141        jQuery("#att_auto_delete_limit").focus(); return false;
    141142        }
     
    147148        if(trim(jQuery("#size_limit_value").val())!='' && trim(jQuery("#size_limit_value").val()) > '0') {
    148149        if(!checknumber(jQuery("#size_limit_value").val())) {
    149         alert("<?php _e("Please enter valid number of memory size.", 'mailing-group-module'); ?>");
     150        alert("<?php esc_html_e("Please enter valid number of memory size.", 'wp-mailing-group'); ?>");
    150151        jQuery("#size_limit_value").focus(); return false;
    151152        }
    152153        } else {
    153         alert("<?php _e("Please enter size of memory for auto-deletion.", 'mailing-group-module'); ?>");
     154        alert("<?php esc_html_e("Please enter size of memory for auto-deletion.", 'wp-mailing-group'); ?>");
    154155        jQuery("#size_limit_value").focus(); return false;
    155156        }
     
    159160       
    160161        var data = jQuery(this).serialize();
    161         jQuery.post(ajaxurl, data, function(response) { if(response=='exists') { jQuery("#ajaxMessages_inn").html("<?php wpmg_showmessages("error", __("Mailing group already exists.", 'mailing-group-module')); ?>"); } else if(response=='updated') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("updated", __("Mailing group has been updated successfully.", 'mailing-group-module')); ?>"); showdatatable(); } else if(response=='added') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("updated", __("Mailing group has been added successfully.", 'mailing-group-module')); ?>"); showdatatable();} else if(response=='free') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("error", __("You can only add one mailing group per domain, Please upgrade to Paid version for more features.", 'mailing-group-module')); ?>"); showdatatable();}});
     162        jQuery.post(ajaxurl, data, function(response) { if(response=='exists') { jQuery("#ajaxMessages_inn").html("<?php wpmg_showmessages("error", __("Mailing group already exists.", 'wp-mailing-group')); ?>"); } else if(response=='updated') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("updated", __("Mailing group has been updated successfully.", 'wp-mailing-group')); ?>"); showdatatable(); } else if(response=='added') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("updated", __("Mailing group has been added successfully.", 'wp-mailing-group')); ?>"); showdatatable();} else if(response=='free') { jQuery("#ajaxMessages").html("<?php wpmg_showmessages("error", __("You can only add one mailing group per domain, Please upgrade to Paid version for more features.", 'wp-mailing-group')); ?>"); showdatatable();}});
    162163        return false;
    163164    });
     
    210211        || trim(jQuery("#password").val())==""
    211212        || trim(jQuery("#pop_server").val())==""
    212         || trim(jQuery("#pop_server").val())=='<?php _e("e.g. pop.mailserver.com", 'mailing-group-module'); ?>')
     213        || trim(jQuery("#pop_server").val())=='<?php esc_html_e("e.g. pop.mailserver.com", 'wp-mailing-group'); ?>')
    213214        {
    214             alert("<?php _e("Please enter valid values for incoming sever, email and password & try again.", 'mailing-group-module'); ?>");
     215            alert("<?php esc_html_e("Please enter valid values for incoming sever, email and password & try again.", 'wp-mailing-group'); ?>");
    215216            return false;
    216217
     
    244245<div xmlns="http://www.w3.org/1999/xhtml" class="wrap nosubsub">
    245246
    246     <h2><?php _e("Add/Edit Mailing Group", 'mailing-group-module'); ?></h2>
     247    <h2><?php esc_html_e("Add/Edit Mailing Group", 'wp-mailing-group'); ?></h2>
    247248
    248249    <div id="col-left">
     
    258259                        <div class="form-field">
    259260
    260                             <label for="tag-name"><?php _e("Group Name", 'mailing-group-module'); ?> : </label>
    261 
    262                             <input type="text" size="40" id="title" name="title" value="<?php echo (isset($title) && $title!=''?$title:_e("e.g. My Group Name", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. My Group Name", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php _e("e.g. My Group Name", 'mailing-group-module') ?>'; }"/>
     261                            <label for="tag-name"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?> : </label>
     262
     263                            <input type="text" size="40" id="title" name="title" value="<?php echo esc_attr($title); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. My Group Name", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js(__("e.g. My Group Name", 'wp-mailing-group')); ?>'; }"/>
    263264
    264265                        </div>
    265266                       
    266267                        <div class="form-field">
    267                             <label for="tag-name" style="height:45px;"><?php _e("Add Group Name as prefix in email subject line", 'mailing-group-module'); ?> : </label>
     268                            <label for="tag-name" style="height:45px;"><?php esc_html_e("Add Group Name as prefix in email subject line", 'wp-mailing-group'); ?> : </label>
    268269                            <input type="checkbox" name="use_in_subject" value="1" id="use_in_subject" style="margin-top:20px !important;" <?php echo (isset($use_in_subject) && $use_in_subject == '1' ? "checked" : ""); ?> />
    269270                        </div>
     
    271272                        <div class="form-field">
    272273
    273                             <label for="tag-name"><?php _e("Group Email Address", 'mailing-group-module'); ?> : </label>
    274 
    275                             <input type="text" size="40" id="email" name="email" value="<?php echo (isset($email) && $email!=''?$email:_e("e.g. [email protected]", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'; }"/>
    276 
    277                             <br /><p class="noteclass"><?php _e("- Group Email should be set up as an IMAP mailbox. You should use your domain email here", 'mailing-group-module'); ?></p>
    278 
    279                         </div>
    280 
    281                         <div class="form-field">
    282 
    283                             <label for="tag-name"><?php _e("Password", 'mailing-group-module'); ?> : </label>
    284 
    285                             <input type="password" size="27" id="password" name="password" value="<?php echo (isset($password))?$password:''; ?>"/>
     274                            <label for="tag-name"><?php esc_html_e("Group Email Address", 'wp-mailing-group'); ?> : </label>
     275
     276                            <input type="text" size="40" id="email" name="email" value="<?php echo esc_attr($email); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'; }"/>
     277
     278                            <br /><p class="noteclass"><?php esc_html_e("- Group Email should be set up as an IMAP mailbox. You should use your domain email here", 'wp-mailing-group'); ?></p>
     279
     280                        </div>
     281
     282                        <div class="form-field">
     283
     284                            <label for="tag-name"><?php esc_html_e("Password", 'wp-mailing-group'); ?> : </label>
     285
     286                            <input type="password" size="27" id="password" name="password" value="<?php echo esc_attr($password); ?>"/>
    286287
    287288                        </div>
    288289    <div class="clearbth"></div>
    289290
    290     <div><h3><?php _e("Incoming Mail Settings", 'mailing-group-module'); ?></h3></div>
     291    <div><h3><?php esc_html_e("Incoming Mail Settings", 'wp-mailing-group'); ?></h3></div>
    291292
    292293                        <div class="form-field">
    293294           
    294 <p class="noteclass"><?php _e("- Not sure what to do? Check out our list of servers and their mail & smtp settings <a href='http://www.wpmailinggroup.com/imappop3-mailbox-settings?utm_source=wpmgf&utm_medium=provider&utm_campaign=wpmgf-settings' target='_blank'> here</a>", 'mailing-group-module'); ?></p>                       
    295                             <label for="tag-name"><?php _e("Access Mailbox via", 'mailing-group-module'); ?> : </label>                 
    296                             <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'pop3'){ echo 'checked'; } ?> value="pop3"/><p class="innn">&nbsp;&nbsp;<?php _e("POP3", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>
    297                             <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'imap-novalidate-cert'){ echo 'checked'; } ?> value="imap-novalidate-cert"/><p class="innn">&nbsp;&nbsp;<?php _e("IMAP with additional params", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>                         
    298                             <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'imap'){ echo 'checked'; } ?> value="imap"/><p class="innn">&nbsp;&nbsp;<?php _e("IMAP", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
     295<p class="noteclass"><?php esc_html_e("- Not sure what to do? Check out our list of servers and their mail & smtp settings <a href='http://www.wpmailinggroup.com/imappop3-mailbox-settings?utm_source=wpmgf&utm_medium=provider&utm_campaign=wpmgf-settings' target='_blank'> here</a>", 'wp-mailing-group'); ?></p>                       
     296                            <label for="tag-name"><?php esc_html_e("Access Mailbox via", 'wp-mailing-group'); ?> : </label>                 
     297                            <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'pop3'){ echo 'checked'; } ?> value="pop3"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("POP3", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>
     298                            <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'imap-novalidate-cert'){ echo 'checked'; } ?> value="imap-novalidate-cert"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("IMAP with additional params", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>                         
     299                            <input type="radio" class="pop_server_type" name="pop_server_type" <?php if($pop_server_type == 'imap'){ echo 'checked'; } ?> value="imap"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("IMAP", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
    299300                        </div> 
    300301                        <div class="form-field">
    301302                            <div><a href="http://www.wpmailinggroup.com/imappop3-mailbox-settings/#gmail-imap">Want to use gmail? click here to see settings for it</a> </div>
    302                             <label for="tag-name"><?php _e("Incoming Mail Server", 'mailing-group-module'); ?> : </label>
     303                            <label for="tag-name"><?php esc_html_e("Incoming Mail Server", 'wp-mailing-group'); ?> : </label>
    303304                           
    304                             <div class="lft"><input type="text" size="40" id="pop_server" name="pop_server" value="<?php echo $pop_server; ?>" placeholder="e.g. imap.yourdomain.com" /></div>
    305 
    306                             <div class="rgt"><p class="innn"><?php _e("Port", 'mailing-group-module'); ?> : </p><input type="text" maxlength="5" id="pop_port" name="pop_port" value="<?php echo $pop_port; ?>" placeholder="143" /></div>
    307 
    308                             <div class="rgt"><input type="checkbox" id="pop_secure" name="pop_secure" value="1" <?php echo $pop_secure_value; ?> /><p class="innn">&nbsp;&nbsp;<?php _e("User/Pass Required?", 'mailing-group-module'); ?></p></div>
    309 
    310                         </div>
    311                         <div class="form-field" id="pop_secured_div" style="display: <?php echo $pop_secure_class; ?>;">
     305                            <div class="lft"><input type="text" size="40" id="pop_server" name="pop_server" value="<?php echo esc_attr($pop_server); ?>" placeholder="<?php esc_attr_e("e.g. imap.yourdomain.com", 'wp-mailing-group'); ?>" /></div>
     306
     307                            <div class="rgt"><p class="innn"><?php esc_html_e("Port", 'wp-mailing-group'); ?> : </p><input type="text" size="40" id="pop_port" name="pop_port" value="<?php echo esc_attr($pop_port); ?>" placeholder="<?php esc_attr_e("143", 'wp-mailing-group'); ?>" /></div>
     308
     309                            <div class="rgt"><input type="checkbox" id="pop_secure" name="pop_secure" value="1" <?php echo esc_attr($pop_secure_value); ?> /><p class="innn">&nbsp;&nbsp;<?php esc_html_e("User/Pass Required?", 'wp-mailing-group'); ?></p></div>
     310
     311                        </div>
     312                        <div class="form-field" id="pop_secured_div" style="display: <?php echo esc_attr($pop_secure_class); ?>;">
    312313                       
    313314                            <div class="form-field">
    314                                 <label for="tag-name"><?php _e("Username", 'mailing-group-module'); ?> : </label>
    315                                 <input type="text" size="27" id="pop_username" name="pop_username" value="<?php echo (isset($pop_username))?$pop_username:''; ?>" placeholder="Group email address"/>
     315                                <label for="tag-name"><?php esc_html_e("Username", 'wp-mailing-group'); ?> : </label>
     316                                <input type="text" size="27" id="pop_username" name="pop_username" value="<?php echo esc_attr($pop_username); ?>" placeholder="<?php esc_attr_e("Group email address", 'wp-mailing-group'); ?>"/>
    316317                            </div>
    317318                            <div class="form-field">
    318                                 <label for="tag-name"><?php _e("Password", 'mailing-group-module'); ?> : </label>
    319                                 <input type="password" size="27" id="pop_password" name="pop_password" value="<?php echo (isset($pop_password))?$pop_password:''; ?>" placeholder="Group email password"/>
     319                                <label for="tag-name"><?php esc_html_e("Password", 'wp-mailing-group'); ?> : </label>
     320                                <input type="password" size="27" id="pop_password" name="pop_password" value="<?php echo esc_attr($pop_password); ?>" placeholder="<?php esc_attr_e("Group email password", 'wp-mailing-group'); ?>"/>
    320321                            </div>
    321322                            <div id="pop_sslDiv" class="rgt">
    322                                 <input type="checkbox" name="pop_ssl" id="pop_ssl" value="1" <?php echo($pop_ssl == '1' ? 'checked' : '' ); ?> />
    323                                 <p class="innn">&nbsp;&nbsp;<?php _e( "SSL/Secure", 'mailing-group-module' ); ?></p>
     323                                <input type="checkbox" name="pop_ssl" id="pop_ssl" value="1" <?php echo esc_attr($pop_ssl == '1' ? 'checked' : ''); ?> />
     324                                <p class="innn">&nbsp;&nbsp;<?php esc_html_e( "SSL/Secure", 'wp-mailing-group' ); ?></p>
    324325                            </div>
    325326                        </div>
     
    329330                        </p>
    330331                            <div class="imap_response" style="float: left; color: blue;"></div>
    331                             <p class="innn" style="clear: both;"><input type="button" value="<?php _e("Test Imap connection", 'mailing-group-module'); ?>" class="button" id="test_imap_conn" /></p>   
     332                            <p class="innn" style="clear: both;"><input type="button" value="<?php esc_html_e("Test Imap connection", 'wp-mailing-group'); ?>" class="button" id="test_imap_conn" /></p>   
    332333                        </div>
    333334                        <?php
     
    346347                        <div class="clearbth"></div>
    347348
    348     <div><h3><?php _e("Outgoing Mail Settings", 'mailing-group-module'); ?></h3></div> 
     349    <div><h3><?php esc_html_e("Outgoing Mail Settings", 'wp-mailing-group'); ?></h3></div> 
    349350                        <div class="form-field">   
    350                         <label for="tag-name"><?php _e("Choose Mailing Function ", 'mailing-group-module'); ?> : </label>                   
    351                         <input type="radio" class="mail_type" name="mail_type" <?php if($mail_type == 'wp'){ echo 'checked'; } ?> value="wp"/><p class="innn">&nbsp;&nbsp;<?php _e("WP Mail", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>   
    352                         <input type="radio" id="mail_type_smtp" class="mail_type" name="mail_type" <?php if($mail_type == 'smtp'){ echo 'checked'; } ?> value="smtp"/><p class="innn">&nbsp;&nbsp;<?php _e("SMTP Mail", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
    353                         <input type="radio" class="mail_type" name="mail_type" <?php if($mail_type == 'php'){ echo 'checked'; } ?> value="php"/><p class="innn">&nbsp;&nbsp;<?php _e("PHP Mail", 'mailing-group-module'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
    354                         <p class="noteclass"><?php _e("-If not sure what to choose, select WP Mail.",'mailing-group-module');?>
     351                        <label for="tag-name"><?php esc_html_e("Choose Mailing Function ", 'wp-mailing-group'); ?> : </label>                   
     352                        <input type="radio" class="mail_type" name="mail_type" <?php if($mail_type == 'wp'){ echo 'checked'; } ?> value="wp"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("WP Mail", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>   
     353                        <input type="radio" id="mail_type_smtp" class="mail_type" name="mail_type" <?php if($mail_type == 'smtp'){ echo 'checked'; } ?> value="smtp"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("SMTP Mail", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
     354                        <input type="radio" class="mail_type" name="mail_type" <?php if($mail_type == 'php'){ echo 'checked'; } ?> value="php"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("PHP Mail", 'wp-mailing-group'); ?>&nbsp;&nbsp;&nbsp;&nbsp;</p>     
     355                        <p class="noteclass"><?php esc_html_e("-If not sure what to choose, select WP Mail.",'wp-mailing-group');?>
    355356                            <p class="innn" style="clear: both;">
    356                             <a href="<?php echo admin_url('admin.php?page=wpmg_mailinggroup_testmail'); ?>" target="_blank">
    357                             <input type="button" value="<?php _e("Test Outgoing Connection", 'mailing-group-module'); ?>" class="button" />
     357                            <a href="<?php echo esc_url(admin_url('admin.php?page=wpmg_mailinggroup_testmail')); ?>" target="_blank">
     358                            <input type="button" value="<?php esc_attr_e("Test Outgoing Connection", 'wp-mailing-group'); ?>" class="button" />
    358359                            </a>
    359360                            </p>
     
    361362                        </div>     
    362363                       
    363                         <div class="form-field" id="smtp_mail_div" style="display:<?php echo $classmail; ?>;">
    364                             <label for="tag-name"><?php _e("SMTP Server", 'mailing-group-module'); ?> : </label>
    365                             <div class="lft"><input type="text" size="40" id="smtp_server" name="smtp_server" value="<?php echo (isset($smtp_server) && $smtp_server!=''?$smtp_server:_e("e.g. smtp.mailserver.com", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. smtp.mailserver.com", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php _e("e.g. smtp.mailserver.com", 'mailing-group-module') ?>'; }"/><br>
     364                        <div class="form-field" id="smtp_mail_div" style="display:<?php echo esc_attr($classmail); ?>;">
     365                            <label for="tag-name"><?php esc_html_e("SMTP Server", 'wp-mailing-group'); ?> : </label>
     366                            <div class="lft"><input type="text" size="40" id="smtp_server" name="smtp_server" value="<?php echo esc_attr($smtp_server); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. smtp.mailserver.com", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js(__("e.g. smtp.mailserver.com", 'wp-mailing-group')); ?>'; }"/><br>
    366367                            </div>
    367                             <div class="rgt"><p class="innn"><?php _e("Port", 'mailing-group-module'); ?> : </p><input type="text" id="smtp_port" maxlength="5" name="smtp_port" value="<?php echo (isset($smtp_port) && $smtp_port!=''?$smtp_port:"25"); ?>"/></div>
    368                             <div class="rgt"><input type="checkbox" id="smtp_secure" name="smtp_secure" <?php echo $checkSelsmtp; ?> value="1"/><p class="innn">&nbsp;&nbsp;<?php _e("SSL/Secure Connection", 'mailing-group-module'); ?></p></div>
    369                             <p class="noteclass"><?php _e("SMTP not available or reliable? See", 'mailing-group-module'); ?> <a href="http://www.wpmailinggroup.com/faq/send-mail-smtp/" target="_blank"><?php _e("Recommended SMTP Suppliers", 'mailing-group-module'); ?></a>.</em></p>
    370 
    371                         </div>
    372 
    373                         <div class="form-field" id="smtp_secured_div" style="display:<?php echo $classsmtp; ?>;">
     368                            <div class="rgt"><p class="innn"><?php esc_html_e("Port", 'wp-mailing-group'); ?> : </p><input type="text" id="smtp_port" maxlength="5" name="smtp_port" value="<?php echo esc_attr($smtp_port); ?>"/></div>
     369                            <div class="rgt"><input type="checkbox" id="smtp_secure" name="smtp_secure" <?php echo esc_attr($checkSelsmtp); ?> value="1"/><p class="innn">&nbsp;&nbsp;<?php esc_html_e("SSL/Secure Connection", 'wp-mailing-group'); ?></p></div>
     370                            <p class="noteclass"><?php esc_html_e("SMTP not available or reliable? See", 'wp-mailing-group'); ?> <a href="http://www.wpmailinggroup.com/faq/send-mail-smtp/" target="_blank"><?php esc_html_e("Recommended SMTP Suppliers", 'wp-mailing-group'); ?></a>.</em></p>
     371
     372                        </div>
     373
     374                        <div class="form-field" id="smtp_secured_div" style="display:<?php echo esc_attr($classsmtp); ?>;">
    374375
    375376                            <div class="form-field">
    376377
    377                                 <label for="tag-name"><?php _e("Username", 'mailing-group-module'); ?> : </label>
    378 
    379                                 <input type="text" id="smtp_username" name="smtp_username" size="27" value="<?php echo (isset($smtp_username))?$smtp_username:''; ?>"/>
     378                                <label for="tag-name"><?php esc_html_e("Username", 'wp-mailing-group'); ?> : </label>
     379
     380                                <input type="text" id="smtp_username" name="smtp_username" size="27" value="<?php echo esc_attr($smtp_username); ?>"/>
    380381
    381382                            </div>
     
    385386                            <div class="form-field">
    386387
    387                                 <label for="tag-name"><?php _e("Password", 'mailing-group-module'); ?> : </label>
    388 
    389                                 <input type="password" id="smtp_password" name="smtp_password" size="27" value="<?php echo (isset($smtp_password))?$smtp_password:''; ?>"/>
     388                                <label for="tag-name"><?php esc_html_e("Password", 'wp-mailing-group'); ?> : </label>
     389
     390                                <input type="password" id="smtp_password" name="smtp_password" size="27" value="<?php echo esc_attr($smtp_password); ?>"/>
    390391
    391392                            </div>
     
    394395
    395396                       
    396                         <br /><div><h3><?php _e("Attachments", 'mailing-group-module'); ?></h3></div>
     397                        <br /><div><h3><?php esc_html_e("Attachments", 'wp-mailing-group'); ?></h3></div>
    397398                        <div class="form-field">
    398                             <label for="tag-name"><?php _e("Save Attachments", 'mailing-group-module'); ?> : </label>
    399                             <input type="checkbox" name="save_attachments" id="save_attachments" value="1" <?php echo (isset($save_attachments) && $save_attachments=='1'?'checked':''); ?>>
    400                             <br /><p class="noteclass"><?php _e("- Check this to enable email attachments.", 'mailing-group-module'); ?></p>
    401                         </div>
    402                         <div class="form-field">
    403                             <label for="tag-name"><?php _e("Auto-delete old attachments", 'mailing-group-module'); ?> : </label>
    404                             <input type="radio" name="att_auto_delete" id="att_auto_delete_no"  value="0" <?php echo (isset($att_auto_delete) && $att_auto_delete=='0'?'checked':''); ?> <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp;<?php _e("No", 'mailing-group-module'); ?>&nbsp;
    405                             <input type="radio" name="att_auto_delete" id="att_auto_delete_yes" value="1" <?php echo (isset($att_auto_delete) && $att_auto_delete=='1'?'checked':''); ?> <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp;<?php _e("Yes, after", 'mailing-group-module'); ?>&nbsp;
    406                             <input type="text"  name="att_auto_delete_limit" id="att_auto_delete_limit" size="5" maxlength="2" value="<?php echo (isset($att_auto_delete_limit) && $att_auto_delete_limit!=''?$att_auto_delete_limit:'0'); ?>" <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp;<?php _e("days", 'mailing-group-module'); ?>
     399                            <label for="tag-name"><?php esc_html_e("Save Attachments", 'wp-mailing-group'); ?> : </label>
     400                            <input type="checkbox" name="save_attachments" id="save_attachments" value="1" <?php echo esc_attr($save_attachments == '1' ? 'checked' : ''); ?>>
     401                            <br /><p class="noteclass"><?php esc_html_e("- Check this to enable email attachments.", 'wp-mailing-group'); ?></p>
     402                        </div>
     403                        <div class="form-field">
     404                            <label for="tag-name"><?php esc_html_e("Auto-delete old attachments", 'wp-mailing-group'); ?> : </label>
     405                            <input type="radio" name="att_auto_delete" id="att_auto_delete_no"  value="0" <?php echo esc_attr($att_auto_delete == '0' ? 'checked' : ''); ?> <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>&nbsp;<?php esc_html_e("No", 'wp-mailing-group'); ?>&nbsp;
     406                            <input type="radio" name="att_auto_delete" id="att_auto_delete_yes" value="1" <?php echo esc_attr($att_auto_delete == '1' ? 'checked' : ''); ?> <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>&nbsp;<?php esc_html_e("Yes, after", 'wp-mailing-group'); ?>&nbsp;
     407                            <input type="text"  name="att_auto_delete_limit" id="att_auto_delete_limit" size="5" maxlength="2" value="<?php echo esc_attr($att_auto_delete_limit); ?>" <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>>&nbsp;<?php esc_html_e("days", 'wp-mailing-group'); ?>
    407408                        </div> 
    408409                        <div class="clearbth"></div>
    409410                        <div class="form-field">
    410                             <label for="tag-name"><?php _e("Auto-delete large attachments", 'mailing-group-module'); ?> : </label>
    411                             <input type="radio" name="size_limit" id="size_limit_no"  value="0" <?php echo (isset($size_limit) && $size_limit=='0'?'checked':''); ?> <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp;<?php _e("No", 'mailing-group-module'); ?>&nbsp;
    412                             <input type="radio" name="size_limit" id="size_limit_yes" value="1" <?php echo (isset($size_limit) && $size_limit=='1'?'checked':''); ?> <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp;<?php _e("Yes, over", 'mailing-group-module'); ?>&nbsp;
    413                             <input type="text"  name="size_limit_value" id="size_limit_value" size="5" maxlength="2" value="<?php echo (isset($size_limit_value) && $size_limit_value!=''?$size_limit_value:'0'); ?>" <?php echo (isset($save_attachments) && $save_attachments=='0'?"disabled":""); ?>>&nbsp; <?php _e("MB", 'mailing-group-module'); ?>
     411                            <label for="tag-name"><?php esc_html_e("Auto-delete large attachments", 'wp-mailing-group'); ?> : </label>
     412                            <input type="radio" name="size_limit" id="size_limit_no"  value="0" <?php echo esc_attr($size_limit == '0' ? 'checked' : ''); ?> <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>&nbsp;<?php esc_html_e("No", 'wp-mailing-group'); ?>&nbsp;
     413                            <input type="radio" name="size_limit" id="size_limit_yes" value="1" <?php echo esc_attr($size_limit == '1' ? 'checked' : ''); ?> <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>&nbsp;<?php esc_html_e("Yes, over", 'wp-mailing-group'); ?>&nbsp;
     414                            <input type="text"  name="size_limit_value" id="size_limit_value" size="5" maxlength="2" value="<?php echo esc_attr($size_limit_value); ?>" <?php echo esc_attr($save_attachments == '0' ? 'disabled' : ''); ?>>&nbsp; <?php esc_html_e("MB", 'wp-mailing-group'); ?>
    414415                        </div>
    415                         <p class="noteclass"><?php _e("- If this option is activated, attachments over the specified size will automatically be deleted. The message will be sent to the list without the attachment, with a notice that an attachment was deleted due to size limits.", 'mailing-group-module'); ?></p>                       
     416                        <p class="noteclass"><?php esc_html_e("- If this option is activated, attachments over the specified size will automatically be deleted. The message will be sent to the list without the attachment, with a notice that an attachment was deleted due to size limits.", 'wp-mailing-group'); ?></p>                       
    416417                        <div class="clearbth"></div>
    417                         <div><h3><?php _e("Archive", 'mailing-group-module'); ?></h3></div>
    418                         <div class="form-field">
    419 
    420                             <label for="tag-name"><?php _e("Auto-delete old messages", 'mailing-group-module'); ?> : </label>
    421 
    422                             <input type="radio" name="auto_delete" id="auto_delete_no" value="0" <?php echo (isset($auto_delete) && $auto_delete=='0'?"checked":(isset($auto_delete) && $auto_delete==""?"checked":"")) ?> checked="checked" disabled="disabled" />&nbsp;<?php _e("No", 'mailing-group-module'); ?>&nbsp;
    423 
    424                             <input type="radio" name="auto_delete" disabled="disabled" value="1" id="auto_delete_yes" <?php echo (isset($auto_delete) && $auto_delete=='1'?"checked":"") ?> />&nbsp;<?php _e("Yes, after", 'mailing-group-module'); ?>&nbsp;
    425 
    426                             <input type="text" name="auto_delete_limit" disabled="disabled" id="auto_delete_limit" size="5" maxlength="2" value="<?php echo (isset($auto_delete_limit))?$auto_delete_limit:''; ?>"/>&nbsp;<?php _e("days", 'mailing-group-module'); ?>
    427 
    428                             <br /><p class="noteclass">(<?php _e("Auto-deletion in Premium version only", 'mailing-group-module'); ?>)</p>
    429 
    430                         </div>
    431                                                 <div><h3><?php _e("Footer", 'mailing-group-module'); ?></h3></div>
    432                         <div class="form-field">
    433 
    434                             <label for="tag-name"><?php _e("Footer text for emails", 'mailing-group-module'); ?> : </label>
    435 
    436                             <textarea name="footer_text" id="footer_text" rows="10" cols="80"><?php echo (isset($footer_text) && $footer_text!=''?($footer_text):'-- -- -- --
    437 
    438 This message was sent to <b>{%name%}</b> at <b>{%email%}</b> by the <a href="{%site_url%}">{%site_url%}</a> website using the <a href="http://WPMailingGroup.com">WPMailingGroup plugin</a>.
    439 
    440 <b><a href="{%unsubscribe_url%}">Unsubscribe</a></b> | <a href="{%profile_url%}">Update Profile</a>'); ?></textarea>
    441 
    442                         </div>
    443 
    444                         <div class="form-field">
    445                             <label for="tag-name"><?php _e("Available Variables", 'mailing-group-module'); ?> : </label>
     418                        <div><h3><?php esc_html_e("Archive", 'wp-mailing-group'); ?></h3></div>
     419                        <div class="form-field">
     420
     421                            <label for="tag-name"><?php esc_html_e("Auto-delete old messages", 'wp-mailing-group'); ?> : </label>
     422
     423                            <input type="radio" name="auto_delete" id="auto_delete_no" value="0" <?php echo esc_attr($auto_delete == '0' ? 'checked' : ''); ?> checked="checked" disabled="disabled" />&nbsp;<?php esc_html_e("No", 'wp-mailing-group'); ?>&nbsp;
     424
     425                            <input type="radio" name="auto_delete" disabled="disabled" value="1" id="auto_delete_yes" <?php echo esc_attr($auto_delete == '1' ? 'checked' : ''); ?> />&nbsp;<?php esc_html_e("Yes, after", 'wp-mailing-group'); ?>&nbsp;
     426
     427                            <input type="text" name="auto_delete_limit" disabled="disabled" id="auto_delete_limit" size="5" maxlength="2" value="<?php echo esc_attr($auto_delete_limit); ?>"/>&nbsp;<?php esc_html_e("days", 'wp-mailing-group'); ?>
     428
     429                            <br /><p class="noteclass">(<?php esc_html_e("Auto-deletion in Premium version only", 'wp-mailing-group'); ?>)</p>
     430
     431                        </div>
     432                                                <div><h3><?php esc_html_e("Footer", 'wp-mailing-group'); ?></h3></div>
     433                        <div class="form-field">
     434
     435                            <label for="tag-name"><?php esc_html_e("Footer text for emails", 'wp-mailing-group'); ?> : </label>
     436
     437                            <textarea name="footer_text" id="footer_text" rows="10" cols="80"><?php echo esc_textarea($footer_text); ?></textarea>
     438
     439                        </div>
     440
     441                        <div class="form-field">
     442                            <label for="tag-name"><?php esc_html_e("Available Variables", 'wp-mailing-group'); ?> : </label>
    446443                            <p class="codeexample"><code class="codemail">
    447                                 {%name%} = <?php _e("Name of the receiving member", 'mailing-group-module'); ?><br />
    448                                 {%email%} = <?php _e("Email of the receiving member", 'mailing-group-module'); ?><br />
    449                                 {%site_url%} = <?php _e("Site's URL", 'mailing-group-module'); ?><br />
    450                                 {%archive_url%} = <?php _e("Message Archive page URL", 'mailing-group-module'); ?><br />
    451                                 (<?php _e("- Message Archive in Premium version only", 'mailing-group-module'); ?>) <br />
    452                                 {%profile_url%} = <?php _e("User profile URL", 'mailing-group-module'); ?><br />
    453                                 {%unsubscribe_url%} = <?php _e("Unsubscribe URL", 'mailing-group-module'); ?><br />
    454                                 {%sender_email%} = <?php _e("Available in Premium Version Only - Email of user who sent the email", 'mailing-group-module');?>
     444                                {%name%} = <?php esc_html_e("Name of the receiving member", 'wp-mailing-group'); ?><br />
     445                                {%email%} = <?php esc_html_e("Email of the receiving member", 'wp-mailing-group'); ?><br />
     446                                {%site_url%} = <?php esc_html_e("Site's URL", 'wp-mailing-group'); ?><br />
     447                                {%archive_url%} = <?php esc_html_e("Message Archive page URL", 'wp-mailing-group'); ?><br />
     448                                (<?php esc_html_e("- Message Archive in Premium version only", 'wp-mailing-group'); ?>) <br />
     449                                {%profile_url%} = <?php esc_html_e("User profile URL", 'wp-mailing-group'); ?><br />
     450                                {%unsubscribe_url%} = <?php esc_html_e("Unsubscribe URL", 'wp-mailing-group'); ?><br />
     451                                {%sender_email%} = <?php esc_html_e("Available in Premium Version Only - Email of user who sent the email", 'wp-mailing-group');?>
    455452                            </code>
    456453                            </p>
    457454                        </div>
    458455
    459                         <div><h3><?php _e("Settings for Subscription Request messages", 'mailing-group-module'); ?></h3></div>
    460 
    461                         <div class="form-field">
    462 
    463                             <label for="tag-name"><?php _e("Sender name", 'mailing-group-module'); ?> : </label>
    464 
    465                             <input type="text" size="40" id="sender_name" name="sender_name" value="<?php echo (isset($sender_name) && $sender_name!=''?$sender_name:_e("e.g. Mailing Group Name Administrator", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. Mailing Group Name Administrator", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php _e("e.g. Mailing Group Name Administrator", 'mailing-group-module') ?>'; }"/>
    466 
    467                         </div>
    468 
    469                         <div class="form-field">
    470 
    471                             <label for="tag-name"><?php _e("Sender email", 'mailing-group-module'); ?> : </label>
    472 
    473                             <input type="text" size="40" id="sender_email" name="sender_email" value="<?php echo (isset($sender_email) && $sender_email!=''?$sender_email:_e("e.g. [email protected]", 'mailing-group-module')); ?>" onfocus="if(this.value=='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php _e("e.g. [email protected]", 'mailing-group-module') ?>'; }"/>
     456                        <div><h3><?php esc_html_e("Settings for Subscription Request messages", 'wp-mailing-group'); ?></h3></div>
     457
     458                        <div class="form-field">
     459
     460                            <label for="tag-name"><?php esc_html_e("Sender name", 'wp-mailing-group'); ?> : </label>
     461
     462                            <input type="text" size="40" id="sender_name" name="sender_name" value="<?php echo esc_attr($sender_name); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. Mailing Group Name Administrator", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js(__("e.g. Mailing Group Name Administrator", 'wp-mailing-group')); ?>'; }"/>
     463
     464                        </div>
     465
     466                        <div class="form-field">
     467
     468                            <label for="tag-name"><?php esc_html_e("Sender email", 'wp-mailing-group'); ?> : </label>
     469
     470                            <input type="text" size="40" id="sender_email" name="sender_email" value="<?php echo esc_attr($sender_email); ?>" onfocus="if(this.value=='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'){ this.value=''; }" onblur="if(this.value==''){ this.value='<?php echo esc_js(__("e.g. [email protected]", 'wp-mailing-group')); ?>'; }"/>
    474471
    475472                        </div>
     
    479476                        <div class="form-field">
    480477
    481                             <label for="tag-name"><?php _e("Reply To", 'mailing-group-module'); ?> : </label>
     478                            <label for="tag-name"><?php esc_html_e("Reply To", 'wp-mailing-group'); ?> : </label>
    482479
    483480                           
     
    486483                        <div class="clearbth"></div>
    487484
    488                         <div><h3><?php _e("Mailing Group Status", 'mailing-group-module'); ?></h3></div>
    489 
    490                         <div class="form-field">
    491 
    492                             <label for="tag-name"><?php _e("Status", 'mailing-group-module'); ?> : </label>
     485                        <div><h3><?php esc_html_e("Mailing Group Status", 'wp-mailing-group'); ?></h3></div>
     486
     487                        <div class="form-field">
     488
     489                            <label for="tag-name"><?php esc_html_e("Status", 'wp-mailing-group'); ?> : </label>
    493490
    494491                            <select name="status" id="status">
    495                                 <option value="1" <?php echo (isset($status) && $status=='1'?"selected":""); ?>><?php _e("Active", 'mailing-group-module'); ?></option>
    496                                 <option value="0" <?php echo (isset($status) && $status=='0'?"selected":""); ?>><?php _e("Inactive", 'mailing-group-module'); ?></option>
     492                                <option value="1" <?php echo esc_attr($status == '1' ? 'selected' : ''); ?>><?php esc_html_e("Active", 'wp-mailing-group'); ?></option>
     493                                <option value="0" <?php echo esc_attr($status == '0' ? 'selected' : ''); ?>><?php esc_html_e("Inactive", 'wp-mailing-group'); ?></option>
    497494                            </select>
    498495
     
    501498                        <div class="clearbth"></div>
    502499                        <div class="form-field">
    503                             <label for="tag-name"><?php _e("Visibility", 'mailing-group-module'); ?> : </label>
     500                            <label for="tag-name"><?php esc_html_e("Visibility", 'wp-mailing-group'); ?> : </label>
    504501                            <select name="visibility" id="visibility">
    505                                 <option value="1" <?php echo (isset($visibility) && $visibility=='1'?"selected":""); ?>><?php _e("Public", 'mailing-group-module'); ?></option>
    506                                 <option value="2" <?php echo (isset($visibility) && $visibility=='2'?"selected":""); ?> <?php echo (isset($visibility) && $visibility==''?"selected":"")?>><?php _e("Invitation", 'mailing-group-module'); ?></option>
    507                                 <option value="3" <?php echo (isset($visibility) && $visibility=='3'?"selected":""); ?> <?php echo (isset($visibility) && $visibility==''?"selected":"")?>><?php _e("Private", 'mailing-group-module'); ?></option>
     502                                <option value="1" <?php echo esc_attr($visibility == '1' ? 'selected' : ''); ?>><?php esc_html_e("Public", 'wp-mailing-group'); ?></option>
     503                                <option value="2" <?php echo esc_attr($visibility == '2' || $visibility == '' ? 'selected' : ''); ?>><?php esc_html_e("Invitation", 'wp-mailing-group'); ?></option>
     504                                <option value="3" <?php echo esc_attr($visibility == '3' || $visibility == '' ? 'selected' : ''); ?>><?php esc_html_e("Private", 'wp-mailing-group'); ?></option>
    508505                            </select>
    509506                        </div>
    510507                        <div class="form-field">
    511                             <label for="tag-name"><?php _e('Digest Mode', 'mailing-group-module'); ?> : </label>
     508                            <label for="tag-name"><?php esc_html_e('Digest Mode', 'wp-mailing-group'); ?> : </label>
    512509                            <select disabled>
    513                                 <option><?php _e('Email', 'mailing-group-module'); ?></option>
    514                                 <option><?php _e('Digest Email', 'mailing-group-module'); ?></option>
     510                                <option><?php esc_html_e('Email', 'wp-mailing-group'); ?></option>
     511                                <option><?php esc_html_e('Digest Email', 'wp-mailing-group'); ?></option>
    515512                            </select>
    516                                <p class="noteclass"><?php _e('<span style="colour=black;font-weight:bold;">Digest Mode in Premium version only</span>', 'mailing-group-module'); ?></p>
     513                               <p class="noteclass"><?php esc_html_e('Digest Mode in Premium version only', 'wp-mailing-group'); ?></p>
    517514                            <p class="noteclass">
    518                                 <?php _e('- Email: You will receive each email individually as they are sent.<br>
    519                                 - Digest Email: (receive e-mail approximately one e-mail per day) you get up to 25 full new messages bundled into a single e-mail. <a target="_blank" href="https://www.wpmailinggroup.com/feature-list/">Check out premium features</a>');?>
     515                                <?php esc_html_e('- Email: You will receive each email individually as they are sent.
     516                                - Digest Email: (receive e-mail approximately one e-mail per day) you get up to 25 full new messages bundled into a single e-mail. Check out premium features', 'wp-mailing-group'); ?>
    520517                            </p>
    521518                         
    522519                        </div>
    523520                        <div class="form-field">
    524                             <label><?php _e('Reply-To Email', 'mailing-group-module'); ?> : </label>
     521                            <label><?php esc_html_e('Reply-To Email', 'wp-mailing-group'); ?> : </label>
    525522                            <select disabled>
    526523                             
    527                                 <option><?php _e('Sender Email', 'mailing-group-module'); ?></option>
    528                                 <option><?php _e('Group Email', 'mailing-group-module'); ?></option>
    529                                 <option><?php _e('Custom Email', 'mailing-group-module'); ?></option>
     524                                <option><?php esc_html_e('Sender Email', 'wp-mailing-group'); ?></option>
     525                                <option><?php esc_html_e('Group Email', 'wp-mailing-group'); ?></option>
     526                                <option><?php esc_html_e('Custom Email', 'wp-mailing-group'); ?></option>
    530527                            </select>
    531                             <p class="noteclass"><?php _e('Select reply destination to be original sender or custom email. <span style="colour=black;font-weight:bold;">Available in Premium version only <a target ="_blank" href="https://www.wpmailinggroup.com/feature/send-email-to-original-sender/">Read More</a></span>', 'mailing-group-module'); ?></p>
     528                            <p class="noteclass"><?php esc_html_e('Select reply destination to be original sender or custom email. <span style="colour=black;font-weight:bold;">Available in Premium version only <a target ="_blank" href="https://www.wpmailinggroup.com/feature/send-email-to-original-sender/">Read More</a></span>', 'wp-mailing-group'); ?></p>
    532529                        </div>
    533530                        <p>&nbsp;</p>
    534531                        <div class="form-field">
    535532                            <label for="tag-name">&nbsp;</label>
    536                             <input type="submit" value="<?php echo $btn; ?>" class="button" id="submit" name="submit"/>
     533                            <input type="submit" value="<?php echo esc_attr($btn); ?>" class="button" id="submit" name="submit"/>
    537534                        </div>
    538535
    539536                        <p class="submit">
    540                             <input type="hidden" name="addme" value=<?php echo $hidval;?> >
    541                             <input type="hidden" name="id" value=<?php echo (isset($id))?$id:'';?> >
     537                            <input type="hidden" name="addme" value="<?php echo esc_attr($hidval);?>" >
     538                            <input type="hidden" name="id" value="<?php echo esc_attr(isset($id) ? $id : ''); ?>" >
    542539                            <input type="hidden" name="action" value="wpmg_addmailgroupsetting" />
    543540                            <input type="hidden" name="page" value="wpmg_mailinggroup_add" />
  • wp-mailing-group/trunk/template/mg_mailinggrouplist.php

    r1638294 r3252678  
    1 
    21<?php
    32
    43/* get all variables */
    54
    6 $info   = (isset($_REQUEST["info"])? sanitize_text_field($_REQUEST["info"]): '');
    7 
    8 $delid  = (isset($_GET["did"])? sanitize_text_field($_GET["did"]): '');
     5$info   = (isset($_REQUEST["info"]) ? sanitize_text_field($_REQUEST["info"]) : '');
     6
     7$delid  = (isset($_GET["did"]) ? sanitize_text_field($_GET["did"]) : '');
    98
    109/* get all variables */
    1110
    12 if($info=="del") {
    13 
    14     $wpdb->query("delete from ".$table_name_group." where id=".$delid);
    15 
    16     $wpdb->query("delete from ".$table_name_requestmanager_taxonomy." where group_id=".$delid);
    17 
    18     wpmg_showmessages("updated", __("Mailing group has been deleted successfully.", 'mailing-group-module'));
    19 
     11if ($info == "del") {
     12
     13    $wpdb->query("delete from " . $table_name_group . " where id=" . $delid);
     14
     15    $wpdb->query("delete from " . $table_name_requestmanager_taxonomy . " where group_id=" . $delid);
     16
     17    wpmg_showmessages("updated", __("Mailing group has been deleted successfully.", 'wp-mailing-group'));
    2018}
    2119
     
    5351
    5452    <script type="text/javascript">
    55 
    56         jQuery(document).ready(function() {
    57 
    58             /* Build the DataTable with third column using our custom sort functions */
    59 
    60             <?php if(count($result)>0) { ?>
    61 
    62             //jQuery('#mailinggrouplist').dataTable();
     53        jQuery(document).ready(function() {
     54
     55            /* Build the DataTable with third column using our custom sort functions */
     56
     57            <?php if (count($result) > 0) { ?>
     58
     59                //jQuery('#mailinggrouplist').dataTable();
    6360
    6461            <?php } ?>
    6562
    66             jQuery('.quick_edit').click(function(){ jQuery('#mailinggrouplist > tbody  > tr').each(function() { jQuery(this).closest('tr').css("background-color","#F9F9F9"); }); jQuery(this).closest('tr').css("background-color","#FEA03D"); jQuery("#mg_loading").show(); var thisId = this.name; var data = { action: 'wpmg_addeditmailinggroup', page: 'wpmg_mailinggroup_add',id:thisId,act:"upd"}; jQuery.post(ajaxurl, data, function(response) {jQuery("#mg_loading").hide(); jQuery("#ajaxContent").html(response);});})
    67 
    68             jQuery('#quick_add').click(function(){ jQuery("#mg_loading").show(); var data = { action: 'wpmg_addeditmailinggroup', page: 'wpmg_mailinggroup_add',act:"add"}; jQuery.post(ajaxurl, data, function(response) {jQuery("#mg_loading").hide(); jQuery("#ajaxContent").html(response);});});});
    69 
    70             function showdatatable() { var data = { action: 'wpmg_mailinggrouplisting',page: 'wpmg_mailinggroup_list'}; jQuery.post(ajaxurl, data, function(response) { jQuery("#mail_listing").html(response);}); }
    71 
    72     </script>
    73 
    74     <h2><?php _e("Mailing Groups", 'mailing-group-module');?>
    75 
    76     <?php if( $plugintype == 'FREE' && count($result) > 0 ) { } else {?> <a class="button add-new-h2" id="quick_add" href="#"><?php _e("Add New Mailing Group", 'mailing-group-module');?></a> <?php } ?>
    77 
    78     </h2>
    79 
    80     <p>
    81 
    82     <?php echo sprintf( __("<p>Your Mailing Group can be added and configured below. Only one Mailing Group is available in this Free plugin. Just click 'Add New Mailing Group' to get started. The Premium plugin supports unlimited Mailing Groups for all your different group needs. Why not <a href='%s' target='_blank'>upgrade now</a>?"), $websiteurl ); ?></p>
    83 
    84     <?php echo sprintf( __("<h2>Mailing Group Icons Explained:</h2>"), $websiteurl ); ?></p>
    85    
     63            jQuery('.quick_edit').click(function() {
     64                jQuery('#mailinggrouplist > tbody  > tr').each(function() {
     65                    jQuery(this).closest('tr').css("background-color", "#F9F9F9");
     66                });
     67                jQuery(this).closest('tr').css("background-color", "#FEA03D");
     68                jQuery("#mg_loading").show();
     69                var thisId = this.name;
     70                var data = {
     71                    action: 'wpmg_addeditmailinggroup',
     72                    page: 'wpmg_mailinggroup_add',
     73                    id: thisId,
     74                    act: "upd"
     75                };
     76                jQuery.post(ajaxurl, data, function(response) {
     77                    jQuery("#mg_loading").hide();
     78                    jQuery("#ajaxContent").html(response);
     79                });
     80            })
     81
     82            jQuery('#quick_add').click(function() {
     83                jQuery("#mg_loading").show();
     84                var data = {
     85                    action: 'wpmg_addeditmailinggroup',
     86                    page: 'wpmg_mailinggroup_add',
     87                    act: "add"
     88                };
     89                jQuery.post(ajaxurl, data, function(response) {
     90                    jQuery("#mg_loading").hide();
     91                    jQuery("#ajaxContent").html(response);
     92                });
     93            });
     94        });
     95
     96        function showdatatable() {
     97            var data = {
     98                action: 'wpmg_mailinggrouplisting',
     99                page: 'wpmg_mailinggroup_list'
     100            };
     101            jQuery.post(ajaxurl, data, function(response) {
     102                jQuery("#mail_listing").html(response);
     103            });
     104        }
     105    </script>
     106
     107    <h2><?php esc_html_e("Mailing Groups", 'wp-mailing-group'); ?>
     108
     109        <?php if ($plugintype == 'FREE' && count($result) > 0) {
     110        } else { ?> <a class="button add-new-h2" id="quick_add" href="#"><?php esc_html_e("Add New Mailing Group", 'wp-mailing-group'); ?></a> <?php } ?>
     111
     112    </h2>
     113
     114    <p>
     115
     116        <?php
     117        /* translators: %s: URL to the premium plugin page */
     118        echo sprintf(__("<p>Your Mailing Group can be added and configured below. Only one Mailing Group is available in this Free plugin. Just click 'Add New Mailing Group' to get started. The Premium plugin supports unlimited Mailing Groups and includes many extra features like message archiving, member management, and more.</p>", 'wp-mailing-group'), $websiteurl);
     119        ?>
     120
     121        <?php
     122        /* translators: %s: URL to the premium plugin page */
     123        echo sprintf(__("Mailing Group Icons Explained:", 'wp-mailing-group'), $websiteurl);
     124        ?>
     125
     126    </p>
     127
    86128    <div class="wpmg_mailing_group_icons"></div>
    87    
    88     <br/>
    89    
    90      <table class="wp-list-table widefat fixed" id="mailinggrouplist">
     129
     130    <br />
     131
     132    <table class="wp-list-table widefat fixed" id="mailinggrouplist">
    91133
    92134        <thead>
     
    94136            <tr role="row" class="topRow">
    95137
    96                 <th class="sort topRow_grouplist"><a href="#"><?php _e("Group Name", 'mailing-group-module');?></a></th>
    97 
    98                 <th class="sort topRow_grouplist"><a href="#"><?php _e("Email Address", 'mailing-group-module');?></a></th>
    99 
    100                 <th class="sort topRow_grouplist"><?php _e("Status", 'mailing-group-module');?></th>
    101 
    102                 <th width="22%"><?php _e("Actions", 'mailing-group-module');?></th>
     138                <th class="sort topRow_grouplist"><a href="#"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?></a></th>
     139
     140                <th class="sort topRow_grouplist"><a href="#"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?></a></th>
     141
     142                <th class="sort topRow_grouplist"><?php esc_html_e("Status", 'wp-mailing-group'); ?></th>
     143
     144                <th width="22%"><?php esc_html_e("Actions", 'wp-mailing-group'); ?></th>
    103145
    104146            </tr>
     
    108150        <tbody>
    109151
    110 <?php
    111 
    112     if ($totcount > 0 )
    113 
    114         {
    115 
    116             foreach ($result as $row)
    117 
    118             {
    119 
    120                 $id = $row->id;
    121 
    122                 $title = wpmg_dbStripslashes($row->title);
    123 
    124                 $email = wpmg_dbStripslashes($row->email);
    125 
    126                 $status = wpmg_dbStripslashes($row->status);
    127 
    128                 $archive_message = wpmg_dbStripslashes($row->archive_message);
    129 
    130     ?>
    131 
    132             <tr>
    133 
    134                 <td><?php echo $title; ?></td>
    135 
    136                 <td><?php echo $email; ?></td>
    137 
    138                 <td><?php echo ($status == '0' ? 'Inactive' : 'Active'); ?></td>
    139 
    140                 <td class="last">
    141 
    142                 <a class="add_subscriber" title="<?php _e("Add Subscriber", 'mailing-group-module');?>" href="admin.php?page=wpmg_mailinggroup_memberadd&act=add&gid=<?php echo $id; ?>"></a>
    143 
    144                 |<a class="view_users" title="<?php _e("View Members", 'mailing-group-module');?>" href="admin.php?page=wpmg_mailinggroup_memberlist&gid=<?php echo $id;?>"></a>
    145 
    146       |<a class="import_users" title="<?php _e("Import Users", 'mailing-group-module');?>" href="admin.php?page=wpmg_mailinggroup_importuser&gid=<?php echo $id;?>"></a>
    147      
    148                 |<a class="quick_edit edit_record" title="<?php _e("Edit", 'mailing-group-module');?>" name="<?php echo $id;?>" href="#"></a>|<a class="delete_record" title="<?php _e("Delete", 'mailing-group-module');?>" href="admin.php?page=wpmg_mailinggroup_list&info=del&did=<?php echo $id;?>" onclick="return confirm('<?php _e("Are you sure you want to delete this group?", 'mailing-group-module');?>');"></a></td>
    149 
    150             </tr>
    151 
    152 <?php }
    153 
    154     } else { ?>
    155 
    156             <tr>
    157 
    158                 <td colspan="3" align="center"><?php _e("Click 'Add New Mailing Group' to get started", 'mailing-group-module');?></td>
    159 
    160             <tr>
    161 
    162     <?php } ?>
    163 
    164     </tbody>
     152            <?php
     153
     154            if ($totcount > 0) {
     155
     156                foreach ($result as $row) {
     157
     158                    $id = $row->id;
     159
     160                    $title = wpmg_dbStripslashes($row->title);
     161
     162                    $email = wpmg_dbStripslashes($row->email);
     163
     164                    $status = wpmg_dbStripslashes($row->status);
     165
     166                    $archive_message = wpmg_dbStripslashes($row->archive_message);
     167
     168            ?>
     169
     170                    <tr>
     171
     172                        <td><?php echo esc_html($title); ?></td>
     173
     174                        <td><?php echo esc_html($email); ?></td>
     175
     176                        <td><?php echo ($status == '0' ? esc_html__('Inactive', 'wp-mailing-group') : esc_html__('Active', 'wp-mailing-group')); ?></td>
     177
     178                        <td class="last">
     179
     180                            <a class="add_subscriber" title="<?php esc_attr_e("Add Subscriber", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_memberadd&act=add&gid=<?php echo esc_attr($id); ?>"></a>
     181
     182                            |<a class="view_users" title="<?php esc_attr_e("View Members", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_memberlist&gid=<?php echo esc_attr($id); ?>"></a>
     183
     184                            |<a class="import_users" title="<?php esc_attr_e("Import Users", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_importuser&gid=<?php echo esc_attr($id); ?>"></a>
     185
     186                            |<a class="quick_edit edit_record" title="<?php esc_attr_e("Edit", 'wp-mailing-group'); ?>" name="<?php echo esc_attr($id); ?>" href="#"></a>|<a class="delete_record" title="<?php esc_attr_e("Delete", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_list&info=del&did=<?php echo esc_attr($id); ?>" onclick="return confirm('<?php echo esc_js(__("Are you sure you want to delete this group?", 'wp-mailing-group')); ?>');"></a>
     187                        </td>
     188
     189                    </tr>
     190
     191                <?php }
     192            } else { ?>
     193
     194                <tr>
     195
     196                    <td colspan="3" align="center"><?php esc_html_e("Click 'Add New Mailing Group' to get started", 'wp-mailing-group'); ?></td>
     197
     198                <tr>
     199
     200                <?php } ?>
     201
     202        </tbody>
    165203
    166204    </table>
    167     <div id="mg_loading" class="mg_loading" style="display:none;"></div>
     205    <div id="mg_loading" class="mg_loading" style="display:none;"></div>
    168206    <div id="ajaxContent" class="ajaxContent"></div>
    169207
  • wp-mailing-group/trunk/template/mg_mailingrequest.php

    r2183890 r3252678  
    4343            } else {
    4444
    45                 $addRequesttodb = $objMem->selectRows($table_name_requestmanager, "",  " where id = '".$UpdId."'");
     45                $addRequesttodb = $objMem->selectRowsV2($table_name_requestmanager, "",  " where id = '".$UpdId."'");
    4646
    4747                $random_password = wp_generate_password( 12, false );
     
    8181                        'role' => 'subscriber' );
    8282
    83                     /* //print_r($userdata); */
    84 
    85                     $user_id = wp_insert_user( $userdata );
    86 
    87                     $msg = "";
    88 
    89                     if(is_numeric($user_id)) {
    90 
    91                         /* //echo "<br>---".$user_id; */
    92 
    93                         wp_new_user_notification($user_id, $random_password);
    94 
    95                         add_user_meta( $user_id, "Plugin", "groupmailing" );
    96 
    97                         add_user_meta( $user_id, "User_status", $status );
    98 
    99                         $gropArray = array($gid=>$group_name[$gid]);
    100 
    101                         add_user_meta( $user_id, "Group_subscribed", serialize($gropArray) );
    102 
    103                         $objMem->addUserGroupTaxonomy($table_name_user_taxonomy, $user_id, $gropArray);
     83                        /* //print_r($userdata); */
     84
     85                        $user_id = wp_insert_user( $userdata );
     86
     87                        $msg = "";
     88
     89                        if(is_numeric($user_id)) {
     90
     91                            /* //echo "<br>---".$user_id; */
     92
     93                            wp_new_user_notification($user_id, $random_password);
     94
     95                            add_user_meta( $user_id, "Plugin", "groupmailing" );
     96
     97                            add_user_meta( $user_id, "User_status", $status );
     98
     99                            $gropArray = array($gid=>$group_name[$gid]);
     100
     101                            add_user_meta( $user_id, "Group_subscribed", serialize($gropArray) );
     102
     103                            $objMem->addUserGroupTaxonomy($table_name_user_taxonomy, $user_id, $gropArray);
     104
     105                            if(count($group_name)>1) {
     106
     107                                 $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
     108
     109                            } else {
     110
     111                                $myFields=array("status");
     112
     113                                $_ARR['id'] = $UpdId;
     114
     115                                $_ARR['status'] = $status;
     116
     117                                $objMem->updRowV2($table_name_requestmanager,$_ARR, $myFields);
     118
     119                            }
     120
     121                        }
     122
     123                        wpmg_sendGroupConfirmationtoMember($user_id, $gropArray);
     124
     125                } else {
     126
     127                    if($username_e || $email_e) {
     128
     129                        $userId = (is_numeric($username_e)?$username_e:$email_e);
     130
     131                        if(is_numeric($userId)) {
     132
     133                            $usergroupnames = get_user_meta($userId, "Group_subscribed", true);
     134
     135                            $group_name_new = unserialize($usergroupnames);
     136
     137                            if(!in_array($gid, $group_name_new)) {
     138
     139                                $group_name_new[$gid] = $group_name[$gid];
     140
     141                            }
     142
     143                            update_user_meta( $userId, "Group_subscribed", serialize($group_name_new) );
     144
     145                            $objMem->updUserGroupTaxonomy($table_name_user_taxonomy, $userId, $group_name_new);
     146
     147                            if(count($group_name)>1) {
     148
     149                                $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
     150
     151                            } else {
     152
     153                                $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
     154
     155                                $myFields=array("status");
     156
     157                                $_ARR['id'] = $UpdId;
     158
     159                                $_ARR['status'] = $status;
     160
     161                                $objMem->updRowV2($table_name_requestmanager,$_ARR, $myFields);
     162
     163                            }
     164
     165                        }
     166
     167                    }
     168
     169                }
     170
     171            }
     172
     173        } else if($mact=='2'){
     174
     175            $addRequesttodb = $objMem->selectRowsV2($table_name_requestmanager, "",  " where id = '".$delid."'");
     176
     177            $groupArr = $objMem->getUserGroup($table_name_requestmanager_taxonomy, $delid);
     178
     179            if(count($groupArr)>1) {
     180
     181                $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$delid);
     182
     183            } else {
     184
     185                $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$delid);
     186
     187                $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name_requestmanager." WHERE id = %d", $delid));
     188
     189            }
     190
     191        }
     192
     193    }
     194
     195    wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=mass&type=".$mact);
     196
     197    exit;
     198
     199}
     200
     201
     202
     203if($actreq=='app') {
     204
     205    $addRequesttodb = $objMem->selectRowsV2($table_name_requestmanager, "",  " where id = '".$UpdId."'");
     206
     207    $random_password = wp_generate_password( 12, false );
     208
     209    $name = $addRequesttodb[0]->name;
     210
     211    $email = $addRequesttodb[0]->email;
     212
     213    $username = $addRequesttodb[0]->username;
     214
     215    $group_name =  $objMem->getUserGroup($table_name_requestmanager_taxonomy, $UpdId);
     216
     217    $usercount = $objMem->getGroupUserCount($table_name_user_taxonomy, $gid);
     218
     219    $usercount = count($usercount);
     220
     221    if($usercount>=$memberLimit) {
     222
     223        wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=free");
     224
     225        exit;
     226
     227    } else {
     228
     229        /* //echo "<pre>";
     230
     231        //print_r($group_name); */
     232
     233        if(trim($username)=="") {
     234
     235            $username = $email;
     236
     237        }
     238
     239        $status = "1";
     240
     241        $username_e = username_exists( $username );
     242
     243        $email_e = email_exists($email);
     244
     245        if(isset($user_id) ===  FALSE && email_exists($email) === FALSE){
     246
     247            $userdata = array(
     248
     249                'user_login' => $username,
     250
     251                'first_name' => $name,
     252
     253                'user_pass' => $random_password,
     254
     255                'user_email' => $email,
     256
     257                'role' => 'subscriber' );
     258
     259                /* //print_r($userdata); */
     260
     261                $user_id = wp_insert_user( $userdata );
     262
     263                /* //wp_new_user_notification($user_id, $random_password); */
     264
     265                $msg = "";
     266
     267                if(is_numeric($user_id)) {
     268
     269                    /* //echo "<br>---".$user_id; */
     270
     271                    wp_new_user_notification($user_id, $random_password);
     272
     273                    add_user_meta( $user_id, "Plugin", "groupmailing" );
     274
     275                    add_user_meta( $user_id, "User_status", $status );
     276
     277                    $gropArray = array($gid=>$group_name[$gid]);
     278
     279                    add_user_meta( $user_id, "Group_subscribed", serialize($gropArray) );
     280
     281                    $objMem->addUserGroupTaxonomy($table_name_user_taxonomy, $user_id, $gropArray);
     282
     283                    if(count($group_name)>1) {
     284
     285                        /* //echo "<br> in delete---"; */
     286
     287                         $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
     288
     289                    } else {
     290
     291                        $myFields=array("status");
     292
     293                        $_ARR['id'] = $UpdId;
     294
     295                        $_ARR['status'] = $status;
     296
     297                        $objMem->updRowV2($table_name_requestmanager,$_ARR, $myFields);
     298
     299                    }
     300
     301                    wpmg_sendGroupConfirmationtoMember($user_id, $gropArray);
     302
     303                    wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=app");
     304
     305                    exit;
     306
     307                } else {
     308
     309                    foreach($user_id->errors as $errr) {
     310
     311                        $msg .= $errr[0];
     312
     313                    }
     314
     315                    wpmg_showmessages("error", $msg);
     316
     317                }
     318
     319            } else {
     320
     321                if($username_e || $email_e) {
     322
     323                    $userId = (is_numeric($username_e)?$username_e:$email_e);
     324
     325                    if(is_numeric($userId)) {
     326
     327                        $usergroupnames = get_user_meta($userId, "Group_subscribed", true);
     328
     329                        $group_name_new = unserialize($usergroupnames);
     330
     331                        if(!in_array($gid, $group_name_new)) {
     332
     333                            $group_name_new[$gid] = $group_name[$gid];
     334
     335                        }
     336
     337                        update_user_meta( $userId, "Group_subscribed", serialize($group_name_new) );
     338
     339                        $objMem->updUserGroupTaxonomy($table_name_user_taxonomy, $userId, $group_name_new);
    104340
    105341                        if(count($group_name)>1) {
    106342
    107                              $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
     343                            $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
    108344
    109345                        } else {
    110346
     347                            $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$UpdId);
     348
    111349                            $myFields=array("status");
    112350
     
    115353                            $_ARR['status'] = $status;
    116354
    117                             $objMem->updRow($table_name_requestmanager,$_ARR, $myFields);
     355                            $objMem->updRowV2($table_name_requestmanager,$_ARR, $myFields);
    118356
    119357                        }
     
    123361                    wpmg_sendGroupConfirmationtoMember($user_id, $gropArray);
    124362
     363                    wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=upd2");
     364
     365                    exit;
     366
     367                }
     368
     369            }
     370
     371        }
     372
     373} else if($actreq=='del') {
     374
     375    $addRequesttodb = $objMem->selectRowsV2($table_name_requestmanager, "",  " where id = '".$delid."'");
     376
     377    $groupArr = $objMem->getUserGroup($table_name_requestmanager_taxonomy, $delid);
     378
     379    if(count($groupArr)>1) {
     380
     381        $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$delid);
     382
     383        wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=upd");
     384
     385        exit;
     386
     387    } else {
     388
     389        $objMem->deleteUserGroupV2($table_name_requestmanager_taxonomy,$gid,$delid);
     390
     391        $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name_requestmanager." WHERE id = %d", $delid));
     392
     393        wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=del");
     394
     395        exit;
     396
     397    }
     398
     399} else if($actreq=='delsubs') {
     400
     401    $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name_requestmanager." WHERE id = %d", $delid));
     402
     403    wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=delsubs");
     404
     405    exit;
     406
     407}
     408
     409if($info=="app") {
     410
     411    wpmg_showmessages("updated", __("Subscription request has been approved successfully.", 'wp-mailing-group'));
     412
     413} else if($info=="upd") {
     414
     415    wpmg_showmessages("updated", __("Subscription request has been updated successfully.", 'wp-mailing-group'));
     416
     417} else if($info=="upd2") {
     418
     419    wpmg_showmessages("updated", __("Subscription request was already registered, groups updated successfully.", 'wp-mailing-group'));
     420
     421} else if($info=="del") {
     422
     423    wpmg_showmessages("updated", __("Subscription request has been rejected successfully.", 'wp-mailing-group'));
     424
     425} else if($info=="delsubs") {
     426
     427    wpmg_showmessages("updated", __("Subscription request has been deleted successfully.", 'wp-mailing-group'));
     428
     429} else if($info=="saved") {
     430
     431    wpmg_showmessages("updated", __("Subscription request has been added successfully. Now approve the request to activate the membership.", 'wp-mailing-group'));
     432
     433}  else if($info=="free") {
     434
     435    wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'wp-mailing-group'));
     436
     437} else if($info=="mass") {
     438
     439    if($type=='1') {
     440
     441        wpmg_showmessages("updated", __("Subscription request(s) has been added successfully.", 'wp-mailing-group'));
     442
     443    } else if($type=='2') {
     444
     445        wpmg_showmessages("updated", __("Subscription request(s) has been rejected successfully.", 'wp-mailing-group'));
     446
     447    } else if($type=='3') {
     448
     449        wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'wp-mailing-group'));
     450
     451    }
     452
     453}
     454
     455$result = $objMem->selectRowsV2($table_name_requestmanager, "",  " where status = '0' order by id desc");
     456
     457$totcount = count($result);
     458
     459if ($totcount>0) {
     460
     461?>
     462
     463<script type="text/javascript">
     464
     465    jQuery(document).ready(function() {
     466
     467        jQuery('#mailingrequestmanager').dataTable( {
     468
     469            "aoColumnDefs":[{"bSortable": false, "aTargets": [ 0, 3, 4 ]}],
     470
     471            "fnDrawCallback":function(){
     472
     473                if('<?php echo $totcount; ?>'<=5){
     474
     475                    document.getElementById('mailingrequestmanager_paginate').style.display = "none";
     476
    125477                } else {
    126478
    127                     if($username_e || $email_e) {
    128 
    129                         $userId = (is_numeric($username_e)?$username_e:$email_e);
    130 
    131                         if(is_numeric($userId)) {
    132 
    133                             $usergroupnames = get_user_meta($userId, "Group_subscribed", true);
    134 
    135                             $group_name_new = unserialize($usergroupnames);
    136 
    137                             if(!in_array($gid, $group_name_new)) {
    138 
    139                                 $group_name_new[$gid] = $group_name[$gid];
     479                    document.getElementById('mailingrequestmanager_paginate').style.display = "block";
     480
     481                }
     482
     483            }
     484
     485        });
     486
     487    });
     488
     489</script>
     490
     491<?php } ?>
     492
     493<div class="wrap">
     494
     495    <h2 class="nav-tab-wrapper">
     496
     497        <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php esc_html_e("Subscription Request Manager", 'wp-mailing-group'); ?>" class="nav-tab nav-tab-active"><?php esc_html_e("Subscription Request Manager", 'wp-mailing-group'); ?></a>
     498
     499        <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab" title="<?php esc_html_e("Add New Subscriber", 'wp-mailing-group'); ?>"><?php esc_html_e("Add New Subscriber", 'wp-mailing-group'); ?></a>
     500
     501     
     502
     503    </h2>
     504
     505    <div style="padding-top:20px; padding-bottom:25px;"><?php esc_html_e("Any new subscriber requests submitted via your website, or via the Add New Subscriber panel, will appear below. You need to use the plugin's shortcode to display the subscription request form on your website - see the Help tab in the General Settings for more information.", 'wp-mailing-group'); ?></div>
     506
     507    <form name="approvedeleterequest" id="approvedeleterequest" method="post">
     508
     509    <div class="tablenav top">
     510
     511        <div class="alignleft actions">
     512
     513            <select name="massaction" id="massaction">
     514                <option selected="selected" value=""><?php esc_html_e("Bulk actions", 'wp-mailing-group'); ?></option>
     515
     516                <option value="1"><?php esc_html_e("Approve Selected", 'wp-mailing-group'); ?></option>
     517
     518                <option value="2"><?php esc_html_e("Reject Selected", 'wp-mailing-group'); ?></option>
     519
     520            </select>
     521
     522            <input type="submit" id="doaction" name="Save" value="<?php esc_html_e("Apply", 'wp-mailing-group'); ?>" />
     523
     524        </div>
     525
     526        <br class="clear">
     527
     528    </div>
     529
     530    <table class="wp-list-table widefat fixed" id="mailingrequestmanager">
     531
     532        <thead>
     533
     534            <tr role="row" class="topRow header_tab">
     535
     536                <th width="8%">
     537
     538                    <input type="checkbox" id="selectorall" name="selectorall" value="1" />
     539
     540                </th>
     541
     542                <th width="25%" class="sort" style="cursor:pointer;"><a href="#"><?php esc_html_e("Name", 'wp-mailing-group'); ?></a></th>
     543
     544                <th class="sortemail"><a href="#"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?></a></th>
     545
     546                <th><?php esc_html_e("Group Name", 'wp-mailing-group'); ?></th>
     547
     548                <th width="10%"><?php esc_html_e("Actions", 'wp-mailing-group'); ?></th>
     549
     550            </tr>
     551
     552        </thead>
     553
     554        <tbody>
     555
     556<?php
     557
     558        if ($totcount > 0 )
     559
     560        {
     561
     562            foreach ($result as $row)
     563
     564            {
     565
     566                $id = $row->id;
     567
     568                $name = wpmg_dbStripslashes($row->name);
     569
     570                $email = wpmg_dbStripslashes($row->email);
     571
     572                $message_sent = $row->message_sent;
     573
     574                /* $group_name = wpmg_dbStripslashes($row->group_name); */
     575
     576                $status = $row->status;
     577
     578                $act = "hid";
     579
     580                $lablestatus = __("Visible", 'wp-mailing-group');
     581
     582                if($status==0) {
     583
     584                    $act = "vis";
     585
     586                    $lablestatus = __("Hidden", 'wp-mailing-group');
     587
     588                }
     589
     590                $result_groups = $objMem->getCompleteUserGroups($table_name_requestmanager_taxonomy, $table_name_group, $id);
     591
     592    ?>
     593
     594            <tr>
     595
     596                <td width="8%">
     597
     598                    <?php
     599
     600                    if(count($result_groups)>0) {
     601
     602                        foreach($result_groups as $groups) {
     603
     604                    ?>
     605
     606                            <input type="checkbox" class="selectorsubscription" id="selector" name="selectusers[]" value="<?php echo $id; ?>_<?php echo $groups->group_id;?>" id="" /><br />
     607
     608                    <?php
     609
     610                        }
     611
     612                    }
     613
     614                    ?>
     615
     616                </td>
     617
     618                <td width="25%"><?php echo $name; ?></td>
     619
     620                <td><?php echo $email; ?></td>
     621
     622                <td>
     623
     624                <?php
     625
     626                    if(count($result_groups)>0) {
     627
     628                        foreach($result_groups as $groups) {
     629
     630                            echo wpmg_dbStripslashes($groups->title)."<br>";
     631
     632                        }
     633
     634                    }
     635
     636                ?></td>
     637
     638                <td width="22%" class="last">
     639
     640                    <?php
     641
     642                        if(count($result_groups)>0) {
     643
     644                            $ijk = 1;
     645
     646                            foreach($result_groups as $groups) {
     647
     648                    ?>
     649
     650                                <a class="approve_record" title="<?php esc_html_e("Approve", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=app&id=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to approve this subscription request?", 'wp-mailing-group'); ?>');"></a>|<a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=del&did=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to reject this subscription request?", 'wp-mailing-group'); ?>');" title="<?php esc_html_e("Reject", 'wp-mailing-group'); ?>" class="reject_record"></a>|<a href="admin.php?page=wpmg_mailinggroup_sendmessage&act=upd&id=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>&TB_iframe=true&width=550&height=530" title="<?php esc_html_e("Send Message", 'wp-mailing-group'); ?>" class="send_mail thickbox"></a>
     651
     652                                <?php if(count($result_groups)!==$ijk) { ?>
     653
     654                                    <br />
     655
     656                                <?php } ?>
     657
     658                    <?php
     659
     660                                $ijk++;
     661
     662                            }
     663
     664                            if($message_sent>0) {
     665
     666                                echo "|<a href='#' title='Messages Sent'>(".$message_sent.")</a>";
    140667
    141668                            }
    142669
    143                             update_user_meta( $userId, "Group_subscribed", serialize($group_name_new) );
    144 
    145                             $objMem->updUserGroupTaxonomy($table_name_user_taxonomy, $userId, $group_name_new);
    146 
    147                             if(count($group_name)>1) {
    148 
    149                                 $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
    150 
    151                             } else {
    152 
    153                                 $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
    154 
    155                                 $myFields=array("status");
    156 
    157                                 $_ARR['id'] = $UpdId;
    158 
    159                                 $_ARR['status'] = $status;
    160 
    161                                 $objMem->updRow($table_name_requestmanager,$_ARR, $myFields);
    162 
    163                             }
     670                        } else {
     671
     672                    ?>
     673
     674                                <a class="reject_record" title="<?php esc_html_e("Delete", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=delsubs&did=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to delete this subscription request completely?", 'wp-mailing-group'); ?>');"></a>
     675
     676                    <?php
    164677
    165678                        }
    166679
    167                     }
    168 
    169                 }
    170 
    171             }
    172 
    173         } else if($mact=='2'){
    174 
    175             $addRequesttodb = $objMem->selectRows($table_name_requestmanager, "",  " where id = '".$delid."'");
    176 
    177             $groupArr = $objMem->getUserGroup($table_name_requestmanager_taxonomy, $delid);
    178 
    179             if(count($groupArr)>1) {
    180 
    181                 $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$delid);
    182 
    183             } else {
    184 
    185                 $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$delid);
    186 
    187                 $wpdb->query("delete from ".$table_name_requestmanager." where id=".$delid);
    188 
    189             }
    190 
    191         }
    192 
    193     }
    194 
    195     wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=mass&type=".$mact);
    196 
    197     exit;
    198 
    199 }
    200 
    201 
    202 
    203 if($actreq=='app') {
    204 
    205     $addRequesttodb = $objMem->selectRows($table_name_requestmanager, "",  " where id = '".$UpdId."'");
    206 
    207     $random_password = wp_generate_password( 12, false );
    208 
    209     $name = $addRequesttodb[0]->name;
    210 
    211     $email = $addRequesttodb[0]->email;
    212 
    213     $username = $addRequesttodb[0]->username;
    214 
    215     $group_name =  $objMem->getUserGroup($table_name_requestmanager_taxonomy, $UpdId);
    216 
    217     $usercount = $objMem->getGroupUserCount($table_name_user_taxonomy, $gid);
    218 
    219     $usercount = count($usercount);
    220 
    221     if($usercount>=$memberLimit) {
    222 
    223         wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=free");
    224 
    225         exit;
    226 
    227     } else {
    228 
    229         /* //echo "<pre>";
    230 
    231         //print_r($group_name); */
    232 
    233         if(trim($username)=="") {
    234 
    235             $username = $email;
    236 
    237         }
    238 
    239         $status = "1";
    240 
    241         $username_e = username_exists( $username );
    242 
    243         $email_e = email_exists($email);
    244 
    245         if(isset($user_id) ===  FALSE && email_exists($email) === FALSE){
    246 
    247             $userdata = array(
    248 
    249                 'user_login' => $username,
    250 
    251                 'first_name' => $name,
    252 
    253                 'user_pass' => $random_password,
    254 
    255                 'user_email' => $email,
    256 
    257                 'role' => 'subscriber' );
    258 
    259             /* //print_r($userdata); */
    260 
    261             $user_id = wp_insert_user( $userdata );
    262 
    263             /* //wp_new_user_notification($user_id, $random_password); */
    264 
    265             $msg = "";
    266 
    267             if(is_numeric($user_id)) {
    268 
    269                 /* //echo "<br>---".$user_id; */
    270 
    271                 wp_new_user_notification($user_id, $random_password);
    272 
    273                 add_user_meta( $user_id, "Plugin", "groupmailing" );
    274 
    275                 add_user_meta( $user_id, "User_status", $status );
    276 
    277                 $gropArray = array($gid=>$group_name[$gid]);
    278 
    279                 add_user_meta( $user_id, "Group_subscribed", serialize($gropArray) );
    280 
    281                 $objMem->addUserGroupTaxonomy($table_name_user_taxonomy, $user_id, $gropArray);
    282 
    283                 if(count($group_name)>1) {
    284 
    285                     /* //echo "<br> in delete---"; */
    286 
    287                      $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
    288 
    289                 } else {
    290 
    291                     $myFields=array("status");
    292 
    293                     $_ARR['id'] = $UpdId;
    294 
    295                     $_ARR['status'] = $status;
    296 
    297                     $objMem->updRow($table_name_requestmanager,$_ARR, $myFields);
    298 
    299                 }
    300 
    301                 wpmg_sendGroupConfirmationtoMember($user_id, $gropArray);
    302 
    303                 wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=app");
    304 
    305                 exit;
    306 
    307             } else {
    308 
    309                 foreach($user_id->errors as $errr) {
    310 
    311                     $msg .= $errr[0];
    312 
    313                 }
    314 
    315                 wpmg_showmessages("error", $msg);
    316 
    317             }
    318 
    319         } else {
    320 
    321             if($username_e || $email_e) {
    322 
    323                 $userId = (is_numeric($username_e)?$username_e:$email_e);
    324 
    325                 if(is_numeric($userId)) {
    326 
    327                     $usergroupnames = get_user_meta($userId, "Group_subscribed", true);
    328 
    329                     $group_name_new = unserialize($usergroupnames);
    330 
    331                     if(!in_array($gid, $group_name_new)) {
    332 
    333                         $group_name_new[$gid] = $group_name[$gid];
    334 
    335                     }
    336 
    337                     update_user_meta( $userId, "Group_subscribed", serialize($group_name_new) );
    338 
    339                     $objMem->updUserGroupTaxonomy($table_name_user_taxonomy, $userId, $group_name_new);
    340 
    341                     if(count($group_name)>1) {
    342 
    343                         $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
    344 
    345                     } else {
    346 
    347                         $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$UpdId);
    348 
    349                         $myFields=array("status");
    350 
    351                         $_ARR['id'] = $UpdId;
    352 
    353                         $_ARR['status'] = $status;
    354 
    355                         $objMem->updRow($table_name_requestmanager,$_ARR, $myFields);
    356 
    357                     }
    358 
    359                 }
    360 
    361                 wpmg_sendGroupConfirmationtoMember($user_id, $gropArray);
    362 
    363                 wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=upd2");
    364 
    365                 exit;
    366 
    367             }
    368 
    369         }
    370 
    371     }
    372 
    373 } else if($actreq=='del') {
    374 
    375     $addRequesttodb = $objMem->selectRows($table_name_requestmanager, "",  " where id = '".$delid."'");
    376 
    377     $groupArr = $objMem->getUserGroup($table_name_requestmanager_taxonomy, $delid);
    378 
    379     if(count($groupArr)>1) {
    380 
    381         $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$delid);
    382 
    383         wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=upd");
    384 
    385         exit;
    386 
    387     } else {
    388 
    389         $objMem->deleteUserGroup($table_name_requestmanager_taxonomy,$gid,$delid);
    390 
    391         $wpdb->query("delete from ".$table_name_requestmanager." where id=".$delid);
    392 
    393         wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=del");
    394 
    395         exit;
    396 
    397     }
    398 
    399 } else if($actreq=='delsubs') {
    400 
    401     $wpdb->query("delete from ".$table_name_requestmanager." where id=".$delid);
    402 
    403     wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=delsubs");
    404 
    405     exit;
    406 
    407 }
    408 
    409 if($info=="app") {
    410 
    411     wpmg_showmessages("updated", __("Subscription request has been approved successfully.", 'mailing-group-module'));
    412 
    413 } else if($info=="upd") {
    414 
    415     wpmg_showmessages("updated", __("Subscription request has been updated successfully.", 'mailing-group-module'));
    416 
    417 } else if($info=="upd2") {
    418 
    419     wpmg_showmessages("updated", __("Subscription request was already registered, groups updated successfully.", 'mailing-group-module'));
    420 
    421 } else if($info=="del") {
    422 
    423     wpmg_showmessages("updated", __("Subscription request has been rejected successfully.", 'mailing-group-module'));
    424 
    425 } else if($info=="delsubs") {
    426 
    427     wpmg_showmessages("updated", __("Subscription request has been deleted successfully.", 'mailing-group-module'));
    428 
    429 } else if($info=="saved") {
    430 
    431     wpmg_showmessages("updated", __("Subscription request has been added successfully. Now approve the request to activate the membership.", 'mailing-group-module'));
    432 
    433 }  else if($info=="free") {
    434 
    435     wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'mailing-group-module'));
    436 
    437 } else if($info=="mass") {
    438 
    439     if($type=='1') {
    440 
    441         wpmg_showmessages("updated", __("Subscription request(s) has been added successfully.", 'mailing-group-module'));
    442 
    443     } else if($type=='2') {
    444 
    445         wpmg_showmessages("updated", __("Subscription request(s) has been rejected successfully.", 'mailing-group-module'));
    446 
    447     } else if($type=='3') {
    448 
    449         wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'mailing-group-module'));
    450 
    451     }
    452 
    453 }
    454 
    455 $result = $objMem->selectRows($table_name_requestmanager, "",  " where status = '0' order by id desc");
    456 
    457 $totcount = count($result);
    458 
    459 if ($totcount>0) {
    460 
    461 ?>
    462 
    463 <script type="text/javascript">
    464 
    465     jQuery(document).ready(function() {
    466 
    467         jQuery('#mailingrequestmanager').dataTable( {
    468 
    469             "aoColumnDefs":[{"bSortable": false, "aTargets": [ 0, 3, 4 ]}],
    470 
    471             "fnDrawCallback":function(){
    472 
    473                 if('<?php echo $totcount; ?>'<=5){
    474 
    475                     document.getElementById('mailingrequestmanager_paginate').style.display = "none";
    476 
    477                 } else {
    478 
    479                     document.getElementById('mailingrequestmanager_paginate').style.display = "block";
    480 
    481                 }
    482 
    483             }
    484 
    485         });
    486 
    487     });
    488 
    489 </script>
    490 
    491 <?php } ?>
    492 
    493 <div class="wrap">
    494 
    495     <h2 class="nav-tab-wrapper">
    496 
    497         <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php _e("Subscription Request Manager", 'mailing-group-module'); ?>" class="nav-tab nav-tab-active"><?php _e("Subscription Request Manager", 'mailing-group-module'); ?></a>
    498 
    499         <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab" title="<?php _e("Add New Subscriber", 'mailing-group-module'); ?>"><?php _e("Add New Subscriber", 'mailing-group-module'); ?></a>
    500 
    501      
    502 
    503     </h2>
    504 
    505     <div style="padding-top:20px; padding-bottom:25px;"><?php _e("Any new subscriber requests submitted via your website, or via the Add New Subscriber panel, will appear below. You need to use the plugin’s shortcode to display the subscription request form on your website - see the Help tab in the General Settings for more information.", 'mailing-group-module'); ?></div>
    506 
    507     <form name="approvedeleterequest" id="approvedeleterequest" method="post">
    508 
    509     <div class="tablenav top">
     680                    ?>
     681
     682                </td>
     683
     684            </tr>
     685
     686<?php }
     687
     688    } else { ?>
     689
     690            <tr>
     691
     692                <td colspan="5" align="center"><?php esc_html_e("No new subscription requests", 'wp-mailing-group'); ?></td>
     693
     694            </tr>
     695
     696    <?php } ?>
     697
     698    </tbody>
     699
     700    </table>
     701
     702    <div class="tablenav bottom">
    510703
    511704        <div class="alignleft actions">
    512705
    513             <select name="massaction" id="massaction">
    514                 <option selected="selected" value=""><?php _e("Bulk actions", 'mailing-group-module'); ?></option>
    515 
    516                 <option value="1"><?php _e("Approve Selected", 'mailing-group-module'); ?></option>
    517 
    518                 <option value="2"><?php _e("Reject Selected", 'mailing-group-module'); ?></option>
     706            <select name="massaction2" id="massaction2">
     707
     708                <option selected="selected" value=""><?php esc_html_e("Bulk actions", 'wp-mailing-group'); ?></option>
     709
     710                <option value="1"><?php esc_html_e("Approve Selected", 'wp-mailing-group'); ?></option>
     711
     712                <option value="2"><?php esc_html_e("Reject Selected", 'wp-mailing-group'); ?></option>
    519713
    520714            </select>
    521715
    522             <input type="submit" id="doaction" name="Save" value="<?php _e("Apply", 'mailing-group-module'); ?>" />
     716            <input type="submit" id="doaction2" name="Save" value="<?php esc_html_e("Apply", 'wp-mailing-group'); ?>" />
    523717
    524718        </div>
     
    528722    </div>
    529723
    530     <table class="wp-list-table widefat fixed" id="mailingrequestmanager">
    531 
    532         <thead>
    533 
    534             <tr role="row" class="topRow header_tab">
    535 
    536                 <th width="8%">
    537 
    538                     <input type="checkbox" id="selectorall" name="selectorall" value="1" />
    539 
    540                 </th>
    541 
    542                 <th width="25%" class="sort" style="cursor:pointer;"><a href="#"><?php _e("Name", 'mailing-group-module'); ?></a></th>
    543 
    544                 <th class="sortemail"><a href="#"><?php _e("Email Address", 'mailing-group-module'); ?></a></th>
    545 
    546                 <th><?php _e("Group Name", 'mailing-group-module'); ?></th>
    547 
    548                 <th width="10%"><?php _e("Actions", 'mailing-group-module'); ?></th>
    549 
    550             </tr>
    551 
    552         </thead>
    553 
    554         <tbody>
    555 
    556 <?php
    557 
    558         if ($totcount > 0 )
    559 
    560         {
    561 
    562             foreach ($result as $row)
    563 
    564             {
    565 
    566                 $id = $row->id;
    567 
    568                 $name = wpmg_dbStripslashes($row->name);
    569 
    570                 $email = wpmg_dbStripslashes($row->email);
    571 
    572                 $message_sent = $row->message_sent;
    573 
    574                 /* $group_name = wpmg_dbStripslashes($row->group_name); */
    575 
    576                 $status = $row->status;
    577 
    578                 $act = "hid";
    579 
    580                 $lablestatus = __("Visible", 'mailing-group-module');
    581 
    582                 if($status==0) {
    583 
    584                     $act = "vis";
    585 
    586                     $lablestatus = __("Hidden", 'mailing-group-module');
    587 
    588                 }
    589 
    590                 $result_groups = $objMem->getCompleteUserGroups($table_name_requestmanager_taxonomy, $table_name_group, $id);
    591 
    592     ?>
    593 
    594             <tr>
    595 
    596                 <td width="8%">
    597 
    598                     <?php
    599 
    600                     if(count($result_groups)>0) {
    601 
    602                         foreach($result_groups as $groups) {
    603 
    604                     ?>
    605 
    606                             <input type="checkbox" class="selectorsubscription" id="selector" name="selectusers[]" value="<?php echo $id; ?>_<?php echo $groups->group_id;?>" id="" /><br />
    607 
    608                     <?php
    609 
    610                         }
    611 
    612                     }
    613 
    614                     ?>
    615 
    616                 </td>
    617 
    618                 <td width="25%"><?php echo $name; ?></td>
    619 
    620                 <td><?php echo $email; ?></td>
    621 
    622                 <td>
    623 
    624                 <?php
    625 
    626                     if(count($result_groups)>0) {
    627 
    628                         foreach($result_groups as $groups) {
    629 
    630                             echo wpmg_dbStripslashes($groups->title)."<br>";
    631 
    632                         }
    633 
    634                     }
    635 
    636                 ?></td>
    637 
    638                 <td width="22%" class="last">
    639 
    640                     <?php
    641 
    642                         if(count($result_groups)>0) {
    643 
    644                             $ijk = 1;
    645 
    646                             foreach($result_groups as $groups) {
    647 
    648                     ?>
    649 
    650                                 <a class="approve_record" title="<?php _e("Approve", 'mailing-group-module'); ?>" href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=app&id=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php _e("Are you sure you want to approve this subscription request?", 'mailing-group-module'); ?>');"></a>|<a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=del&did=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php _e("Are you sure you want to reject this subscription request?", 'mailing-group-module'); ?>');" title="<?php _e("Reject", 'mailing-group-module'); ?>" class="reject_record"></a>|<a href="admin.php?page=wpmg_mailinggroup_sendmessage&act=upd&id=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>&TB_iframe=true&width=550&height=530" title="<?php _e("Send Message", 'mailing-group-module'); ?>" class="send_mail thickbox"></a>
    651 
    652                                 <?php if(count($result_groups)!==$ijk) { ?>
    653 
    654                                     <br />
    655 
    656                                 <?php } ?>
    657 
    658                     <?php
    659 
    660                                 $ijk++;
    661 
    662                             }
    663 
    664                             if($message_sent>0) {
    665 
    666                                 echo "|<a href='#' title='Messages Sent'>(".$message_sent.")</a>";
    667 
    668                             }
    669 
    670                         } else {
    671 
    672                     ?>
    673 
    674                                 <a class="reject_record" title="<?php _e("Delete", 'mailing-group-module'); ?>" href="admin.php?page=wpmg_mailinggroup_requestmanagerlist&act=delsubs&did=<?php echo $id;?>&gid=<?php echo $groups->group_id;?>" onclick="return confirm('<?php _e("Are you sure you want to delete this subscription request completely?", 'mailing-group-module'); ?>');"></a>
    675 
    676                     <?php
    677 
    678                         }
    679 
    680                     ?>
    681 
    682                 </td>
    683 
    684             </tr>
    685 
    686 <?php }
    687 
    688     } else { ?>
    689 
    690             <tr>
    691 
    692                 <td colspan="5" align="center"><?php _e("No new subscription requests", 'mailing-group-module'); ?></td>
    693 
    694             </tr>
    695 
    696     <?php } ?>
    697 
    698     </tbody>
    699 
    700     </table>
    701 
    702     <div class="tablenav bottom">
    703 
    704         <div class="alignleft actions">
    705 
    706             <select name="massaction2" id="massaction2">
    707 
    708                 <option selected="selected" value=""><?php _e("Bulk actions", 'mailing-group-module'); ?></option>
    709 
    710                 <option value="1"><?php _e("Approve Selected", 'mailing-group-module'); ?></option>
    711 
    712                 <option value="2"><?php _e("Reject Selected", 'mailing-group-module'); ?></option>
    713 
    714             </select>
    715 
    716             <input type="submit" id="doaction2" name="Save" value="<?php _e("Apply", 'mailing-group-module'); ?>" />
    717 
    718         </div>
    719 
    720         <br class="clear">
    721 
    722     </div>
    723 
    724724    </form>
    725725
  • wp-mailing-group/trunk/template/mg_mailingrequestadd.php

    r2344820 r3252678  
    4343}
    4444
    45 $btn = __("Add Subscriber", 'mailing-group-module');
     45$btn = __("Add Subscriber", 'wp-mailing-group');
    4646
    4747$id = "";
     
    103103    <h2 class="nav-tab-wrapper">
    104104
    105         <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php _e("Subscription Request Manager", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Subscription Request Manager", 'mailing-group-module'); ?></a>
    106 
    107         <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab nav-tab-active" title="<?php _e("Add New Subscriber", 'mailing-group-module'); ?>"><?php _e("Add New Subscriber", 'mailing-group-module'); ?></a>
     105        <a href="admin.php?page=wpmg_mailinggroup_requestmanagerlist" title="<?php esc_html_e("Subscription Request Manager", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Subscription Request Manager", 'wp-mailing-group'); ?></a>
     106
     107        <a href="admin.php?page=wpmg_mailinggroup_requestmanageradd&act=add" class="nav-tab nav-tab-active" title="<?php esc_html_e("Add New Subscriber", 'wp-mailing-group'); ?>"><?php esc_html_e("Add New Subscriber", 'wp-mailing-group'); ?></a>
    108108
    109109
     
    135135                        <div class="form-field">
    136136
    137                             <label for="tag-name"><?php _e("Name", 'mailing-group-module'); ?> : </label>
     137                            <label for="tag-name"><?php esc_html_e("Name", 'wp-mailing-group'); ?> : </label>
    138138
    139139                            <input type="text" size="40" id="name" name="name" value="<?php echo $name; ?>"/>
     
    143143                        <div class="form-field">
    144144
    145                             <label for="tag-name"><?php _e("Email Address", 'mailing-group-module'); ?> : </label>
     145                            <label for="tag-name"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?> : </label>
    146146
    147147                            <input type="text" size="40" id="email" name="email" value="<?php echo $email; ?>"/>
     
    151151                        <div class="form-field">
    152152
    153                             <label for="tag-name"><?php _e("Group Name", 'mailing-group-module'); ?> : </label>
     153                            <label for="tag-name"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?> : </label>
    154154
    155155                            <div class="check_div">
     
    161161                                        <tr role="row" class="topRow">
    162162
    163                                             <th class="sort topRow_messagelist"><?php _e("Mailing Group(s)", 'mailing-group-module'); ?></th>
    164 
    165                                             <th><?php _e("Email Format", 'mailing-group-module'); ?></th>
     163                                            <th class="sort topRow_messagelist"><?php esc_html_e("Mailing Group(s)", 'wp-mailing-group'); ?></th>
     164
     165                                            <th><?php esc_html_e("Email Format", 'wp-mailing-group'); ?></th>
    166166
    167167                                        </tr>
     
    183183                                                <div class="check_div">
    184184
    185                                                     <div class="lft"><input type="radio" name="email_format_<?php echo $group->id; ?>" <?php echo (isset($email_format) && $email_format=='1'?"checked":($email_format==''?"checked":"")); ?> value="1" />&nbsp;<?php _e("HTML", 'mailing-group-module'); ?></div>
    186 
    187                                                     <div class="rgt"><input type="radio" <?php echo (isset($email_format) && $email_format=='2'?"checked":""); ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php _e("Plain Text", 'mailing-group-module'); ?></div>
     185                                                    <div class="lft"><input type="radio" name="email_format_<?php echo $group->id; ?>" <?php echo (isset($email_format) && $email_format=='1'?"checked":($email_format==''?"checked":"")); ?> value="1" />&nbsp;<?php esc_html_e("HTML", 'wp-mailing-group'); ?></div>
     186
     187                                                    <div class="rgt"><input type="radio" <?php echo (isset($email_format) && $email_format=='2'?"checked":""); ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php esc_html_e("Plain Text", 'wp-mailing-group'); ?></div>
    188188
    189189                                                </div>
  • wp-mailing-group/trunk/template/mg_memberadd.php

    r1752047 r3252678  
    7171        }
    7272
    73         $btn = __("Update Member", 'mailing-group-module');
     73        $btn = __("Update Member", 'wp-mailing-group');
    7474
    7575        $hidval = 2;
     
    9595} else {
    9696
    97     $btn = __("Submit", 'mailing-group-module');
     97    $btn = __("Submit", 'wp-mailing-group');
    9898
    9999    $id = "";
     
    125125    if($usercount>=$memberLimit) {
    126126
    127         wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'mailing-group-module'));
     127        wpmg_showmessages("error", __("You can only add 20 member(s) per group, Please upgrade to paid version for more features.", 'wp-mailing-group'));
    128128
    129129    } else {
     
    157157            if(is_numeric($username_e)) {
    158158
    159                 wpmg_showmessages("error", __("The username entered already exists in the system.", 'mailing-group-module'));
     159                wpmg_showmessages("error", __("The username entered already exists in the system.", 'wp-mailing-group'));
    160160
    161161                $username = "";
     
    163163            } else if(is_numeric($email_e)) {
    164164
    165                 wpmg_showmessages("error", __("The email entered already exists in the system.", 'mailing-group-module'));
     165                wpmg_showmessages("error", __("The email entered already exists in the system.", 'wp-mailing-group'));
    166166
    167167            } else {
     
    207207                } else {
    208208
    209                     wp_new_user_notification($user_id, $random_password);
     209                    wp_new_user_notification($user_id);
    210210
    211211                }
     
    219219        } else {
    220220
    221             wpmg_showmessages("error", __("Please enter username or email to proceed.", 'mailing-group-module'));
     221            wpmg_showmessages("error", __("Please enter username or email to proceed.", 'wp-mailing-group'));
    222222
    223223        }
     
    263263    } else {
    264264
    265         wpmg_showmessages("error", __("Please enter username to proceed.", 'mailing-group-module'));
     265        wpmg_showmessages("error", __("Please enter username to proceed.", 'wp-mailing-group'));
    266266
    267267    }
     
    271271if($info=="userexists") {
    272272
    273     wpmg_showmessages("error", __("The email entered already exists in the system.", 'mailing-group-module'));
     273    wpmg_showmessages("error", __("The email entered already exists in the system.", 'wp-mailing-group'));
    274274
    275275} else if($info=="uns") {
    276276
    277     wpmg_showmessages("updated", __("Member has been unsubcribed from the group.", 'mailing-group-module'));
     277    wpmg_showmessages("updated", __("Member has been unsubcribed from the group.", 'wp-mailing-group'));
    278278
    279279}
     
    313313            if(trim(jQuery("#username").val())=="") {
    314314
    315                 alert("<?php _e("Please enter username to check.", 'mailing-group-module'); ?>");
     315                alert("<?php esc_html_e("Please enter username to check.", 'wp-mailing-group'); ?>");
    316316
    317317                jQuery("#username").focus();
     
    329329                if(trim(response)=='yes') {
    330330
    331                     alert("<?php _e("Username is available.", 'mailing-group-module'); ?>");
     331                    alert("<?php esc_html_e("Username is available.", 'wp-mailing-group'); ?>");
    332332
    333333                    jQuery("#username").val(thisUsername);
     
    337337                } else {
    338338
    339                     alert("<?php _e("Username is not available, please try again.", 'mailing-group-module'); ?>");
     339                    alert("<?php esc_html_e("Username is not available, please try again.", 'wp-mailing-group'); ?>");
    340340
    341341                    jQuery("#username").val(thisUsername);
     
    419419    <div class="icon32" id="icon-edit"><br/></div>
    420420
    421     <h2><?php _e("Add/Edit Member", 'mailing-group-module'); ?></h2>
     421    <h2><?php esc_html_e("Add/Edit Member", 'wp-mailing-group'); ?></h2>
    422422
    423423    <div id="col-left-2">
     
    437437                        <div class="form-field">
    438438
    439                             <label for="tag-name"><?php _e("Name", 'mailing-group-module'); ?> : </label>
     439                            <label for="tag-name"><?php esc_html_e("Name", 'wp-mailing-group'); ?> : </label>
    440440
    441441                            <input type="text" size="40" id="name" name="name" value="<?php echo $name; ?>"/>
     
    449449                                <label for="tag-name">&nbsp;</label>
    450450
    451                                 <input type="checkbox" name="auto_generate" <?php echo (isset($auto_generate) && $auto_generate =='1'?"checked":""); ?> value="1" id="auto_generate" />&nbsp;<?php _e("Auto-generate WordPress username", 'mailing-group-module'); ?>
     451                                <input type="checkbox" name="auto_generate" <?php echo (isset($auto_generate) && $auto_generate =='1'?"checked":""); ?> value="1" id="auto_generate" />&nbsp;<?php esc_html_e("Auto-generate WordPress username", 'wp-mailing-group'); ?>
    452452
    453453                            </div>
     
    457457                        <div class="form-field" id="gen_username">
    458458
    459                             <label for="tag-name"><?php _e("Username", 'mailing-group-module'); ?> : </label>
    460 
    461                             <input type="text" size="40" id="username" name="username" <?php echo (isset($act) && $act=='upd'?'disabled="disabled"':"")?> value="<?php echo (isset($username))? $username :''; ?>"/><?php if($act!='upd') { ?>&nbsp;<a href="#" id="check_username" name="check_username"/><?php _e("Check Availability", 'mailing-group-module'); ?></a><?php } ?><?php echo ($act=='upd'?'&nbsp;'.__("Username cannot be edited.", 'mailing-group-module'):"")?>
     459                            <label for="tag-name"><?php esc_html_e("Username", 'wp-mailing-group'); ?> : </label>
     460
     461                            <input type="text" size="40" id="username" name="username" <?php echo (isset($act) && $act=='upd'?'disabled="disabled"':"")?> value="<?php echo (isset($username))? $username :''; ?>"/><?php if($act!='upd') { ?>&nbsp;<a href="#" id="check_username" name="check_username"/><?php esc_html_e("Check Availability", 'wp-mailing-group'); ?></a><?php } ?><?php echo ($act=='upd'?'&nbsp;'.__("Username cannot be edited.", 'wp-mailing-group'):"")?>
    462462
    463463                        </div>
     
    465465                        <div class="form-field">
    466466
    467                             <label for="tag-name"><?php _e("Email Address", 'mailing-group-module'); ?> : </label>
    468 
    469                             <input type="text" size="40" id="email" name="email" <?php echo ($act=='upd'?'disabled="disabled"':"")?> value="<?php echo $email; ?>"/><?php echo ($act=='upd'?'&nbsp;'.__("Email cannot be edited.", 'mailing-group-module'):"")?>
     467                            <label for="tag-name"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?> : </label>
     468
     469                            <input type="text" size="40" id="email" name="email" <?php echo ($act=='upd'?'disabled="disabled"':"")?> value="<?php echo $email; ?>"/><?php echo ($act=='upd'?'&nbsp;'.__("Email cannot be edited.", 'wp-mailing-group'):"")?>
    470470
    471471                        </div>
     
    477477                                <label for="tag-name">&nbsp;</label>
    478478
    479                                 <div><p class="ltfloat"><input type="radio" name="confirmation_email" <?php echo (isset($confirmation_email) && $confirmation_email=='1'?"checked":(!isset($confirmation_email)?"checked":"")); ?> class="confirmation_email" id="confirmation_email_1" value="1" /><?php _e("Send opt-in confirmation link", 'mailing-group-module'); ?></p><p class="ltfloat"><input type="radio" <?php echo (isset($confirmation_email) && $confirmation_email=='0'?"checked":""); ?> name="confirmation_email" class="confirmation_email" id="confirmation_email_0" value="0" /><?php _e(" Skip opt-in confirmation", 'mailing-group-module'); ?></p></div>
     479                                <div><p class="ltfloat"><input type="radio" name="confirmation_email" <?php echo (isset($confirmation_email) && $confirmation_email=='1'?"checked":(!isset($confirmation_email)?"checked":"")); ?> class="confirmation_email" id="confirmation_email_1" value="1" /><?php esc_html_e("Send opt-in confirmation link", 'wp-mailing-group'); ?></p><p class="ltfloat"><input type="radio" <?php echo (isset($confirmation_email) && $confirmation_email=='0'?"checked":""); ?> name="confirmation_email" class="confirmation_email" id="confirmation_email_0" value="0" /><?php esc_html_e(" Skip opt-in confirmation", 'wp-mailing-group'); ?></p></div>
    480480
    481481                            </div>
     
    485485                        <div class="form-field">
    486486
    487                             <label for="tag-name"><?php _e("Group Name", 'mailing-group-module'); ?> : </label>
     487                            <label for="tag-name"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?> : </label>
    488488
    489489                            <div class="check_div">
     
    495495                                        <tr role="row" class="topRow">
    496496
    497                                             <th class="sort topRow_messagelist"><?php _e("Mailing Group Name", 'mailing-group-module'); ?></th>
    498 
    499                                             <th><?php _e("Subscription Status", 'mailing-group-module'); ?></th>
    500 
    501                                             <th><?php _e("Email Format", 'mailing-group-module'); ?></th>
     497                                            <th class="sort topRow_messagelist"><?php esc_html_e("Mailing Group Name", 'wp-mailing-group'); ?></th>
     498
     499                                            <th><?php esc_html_e("Subscription Status", 'wp-mailing-group'); ?></th>
     500
     501                                            <th><?php esc_html_e("Email Format", 'wp-mailing-group'); ?></th>
    502502
    503503                                        </tr>
     
    537537                                                <div class="check_div">
    538538
    539                                                     <input type="radio" name="email_format_<?php echo $group->id; ?>" <?php echo (isset($group_name[$group->id]) && $group_name[$group->id]=='1'?"checked":(count($group_name)=='0'?"checked":(!isset($group_name[$group->id])?"checked":""))); ?> value="1" />&nbsp;<?php _e("HTML", 'mailing-group-module'); ?>
     539                                                    <input type="radio" name="email_format_<?php echo $group->id; ?>" <?php echo (isset($group_name[$group->id]) && $group_name[$group->id]=='1'?"checked":(count($group_name)=='0'?"checked":(!isset($group_name[$group->id])?"checked":""))); ?> value="1" />&nbsp;<?php esc_html_e("HTML", 'wp-mailing-group'); ?>
    540540
    541541                                                    <br />
    542542
    543                                                     <input type="radio" <?php echo (isset($group_name[$group->id]) && $group_name[$group->id]=='2'?"checked":""); ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php _e("Plain Text", 'mailing-group-module'); ?>
     543                                                    <input type="radio" <?php echo (isset($group_name[$group->id]) && $group_name[$group->id]=='2'?"checked":""); ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php esc_html_e("Plain Text", 'wp-mailing-group'); ?>
    544544
    545545                                                </div>
     
    567567                                <p class="ltfloat">
    568568
    569                                     <input type="radio" name="status" <?php echo ($status=='0'?"checked":""); ?> <?php echo ($status==''?"checked":"") ?> id="status_0" value="0" />&nbsp;<?php _e("On Hold", 'mailing-group-module'); ?></p>
    570 
    571                                 <p class="ltfloat"><input type="radio" <?php echo ($status=='1'?"checked":""); ?> name="status" id="status_1" value="1" <?php if($act!="upd") { ?>disabled="disabled"<?php } ?> />&nbsp;<?php _e("Active", 'mailing-group-module'); ?></p>
     569                                    <input type="radio" name="status" <?php echo ($status=='0'?"checked":""); ?> <?php echo ($status==''?"checked":"") ?> id="status_0" value="0" />&nbsp;<?php esc_html_e("On Hold", 'wp-mailing-group'); ?></p>
     570
     571                                <p class="ltfloat"><input type="radio" <?php echo ($status=='1'?"checked":""); ?> name="status" id="status_1" value="1" <?php if($act!="upd") { ?>disabled="disabled"<?php } ?> />&nbsp;<?php esc_html_e("Active", 'wp-mailing-group'); ?></p>
    572572
    573573                            </div>
  • wp-mailing-group/trunk/template/mg_membergroups.php

    r1752047 r3252678  
    3131        $group_name  = unserialize(get_user_meta($id, "Group_subscribed", true));
    3232
    33         $btn = __("Update", 'mailing-group-module');
     33        $btn = __("Update", 'wp-mailing-group');
    3434
    3535        $hidval = 2;
     
    7171if($info=="uns") {
    7272
    73     wpmg_showmessages("updated", __("Member has been unsubcribed from the group.", 'mailing-group-module'));
     73    wpmg_showmessages("updated", __("Member has been unsubcribed from the group.", 'wp-mailing-group'));
    7474
    7575} else if($info=="upd") {
    7676
    77     wpmg_showmessages("updated", __("You have succesfully updated your groups settings.", 'mailing-group-module'));
     77    wpmg_showmessages("updated", __("You have succesfully updated your groups settings.", 'wp-mailing-group'));
    7878
    7979}
     
    137137    <div class="icon32" id="icon-edit"><br/></div>
    138138
    139     <h2><?php _e("Update Group Subscribed", 'mailing-group-module'); ?></h2>
     139    <h2><?php esc_html_e("Update Group Subscribed", 'wp-mailing-group'); ?></h2>
    140140
    141141    <div id="col-left">
     
    153153                        <div class="form-field">
    154154
    155                             <label for="tag-name"><?php _e("Group Name", 'mailing-group-module'); ?> : </label>
     155                            <label for="tag-name"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?> : </label>
    156156
    157157                            <div class="check_div">
     
    163163                                        <tr role="row" class="topRow">
    164164
    165                                             <th class="sort topRow_messagelist"><?php _e("Mailing Group Name", 'mailing-group-module'); ?></th>
    166 
    167                                             <th><?php _e("Subscription Status", 'mailing-group-module'); ?></th>
    168 
    169                                             <th><?php _e("Email Format", 'mailing-group-module'); ?></th>
     165                                            <th class="sort topRow_messagelist"><?php esc_html_e("Mailing Group Name", 'wp-mailing-group'); ?></th>
     166
     167                                            <th><?php esc_html_e("Subscription Status", 'wp-mailing-group'); ?></th>
     168
     169                                            <th><?php esc_html_e("Email Format", 'wp-mailing-group'); ?></th>
    170170
    171171                                            <?php if(isset($act) && $act=='upd') { ?>
    172172
    173                                                 <th><?php _e("Unsubscribe from this group", 'mailing-group-module'); ?></th>
     173                                                <th><?php esc_html_e("Unsubscribe from this group", 'wp-mailing-group'); ?></th>
    174174
    175175                                            <?php } ?>
     
    201201                                        <tr>
    202202
    203                                             <td><input type="checkbox" name="group_name[]" id="selector" value="<?php echo $group->id; ?>" <?php echo ($checkSelected?"checked":($gid==$group->id?"checked":"")) ?> />&nbsp;<?php echo $group->title; ?>
     203                                            <td><input type="checkbox" name="group_name[]" id="selector" value="<?php echo esc_html($group->id); ?>" <?php echo ($checkSelected?"checked":($gid==$group->id?"checked":"")) ?> />&nbsp;<?php echo esc_html($group->title); ?>
    204204
    205205                                            </td>
     
    215215                                                <div class="check_div">
    216216
    217                                                     <div class="lft"><input type="radio" name="email_format_<?php echo $group->id; ?>" <?php echo ($group_name[$group->id]=='1'?"checked":"") ?> value="1" />&nbsp;<?php _e("HTML", 'mailing-group-module'); ?></div>
    218 
    219                                                     <div class="rgt"><input type="radio" <?php echo ($group_name[$group->id]=='2'?"checked":(count($group_name)=='0'?"checked":(!isset($group_name[$group->id])?"checked":""))) ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php _e("Plain Text", 'mailing-group-module'); ?></div>
     217                                                    <div class="lft"><input type="radio" name="email_format_<?php echo esc_html($group->id); ?>" <?php echo ($group_name[$group->id]=='1'?"checked":"") ?> value="1" />&nbsp;<?php esc_html_e("HTML", 'wp-mailing-group'); ?></div>
     218
     219                                                    <div class="rgt"><input type="radio" <?php echo ($group_name[$group->id]=='2'?"checked":(count($group_name)=='0'?"checked":(!isset($group_name[$group->id])?"checked":""))) ?> name="email_format_<?php echo $group->id; ?>" value="2" />&nbsp;<?php esc_html_e("Plain Text", 'wp-mailing-group'); ?></div>
    220220
    221221                                                </div>
     
    239239                        <p class="submit">
    240240
    241                             <input type="submit" value="<?php echo $btn; ?>" class="button" id="submit" name="submit"/>
    242 
    243                             <input type="hidden" name="addme" value=<?php echo $hidval;?> >
    244 
    245                             <input type="hidden" name="id" value=<?php echo $id;?> >
     241                            <input type="submit" value="<?php echo esc_html($btn); ?>" class="button" id="submit" name="submit"/>
     242
     243                            <input type="hidden" name="addme" value="<?php echo esc_html($hidval); ?>" >
     244
     245                            <input type="hidden" name="id" value="<?php echo esc_html($id); ?>" >
    246246
    247247                        </p>
  • wp-mailing-group/trunk/template/mg_memberlist.php

    r1355199 r3252678  
    2323if($info=="saved") {
    2424
    25     wpmg_showmessages("updated", __("Member has been added successfully.", 'mailing-group-module'));
     25    wpmg_showmessages("updated", __("Member has been added successfully.", 'wp-mailing-group'));
    2626
    2727} else if($info=="upd") {
    2828
    29     wpmg_showmessages("updated", __("Member has been updated successfully.", 'mailing-group-module'));
     29    wpmg_showmessages("updated", __("Member has been updated successfully.", 'wp-mailing-group'));
    3030
    3131} else if($info=="del") {
     
    3737    delete_user_meta( $delid, "Group_subscribed" );
    3838
    39     $wpdb->query("delete from ".$table_name_user_taxonomy." where user_id=".$delid);
     39    $wpdb->query($wpdb->prepare("delete from ".$table_name_user_taxonomy." where user_id=%d", $delid));
    4040   
    41     $message = "Member has been deleted successfully from mailinggroup";
     41    $Userrow = get_user_by("id", $delid);
     42    $name = $Userrow->display_name;
    4243   
    43         if(isset($_GET['delfrmwp'])){
     44    /* translators: %s: member name */
     45    $message = sprintf(__("Member %s has been deleted successfully from mailinggroup", 'wp-mailing-group'), $name);
     46   
     47    if(isset($_GET['delfrmwp'])){
     48        wp_delete_user($delid);
    4449       
    45             wp_delete_user( $delid );
    46            
    47             $message = "Member has been successfully deleted from wordpress and mailinggroup";
     50        /* translators: %s: member name */
     51        $message = sprintf(__("Member %s has been successfully deleted from wordpress and mailinggroup", 'wp-mailing-group'), $name);
     52    }
     53
     54    wpmg_showmessages("updated", esc_html__("Member has been deleted successfully.", 'wp-mailing-group'));
     55
     56}
     57
     58if($actreq=='hold') {
     59
     60    update_user_meta( $id, "User_status", '0', '1' );
     61
     62    wpmg_redirectTo("wpmg_mailinggroup_memberlist&info=vis&gid=".$gid);
     63
     64    exit;
     65
     66} else if($actreq=='active') {
     67
     68    update_user_meta( $id, "User_status", '1', '0' );
     69
     70    wpmg_redirectTo("wpmg_mailinggroup_memberlist&info=hid&gid=".$gid);
     71
     72    exit;
     73
     74}
     75
     76$result = $objMem->selectRows($table_name_user_taxonomy, "",  " where group_id='".$gid."' order by id desc");
     77
     78$totcount = count($result);
     79
     80if ($totcount>0) {
     81
     82?>
     83
     84<script type="text/javascript">
     85
     86    /* <![CDATA[ */
     87
     88    jQuery(document).ready(function() {
     89
     90        /* Build the DataTable with third column using our custom sort functions */
     91
     92        <?php if(count($result)>0) { ?>
     93
     94        jQuery('#memberlist').dataTable( {
     95
     96            "aoColumnDefs": [
     97
     98              { "bSortable": false, "aTargets": [ 3,4,5 ] },
     99
     100            ],
     101
     102            "oLanguage": {
     103
     104              "sZeroRecords": "<?php esc_html_e("No members found.", 'wp-mailing-group'); ?>"
     105
     106            },
     107
     108            "fnDrawCallback":function(){
     109
     110                if('<?php echo esc_js($totcount); ?>'<=5){
     111
     112                    document.getElementById('memberlist_paginate').style.display = "none";
     113
     114                } else {
     115
     116                    document.getElementById('memberlist_paginate').style.display = "block";
     117
     118                }
     119
     120            }
     121
     122        } );
     123
     124        <?php } ?>
     125
     126        jQuery("#toplevel_page_mailinggroup_intro").removeClass('wp-not-current-submenu');
     127
     128        jQuery("#toplevel_page_mailinggroup_intro").addClass('wp-has-current-submenu');
     129
     130        jQuery("#toplevel_page_mailinggroup_intro ul :nth-child(3)").addClass("current");
     131
     132    } );
     133
     134    /* ]]> */
     135
     136</script>
     137
     138<?php
     139
     140}
     141
     142$resultgp = $objMem->selectRows($table_name_group, "",  " where id='".$gid."'");
     143
     144if (count($resultgp)>0) {
     145
     146    foreach ($resultgp as $rowgp) {
     147
     148        $groupName = $rowgp->title;
     149
     150    }
     151
     152}
     153
     154?>
     155
     156<script type="text/javascript">
     157
     158    jQuery(document).ready(function() {
     159
     160        jQuery("#toplevel_page_mailinggroup_intro").removeClass('wp-not-current-submenu');
     161
     162        jQuery("#toplevel_page_mailinggroup_intro").addClass('wp-has-current-submenu');
     163
     164        jQuery("#toplevel_page_mailinggroup_intro ul :nth-child(3)").addClass("current");
     165
     166    } );
     167
     168</script>
     169
     170<div class="wrap">
     171
     172    <h2><?php esc_html_e("Member Manager", 'wp-mailing-group'); ?> <?php echo ($groupName!='' ? sprintf(
     173        '(%s) <a class="backlink" href="%s">%s</a>',
     174        esc_html($groupName),
     175        esc_url('admin.php?page=wpmg_mailinggroup_list'),
     176        esc_html__('Back', 'wp-mailing-group')
     177    ) : '') ?>
     178
     179    <a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_memberadd&act=add&gid=<?php echo esc_attr($gid); ?>"><?php esc_html_e("Add New Member", 'wp-mailing-group'); ?></a></h2>
     180
     181     <table class="wp-list-table widefat fixed" id="memberlist">
     182
     183        <thead>
     184
     185            <tr role="row" class="topRow" id="memberlistdata">
     186
     187                <th class="sort topRow_messagelist"><a href="#"><?php esc_html_e("Name", 'wp-mailing-group'); ?></a></th>
     188
     189                <th><a href="#"><?php esc_html_e("Username", 'wp-mailing-group'); ?></a></th>
     190
     191                <th><a href="#"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?></a></th>
     192
     193                <th><?php esc_html_e("No of Email Bounces", 'wp-mailing-group'); ?></th>
     194
     195                <th><?php esc_html_e("Status", 'wp-mailing-group'); ?></th>
     196
     197                <th width="10%"><?php esc_html_e("Actions", 'wp-mailing-group'); ?></th>
     198
     199            </tr>
     200
     201        </thead>
     202
     203        <tbody>
     204
     205<?php
     206
    48207       
    49         }
    50            
    51            
    52 
    53     wpmg_showmessages("updated", __($message, 'mailing-group-module'));
    54 
    55 }
    56 
    57 if($actreq=='hold') {
    58 
    59     update_user_meta( $id, "User_status", '0', '1' );
    60 
    61     wpmg_redirectTo("wpmg_mailinggroup_memberlist&info=vis&gid=".$gid);
    62 
    63     exit;
    64 
    65 } else if($actreq=='active') {
    66 
    67     update_user_meta( $id, "User_status", '1', '0' );
    68 
    69     wpmg_redirectTo("wpmg_mailinggroup_memberlist&info=hid&gid=".$gid);
    70 
    71     exit;
    72 
    73 }
    74 
    75 $result = $objMem->selectRows($table_name_user_taxonomy, "",  " where group_id='".$gid."' order by id desc");
    76 
    77 $totcount = count($result);
    78 
    79 if ($totcount>0) {
    80 
    81 ?>
    82 
    83 <script type="text/javascript">
    84 
    85     /* <![CDATA[ */
    86 
    87     jQuery(document).ready(function() {
    88 
    89         /* Build the DataTable with third column using our custom sort functions */
    90 
    91         <?php if(count($result)>0) { ?>
    92 
    93         jQuery('#memberlist').dataTable( {
    94 
    95             "aoColumnDefs": [
    96 
    97               { "bSortable": false, "aTargets": [ 3,4,5 ] },
    98 
    99             ],
    100 
    101             "oLanguage": {
    102 
    103               "sZeroRecords": "<?php _e("No members found.", 'mailing-group-module'); ?>"
    104 
    105             },
    106 
    107             "fnDrawCallback":function(){
    108 
    109                 if('<?php echo $totcount; ?>'<=5){
    110 
    111                     document.getElementById('memberlist_paginate').style.display = "none";
    112 
    113                 } else {
    114 
    115                     document.getElementById('memberlist_paginate').style.display = "block";
     208
     209        if ($totcount>0) {
     210
     211            foreach ($result as $row) {
     212
     213                $userId = $row->user_id;
     214
     215               
     216
     217                $Userrow = get_user_by("id", $userId);
     218
     219               
     220
     221                $user_login = $Userrow->user_login;
     222
     223                $user_email = $Userrow->user_email;
     224
     225                $display_name = $Userrow->first_name;
     226
     227                $status = get_user_meta($userId, "User_status", true);
     228
     229               
     230
     231                $mailbounceresult = 0;
     232
     233                $mailbounceresult = $objMem->selectRows($table_name_sent_emails, "",  " where user_id = '".$userId."' and status='2'");
     234
     235                $noofemailb = count($mailbounceresult);
     236
     237               
     238
     239                $act = "hold";
     240
     241               
     242
     243                $lablestatus = __("Active", 'wp-mailing-group');
     244
     245                $labledetail = __("click to put On Hold", 'wp-mailing-group');
     246
     247                if($status==0) {
     248
     249                    $act = "active";
     250
     251                    $lablestatus = __("On Hold", 'wp-mailing-group');
     252
     253                    $labledetail = __("click to Activate", 'wp-mailing-group');
    116254
    117255                }
    118256
    119             }
    120 
    121         } );
    122 
    123         <?php } ?>
    124 
    125         jQuery("#toplevel_page_mailinggroup_intro").removeClass('wp-not-current-submenu');
    126 
    127         jQuery("#toplevel_page_mailinggroup_intro").addClass('wp-has-current-submenu');
    128 
    129         jQuery("#toplevel_page_mailinggroup_intro ul :nth-child(3)").addClass("current");
    130 
    131     } );
    132 
    133     /* ]]> */
    134 
    135 </script>
    136 
    137 <?php
    138 
    139 }
    140 
    141 $resultgp = $objMem->selectRows($table_name_group, "",  " where id='".$gid."'");
    142 
    143 if (count($resultgp)>0) {
    144 
    145     foreach ($resultgp as $rowgp) {
    146 
    147         $groupName = $rowgp->title;
    148 
    149     }
    150 
    151 }
    152 
    153 ?>
    154 
    155 <script type="text/javascript">
    156 
    157     jQuery(document).ready(function() {
    158 
    159         jQuery("#toplevel_page_mailinggroup_intro").removeClass('wp-not-current-submenu');
    160 
    161         jQuery("#toplevel_page_mailinggroup_intro").addClass('wp-has-current-submenu');
    162 
    163         jQuery("#toplevel_page_mailinggroup_intro ul :nth-child(3)").addClass("current");
    164 
    165     } );
    166 
    167 </script>
    168 
    169 <div class="wrap">
    170 
    171     <h2><?php _e("Member Manager", 'mailing-group-module'); ?> <?php echo ($groupName!=''?"($groupName) <a class='backlink' href='admin.php?page=wpmg_mailinggroup_list'>". __("Back", 'mailing-group-module')."</a>":"") ?>
    172 
    173     <a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_memberadd&act=add&gid=<?php echo $gid; ?>"><?php _e("Add New Member", 'mailing-group-module'); ?></a></h2>
    174 
    175      <table class="wp-list-table widefat fixed" id="memberlist">
    176 
    177         <thead>
    178 
    179             <tr role="row" class="topRow" id="memberlistdata">
    180 
    181                 <th class="sort topRow_messagelist"><a href="#"><?php _e("Name", 'mailing-group-module'); ?></a></th>
    182 
    183                 <th><a href="#"><?php _e("Username", 'mailing-group-module'); ?></a></th>
    184 
    185                 <th><a href="#"><?php _e("Email Address", 'mailing-group-module'); ?></a></th>
    186 
    187                 <th><?php _e("No of Email Bounces", 'mailing-group-module'); ?></th>
    188 
    189                 <th><?php _e("Status", 'mailing-group-module'); ?></th>
    190 
    191                 <th width="10%"><?php _e("Actions", 'mailing-group-module'); ?></th>
    192 
    193             </tr>
    194 
    195         </thead>
    196 
    197         <tbody>
    198 
    199 <?php
    200 
    201        
    202 
    203         if ($totcount>0) {
    204 
    205             foreach ($result as $row) {
    206 
    207                 $userId = $row->user_id;
    208 
    209                
    210 
    211                 $Userrow = get_user_by("id", $userId);
    212 
    213                
    214 
    215                 $user_login = $Userrow->user_login;
    216 
    217                 $user_email = $Userrow->user_email;
    218 
    219                 $display_name = $Userrow->first_name;
    220 
    221                 $status = get_user_meta($userId, "User_status", true);
    222 
    223                
    224 
    225                 $mailbounceresult = 0;
    226 
    227                 $mailbounceresult = $objMem->selectRows($table_name_sent_emails, "",  " where user_id = '".$userId."' and status='2'");
    228 
    229                 $noofemailb = count($mailbounceresult);
    230 
    231                
    232 
    233                 $act = "hold";
    234 
    235                
    236 
    237                 $lablestatus = __("Active", 'mailing-group-module');
    238 
    239                 $labledetail = __("click to put On Hold", 'mailing-group-module');
    240 
    241                 if($status==0) {
    242 
    243                     $act = "active";
    244 
    245                     $lablestatus = __("On Hold", 'mailing-group-module');
    246 
    247                     $labledetail = __("click to Activate", 'mailing-group-module');
    248 
    249                 }
    250 
    251257?>              <tr>
    252258
    253                     <td><?php echo $display_name; ?></td>
    254 
    255                     <td><?php echo $user_login; ?></td>
    256 
    257                     <td><?php echo $user_email; ?></td>
    258 
    259                     <td><?php echo $noofemailb; ?></td>
    260 
    261                     <td><?php echo $lablestatus; ?> (<a href="admin.php?page=wpmg_mailinggroup_memberlist&act=<?php echo $act; ?>&id=<?php echo $userId;?>&gid=<?php echo $gid;?>"><?php echo $labledetail; ?></a>)</td>
    262 
    263                     <td width="20%" class="last"><a href="admin.php?page=wpmg_mailinggroup_memberadd&act=upd&id=<?php echo $userId;?>&gid=<?php echo $gid;?>" class="edit_record" title="<?php _e("Edit", 'mailing-group-module'); ?>"></a><?php if($Userrow->roles[0]!='administrator') { ?>|<a href="admin.php?page=wpmg_mailinggroup_memberlist&info=del&did=<?php echo $userId;?>&gid=<?php echo $gid;?>" onclick="return confirm('<?php _e("Are you sure you want to delete this member?", 'mailing-group-module'); ?>');" class="delete_record" title="Remove User from this Mailing List"></a>|<a href="admin.php?page=wpmg_mailinggroup_memberlist&info=del&delfrmwp=1&did=<?php echo $userId;?>&gid=<?php echo $gid;?>" onclick="return confirm('<?php _e("Are you sure you want to delete this member from wordpress altogether?", 'mailing-group-module'); ?>');" class="total_del_user" title="Delete User Completely from Website"></a><?php } ?>|<a href="admin.php?page=wpmg_mailinggroup_adminarchive&uid=<?php echo $userId;?>" class="archive_messages" title="<?php _e("View Archived Messages", 'mailing-group-module'); ?>"></a></td>
     259                    <td><?php echo esc_html($display_name); ?></td>
     260
     261                    <td><?php echo esc_html($user_login); ?></td>
     262
     263                    <td><?php echo esc_html($user_email); ?></td>
     264
     265                    <td><?php echo esc_html($noofemailb); ?></td>
     266
     267                    <td><?php echo esc_html($lablestatus); ?> (<a href="admin.php?page=wpmg_mailinggroup_memberlist&act=<?php echo esc_attr($act); ?>&id=<?php echo esc_attr($userId);?>&gid=<?php echo esc_attr($gid);?>"><?php echo esc_html($labledetail); ?></a>)</td>
     268
     269                    <td width="20%" class="last"><a href="admin.php?page=wpmg_mailinggroup_memberadd&act=upd&id=<?php echo esc_attr($userId);?>&gid=<?php echo esc_attr($gid);?>" class="edit_record" title="<?php esc_html_e("Edit", 'wp-mailing-group'); ?>"></a><?php if($Userrow->roles[0]!='administrator') { ?>|<a href="admin.php?page=wpmg_mailinggroup_memberlist&info=del&did=<?php echo esc_attr($userId);?>&gid=<?php echo esc_attr($gid);?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to delete this member?", 'wp-mailing-group'); ?>');" class="delete_record" title="Remove User from this Mailing List"></a>|<a href="admin.php?page=wpmg_mailinggroup_memberlist&info=del&delfrmwp=1&did=<?php echo esc_attr($userId);?>&gid=<?php echo esc_attr($gid);?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to delete this member from wordpress altogether?", 'wp-mailing-group'); ?>');" class="total_del_user" title="Delete User Completely from Website"></a><?php } ?>|<a href="admin.php?page=wpmg_mailinggroup_adminarchive&uid=<?php echo esc_attr($userId);?>" class="archive_messages" title="<?php esc_html_e("View Archived Messages", 'wp-mailing-group'); ?>"></a></td>
    264270
    265271                </tr>
     
    273279            <tr>
    274280
    275                 <td colspan="6" align="center"><?php _e("No members found.", 'mailing-group-module'); ?></td>
     281                <td colspan="6" align="center"><?php esc_html_e("No members found.", 'wp-mailing-group'); ?></td>
    276282
    277283            <tr>
  • wp-mailing-group/trunk/template/mg_messageadd.php

    r1752047 r3252678  
    5353            $status  = $row->status;
    5454
    55             $btn       = __("Update Message", 'mailing-group-module');
     55            $btn       = __("Update Message", 'wp-mailing-group');
    5656
    5757            $hidval    = 2;
     
    6363} else {
    6464
    65     $btn       = __("Submit", 'mailing-group-module');
     65    $btn       = __("Submit", 'wp-mailing-group');
    6666
    6767    $id        = "";
     
    103103    <h2 class="nav-tab-wrapper">
    104104
    105         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    106 
    107         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab nav-tab-active" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    108 
    109         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
    110 
    111         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     105        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     106
     107        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab nav-tab-active" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     108
     109        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
     110
     111        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    112112
    113113        <?php if($plugintype=='PAID') { ?>
    114114
    115             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     115            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    116116
    117117        <?php } ?>
    118118
    119         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     119        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    120120
    121121    </h2>
     
    125125    <div class="icon32" id="icon-edit"><br/></div>
    126126
    127     <h2><?php _e("Add/Edit Message", 'mailing-group-module'); ?> <a class='backlink' href='admin.php?page=wpmg_mailinggroup_messagelist'><?php _e("Back to Custom Messages", 'mailing-group-module') ?></a></h2>
     127    <h2><?php esc_html_e("Add/Edit Message", 'wp-mailing-group'); ?> <a class='backlink' href='admin.php?page=wpmg_mailinggroup_messagelist'><?php esc_html_e("Back to Custom Messages", 'wp-mailing-group') ?></a></h2>
    128128
    129129    <div id="col-left">
     
    139139                        <div class="form-field">
    140140
    141                             <label for="tag-name"><?php _e("Title", 'mailing-group-module'); ?> : </label>
    142 
    143                             <input type="text" size="40" id="title" name="title" value="<?php echo $title; ?>"/>
     141                            <label for="tag-name"><?php esc_html_e("Title", 'wp-mailing-group'); ?> : </label>
     142
     143                            <input type="text" size="40" id="title" name="title" value="<?php echo esc_attr($title); ?>"/>
    144144
    145145                        </div>
     
    147147                        <div class="form-field">
    148148
    149                             <label for="tag-name"><?php _e("Description", 'mailing-group-module'); ?> : </label>
    150 
    151                             <textarea name="description" rows="8" cols="50" id="description"><?php echo $description; ?></textarea>
     149                            <label for="tag-name"><?php esc_html_e("Description", 'wp-mailing-group'); ?> : </label>
     150
     151                            <textarea name="description" rows="8" cols="50" id="description"><?php echo esc_textarea($description); ?></textarea>
    152152
    153153                        </div>
     
    155155                        <div class="form-field">
    156156
    157                             <label for="tag-name"><?php _e("Visibility", 'mailing-group-module'); ?> : </label>
     157                            <label for="tag-name"><?php esc_html_e("Visibility", 'wp-mailing-group'); ?> : </label>
    158158
    159159                            <select name="status" id="status">
    160160
    161                                 <option value=""><?php _e("Select", 'mailing-group-module'); ?></option>
    162 
    163                                 <option value="0" <?php echo ($status=='0'?"selected":""); ?>><?php _e("Hidden", 'mailing-group-module'); ?></option>
    164 
    165                                 <option value="1" <?php echo ($status=='1'?"selected":""); ?>><?php _e("Visible", 'mailing-group-module'); ?></option>
     161                                <option value=""><?php esc_html_e("Select", 'wp-mailing-group'); ?></option>
     162
     163                                <option value="0" <?php echo ($status=='0'?"selected":""); ?>><?php esc_html_e("Hidden", 'wp-mailing-group'); ?></option>
     164
     165                                <option value="1" <?php echo ($status=='1'?"selected":""); ?>><?php esc_html_e("Visible", 'wp-mailing-group'); ?></option>
    166166
    167167                            </select>
     
    171171                        <div class="form-field">
    172172
    173                             <label for="tag-name"><?php _e("Available variables", 'mailing-group-module'); ?> : </label>
     173                            <label for="tag-name"><?php esc_html_e("Available variables", 'wp-mailing-group'); ?> : </label>
    174174
    175175                            <div class="variableslist">
    176176
    177                                 <p>{%name%} = <?php _e("User's Name", 'mailing-group-module'); ?>,</p>
    178 
    179                                 <p>{%email%} = <?php _e("User's Email", 'mailing-group-module'); ?></p>
    180 
    181                                 <p>{%site_email%} = <?php _e("Site's Email", 'mailing-group-module'); ?></p>
    182 
    183                                 <p>{%site_title%} = <?php _e("Site's Title", 'mailing-group-module'); ?></p>
    184 
    185                                 <p>{%site_url%} = <?php _e("Site's Web Address", 'mailing-group-module'); ?></p>
    186 
    187                                 <p>{%group_name%} = <?php _e("Current Group Name", 'mailing-group-module'); ?></p>
     177                                <p>{%name%} = <?php esc_html_e("User's Name", 'wp-mailing-group'); ?>,</p>
     178
     179                                <p>{%email%} = <?php esc_html_e("User's Email", 'wp-mailing-group'); ?></p>
     180
     181                                <p>{%site_email%} = <?php esc_html_e("Site's Email", 'wp-mailing-group'); ?></p>
     182
     183                                <p>{%site_title%} = <?php esc_html_e("Site's Title", 'wp-mailing-group'); ?></p>
     184
     185                                <p>{%site_url%} = <?php esc_html_e("Site's Web Address", 'wp-mailing-group'); ?></p>
     186
     187                                <p>{%group_name%} = <?php esc_html_e("Current Group Name", 'wp-mailing-group'); ?></p>
    188188
    189189                            </div>
     
    193193                        <p class="submit">
    194194
    195                             <input type="submit" value="<?php echo $btn; ?>" class="button" id="submit" name="submit"/>
    196 
    197                             <input type="hidden" name="addme" value=<?php echo $hidval;?> >
    198 
    199                             <input type="hidden" name="id" value=<?php echo $id;?> >
     195                            <input type="submit" value="<?php echo esc_attr($btn); ?>" class="button" id="submit" name="submit"/>
     196
     197                            <input type="hidden" name="addme" value="<?php echo esc_attr($hidval);?>" >
     198
     199                            <input type="hidden" name="id" value="<?php echo esc_attr($id);?>" >
    200200
    201201                        </p>
  • wp-mailing-group/trunk/template/mg_messagelist.php

    r1752047 r3252678  
    4545if($info=="saved") {
    4646
    47     wpmg_showmessages("updated", __("Message has been added successfully.", 'mailing-group-module'));
     47    wpmg_showmessages("updated", __("Message has been added successfully.", 'wp-mailing-group'));
    4848
    4949} else if($info=="upd") {
    5050
    51     wpmg_showmessages("updated", __("Message has been updated successfully.", 'mailing-group-module'));
     51    wpmg_showmessages("updated", __("Message has been updated successfully.", 'wp-mailing-group'));
    5252
    5353} else if($info=="vis") {
    5454
    55     wpmg_showmessages("updated", __("Message has been set to visible successfully.", 'mailing-group-module'));
     55    wpmg_showmessages("updated", __("Message has been set to visible successfully.", 'wp-mailing-group'));
    5656
    5757} else if($info=="hid") {
    5858
    59     wpmg_showmessages("updated", __("Message has been  set to hidden successfully.", 'mailing-group-module'));
     59    wpmg_showmessages("updated", __("Message has been  set to hidden successfully.", 'wp-mailing-group'));
    6060
    6161} else if($info=="del") {
     
    6363    $wpdb->query("delete from ".$table_name_message." where id=".$delid);
    6464
    65     wpmg_showmessages("updated", __("Message has been deleted successfully.", 'mailing-group-module'));
     65    wpmg_showmessages("updated", __("Message has been deleted successfully.", 'wp-mailing-group'));
    6666
    6767}
     
    151151    <h2 class="nav-tab-wrapper">
    152152
    153         <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>" class="nav-tab"><?php _e("Introduction", 'mailing-group-module'); ?></a>
    154 
    155         <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab nav-tab-active" title="<?php _e("Custom Messages", 'mailing-group-module'); ?>"><?php _e("Custom Messages", 'mailing-group-module'); ?></a>
    156 
    157         <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php _e("Admin Messages", 'mailing-group-module'); ?>"><?php _e("Admin Messages", 'mailing-group-module'); ?></a>
    158 
    159         <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php _e("Stylesheet", 'mailing-group-module'); ?>"><?php _e("Stylesheet", 'mailing-group-module'); ?></a>
     153        <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" class="nav-tab"><?php esc_html_e("Introduction", 'wp-mailing-group'); ?></a>
     154
     155        <a href="admin.php?page=wpmg_mailinggroup_messagelist" class="nav-tab nav-tab-active" title="<?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Custom Messages", 'wp-mailing-group'); ?></a>
     156
     157        <a href="admin.php?page=wpmg_mailinggroup_adminmessagelist" class="nav-tab" title="<?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?>"><?php esc_html_e("Admin Messages", 'wp-mailing-group'); ?></a>
     158
     159        <a href="admin.php?page=wpmg_mailinggroup_style" class="nav-tab" title="<?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?>"><?php esc_html_e("Stylesheet", 'wp-mailing-group'); ?></a>
    160160
    161161        <?php if($plugintype=='PAID') { ?>
    162162
    163             <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php _e("Contact", 'mailing-group-module'); ?>"><?php _e("Contact", 'mailing-group-module'); ?></a>
     163            <a href="admin.php?page=wpmg_mailinggroup_contact" class="nav-tab" title="<?php esc_html_e("Contact", 'wp-mailing-group'); ?>"><?php esc_html_e("Contact", 'wp-mailing-group'); ?></a>
    164164
    165165        <?php } ?>
    166166
    167         <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php _e("Help", 'mailing-group-module'); ?>"><?php _e("Help", 'mailing-group-module'); ?></a>
     167        <a href="admin.php?page=wpmg_mailinggroup_help" class="nav-tab" title="<?php esc_html_e("Help", 'wp-mailing-group'); ?>"><?php esc_html_e("Help", 'wp-mailing-group'); ?></a>
    168168
    169169    </h2>
     
    171171    <div>&nbsp;</div>
    172172
    173     <a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_messageadd&act=add"><?php _e("New custom message", 'mailing-group-module'); ?></a></h2>
     173    <a class="button add-new-h2" href="admin.php?page=wpmg_mailinggroup_messageadd&act=add"><?php esc_html_e("New custom message", 'wp-mailing-group'); ?></a></h2>
    174174
    175175    <p>When a user sends a request to join a mailing group, you can send them a customised response, for example if you would like more information from them before approving their request. Any custom messages you save when responding to a subscription request appear in the list below.</p>
     
    181181            <tr role="row" class="topRow">
    182182
    183                 <th width="35%" class="sort topRow_messagelist"><a href="#"><?php _e("Title", 'mailing-group-module'); ?></a></th>
    184 
    185                 <th width="35%"><?php _e("Message", 'mailing-group-module'); ?></th>
    186 
    187                 <th width="20%"><?php _e("Hidden/Visible", 'mailing-group-module'); ?></th>
    188 
    189                 <th width="8%"><?php _e("Actions", 'mailing-group-module'); ?></th>
     183                <th width="35%" class="sort topRow_messagelist"><a href="#"><?php esc_html_e("Title", 'wp-mailing-group'); ?></a></th>
     184
     185                <th width="35%"><?php esc_html_e("Message", 'wp-mailing-group'); ?></th>
     186
     187                <th width="20%"><?php esc_html_e("Hidden/Visible", 'wp-mailing-group'); ?></th>
     188
     189                <th width="8%"><?php esc_html_e("Actions", 'wp-mailing-group'); ?></th>
    190190
    191191            </tr>
     
    223223                $act = "hid";
    224224
    225                 $lablestatus = __("Visible", 'mailing-group-module');
     225                $lablestatus = __("Visible", 'wp-mailing-group');
    226226
    227227                if($status==0) {
     
    229229                    $act = "vis";
    230230
    231                     $lablestatus = __("Hidden", 'mailing-group-module');
     231                    $lablestatus = __("Hidden", 'wp-mailing-group');
    232232
    233233                }
     
    237237            <tr>
    238238
    239                 <td width="40%"><?php echo $title; ?></td>
    240 
    241                 <td width="40%"><?php echo $desc; ?></td>
    242 
    243                 <td width="15%"><a href="admin.php?page=wpmg_mailinggroup_messagelist&act=<?php echo $act; ?>&id=<?php echo $id;?>"><?php echo $lablestatus; ?></a></td>
    244 
    245                 <td width="10%" class="last"><a href="admin.php?page=wpmg_mailinggroup_messageadd&act=upd&id=<?php echo $id;?>" class="edit_record" title="<?php _e("Edit", 'mailing-group-module'); ?>"></a>|<a class="delete_record" title="<?php _e("Delete", 'mailing-group-module'); ?>" href="admin.php?page=wpmg_mailinggroup_messagelist&info=del&did=<?php echo $id;?>" onclick="return confirm('<?php _e("Are you sure you want to delete this message?", 'mailing-group-module'); ?>');"></a></td>
     239                <td width="40%"><?php echo esc_html($title); ?></td>
     240
     241                <td width="40%"><?php echo esc_html($desc); ?></td>
     242
     243                <td width="15%"><a href="admin.php?page=wpmg_mailinggroup_messagelist&act=<?php echo esc_attr($act); ?>&id=<?php echo esc_attr($id);?>"><?php echo esc_html($lablestatus); ?></a></td>
     244
     245                <td width="10%" class="last"><a href="admin.php?page=wpmg_mailinggroup_messageadd&act=upd&id=<?php echo esc_attr($id);?>" class="edit_record" title="<?php esc_html_e("Edit", 'wp-mailing-group'); ?>"></a>|<a class="delete_record" title="<?php esc_html_e("Delete", 'wp-mailing-group'); ?>" href="admin.php?page=wpmg_mailinggroup_messagelist&info=del&did=<?php echo esc_attr($id);?>" onclick="return confirm('<?php esc_html_e("Are you sure you want to delete this message?", 'wp-mailing-group'); ?>');"></a></td>
    246246
    247247            </tr>
     
    253253            <tr>
    254254
    255                 <td colspan="3" align="center"><?php _e("No Message Found!", 'mailing-group-module'); ?></td>
     255                <td colspan="3" align="center"><?php esc_html_e("No Message Found!", 'wp-mailing-group'); ?></td>
    256256
    257257            <tr>
  • wp-mailing-group/trunk/template/mg_sendmessage.php

    r1752047 r3252678  
    4343        $objMem->addNewRow($table_name_message,$_POST, $myFields);
    4444
    45         wpmg_showmessages("updated", __("Message has been sent to user successfully", 'mailing-group-module'));
     45        wpmg_showmessages("updated", __("Message has been sent to user successfully", 'wp-mailing-group'));
    4646
    4747        /* //wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=sent");
     
    5151    } else {
    5252
    53         wpmg_showmessages("updated", __("Message has been sent to user successfully.", 'mailing-group-module'));
     53        wpmg_showmessages("updated", __("Message has been sent to user successfully.", 'wp-mailing-group'));
    5454
    5555        /* //wpmg_redirectTo("wpmg_mailinggroup_requestmanagerlist&info=sent");
     
    189189    <div class="icon32" id="icon-edit"><br/></div>
    190190
    191     <h2><?php _e("Send Message", 'mailing-group-module'); ?></h2>
     191    <h2><?php esc_html_e("Send Message", 'wp-mailing-group'); ?></h2>
    192192
    193193    <div id="col-left-pop">
     
    203203                        <div class="form-field">
    204204
    205                             <label for="tag-name"><?php _e("Message", 'mailing-group-module'); ?> : </label>
     205                            <label for="tag-name"><?php esc_html_e("Message", 'wp-mailing-group'); ?> : </label>
    206206
    207207                            <select name="selectmessage" id="selectmessage">
    208208
    209                                 <option value=""><?php _e("Select Message", 'mailing-group-module'); ?></option>
    210 
    211                                 <option value="0"><?php _e("New Message", 'mailing-group-module'); ?></option>
     209                                <option value=""><?php esc_html_e("Select Message", 'wp-mailing-group'); ?></option>
     210
     211                                <option value="0"><?php esc_html_e("New Message", 'wp-mailing-group'); ?></option>
    212212
    213213                                <?php foreach($result_message as $message) { ?>
    214214
    215                                     <option value="<?php echo $message->id; ?>"><?php echo wpmg_dbStripslashes($message->title); ?></option>
     215                                    <option value="<?php echo esc_attr($message->id); ?>"><?php echo esc_html(wpmg_dbStripslashes($message->title)); ?></option>
    216216
    217217                                <?php } ?>
     
    223223                        <div class="form-field marginbottom">
    224224
    225                             <label for="tag-name"><?php _e("Title", 'mailing-group-module'); ?> : </label>
    226 
    227                             <input type="text" size="40" id="title" name="title" value="<?php echo $title; ?>"/>
     225                            <label for="tag-name"><?php esc_html_e("Title", 'wp-mailing-group'); ?> : </label>
     226
     227                            <input type="text" size="40" id="title" name="title" value="<?php echo esc_attr($title); ?>"/>
    228228
    229229                        </div>
     
    231231                        <div class="form-field">
    232232
    233                             <label for="tag-name"><?php _e("Description", 'mailing-group-module'); ?> : </label>
    234 
    235                             <textarea name="description" rows="8" cols="50" id="description"><?php echo $description; ?></textarea>
     233                            <label for="tag-name"><?php esc_html_e("Description", 'wp-mailing-group'); ?> : </label>
     234
     235                            <textarea name="description" rows="8" cols="50" id="description"><?php echo esc_textarea($description); ?></textarea>
    236236
    237237                        </div>
     
    239239                        <div class="form-field marginleft">
    240240
    241                             <input type="checkbox" name="savetopreset" value="1" />&nbsp;<?php _e("Save to Preset Messages", 'mailing-group-module'); ?>
     241                            <input type="checkbox" name="savetopreset" value="1" />&nbsp;<?php esc_html_e("Save to Preset Messages", 'wp-mailing-group'); ?>
    242242
    243243                        </div>
     
    247247                        <div class="variableslist_pop">
    248248
    249                             <p>{%name%} = <?php _e("User's Name", 'mailing-group-module'); ?>,</p>
    250 
    251                             <p>{%email%} = <?php _e("User's Email", 'mailing-group-module'); ?></p>
    252 
    253                             <p>{%site_email%} = <?php _e("Site's Email", 'mailing-group-module'); ?></p>
    254 
    255                             <p>{%site_title%} = <?php _e("Site's Title", 'mailing-group-module'); ?></p>
    256 
    257                             <p>{%site_url%} = <?php _e("Site's Web Address", 'mailing-group-module'); ?></p>
    258 
    259                             <p>{%group_name%} = <?php _e("Current Group Name", 'mailing-group-module'); ?></p>
     249                            <p>{%name%} = <?php esc_html_e("User's Name", 'wp-mailing-group'); ?>,</p>
     250
     251                            <p>{%email%} = <?php esc_html_e("User's Email", 'wp-mailing-group'); ?></p>
     252
     253                            <p>{%site_email%} = <?php esc_html_e("Site's Email", 'wp-mailing-group'); ?></p>
     254
     255                            <p>{%site_title%} = <?php esc_html_e("Site's Title", 'wp-mailing-group'); ?></p>
     256
     257                            <p>{%site_url%} = <?php esc_html_e("Site's Web Address", 'wp-mailing-group'); ?></p>
     258
     259                            <p>{%group_name%} = <?php esc_html_e("Current Group Name", 'wp-mailing-group'); ?></p>
    260260
    261261                        </div>
     
    267267                            <input type="hidden" name="addme" value="1" >
    268268
    269                             <input type="hidden" name="id" value="<?php echo $id; ?>" >
     269                            <input type="hidden" name="id" value="<?php echo esc_attr($id); ?>" >
    270270
    271271                            <input type="hidden" name="status" value="1" >
  • wp-mailing-group/trunk/template/mg_settingstab.php

    r1752047 r3252678  
    99<div class="wrap">
    1010
    11     <h2><?php _e("General Setting", 'mailing-group-module'); ?></h2>
     11    <h2><?php esc_html_e("General Setting", 'wp-mailing-group'); ?></h2>
    1212
    1313    <div>
    1414
    15         <h3><?php _e('Please click on below icons to manage the content.', 'mailing-group-module'); ?></h3>
     15        <h3><?php esc_html_e('Please click on below icons to manage the content.', 'wp-mailing-group'); ?></h3>
    1616
    1717    </div>
     
    2525                <div class="icon_content">
    2626
    27                     <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php _e("Introduction", 'mailing-group-module'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/introction-icon.png'; ?>" alt="<?php _e("Introduction", 'mailing-group-module'); ?>" width="80" title="<?php _e("Introduction", 'mailing-group-module'); ?>" /></a>
     27                    <a href="admin.php?page=wpmg_mailinggroup_intro" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/introction-icon.png'; ?>" alt="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" width="80" title="<?php esc_html_e("Introduction", 'wp-mailing-group'); ?>" /></a>
    2828
    2929                </div>
     
    3131                <div class="icon_content">
    3232
    33                     <a href="admin.php?page=wpmg_mailinggroup_messagelist" title="<?php _e("Messages Manager", 'mailing-group-module'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/message-icon.png'; ?>" alt="<?php _e("Messages Manager", 'mailing-group-module'); ?>" title="<?php _e("Messages Manager", 'mailing-group-module'); ?>" width="80" /></a>
     33                    <a href="admin.php?page=wpmg_mailinggroup_messagelist" title="<?php esc_html_e("Messages Manager", 'wp-mailing-group'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/message-icon.png'; ?>" alt="<?php esc_html_e("Messages Manager", 'wp-mailing-group'); ?>" title="<?php esc_html_e("Messages Manager", 'wp-mailing-group'); ?>" width="80" /></a>
    3434
    3535                </div>
     
    3737                <div class="icon_content">
    3838
    39                     <a href="admin.php?page=wpmg_mailinggroup_style" title="<?php _e("Style Manager", 'mailing-group-module'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/style-icon.png'; ?>" width="80" alt="<?php _e("Style Manager", 'mailing-group-module'); ?>" title="<?php _e("Style Manager", 'mailing-group-module'); ?>" /></a>
     39                    <a href="admin.php?page=wpmg_mailinggroup_style" title="<?php esc_html_e("Style Manager", 'wp-mailing-group'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/style-icon.png'; ?>" width="80" alt="<?php esc_html_e("Style Manager", 'wp-mailing-group'); ?>" title="<?php esc_html_e("Style Manager", 'wp-mailing-group'); ?>" /></a>
    4040
    4141                </div>
     
    4545                    <div class="icon_content">
    4646
    47                         <a href="admin.php?page=wpmg_mailinggroup_contact" title="<?php _e("Contact Info", 'mailing-group-module'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/contact-info.png'; ?>" width="80" alt="<?php _e("Contact Info", 'mailing-group-module'); ?>" title="<?php _e("Contact Info", 'mailing-group-module'); ?>" /></a>
     47                        <a href="admin.php?page=wpmg_mailinggroup_contact" title="<?php esc_html_e("Contact Info", 'wp-mailing-group'); ?>"><img src="<?php echo WPMG_PLUGIN_URL.'/images/contact-info.png'; ?>" width="80" alt="<?php esc_html_e("Contact Info", 'wp-mailing-group'); ?>" title="<?php esc_html_e("Contact Info", 'wp-mailing-group'); ?>" /></a>
    4848
    4949                    </div>
  • wp-mailing-group/trunk/template/mg_testmail.php

    r2412695 r3252678  
    163163                                if(!$mail->Send()) {               
    164164                                   
    165                                     wpmg_showmessages("error", __( "Test Email Failed, Check debugging info above.", 'mailing-group-module') );                     
     165                                    wpmg_showmessages("error", __( "Test Email Failed, Check debugging info above.", 'wp-mailing-group') );                     
    166166                                    $_ARRDB['status'] = "1";
    167167                                   
    168168                                   
    169169                                }else{
    170                                     wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'mailing-group-module') );
     170                                    wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'wp-mailing-group') );
    171171                                    $_ARRDB['status']    = "0";
    172172                                    print_r($mail->ErrorInfo);
     
    225225
    226226
    227                                 wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'mailing-group-module') ); 
     227                                wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'wp-mailing-group') ); 
    228228
    229229                                }else{
    230230                                   
    231                                 wpmg_showmessages("error", __( "Test Email Failed, Check debugging info below.", 'mailing-group-module') );     
     231                                wpmg_showmessages("error", __( "Test Email Failed, Check debugging info below.", 'wp-mailing-group') );     
    232232                               
    233233                                print_r(error_get_last());
     
    284284                                if($wp_sent) { 
    285285
    286                                     wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'mailing-group-module') );                         
     286                                    wpmg_showmessages("updated", __( "Test Mail Sent Succesfully!", 'wp-mailing-group') );                         
    287287       
    288288
    289289                                } else {                       
    290290
    291                                     wpmg_showmessages("error", __( "Test Mail Failed, Try using PHP Mail in group settings!", 'mailing-group-module') );                           
     291                                    wpmg_showmessages("error", __( "Test Mail Failed, Try using PHP Mail in group settings!", 'wp-mailing-group') );                           
    292292       
    293293                                }                           
     
    305305                           
    306306
    307                             wpmg_showmessages('error', __( "Please fill all fields!", 'mailing-group-module') );
     307                            wpmg_showmessages('error', __( "Please fill all fields!", 'wp-mailing-group') );
    308308
    309309                           
     
    385385    <div class="icon32" id="icon-edit"><br/></div>
    386386
    387     <h2><?php _e("Test Email", 'mailing-group-module'); ?></h2>
     387    <h2><?php esc_html_e("Test Email", 'wp-mailing-group'); ?></h2>
    388388
    389389<div class="div800">
    390390
    391 <?php _e("You can test the 'Send Email' function here, to verify that your mailing group’s outgoing mail settings are functioning correctly. It will use the exact settings you have input for the mailing group you select below, and this test email will be sent to all subscribers of the selected mailing group.
    392 
    393 If you have not yet set up a mailing group, please ensure you do so, and add at least one member to it before you run this test.", 'mailing-group-module');
     391<?php esc_html_e("You can test the 'Send Email' function here, to verify that your mailing group's outgoing mail settings are functioning correctly. It will use the exact settings you have input for the mailing group you select below, and this test email will be sent to all subscribers of the selected mailing group.
     392
     393If you have not yet set up a mailing group, please ensure you do so, and add at least one member to it before you run this test.", 'wp-mailing-group');
    394394 ?>
    395395
     
    411411
    412412
    413                             <label for="tag-name"><?php _e("Subject", 'mailing-group-module'); ?> : </label>
     413                            <label for="tag-name"><?php esc_html_e("Subject", 'wp-mailing-group'); ?> : </label>
    414414                           
    415415                             <input type="text" size="40" id="subject" name="subject"  value=""/>
     
    422422
    423423
    424                             <label for="tag-name"><?php _e("Message", 'mailing-group-module'); ?> : </label>
     424                            <label for="tag-name"><?php esc_html_e("Message", 'wp-mailing-group'); ?> : </label>
    425425
    426426
     
    431431                        <div class="bootstrap-wrapper form-field">
    432432
    433                             <label for="tag-name"><?php _e("Group Name", 'mailing-group-module'); ?> : </label>
     433                            <label for="tag-name"><?php esc_html_e("Group Name", 'wp-mailing-group'); ?> : </label>
    434434
    435435
     
    443443
    444444
    445                                             <th class="sort topRow_messagelist"><?php _e("Mailing Group Name", 'mailing-group-module'); ?></th>
     445                                            <th class="sort topRow_messagelist"><?php esc_html_e("Mailing Group Name", 'wp-mailing-group'); ?></th>
    446446
    447447
     
    464464
    465465
    466                                             <td><input type="radio" name="group_name" id="selector" value="<?php echo $group->id; ?>"  />&nbsp;<?php echo $group->title; ?>
     466                                            <td><input type="radio" name="group_name" id="selector" value="<?php echo esc_attr($group->id); ?>"  />&nbsp;<?php echo esc_html($group->title); ?>
    467467
    468468                                            </td>
     
    488488                        <p class="submit">
    489489
    490                             <input type="submit" id="test_email" value="Send Email" class="button" <?php echo $disabled; ?>  name="submit"/>
     490                            <input type="submit" id="test_email" value="Send Email" class="button" <?php echo esc_attr($disabled); ?>  name="submit"/>
    491491
    492492                            <?php if(!empty($message)){ ?>
     
    532532           
    533533                    $status = get_option('wpmg_status_for_'.$group->email,'No data found - Refresh this page again in 10 minutes. If you still see this message correct your IMAP/POP setting on mailing groups page');
    534                     echo $status;
     534                    echo esc_html($status);
    535535               
    536536        echo '</td>';
     
    642642                }else{
    643643                   
    644                     echo $plugin_cron.' is queued  <span class="glyphicon glyphicon-ok"></span><br/>';
     644                    echo esc_html($plugin_cron).' is queued  <span class="glyphicon glyphicon-ok"></span><br/>';
    645645                }
    646646            }
     
    664664            <td><label>WPMG Version:</label>    </td>
    665665
    666             <td><?php echo $WPMG_SETTINGS['MG_VERSION_NO'];?></td>
     666            <td><?php echo esc_html($WPMG_SETTINGS['MG_VERSION_NO']);?></td>
    667667    </tr>
    668668
    669669    <tr>
    670670            <td><label>Web Server Info: </label>  </td>
    671             <td><?php echo $_SERVER['SERVER_SOFTWARE'] . "<br/>"; ?></td>
     671            <td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']) . "<br/>"; ?></td>
    672672    </tr>
    673673
     
    764764
    765765    <tr>
    766             <td><label>WP Remote Post:</label></td>           <td><?php echo $WP_REMOTE_POST; ?></td>
     766            <td><label>WP Remote Post:</label></td>           <td><?php echo esc_html($WP_REMOTE_POST); ?></td>
    767767
    768768    </tr>
  • wp-mailing-group/trunk/template/mg_user_form.php

    r2344820 r3252678  
    6161        } else {
    6262
    63             wpmg_showmessages("error", __("User with email address already exists, please contact administrator for more info.", 'mailing-group-module'));
     63            wpmg_showmessages("error", __("User with email address already exists, please contact administrator for more info.", 'wp-mailing-group'));
    6464
    6565        }
     
    6767    } else {
    6868
    69         wpmg_showmessages("error", __("Invalid captcha code, Please try again.", 'mailing-group-module'));
     69        wpmg_showmessages("error", __("Invalid captcha code, Please try again.", 'wp-mailing-group'));
    7070
    7171    }
     
    7373} else if($info=="saved") {
    7474
    75     wpmg_showmessages("updated", __("Thank you for your request to join our mailing group(s). You will be informed once a moderator has reviewed your request.", 'mailing-group-module'));
     75    wpmg_showmessages("updated", __("Thank you for your request to join our mailing group(s). You will be informed once a moderator has reviewed your request.", 'wp-mailing-group'));
    7676
    7777}
     
    103103.updated{display:inline !important;}
    104104
    105 <?php echo $custom_style = $WPMG_SETTINGS["MG_CUSTOM_STYLESHEET"]; ?>
     105<?php echo esc_url($custom_style = $WPMG_SETTINGS["MG_CUSTOM_STYLESHEET"]); ?>
    106106
    107107</style>
     
    123123                        <div class="form-field">
    124124
    125                             <label for="tag-name"><?php _e("Name", 'mailing-group-module'); ?> : </label>
    126 
    127                             <input type="text" size="40" id="fname" name="fname" value="<?php echo $fname; ?>"/>
    128 
    129                         </div>
    130 
    131                         <div class="form-field">
    132 
    133                             <label for="tag-name"><?php _e("Email Address", 'mailing-group-module'); ?> : </label>
    134 
    135                             <input type="text" size="40" id="email" name="email" value="<?php echo $email; ?>"/>
     125                            <label for="tag-name"><?php esc_html_e("Name", 'wp-mailing-group'); ?> : </label>
     126
     127                            <input type="text" size="40" id="fname" name="fname" value="<?php echo esc_attr($fname); ?>"/>
     128
     129                        </div>
     130
     131                        <div class="form-field">
     132
     133                            <label for="tag-name"><?php esc_html_e("Email Address", 'wp-mailing-group'); ?> : </label>
     134
     135                            <input type="text" size="40" id="email" name="email" value="<?php echo esc_attr($email); ?>"/>
    136136
    137137                        </div>
     
    141141                            <div class="check_div_fir">
    142142
    143                                 <p class="inner_check_imp"><?php _e("Mailing Group", 'mailing-group-module'); ?> :</p>
     143                                <p class="inner_check_imp"><?php esc_html_e("Mailing Group", 'wp-mailing-group'); ?> :</p>
    144144
    145145                            </div>
     
    153153                                foreach($result_groups as $group) { ?>
    154154
    155                                 <p class="inner_check_imp_group"><input type="checkbox" name="group_name[]" id="selector" value="<?php echo $group->id; ?>" <?php echo (in_array($group->id,$group_name)?"checked":""); ?> />&nbsp;<?php echo $group->title; ?></p>
    156 
    157                             <?php }}else{ _e("No group available", 'mailing-group-module'); }?>
     155                                <p class="inner_check_imp_group"><input type="checkbox" name="group_name[]" id="selector" value="<?php echo esc_attr($group->id); ?>" <?php echo (in_array($group->id,$group_name)?"checked":""); ?> />&nbsp;<?php echo esc_html($group->title); ?></p>
     156
     157                            <?php }}else{ esc_html_e("No group available", 'wp-mailing-group'); }?>
    158158
    159159                            </div>
     
    163163                        <div class="form-field">
    164164
    165                             <label for="tag-name"><?php _e("Captcha", 'mailing-group-module'); ?> : </label>
     165                            <label for="tag-name"><?php esc_html_e("Captcha", 'wp-mailing-group'); ?> : </label>
    166166
    167167                            <img src="<?php echo WPMG_PLUGIN_URL.'/lib/captcha.php'; ?>">
     
    177177                                <input type="submit" value="Subscribe" class="button" id="submit" name="submit"/>
    178178
    179                                 <input type="hidden" name="addme" value="<?php echo $hidval;?>" >
    180 
    181                                 <input type="hidden" name="id" value="<?php echo $id;?>" >
     179                                <input type="hidden" name="addme" value="<?php echo esc_attr($hidval);?>" >
     180
     181                                <input type="hidden" name="id" value="<?php echo esc_attr($id);?>" >
    182182
    183183                                <input type="hidden" name="status" value="0" >
  • wp-mailing-group/trunk/template/mg_viewmessage.php

    r1752047 r3252678  
    8585    <div class="icon32" id="icon-edit"><br/></div>
    8686
    87     <h2><?php _e("View Message", 'mailing-group-module'); ?></h2>
     87    <h2><?php esc_html_e("View Message", 'wp-mailing-group'); ?></h2>
    8888
    8989    <div id="col-left-pop">
     
    113113                    echo "<br>*******************************************************************************************<BR>";*/
    114114
    115                     echo $mailresult[0]->email_content;  /* // Get Body Of Mail number Return String Get Mail id in interger */
     115                    echo wp_kses_post($mailresult[0]->email_content);  /* // Get Body Of Mail number Return String Get Mail id in interger */
    116116
    117117                    ?>
  • wp-mailing-group/trunk/template/mg_viewmessageajax.php

    r1752047 r3252678  
    1515    <div class="icon32" id="icon-edit"><br/></div>
    1616
    17     <h2><?php _e("View Message", 'mailing-group-module'); ?></h2>
     17    <h2><?php esc_html_e("View Message", 'wp-mailing-group'); ?></h2>
    1818
    1919    <div id="col-left-pop">
     
    4343                    echo "<br>*******************************************************************************************<BR>";*/
    4444
    45                     echo $mailresult[0]->email_content;  /* // Get Body Of Mail number Return String Get Mail id in interger */
     45                    echo wp_kses_post($mailresult[0]->email_content);  /* // Get Body Of Mail number Return String Get Mail id in interger */
    4646
    4747                    ?>
Note: See TracChangeset for help on using the changeset viewer.