mailin
Last commit date
css
12 years ago
emails
12 years ago
img
12 years ago
js
12 years ago
lang
12 years ago
ajaxcall.php
12 years ago
ajaxcontent.php
12 years ago
ajaxmanagesubscribe.php
12 years ago
ajaxsmtp.php
12 years ago
api_form.php
12 years ago
compatibility.php
12 years ago
cron.php
12 years ago
listings.php
12 years ago
mailin.php
12 years ago
mailin_widget.php
12 years ago
mailinapi.class.php
12 years ago
readme.html
12 years ago
listings.php
408 lines
| 1 | <script src="<?php echo plugins_url(); ?>/mailin/js/jquery-1.9.1.min.js" ></script> |
| 2 | <script src="<?php echo plugins_url(); ?>/mailin/js/jquery-ui.min.js" ></script> |
| 3 | <script> |
| 4 | var base_url="<?php echo plugins_url(); ?>"; |
| 5 | var selectoption = "<?php esc_html_e('Select option', 'mailin_i18n' ); ?>"; |
| 6 | var selected = "<?php esc_html_e('Selected', 'mailin_i18n' ); ?>"; |
| 7 | </script> |
| 8 | <script src="<?php echo plugins_url(); ?>/mailin/js/jquery.multiselect.min.js" ></script> |
| 9 | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> |
| 10 | <link type="text/css" rel="stylesheet" media="screen" href="<?php echo plugins_url(); ?>/mailin/css/jquery.multiselect.css" /> |
| 11 | |
| 12 | |
| 13 | <script> |
| 14 | var base_url="<?php echo plugins_url(); ?>"; |
| 15 | var selectoption = "<?php esc_html_e('Select option', 'mailin_i18n' ); ?>"; |
| 16 | var selected = "<?php esc_html_e('Selected', 'mailin_i18n' ); ?>"; |
| 17 | </script> |
| 18 | <input type="hidden" name="token" id="token" value="<?php echo md5(get_option('mailin_apikey')); ?>" /> |
| 19 | <input type="hidden" name="language" id="language" value="<?php echo get_bloginfo('language'); ?>" /> |
| 20 | <script src="<?php echo plugins_url(); ?>/mailin/js/mailin.js" ></script> |
| 21 | <div class=""> |
| 22 | <img src="<?php echo plugins_url(); ?>/mailin/img/ |
| 23 | <?php esc_html_e('mailinblue.jpg', 'mailin_i18n' ); ?>" class="mailin-logo"> |
| 24 | <div style="float:left;font-weight:bold; padding:25px 0px 0px 0px; color:#268CCD;"> |
| 25 | <?php esc_html_e('Mailinblue : THE all-in-one plugin for your marketing and transactional emails.', 'mailin_i18n' ); ?></div><div class="clear"></div> |
| 26 | </div> |
| 27 | <div class="mailin_row"> |
| 28 | <fieldset class="fields"> |
| 29 | <legend class="lgend"> |
| 30 | <img src="<?php echo plugins_url(); ?>/mailin/img/logo.gif"> |
| 31 | <?php esc_html_e('Mailinblue', 'mailin_i18n' ); ?> |
| 32 | </legend> |
| 33 | <div class="contact-details"> |
| 34 | <h2 style="color:#268CCD;"><?php esc_html_e('Contact Mailinblue team', 'mailin_i18n' ); ?> </h2> |
| 35 | <div style="clear: both;"></div> |
| 36 | <p> <?php esc_html_e('Contact us:', 'mailin_i18n' ); ?> |
| 37 | <br><br><?php esc_html_e('Email:', 'mailin_i18n' ); ?> |
| 38 | <a style="color:#268CCD;" href="mailto:<?php esc_html_e('contact@mailinblue.com', 'mailin_i18n' ); ?>"> |
| 39 | <?php esc_html_e('contact@mailinblue.com', 'mailin_i18n' ); ?> |
| 40 | </a><br> |
| 41 | <?php esc_html_e('Phone : 0899 25 30 61', 'mailin_i18n' ); ?></p> |
| 42 | <p style="padding-top:20px;"><b><?php esc_html_e('For further informations, please visit our website:', 'mailin_i18n' ); ?> |
| 43 | </b><br><a style="color:#268CCD;" target="_blank" href="<?php esc_html_e('http://www.mailinblue.com/', 'mailin_i18n' ); ?>"> |
| 44 | <?php esc_html_e('http://www.mailinblue.com/', 'mailin_i18n' ); ?></a></p> |
| 45 | </div> |
| 46 | <div><?php esc_html_e('With the Mailinblue plugin, you can find everything you need to easily and efficiently send your emailing campains to your prospects and customers. ', 'mailin_i18n' ); ?> |
| 47 | <br><br> |
| 48 | <ul class="listt"> |
| 49 | <li><?php esc_html_e('Synchronize your subscribers with Mailinblue (subscribed and unsubscribed contacts)', 'mailin_i18n' ); ?></li> |
| 50 | <li><?php esc_html_e('Easily create good looking emailings', 'mailin_i18n' ); ?></li> |
| 51 | <li><?php esc_html_e('Schedule your campaigns', 'mailin_i18n' ); ?></li> |
| 52 | <li><?php esc_html_e('Track your results and optimize', 'mailin_i18n' ); ?></li> |
| 53 | |
| 54 | <li><?php esc_html_e('Monitor your transactional emails (purchase confirmation, password reset …) with a better deliverability and real-time analytics', 'mailin_i18n' ); ?></li> |
| 55 | </ul> |
| 56 | <b><?php esc_html_e('Why should you use Mailinblue ?', 'mailin_i18n' ); ?></b> |
| 57 | <ul class="listt"> |
| 58 | <li><?php esc_html_e('Optimized deliverability', 'mailin_i18n' ); ?></li> |
| 59 | <li><?php esc_html_e('Unbeatable pricing – best value in the industry', 'mailin_i18n' ); ?></li> |
| 60 | <li><?php esc_html_e('Technical support, by phone or by email', 'mailin_i18n' ); ?></li><br> |
| 61 | </ul> |
| 62 | </div><div style="clear:both;"> </div> |
| 63 | </fieldset> |
| 64 | </div> |
| 65 | |
| 66 | <div class="mailin_row"> |
| 67 | <fieldset class="fields"> |
| 68 | <legend class="lgend"><img src="<?php echo plugins_url(); ?>/mailin/img/logo.gif"> |
| 69 | <?php esc_html_e('Prerequisites', 'mailin_i18n' ); ?></legend> |
| 70 | <span> <?php esc_html_e('- You should have a Mailinblue account. You can create a free account here:', 'mailin_i18n' ); ?> |
| 71 | <a target="_blank" href="<?php esc_html_e('http://www.mailinblue.com/', 'mailin_i18n' ); ?>"> |
| 72 | <?php esc_html_e('http://www.mailinblue.com/', 'mailin_i18n' ); ?></a><br></span></fieldset> |
| 73 | </div> |
| 74 | <?php |
| 75 | |
| 76 | $checked1 = ''; |
| 77 | $checked2 = ''; |
| 78 | $checked3 = ''; |
| 79 | $checked4 = ''; |
| 80 | $checked5 = ''; |
| 81 | $checked6 = ''; |
| 82 | $style = ''; |
| 83 | |
| 84 | $mailin_apikey_status = get_option('mailin_apikey_status'); |
| 85 | if ($mailin_apikey_status == 1) |
| 86 | $checked1 = 'checked="checked"'; |
| 87 | else |
| 88 | $checked2 = 'checked="checked"'; |
| 89 | |
| 90 | $mailin_unsubscribe = get_option('mailin_unsubscribe'); |
| 91 | if ($mailin_unsubscribe == 1) |
| 92 | $checked5 = 'checked="checked"'; |
| 93 | else |
| 94 | $checked6 = 'checked="checked"'; |
| 95 | ?> |
| 96 | |
| 97 | <div class = "mailin_row"> |
| 98 | <fieldset class = "fields"> |
| 99 | <legend class = "lgend"><img src = "<?php echo plugins_url(); ?>/mailin/img/logo.gif"> |
| 100 | <?php esc_html_e('Settings', 'mailin_i18n' ); ?></legend> |
| 101 | |
| 102 | <form method = "post" action = "options-general.php?page=mailin_options"> |
| 103 | |
| 104 | <table class = "form-table blog_table"> |
| 105 | |
| 106 | <tr> |
| 107 | <td style = "width:250px; text-align:right;"> |
| 108 | <label style = "word-wrap:break-word; width:244px;"> |
| 109 | <?php esc_html_e('Activate Mailinblue:', 'mailin_i18n' ); ?></label> |
| 110 | </td> |
| 111 | <td> |
| 112 | <?php esc_html_e('Yes', 'mailin_i18n' ); ?> |
| 113 | <input type = "radio" <?php echo $checked1; ?> size = "32" value = "1" class = "mailin_api_status" name = "mailin_api_status"> |
| 114 | <?php esc_html_e('No', 'mailin_i18n' ); ?> |
| 115 | <input type = "radio" <?php echo $checked2; ?> size = "32" value = "0" class = "mailin_api_status" name = "mailin_api_status"> |
| 116 | </td> |
| 117 | </tr> |
| 118 | |
| 119 | <tr valign = "top" class = "apikey"> |
| 120 | <td scope = "row" style = "width:250px; text-align:right;"><?php esc_html_e('API Key', 'mailin_i18n'); ?>:</td> |
| 121 | <td> |
| 122 | <input name = "mailin_apikey" type = "text" id = "mailin_apikey" class = "code" value = "<?php echo esc_attr($api_key); ?>" size = "32" /> |
| 123 | <span title = "<?php esc_html_e('Please enter your API key from your Mailinblue account and if you donot have it yet, please go to www.mailinblue.com and subscribe. You can then get the API key from https://my.mailinblue.com/advanced/apikey', 'mailin_i18n' ); ?>" class = "toolTip"> </span> |
| 124 | </td> |
| 125 | </tr> |
| 126 | <tr> |
| 127 | <td colspan = "2"> |
| 128 | <input type = "hidden" name = "mailin_form_action" value = "apikey_update"/> |
| 129 | <input type = "submit" style = "float: left; margin-left:260px;" name = "Submit" value = "<?php esc_attr_e('Validate & Save', 'mailin_i18n');?>" class = "button" /> |
| 130 | </td> |
| 131 | </tr> |
| 132 | </table> |
| 133 | </form> |
| 134 | </fieldset> |
| 135 | </div> |
| 136 | <?php |
| 137 | |
| 138 | $mailin_manage_subscribe = get_option('mailin_manage_subscribe'); |
| 139 | if ($mailin_manage_subscribe == 1) |
| 140 | $checked3 = 'checked = "checked"'; |
| 141 | else |
| 142 | $checked4 = 'checked = "checked"'; |
| 143 | ?> |
| 144 | |
| 145 | <div class = "mailin_row blog_form"> |
| 146 | <fieldset class = "fields"> |
| 147 | <legend class = "lgend"><img src = "<?php echo plugins_url(); ?>/mailin/img/logo.gif" > |
| 148 | <?php esc_html_e('Your Lists', 'mailin_i18n'); ?></legend> |
| 149 | |
| 150 | |
| 151 | |
| 152 | <table class = "blog_table" style = "width:100%;"> |
| 153 | <form action = "options-general.php?page=mailin_options" method = "post"> |
| 154 | <tbody> |
| 155 | <tr> |
| 156 | <td> |
| 157 | |
| 158 | <input type = "hidden" value = "update_list" name = "mailin_form_action"> |
| 159 | <table class = "optiontable form-table"> |
| 160 | <tr> |
| 161 | <td style = "width:259px; text-align:right;"> |
| 162 | <label style = "word-wrap:break-word; width:244px;"> |
| 163 | <?php esc_html_e('Activate Mailinblue to manage subscribers:', 'mailin_i18n' ); ?></label> |
| 164 | </td> |
| 165 | <td> |
| 166 | <?php esc_html_e('Yes', 'mailin_i18n' ); ?> |
| 167 | <input type = "radio" <?php echo $checked3; ?> size = "32" value = "1" class = "managesubscribe" id = "managesubscribe" name = "managesubscribe"> |
| 168 | <?php esc_html_e('No', 'mailin_i18n' ); ?> |
| 169 | <input type = "radio" <?php echo $checked4; ?> size = "32" value = "0" class = "managesubscribe" id = "managesubscribe" name = "managesubscribe"> |
| 170 | </td> |
| 171 | </tr> |
| 172 | </table> |
| 173 | |
| 174 | <table class = "optiontable form-table"> |
| 175 | <tr> |
| 176 | <td style = "width:259px; text-align:right;"> |
| 177 | <label style = "word-wrap:break-word; width:244px;"> |
| 178 | <?php esc_html_e('Manage unsubscription from Front-Office', 'mailin_i18n' ); ?></label> |
| 179 | </td> |
| 180 | <td> |
| 181 | <?php esc_html_e('Yes', 'mailin_i18n' ); ?> |
| 182 | <input type = "radio" <?php echo $checked5; ?> size = "32" value = "1" class = "unsubscription" id = "unsubscription" name = "unsubscription"> |
| 183 | <?php esc_html_e('No', 'mailin_i18n' ); ?> |
| 184 | <input type = "radio" <?php echo $checked6; ?> size = "32" value = "0" class = "unsubscription" id = "unsubscription" name = "unsubscription"> |
| 185 | <span class = "toolTip" title = "<?php esc_html_e('If you activate this option, you will let your customers the possiblity to unsubscribe from your newsletter using the newsletter block displayed in the home page.', 'mailin_i18n'); ?>"> </span> |
| 186 | </td> |
| 187 | |
| 188 | </tr> |
| 189 | </table> |
| 190 | |
| 191 | <table class = "optiontable form-table subscribe"> |
| 192 | <tr> |
| 193 | <th scope = "row" style = "width:250px; text-align:right;"><label for = "to"><?php esc_html_e('Your Lists', 'mailin_i18n' ); ?> |
| 194 | </label> |
| 195 | </th> |
| 196 | <td > |
| 197 | |
| 198 | <form action = "options-general.php?page = mailin_options" method = "post"> |
| 199 | <select id = "mySelectBox" style = "height:150px;width:250px;" name = 'mailin_list[]' multiple = 'multiple' > |
| 200 | |
| 201 | <?php |
| 202 | $m_obj = new MailinApi; |
| 203 | $m_obj->createFolderCaseTwo(); |
| 204 | $mailin_apikey = get_option('mailin_apikey'); |
| 205 | if ($mailin_apikey) |
| 206 | $m_obj->updateUserLists($mailin_apikey); |
| 207 | $mailin_lists = get_option('mailin_lists'); |
| 208 | if (!is_array($mailin_lists)) |
| 209 | $mailin_lists = unserialize($mailin_lists); |
| 210 | if (!empty($mailin_lists)) |
| 211 | { |
| 212 | $selected_list = get_option( 'mailin_list_selected'); |
| 213 | $selected_list = explode('|', $selected_list); |
| 214 | foreach ($mailin_lists as $item) |
| 215 | { |
| 216 | $selected = ''; |
| 217 | if ($selected_list != '' && in_array($item->id, $selected_list)) |
| 218 | $selected = 'selected = "selected"'; |
| 219 | ?> |
| 220 | |
| 221 | <option value = '<?php echo $item->id ?>' |
| 222 | <?php echo $selected; ?> > |
| 223 | <?php echo $item->name?></option> |
| 224 | |
| 225 | |
| 226 | <?php |
| 227 | } |
| 228 | ?> |
| 229 | </select> |
| 230 | <span class = "toolTip" title = "<?php esc_html_e('Select the contact list where you want to save the contacts of your site WordPress. By default, we have created a list WordPress in your Mailinblue account and we have selected it', 'mailin_i18n'); ?>"> </span> |
| 231 | </td> |
| 232 | </tr> |
| 233 | |
| 234 | <?php |
| 235 | } |
| 236 | ?> |
| 237 | <tr> |
| 238 | <td colspan = "2"> |
| 239 | <input type = "submit" style = "float: left; margin-left:260px;" name = "submit" |
| 240 | id = "submit" class = "button" |
| 241 | value = "<?php _e('Validate & Save', 'mailin_i18n'); ?>" /> |
| 242 | </div> |
| 243 | </td> |
| 244 | </tr> |
| 245 | <tr><td colspan = "2"> |
| 246 | <div style = "float:left;"> |
| 247 | |
| 248 | <?php |
| 249 | $cron_link = MAILIN_URL.'cron.php'; |
| 250 | echo esc_html_e('To synchronize the emails of your customers from Mailinblue platform to your WordPress website, you should run ', 'mailin_i18n').'<a target="_blank" href ="'.$cron_link.'?token='.md5(get_option('mailin_apikey')).'" >'; |
| 251 | echo esc_html_e(' this link', 'mailin_i18n').'</a>'; |
| 252 | echo esc_html_e(' each day.', 'mailin_i18n'); |
| 253 | ?> |
| 254 | |
| 255 | </div> |
| 256 | |
| 257 | </td></tr> |
| 258 | |
| 259 | </table> |
| 260 | |
| 261 | </td> |
| 262 | </tr> |
| 263 | </tbody> |
| 264 | </form> |
| 265 | </table> |
| 266 | |
| 267 | |
| 268 | </fieldset> |
| 269 | </div> |
| 270 | |
| 271 | <?php $options = get_option('mailin_smtp'); ?> |
| 272 | <div class = "mailin_row blog_form"> |
| 273 | <fieldset class = "fields"> |
| 274 | <legend class = "lgend"><img src = "<?php echo plugins_url(); ?>/mailin/img/logo.gif"> |
| 275 | <?php esc_html_e('Activate Mailinblue SMTP for your transactional emails', 'mailin_i18n'); ?></legend> |
| 276 | |
| 277 | |
| 278 | |
| 279 | <table style = "width: 100%;" class = "blog_table"> |
| 280 | <tbody> |
| 281 | <tr> |
| 282 | <td colspan = "2"> |
| 283 | <a href = "<?php esc_html_e('http://www.mailinblue.com/mailin-smtp', 'mailin_i18n' ); ?>" target = "_blank" > |
| 284 | <?php esc_html_e('Mailinblue SMTP', 'mailin_i18n' ); ?> |
| 285 | </a> |
| 286 | <?php esc_html_e(' is a product of Mailinblue and it allows you to manage your transactional emails', 'mailin_i18n'); ?> |
| 287 | <span class = "toolTip" title = "<?php esc_html_e('Transactional email is an expected email because it has been triggered automatically after a transaction or a specific event. Common examples of transactional email is : account opening and welcome message, order shipment confirmation, shipment tracking and purchase order status, registration via a contact form, account termination, payment confirmation, invoice...', 'mailin_i18n'); ?>"> </span> |
| 288 | |
| 289 | </td> |
| 290 | </tr> |
| 291 | |
| 292 | <tr> |
| 293 | <td style = "width:250px; text-align:right;"> |
| 294 | <span style = "word-wrap:break-word; width:244px;"> |
| 295 | <?php echo esc_html_e('Activate Mailinblue SMTP:', 'mailin_i18n'); ?> |
| 296 | </span> |
| 297 | </td> |
| 298 | <td> |
| 299 | |
| 300 | <?php echo esc_html_e('Yes', 'mailin_i18n'); ?> |
| 301 | <input name = "mailin_smtp" type = "radio" id = "mailin_smtp" |
| 302 | class = "mailin_smtp_action" value = "1" size = "32" |
| 303 | <?php if ($options == 1)echo 'checked'; ?> /> |
| 304 | <?php echo esc_html_e('No', 'mailin_i18n'); ?> |
| 305 | <input name = "mailin_smtp" type = "radio" id = "mailin_smtp" |
| 306 | class = "mailin_smtp_action" <?php if ($options == 0)echo 'checked';?> value = "0" size="32" /> |
| 307 | |
| 308 | </td> |
| 309 | </tr> |
| 310 | |
| 311 | <?php |
| 312 | if (!get_option('mailin_smtp')) |
| 313 | $style = 'style="display:none;"'; |
| 314 | ?> |
| 315 | <tr id="smtptest" <?php echo $style; ?> > |
| 316 | <td colspan="2"> |
| 317 | <form action="options-general.php?page=mailin_options" method="post"> |
| 318 | <table class="optiontable form-table"> |
| 319 | <tr valign="top"> |
| 320 | <th scope="row" style="width:250px; text-align:right;"> |
| 321 | <span for="to"><?php esc_html_e('Send email test From / To', 'mailin_i18n' ); ?> |
| 322 | </span> |
| 323 | </th> |
| 324 | <td><input name="to" type="text" id="to" value="<?php echo get_option('admin_email'); ?>" |
| 325 | class="regular-text" /> |
| 326 | </td> |
| 327 | </tr> |
| 328 | <tr> |
| 329 | <td colspan="2"> |
| 330 | <input type="submit" style="float: left; margin-left:260px;" name="smtp_mailin" |
| 331 | id="smtp_mailin" class="button" |
| 332 | value="<?php _e('Send', 'mailin_i18n'); ?>" /> |
| 333 | </div> |
| 334 | </td> |
| 335 | </tr> |
| 336 | </table> |
| 337 | </form> |
| 338 | </td> |
| 339 | </tr> |
| 340 | </tbody> |
| 341 | </table> |
| 342 | </fieldset> |
| 343 | </div> |
| 344 | |
| 345 | |
| 346 | |
| 347 | <?php |
| 348 | |
| 349 | $unsub = $m_obj->getTotalUnsubUsers(); |
| 350 | |
| 351 | $sub = $m_obj->getTotalsubUsers(); |
| 352 | |
| 353 | ?> |
| 354 | |
| 355 | <div class="mailin_row subscribe"> |
| 356 | <input type="hidden" name="pagenumber" id="pagenumber" value="" /> |
| 357 | <fieldset class="fields"> |
| 358 | <legend class="lgend"><img src="<?php echo plugins_url(); ?>/mailin/img/logo.gif"> |
| 359 | <?php esc_html_e('Contacts list', 'mailin_i18n' ); ?> </legend> |
| 360 | |
| 361 | <?php esc_html_e('You have ', 'mailin_i18n' ); ?> |
| 362 | <?php echo $sub[0]->total; ?> |
| 363 | <?php esc_html_e(' contacts subscribed and ', 'mailin_i18n' ); ?> |
| 364 | <?php echo $unsub[0]->total; ?> |
| 365 | <?php esc_html_e(' contacts unsubscribed from WordPress. ', 'mailin_i18n' ); ?> |
| 366 | <?php $total = $sub[0]->total + $unsub[0]->total; |
| 367 | if($total != 0) |
| 368 | { |
| 369 | ?> |
| 370 | <span id="Spantextmore"><?php esc_html_e('For more details,', 'mailin_i18n' ); ?> |
| 371 | </span><span style="display:none;" id="Spantextless"> |
| 372 | <?php esc_html_e('For less details,', 'mailin_i18n' ); ?></span> |
| 373 | <a id="showUserlist" href="javascript:void(0);"><?php esc_html_e('click here', 'mailin_i18n' ); ?> </a> |
| 374 | <br /><br /> |
| 375 | <?php } ?> |
| 376 | <table class="widefat" style="display: none;"> |
| 377 | |
| 378 | <thead> |
| 379 | <tr> |
| 380 | <th><?php echo esc_html_e( 'No.', 'mailin_i18n'); ?></th> |
| 381 | <th><?php echo esc_html_e( 'First name', 'mailin_i18n'); ?> |
| 382 | </th> |
| 383 | <th><?php echo esc_html_e( 'Last name', 'mailin_i18n'); ?> |
| 384 | </th> |
| 385 | <th><?php echo esc_html_e( 'Email', 'mailin_i18n'); ?></th> |
| 386 | |
| 387 | <th><?php echo esc_html_e( 'Client', 'mailin_i18n'); ?></th> |
| 388 | |
| 389 | <th><?php echo esc_html_e( 'Newsletter WordPress status', 'mailin_i18n'); ?> |
| 390 | </th> |
| 391 | <th><?php echo esc_html_e( 'Newsletter Mailin Status', 'mailin_i18n'); ?> |
| 392 | <span title="<?php esc_html_e('Click on the icon to subscribe / unsubscribe the contact from Mailinblue and WordPress.', 'mailin_i18n' ); ?>" class="toolTip"> </span> |
| 393 | </th> |
| 394 | <th><?php echo esc_html_e( 'Date of last update', 'mailin_i18n'); ?> |
| 395 | </th> |
| 396 | </tr> |
| 397 | </thead> |
| 398 | |
| 399 | <tbody style="height: 200px; overflow-y: scroll;" class="midleft"> |
| 400 | |
| 401 | </tbody> |
| 402 | </table> |
| 403 | |
| 404 | </div> |
| 405 | |
| 406 | |
| 407 | |
| 408 |