WP Mail Bank: WordPress SMTP Plugin & Email Logs - Version 3.0.3

Version Description

  • FIX: Code Removed from Skip Action Hook on Wizard Page
  • FIX: Code Removed from De-activation Hook in case of Skipped Wizard Page
  • FIX: Code Removed from Uninstall Hook in case of Skipped Wizard Page
  • FIX: Obsolete Code Removed
  • FIX: Obsolete Code Removed
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 WP Mail Bank: WordPress SMTP Plugin & Email Logs
Version 3.0.3
Comparing to
See all releases

Code changes from version 3.0.2 to 3.0.3

assets/global/img/wizard-icon.png CHANGED
Binary file
includes/footer.php CHANGED
@@ -379,7 +379,6 @@ else
379
  var targeted_popup_class = jQuery(this).attr("data-popup-close-translator");
380
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
381
  }
382
-
383
  e.preventDefault();
384
  });
385
  if(typeof(open_popup_mail_bank) != "function")
@@ -390,7 +389,6 @@ else
390
  {
391
  var targeted_popup_class = jQuery(this).attr("data-popup-open");
392
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
393
-
394
  e.preventDefault();
395
  });
396
  // Close popup
@@ -398,7 +396,6 @@ else
398
  {
399
  var targeted_popup_class = jQuery(this).attr("data-popup-close");
400
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
401
-
402
  e.preventDefault();
403
  });
404
  jQuery(document).keydown(function(e)
@@ -1006,14 +1003,14 @@ else
1006
  overlay_loading_mail_bank();
1007
  jQuery.post(ajaxurl,
1008
  {
1009
- smtp_host: jQuery("#ux_txt_conn_search").val(),
1010
- param: "mail_bank_connectivity_test",
1011
- action: "mail_bank_action",
1012
- _wp_nonce: "<?php echo $connectivity_test_nonce; ?>"
1013
  },
1014
  function(data)
1015
  {
1016
- jQuery("#ux_tbody_smtp").html(data);
1017
  setTimeout(function()
1018
  {
1019
  remove_overlay_mail_bank();
@@ -1021,11 +1018,11 @@ else
1021
  });
1022
  }
1023
  });
1024
- var sidebar_load_interval = setInterval(load_sidebar_content_mail_bank ,1000);
1025
- setTimeout(function()
1026
- {
1027
- clearInterval(sidebar_load_interval);
1028
- }, 5000);
1029
  <?php
1030
  }
1031
  break;
379
  var targeted_popup_class = jQuery(this).attr("data-popup-close-translator");
380
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
381
  }
 
382
  e.preventDefault();
383
  });
384
  if(typeof(open_popup_mail_bank) != "function")
389
  {
390
  var targeted_popup_class = jQuery(this).attr("data-popup-open");
391
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
 
392
  e.preventDefault();
393
  });
394
  // Close popup
396
  {
397
  var targeted_popup_class = jQuery(this).attr("data-popup-close");
398
  jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
 
399
  e.preventDefault();
400
  });
401
  jQuery(document).keydown(function(e)
1003
  overlay_loading_mail_bank();
1004
  jQuery.post(ajaxurl,
1005
  {
1006
+ smtp_host: jQuery("#ux_txt_conn_search").val(),
1007
+ param: "mail_bank_connectivity_test",
1008
+ action: "mail_bank_action",
1009
+ _wp_nonce: "<?php echo $connectivity_test_nonce; ?>"
1010
  },
1011
  function(data)
1012
  {
1013
+ jQuery("#ux_tbody_smtp").html(data);
1014
  setTimeout(function()
1015
  {
1016
  remove_overlay_mail_bank();
1018
  });
1019
  }
1020
  });
1021
+ var sidebar_load_interval = setInterval(load_sidebar_content_mail_bank ,1000);
1022
+ setTimeout(function()
1023
+ {
1024
+ clearInterval(sidebar_load_interval);
1025
+ }, 5000);
1026
  <?php
1027
  }
1028
  break;
includes/mail-bank-manage-email.php CHANGED
@@ -334,7 +334,7 @@ if(!class_exists("mail_bank_manage_email"))
334
  }
335
  foreach($attributes_array as $file)
336
  {
337
- if(!empty($file))
338
  {
339
  $at = new mail_bank_Zend_Mime_Part(file_get_contents($file));
340
  $at->disposition = mail_bank_Zend_Mime::DISPOSITION_ATTACHMENT;
334
  }
335
  foreach($attributes_array as $file)
336
  {
337
+ if(file_exists($file))
338
  {
339
  $at = new mail_bank_Zend_Mime_Part(file_get_contents($file));
340
  $at->disposition = mail_bank_Zend_Mime::DISPOSITION_ATTACHMENT;
includes/queries.php CHANGED
@@ -68,7 +68,16 @@ else
68
  {
69
  case "mb_roles_and_capabilities":
70
  $details_roles_capabilities = get_mail_bank_meta_value("roles_and_capabilities");
71
- $other_roles_array = $details_roles_capabilities["capabilities"];
 
 
 
 
 
 
 
 
 
72
  break;
73
 
74
  case "mb_settings":
68
  {
69
  case "mb_roles_and_capabilities":
70
  $details_roles_capabilities = get_mail_bank_meta_value("roles_and_capabilities");
71
+ $other_roles_access_array = array(
72
+ "manage_options",
73
+ "edit_plugins",
74
+ "edit_posts",
75
+ "publish_posts",
76
+ "publish_pages",
77
+ "edit_pages",
78
+ "read"
79
+ );
80
+ $other_roles_array = isset($details_roles_capabilities["capabilities"]) && $details_roles_capabilities["capabilities"] != "" ? $details_roles_capabilities["capabilities"] : $other_roles_access_array;
81
  break;
82
 
83
  case "mb_settings":
includes/sidebar.php CHANGED
@@ -35,7 +35,7 @@ else
35
  <ul class="page-sidebar-menu-tech-banker" data-slide-speed="200">
36
  <div class="sidebar-search-wrapper" style="padding:20px;text-align:center">
37
  <a class="plugin-logo" href="<?php echo tech_banker_beta_url; ?>" target="_blank">
38
- <img src="<?php echo plugins_url("assets/global/img/mail-bank-logo.png",dirname(__FILE__));?>">
39
  </a>
40
  </div>
41
  <li id="ux_mb_li_email_configuration">
@@ -166,7 +166,7 @@ else
166
  </div>
167
  </div>
168
  </div>
169
- <?php
170
  }
171
  }
172
  ?>
35
  <ul class="page-sidebar-menu-tech-banker" data-slide-speed="200">
36
  <div class="sidebar-search-wrapper" style="padding:20px;text-align:center">
37
  <a class="plugin-logo" href="<?php echo tech_banker_beta_url; ?>" target="_blank">
38
+ <img src="<?php echo plugins_url("assets/global/img/mail-bank-logo.png",dirname(__FILE__));?>" alt="Mail Bank">
39
  </a>
40
  </div>
41
  <li id="ux_mb_li_email_configuration">
166
  </div>
167
  </div>
168
  </div>
169
+ <?php
170
  }
171
  }
172
  ?>
includes/translations.php CHANGED
@@ -62,7 +62,6 @@ else
62
  $wp_langs["en_ca"] = "English (Canada)";
63
  $wp_langs["en_nz"] = "English (New Zealand)";
64
  $wp_langs["en_za"] = "English (South Africa)";
65
- $wp_langs["en_gb"] = "English (UK)";
66
  $wp_langs["eo"] = "Esperanto";
67
  $wp_langs["et"] = "Eesti";
68
  $wp_langs["fo"] = "Føroyskt";
@@ -160,7 +159,6 @@ else
160
  $wp_langs["ta_lk"] = "தமிழ்";
161
  $wp_langs["tt_ru"] = "Татар теле";
162
  $wp_langs["te"] = "తెలుగు";
163
- $wp_langs["th"] = "ไทย";
164
  $wp_langs["bo"] = "བོད་སྐད";
165
  $wp_langs["tir"] = "ትግርኛ";
166
  $wp_langs["tuk"] = "Türkmençe";
62
  $wp_langs["en_ca"] = "English (Canada)";
63
  $wp_langs["en_nz"] = "English (New Zealand)";
64
  $wp_langs["en_za"] = "English (South Africa)";
 
65
  $wp_langs["eo"] = "Esperanto";
66
  $wp_langs["et"] = "Eesti";
67
  $wp_langs["fo"] = "Føroyskt";
159
  $wp_langs["ta_lk"] = "தமிழ்";
160
  $wp_langs["tt_ru"] = "Татар теле";
161
  $wp_langs["te"] = "తెలుగు";
 
162
  $wp_langs["bo"] = "བོད་སྐད";
163
  $wp_langs["tir"] = "ትግርኛ";
164
  $wp_langs["tuk"] = "Türkmençe";
languages/wp-mail-bank-th.mo ADDED
Binary file
languages/wp-mail-bank-th.po ADDED
@@ -0,0 +1,1041 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Mail Bank\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2017-05-08 09:36+0530\n"
6
+ "PO-Revision-Date: 2017-05-08 09:37+0530\n"
7
+ "Last-Translator: Tech Banker\n"
8
+ "Language-Team: Thai (Thailand)\n"
9
+ "Language: th_TH\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=1; plural=0;\n"
14
+ "X-Generator: Poedit 1.8.11\n"
15
+ "X-Loco-Source-Locale: en-IN\n"
16
+ "X-Loco-Project-Id: 22543\n"
17
+ "X-Loco-Api-Version: 1.0.17 20170505-1\n"
18
+ "X-Poedit-KeywordsList: __;_e;.;gettext\n"
19
+ "X-Poedit-Basepath: ..\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: assets\n"
22
+
23
+ #: includes/translations.php:179
24
+ msgid "If Interested, Kindly click "
25
+ msgstr "หากสนใจคลิกที่นี่"
26
+
27
+ #: includes/translations.php:180
28
+ msgid "here."
29
+ msgstr "ที่นี่"
30
+
31
+ #: includes/translations.php:190
32
+ msgid "Upgrade"
33
+ msgstr "อัพเกรด"
34
+
35
+ #: includes/translations.php:191
36
+ msgid "Premium Edition"
37
+ msgstr "Premium Edition"
38
+
39
+ #: includes/translations.php:192
40
+ msgid "This feature is available only in Premium Editions! <br> Kindly Purchase to unlock it!"
41
+ msgstr "คุณสมบัตินี้จะใช้ได้เฉพาะ Premium Edition เท่านั้น! <br> กรุณาทำการสั่งซื้อเพื่อปลกล็อคการใช้งาน"
42
+
43
+ #: includes/translations.php:195
44
+ msgid "Basic Info"
45
+ msgstr "ข้อมูลพื้นฐาน"
46
+
47
+ #: includes/translations.php:196
48
+ msgid "Account Setup"
49
+ msgstr "ตั้งค่าบัญชี"
50
+
51
+ #: includes/translations.php:197
52
+ msgid "Confirm"
53
+ msgstr "ยืนยัน"
54
+
55
+ #: includes/translations.php:200 includes/translations.php:433
56
+ msgid "Mail Bank"
57
+ msgstr "Mail Bank"
58
+
59
+ #: includes/translations.php:201
60
+ msgid "Email Setup"
61
+ msgstr "ตั้งค่าอีเมล"
62
+
63
+ #: includes/translations.php:202
64
+ msgid "Email Logs"
65
+ msgstr "บันทึกข้อมูลอีเมล"
66
+
67
+ #: includes/translations.php:203 includes/translations.php:257
68
+ msgid "Test Email"
69
+ msgstr "ทดสอบอีเมล"
70
+
71
+ #: includes/translations.php:204
72
+ msgid "Plugin Settings"
73
+ msgstr "ตั้งค่าปลั๊กอิน"
74
+
75
+ #: includes/translations.php:205
76
+ msgid "Feedbacks"
77
+ msgstr "ข้อเสนอแนะ"
78
+
79
+ #: includes/translations.php:206
80
+ msgid "Roles & Capabilities"
81
+ msgstr "บทบาทและความสามารถ"
82
+
83
+ #: includes/translations.php:207
84
+ msgid "System Information"
85
+ msgstr "ข้อมูลของระบบ"
86
+
87
+ #: includes/translations.php:208 includes/translations.php:434
88
+ msgid "Error Logs"
89
+ msgstr "บันทึกข้อผิดพลาด"
90
+
91
+ #: includes/translations.php:211
92
+ msgid "Success!"
93
+ msgstr "สำเร็จ!"
94
+
95
+ #: includes/translations.php:212
96
+ msgid "Email Setup has been updated Successfully"
97
+ msgstr "การตั้งค่าอีเมลได้รับการปรับปรุงเรียบร้อยแล้ว"
98
+
99
+ #: includes/translations.php:213
100
+ msgid "Your Feedback has been sent Successfully"
101
+ msgstr "ข้อเสนอแนะของคุณได้ถูกส่งไปเรียบร้อยแล้ว"
102
+
103
+ #: includes/translations.php:214
104
+ msgid "Test Email was sent Successfully!"
105
+ msgstr "อีเมลทดสอบได้ส่งไปเรียบร้อยแล้ว!"
106
+
107
+ #: includes/translations.php:215
108
+ msgid "Test Email was not sent!"
109
+ msgstr "อีเมลทดสอบไม่ได้ส่งออกไป!"
110
+
111
+ #: includes/translations.php:216
112
+ msgid "Plugin Settings have been updated Successfully"
113
+ msgstr "การตั้งค่าปลั๊กอินได้รับการปรับปรุงเรียบร้อยแล้ว"
114
+
115
+ #: includes/translations.php:217
116
+ msgid "The OAuth is not supported by providing SMTP Host, kindly provide username and password"
117
+ msgstr "OAuth ไม่ได้การรับรองโดย SMTP จากโฮส, กรุณาให้ชื่อผู้ใช้ และรหัสผ่าน"
118
+
119
+ #: includes/translations.php:218
120
+ msgid "Query"
121
+ msgstr "สอบถาม"
122
+
123
+ #: includes/translations.php:219
124
+ msgid "Language Interested to Translate"
125
+ msgstr "ภาษาที่ต้องการแปล"
126
+
127
+ #: includes/translations.php:220
128
+ msgid "Please enter the language you want to translate."
129
+ msgstr "กรุณาระบุภาษาที่คุณต้องการแปล"
130
+
131
+ #: includes/translations.php:221
132
+ msgid "Please enter the language"
133
+ msgstr "กรุณาระบุภาษา"
134
+
135
+ #: includes/translations.php:222
136
+ msgid "In this field, You would need to provide your name which will be sent along with your request"
137
+ msgstr "ในส่วนนี้, คุณจำเป็นต้องให้ชื่อของคุณ ซึ่งจะถูกส่งไปพร้อมกัยคำร้องขอของคุณ"
138
+
139
+ #: includes/translations.php:223
140
+ msgid "Important Disclaimer!"
141
+ msgstr "คำเตือน!"
142
+
143
+ #: includes/translations.php:224
144
+ msgid "In this field, You would need to provide your valid email which wiil be sent along with your request"
145
+ msgstr "ในส่วนนี้, คุณจะต้องระบุอีเมลที่ถูกต้อง ซึ่งจะถูกส่งไปพร้อมกับคำขอของคุณ"
146
+
147
+ #: includes/translations.php:225
148
+ msgid "Please enter your query."
149
+ msgstr "กรุณาระบุข้อสอบถามของคุณ"
150
+
151
+ #: includes/translations.php:226
152
+ msgid "Please enter the query."
153
+ msgstr "กรุณาระบุข้อสอบถาม"
154
+
155
+ #: includes/translations.php:227 includes/translations.php:345
156
+ msgid "Close"
157
+ msgstr "ปิด"
158
+
159
+ #: includes/translations.php:228
160
+ msgid "Send Request"
161
+ msgstr "ส่งคำร้อง"
162
+
163
+ #: includes/translations.php:229
164
+ msgid "Translation Request"
165
+ msgstr "คำขอแปล"
166
+
167
+ #: includes/translations.php:230
168
+ msgid "Are you sure you want to close without sending Translation Request?"
169
+ msgstr "คุณแน่ใจหรือไม่ว่าต้องการปิดโดยไม่ต้องส่งคำขอการแปล?"
170
+
171
+ #: includes/translations.php:231 includes/translations.php:402
172
+ msgid "Your Email"
173
+ msgstr "อีเมลของคุณ"
174
+
175
+ #: includes/translations.php:232 includes/translations.php:399
176
+ msgid "Your Name"
177
+ msgstr "ชื่อของคุณ"
178
+
179
+ #: includes/translations.php:233 includes/translations.php:401
180
+ msgid "Please provide your Name"
181
+ msgstr "กรุณาระบุชื่อของคุณ"
182
+
183
+ #: includes/translations.php:237
184
+ msgid "Sent"
185
+ msgstr "ส่งแล้ว"
186
+
187
+ #: includes/translations.php:238
188
+ msgid "Not Sent"
189
+ msgstr "ไม่ได้ส่ง"
190
+
191
+ #: includes/translations.php:239
192
+ msgid "You don't have Sufficient Access to this Page. Kindly contact the Administrator for more Privileges"
193
+ msgstr "คุณไม่มีสิทธิ์เพียงพอที่จะเข้าถึงหน้านี้ โปรดติดต่อผู้ดูแลระบบเพื่อรับสิทธิพิเศษเพิ่มเติม"
194
+
195
+ #: includes/translations.php:240
196
+ msgid "Enable"
197
+ msgstr "เปิด"
198
+
199
+ #: includes/translations.php:241
200
+ msgid "Disable"
201
+ msgstr "ปิด"
202
+
203
+ #: includes/translations.php:242
204
+ msgid "Override"
205
+ msgstr "แทนที"
206
+
207
+ #: includes/translations.php:243
208
+ msgid "Don't Override"
209
+ msgstr "ห้ามแทนที่"
210
+
211
+ #: includes/translations.php:244
212
+ msgid "Save Settings"
213
+ msgstr "บันทึกการตั้งค่า"
214
+
215
+ #: includes/translations.php:245
216
+ msgid "Subject"
217
+ msgstr "หัวข้อ"
218
+
219
+ #: includes/translations.php:246
220
+ msgid "Next Step"
221
+ msgstr "ขั้นถัดไป"
222
+
223
+ #: includes/translations.php:247
224
+ msgid "Previous Step"
225
+ msgstr "ขั้นก่อนหน้า"
226
+
227
+ #: includes/translations.php:250
228
+ msgid "Cc"
229
+ msgstr "Cc"
230
+
231
+ #: includes/translations.php:251
232
+ msgid "Bcc"
233
+ msgstr "Bcc"
234
+
235
+ #: includes/translations.php:252
236
+ msgid "Please provide valid Cc Email Address"
237
+ msgstr "กรุณาระบุอีเมลที่ถูกต้องสำหรับ Cc"
238
+
239
+ #: includes/translations.php:253
240
+ msgid "Please provide valid Bcc Email Address"
241
+ msgstr "กรุณาระบุอีเมลที่ถูกต้องสำหรับ Bcc"
242
+
243
+ #: includes/translations.php:254
244
+ msgid "Please provide Cc Email"
245
+ msgstr "กรุณาระบุอีเมลสำหรับ Cc"
246
+
247
+ #: includes/translations.php:255
248
+ msgid "Please provide Bcc Email"
249
+ msgstr "กรุณาระบุอีเมลสำหรับ Bcc"
250
+
251
+ #: includes/translations.php:256
252
+ msgid "Mailer Settings"
253
+ msgstr "การตั้งค่าการส่งอีเมล"
254
+
255
+ #: includes/translations.php:258
256
+ msgid "From Name"
257
+ msgstr "จากชื่อ"
258
+
259
+ #: includes/translations.php:259
260
+ msgid ""
261
+ "From Name is the inbox field that tells your recipient who sent the messages. If you would like to override the pre-configured From Name, then "
262
+ "you would need to insert the name in the inbox field"
263
+ msgstr "\"จากชื่อ\" คือ ช่องกล่องจดหมายซึ่งจะบอกผู้รับของคุณว่าใครเป็นผู้ส่งข้อความ หากคุณต้องการแทนที่\"จากชื่อ\"ที่กำหนดไว้ล่วงหน้า จากนั้นคุณจะต้องใส่ชื่อในช่องกล่องจดหมาย"
264
+
265
+ #: includes/translations.php:260
266
+ msgid "Please provide From Name"
267
+ msgstr "กรุณาระบุ จากชื่อ"
268
+
269
+ #: includes/translations.php:261
270
+ msgid "From Email"
271
+ msgstr "จากอีเมล"
272
+
273
+ #: includes/translations.php:262
274
+ msgid ""
275
+ "From Email is the inbox field that tells your recipient from which Email Address the messages are coming. If you would like to override the "
276
+ "pre-configured From Email, then you would need to insert an Email Address in the inbox field"
277
+ msgstr "จากอีเมล คือ ฟิลด์กล่องจดหมายซึ่งจะบอกผู้รับของคุณว่าอีเมลใดที่มีข้อความมาถึง ถ้าคุณต้องการแทนที่อีเมล ที่กำหนดไว้ล่วงหน้าจากนั้นคุณจะต้องใส่ที่อยู่อีเมลในกล่องขาเข้า"
278
+
279
+ #: includes/translations.php:263
280
+ msgid "Please provide From Email Address"
281
+ msgstr "กรุณาระบอีเมลแอดเดรส"
282
+
283
+ #: includes/translations.php:264
284
+ msgid "Mailer Type"
285
+ msgstr "ประเภทการส่งอีเมล"
286
+
287
+ #: includes/translations.php:265
288
+ msgid ""
289
+ "This field provides you an ability to choose a specific option for Mailer Type. If you would like to send an Email via SMTP mailer, you would "
290
+ "need to select Send Email via SMTP from the drop down or you could use PHP mail () Function"
291
+ msgstr ""
292
+ "ฟิลด์นี้ให้คุณสามารถเลือกตัวเลือกเฉพาะสำหรับ ประเภทการส่งอีเมล ได้ หากคุณต้องการส่งอีเมลผ่าน SMTP mailer คุณจะต้องเลือกส่งอีเมลผ่าน SMTP "
293
+ "จากเมนูแบบเลื่อนลงหรือคุณสามารถใช้ฟังก์ชัน PHP mail () ได้"
294
+
295
+ #: includes/translations.php:266
296
+ msgid "Send Email via SMTP"
297
+ msgstr "ส่งอีเมลผ่าน SMTP"
298
+
299
+ #: includes/translations.php:267
300
+ msgid "Use The PHP mail() Function"
301
+ msgstr "ใช้ PHP mail() Function"
302
+
303
+ #: includes/translations.php:268
304
+ msgid "SMTP Host"
305
+ msgstr "โฮส SMTP"
306
+
307
+ #: includes/translations.php:269
308
+ msgid ""
309
+ "If you would like to send an Email via different host, you would need to insert that specific host name like smtp.gmail.com in the inbox field"
310
+ msgstr "ถ้าคุณต้องการส่งอีเมลผ่านโฮสต์อื่น คุณจะต้องใส่ชื่อโฮสต์เฉพาะดังกล่าวเช่น smtp.gmail.com ในช่อง"
311
+
312
+ #: includes/translations.php:270 includes/translations.php:404
313
+ msgid "Please provide your Email Address"
314
+ msgstr "กรุณาระบอีเมลแอดเดรสของคุณ"
315
+
316
+ #: includes/translations.php:271
317
+ msgid "Please provide SMTP Host"
318
+ msgstr "กรุณาระบุโฮส SMTP"
319
+
320
+ #: includes/translations.php:272
321
+ msgid "SMTP Port"
322
+ msgstr "พอร์ต SMTP"
323
+
324
+ #: includes/translations.php:273
325
+ msgid "This inbox field is specified to provide a valid SMTP Port for authentication"
326
+ msgstr "ช่องนี้มีไว้สำหรับระบุพอร์ต SMTP ที่ถูกต้องสำหรับการตรวจสอบสิทธิ์"
327
+
328
+ #: includes/translations.php:274
329
+ msgid "Please provide SMTP Port"
330
+ msgstr "กรุณาระบุพอร์ต SMTP"
331
+
332
+ #: includes/translations.php:275
333
+ msgid "Encryption"
334
+ msgstr "การเข้ารหัส"
335
+
336
+ #: includes/translations.php:276
337
+ msgid ""
338
+ "It provides you an ability to choose a specific option for Encryption. If you would like to send an Email with TLS encryption, you would need "
339
+ "to select Use TLS Encryption from the drop down or you could use SSL Encryption. For that you would need to select Use SSL Encryption from the "
340
+ "drop down. If you would like to send an Email without encryption, you would need to select No Encryption from the drop down"
341
+ msgstr ""
342
+ "ช่วยให้คุณสามารถเลือกตัวเลือกเฉพาะสำหรับการเข้ารหัสได้ หากคุณต้องการส่งอีเมลด้วย TLS การเข้ารหัสลับคุณจะต้องเลือกใช้ TLS Encryption จากเมนูแบบเลื่อนลงหรือคุณสามารถใช้ SSL "
343
+ "Encryption เพื่อที่คุณจะต้องเลือก Use SSL Encryption จากเมนูแบบเลื่อนลง ถ้าคุณต้องการส่งอีเมลโดยไม่มีการเข้ารหัสคุณจะต้องเลือกไม่มีการเข้ารหัสจากเมนูแบบเลื่อนลง"
344
+
345
+ #: includes/translations.php:277
346
+ msgid "No Encryption"
347
+ msgstr "ไม่เข้ารหัส"
348
+
349
+ #: includes/translations.php:278
350
+ msgid "Use SSL Encryption"
351
+ msgstr "ใช้ SSL Encryption"
352
+
353
+ #: includes/translations.php:279
354
+ msgid "Use TLS Encryption"
355
+ msgstr "ใช้ TLS Encryption"
356
+
357
+ #: includes/translations.php:280 includes/translations.php:421
358
+ msgid "Authentication"
359
+ msgstr "การรับรอง"
360
+
361
+ #: includes/translations.php:281
362
+ msgid ""
363
+ "This inbox field allows you to choose an appropriate option for authentication. It provides you the Two-way authentication factor; If you "
364
+ "would like to authenticate yourself via Username and Password, you would need to select Use Username and Password from the drop down. You can "
365
+ "also authenticate by an OAuth 2.0 protocol, which requires Client Id and Secret Key, for that you would need to select Use OAuth (Client ID "
366
+ "and Secret Key) from the drop down. You can easily get Client Id and Secret Key from respective SMTP Server Developers section"
367
+ msgstr ""
368
+ "ช่องนี้ช่วยให้คุณสามารถเลือกตัวเลือกที่เหมาะสมสำหรับการตรวจสอบสิทธิ์ จะให้ปัจจัยพิสูจน์ตัวตนแบบสองทาง หากคุณต้องการตรวจสอบตัวตนผ่านทาง Username และ Password "
369
+ "คุณจำเป็นต้องเลือก Use Username and Password จากเมนูแบบเลื่อนลง คุณสามารถรับรองความถูกต้องโดยใช้โปรโตคอล OAuth 2.0 ซึ่งต้องใช้รหัสลูกค้าและคีย์ลับเพราะคุณต้องเลือกใช้ "
370
+ "OAuth (รหัสลูกค้าและคีย์ลับ) จากเมนูแบบเลื่อนลง คุณสามารถรับ ID ไคลเอ็นต์และคีย์ลับจากส่วนนักพัฒนาซอฟต์แวร์ SMTP ได้โดยง่าย"
371
+
372
+ #: includes/translations.php:282
373
+ msgid "Use SMTP Authentication"
374
+ msgstr "ใช้ SMTP Authentication"
375
+
376
+ #: includes/translations.php:283
377
+ msgid "Don't Use SMTP Authentication"
378
+ msgstr "ไม่ใช้ SMTP Authentication"
379
+
380
+ #: includes/translations.php:284
381
+ msgid "Test Email Address"
382
+ msgstr "อีเมลสำหรับทดสอบ"
383
+
384
+ #: includes/translations.php:285
385
+ msgid "In this field, you would need to provide a valid Email Address in the inbox field on which you would like to receive Test email"
386
+ msgstr "ในฟิลด์นี้คุณจะต้องระบุที่อยู่อีเมลที่ถูกต้องในกล่องขาเข้าที่คุณต้องการรับอีเมลทดสอบ"
387
+
388
+ #: includes/translations.php:286
389
+ msgid "Please provide Test Email Address"
390
+ msgstr "กรุณาระบอีเมลสำหรับการทดสอบ"
391
+
392
+ #: includes/translations.php:287
393
+ msgid "In this field, you would need to provide a subject for Test Email"
394
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุหัวข้อสำหรับใช้อีเมลทดสอบ"
395
+
396
+ #: includes/translations.php:288
397
+ msgid "Please provide Subject"
398
+ msgstr "กรุณาระบุหัวข้อ"
399
+
400
+ #: includes/translations.php:289
401
+ msgid "Email Content"
402
+ msgstr "เนื้อหาของอีเมล"
403
+
404
+ #: includes/translations.php:290
405
+ msgid "In this field, you would need to provide the content for Test Email"
406
+ msgstr "ในฟิลด์นี้ คุณจำเป้นต้องระบุเนื้อหาสำหรับอีเมลทดสอบ"
407
+
408
+ #: includes/translations.php:291
409
+ msgid "Send Test Email"
410
+ msgstr "ส่งอีเมลสำหรับทดสอบ"
411
+
412
+ #: includes/translations.php:292
413
+ msgid "SMTP Debugging Output"
414
+ msgstr "ข้อมูลที่ส่งออกมาจาก ข้อบกพร้องจาก SMTP"
415
+
416
+ #: includes/translations.php:293
417
+ msgid "Checking your settings"
418
+ msgstr "กำลังตรวจสอบการตั้งค่าของคุณ"
419
+
420
+ #: includes/translations.php:294
421
+ msgid "Result"
422
+ msgstr "ผลลัพธ์"
423
+
424
+ #: includes/translations.php:295
425
+ msgid "Send Another Test Email"
426
+ msgstr "ส่งอีเมลสำหรับทดสอบอีกอันหนึ่ง"
427
+
428
+ #: includes/translations.php:296
429
+ msgid "From Name Configuration"
430
+ msgstr "การตั้งค่า \"จากชื่อ\""
431
+
432
+ #: includes/translations.php:297
433
+ msgid ""
434
+ "If you would like to override the pre-configured name which will be used while sending Emails, then you would need to choose Override from the "
435
+ "drop down and vice-versa"
436
+ msgstr "ถ้าคุณต้องการแทนที่ชื่อที่กำหนดไว้ล่วงหน้าซึ่งจะใช้ในขณะที่ส่งอีเมลจากนั้นคุณจะต้องเลือกแทนที่จากเมนูแบบเลื่อนลงและกลับกัน"
437
+
438
+ #: includes/translations.php:298
439
+ msgid "From Email Configuration"
440
+ msgstr "การตั้งค่า \"จากอีเมล\""
441
+
442
+ #: includes/translations.php:299
443
+ msgid ""
444
+ "If you would like to override your pre-configured Email Address which will be used while sending Emails, then you would need to choose "
445
+ "Override from the drop down and vice-versa"
446
+ msgstr "ถ้าคุณต้องการแทนที่อีเมล์แอดเดรสที่กำหนดไว้ล่วงหน้าซึ่งจะใช้ในขณะที่ส่งอีเมลจากนั้นคุณจะต้องเลือกแทนที่จากเมนูแบบเลื่อนลงและในทางกลับกัน"
447
+
448
+ #: includes/translations.php:300
449
+ msgid "Username"
450
+ msgstr "ชื่อผู้ใช้"
451
+
452
+ #: includes/translations.php:301
453
+ msgid "In this field, you would need to provide a username to authenticate your SMTP details"
454
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุ ชื่อผู้ใช้ เพื่อรับรองข้อมูล SMTP ของคุณ"
455
+
456
+ #: includes/translations.php:302
457
+ msgid "Please provide username"
458
+ msgstr "กรุณาระบุชื่อผู้ใช้"
459
+
460
+ #: includes/translations.php:303
461
+ msgid "Password"
462
+ msgstr "รหัสผ่าน"
463
+
464
+ #: includes/translations.php:304
465
+ msgid "In this field, you would need to provide a password to authenticate your SMTP details"
466
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุรหัสผ่าน เพื่อรับรองข้อมูล SMTP ของคุณ"
467
+
468
+ #: includes/translations.php:305
469
+ msgid "Please provide password"
470
+ msgstr "กรุณาระบุรหัสผ่าน"
471
+
472
+ #: includes/translations.php:306
473
+ msgid "Redirect URI"
474
+ msgstr "Redirect URL"
475
+
476
+ #: includes/translations.php:307
477
+ msgid "Please copy this Redirect URI and Paste into Redirect URI field when creating your app"
478
+ msgstr "กรุณาคะดลอก URL นี้ และวาง ในฟิลด์ของ Redirect URL ในขณะกำลังสร้างแอปของคุณ"
479
+
480
+ #: includes/translations.php:308
481
+ msgid "Use OAuth (Client Id and Secret Key required)"
482
+ msgstr "ใช้ OAuth (จำเป็นต้องมี Client Id และ Secret Key)"
483
+
484
+ #: includes/translations.php:309
485
+ msgid "None"
486
+ msgstr "ไม่มี"
487
+
488
+ #: includes/translations.php:310
489
+ msgid "Plain Authentication"
490
+ msgstr "การรับรองความถูกต้องแบบธรรมดา"
491
+
492
+ #: includes/translations.php:311
493
+ msgid "Cram-MD5"
494
+ msgstr "Cram-MD5"
495
+
496
+ #: includes/translations.php:312
497
+ msgid "Login"
498
+ msgstr "เข้าสู่ระบบ"
499
+
500
+ #: includes/translations.php:313
501
+ msgid "Client Id"
502
+ msgstr "Client Id"
503
+
504
+ #: includes/translations.php:314
505
+ msgid "Secret Key"
506
+ msgstr "Secret Key"
507
+
508
+ #: includes/translations.php:315
509
+ msgid "Please provide valid Client Id issued by your SMTP Host"
510
+ msgstr "กรุณาระบุ Client ID ที่ออกโดยโฮสของ SMTP ของคุณ"
511
+
512
+ #: includes/translations.php:316
513
+ msgid "Please provide valid Secret Key issued by your SMTP Host"
514
+ msgstr "กรุณาระบุ Secret Key ที่ออกโดยโฮสของ SMTP ของคุณ"
515
+
516
+ #: includes/translations.php:317
517
+ msgid "Please provide Client Id"
518
+ msgstr "กรุณาระบุ Client ID"
519
+
520
+ #: includes/translations.php:318
521
+ msgid "Please provide Secret Key"
522
+ msgstr "กรุณาระบุ Secret Key"
523
+
524
+ #: includes/translations.php:319
525
+ msgid "Yes, automatically send a Test Email upon clicking on the Next Step Button to verify settings"
526
+ msgstr "ใช่ ส่งอีเมลทดสอบโดยอัตโนมัติ เมื่อคลิกที่ปุ่มขั้นถัดไปเพื่อยืนยันการตั้งค่า"
527
+
528
+ #: includes/translations.php:320
529
+ msgid "Email Address"
530
+ msgstr "อีเมลแอดเดรส"
531
+
532
+ #: includes/translations.php:321
533
+ msgid "In this field, you would need to add a valid Email Address in the inbox field from which you would like to send Emails"
534
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุอีเมลแอดเดรสที่ถูกต้อง ในช่อง โดยเือกอีเมลที่คุณต้องการจะทำการส่ง"
535
+
536
+ #: includes/translations.php:322
537
+ msgid "Please provide valid Email Address"
538
+ msgstr "กรุณาระบุอีเมลแอดเดรสที่ถูกต้อง"
539
+
540
+ #: includes/translations.php:323
541
+ msgid "Reply To"
542
+ msgstr "ตอบกลับถึง"
543
+
544
+ #: includes/translations.php:324
545
+ msgid ""
546
+ "In this field, you would need to add a valid Email Address that is automatically inserted into the Reply To field when a user replies to an "
547
+ "email message"
548
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุอีเมลแอดเดรสที่ถูกต้อง ซึ่งจะถูกใส่ให้โดยอัตโนมัติในฟิลด์ของ \"ตอบกลับถึง\" เมื่อผู้ใช้ตอบกลับข้อความ"
549
+
550
+ #: includes/translations.php:325
551
+ msgid "Please provide Reply To Email Address"
552
+ msgstr "กรุณาระบอีเมลสำหรับการตอบกลับ"
553
+
554
+ #: includes/translations.php:326
555
+ msgid "Get Google Client Id and Secret Key"
556
+ msgstr "รับ Google Client Id และ Secret Key"
557
+
558
+ #: includes/translations.php:327
559
+ msgid "Get Microsoft Client Id and Secret Key"
560
+ msgstr "รับ Microsoft Client Id และ Secret Key"
561
+
562
+ #: includes/translations.php:328
563
+ msgid "Get Yahoo Client Id and Secret Key"
564
+ msgstr "รับ Yahoo Client Id และ Secret Key"
565
+
566
+ #: includes/translations.php:331
567
+ msgid "Start Date"
568
+ msgstr "วันที่เริ่มต้น"
569
+
570
+ #: includes/translations.php:332
571
+ msgid "Resend"
572
+ msgstr "ส่งใหม่"
573
+
574
+ #: includes/translations.php:333
575
+ msgid "Please provide Start Date"
576
+ msgstr "กรุณาระบุวันที่เริ่มต้น"
577
+
578
+ #: includes/translations.php:334
579
+ msgid "This field shows starting date of Email Logs"
580
+ msgstr "ฟิลด์นี้แสดงวันที่เริ่มต้นของการบันทึกอีเมล"
581
+
582
+ #: includes/translations.php:335
583
+ msgid "End Date"
584
+ msgstr "วันที่สิ้นสุด"
585
+
586
+ #: includes/translations.php:336
587
+ msgid "Please provide End Date"
588
+ msgstr "กรุณาระบุวันที่สิ้นสุด"
589
+
590
+ #: includes/translations.php:337
591
+ msgid "This field shows ending date of Email Logs"
592
+ msgstr "ฟิลด์นี้แสดงวันที่สิ้นสุดของการบันทึกอีเมล"
593
+
594
+ #: includes/translations.php:338
595
+ msgid "Submit"
596
+ msgstr "ยอมรับ"
597
+
598
+ #: includes/translations.php:339
599
+ msgid "Bulk Action"
600
+ msgstr "การกระทำเป็นกลุ่ม"
601
+
602
+ #: includes/translations.php:340
603
+ msgid "Delete"
604
+ msgstr "ลบ"
605
+
606
+ #: includes/translations.php:341
607
+ msgid "Apply"
608
+ msgstr "ใช้"
609
+
610
+ #: includes/translations.php:342
611
+ msgid "Email To"
612
+ msgstr "อีเมลถึง"
613
+
614
+ #: includes/translations.php:343
615
+ msgid "Action"
616
+ msgstr "กระทำ"
617
+
618
+ #: includes/translations.php:344
619
+ msgid "Show Details"
620
+ msgstr "แสดงรายละเอียด"
621
+
622
+ #: includes/translations.php:346
623
+ msgid "Debugging Output"
624
+ msgstr "ผลของ Debugging"
625
+
626
+ #: includes/translations.php:347
627
+ msgid "Show Debugging Output"
628
+ msgstr "แสดงผล Debugging"
629
+
630
+ #: includes/translations.php:348
631
+ msgid "Email Sent To"
632
+ msgstr "อีเมลส่งไปยัง"
633
+
634
+ #: includes/translations.php:349
635
+ msgid "Date/Time"
636
+ msgstr "วันที่/เวลา"
637
+
638
+ #: includes/translations.php:350 includes/translations.php:418
639
+ msgid "Status"
640
+ msgstr "สถานะ"
641
+
642
+ #: includes/translations.php:351
643
+ msgid "From"
644
+ msgstr "จาก"
645
+
646
+ #: includes/translations.php:352
647
+ msgid "Back to Email Logs"
648
+ msgstr "ย้อนกลับไปยังบันทึกอีเมล"
649
+
650
+ #: includes/translations.php:355
651
+ msgid "Automatic Plugin Updates"
652
+ msgstr "อัพเดทปลั๊กอินอัตโนมัติ"
653
+
654
+ #: includes/translations.php:356
655
+ msgid "Please choose a specific option whether to allow Automatic Plugin Updates"
656
+ msgstr "โปรดเลือกตัวเลือกเฉพาะ ว่าจะอนุญาตให้อัปเดตปลั๊กอินอัตโนมัติหรือไม่"
657
+
658
+ #: includes/translations.php:357
659
+ msgid "Debug Mode"
660
+ msgstr "โหมด Debug"
661
+
662
+ #: includes/translations.php:358
663
+ msgid "Please choose a specific option for Debug Mode"
664
+ msgstr "โปรดเลือกตัวเลือกเฉพาะสำหรับโหมด Debug"
665
+
666
+ #: includes/translations.php:359
667
+ msgid "Remove Tables at Uninstall"
668
+ msgstr "นำ Table ออกเมื่อถอนการติดตั้ง"
669
+
670
+ #: includes/translations.php:360
671
+ msgid "Please choose a specific option whether to allow Remove Tables at Uninstall"
672
+ msgstr "โปรดเลือกตัวเลือกเฉพาะ เพื่ออนุญาตให้ลบ Table เมื่อถอนการติดตั้ง"
673
+
674
+ #: includes/translations.php:361
675
+ msgid "Monitoring Email Logs"
676
+ msgstr "กำลังตรวจสอบบันทึกอีเมล"
677
+
678
+ #: includes/translations.php:362
679
+ msgid "This field is used to allow Email Logs to monitor or not"
680
+ msgstr "ฟิลด์นี้ใช้เพื่ออนุญาตให้บันทึกอีเมลเพื่อตรวจสอบหรือไม่"
681
+
682
+ #: includes/translations.php:363
683
+ msgid "Error Reporting"
684
+ msgstr "รายงานข้อผิดพลาด"
685
+
686
+ #: includes/translations.php:364
687
+ msgid "If you would like to Report your Errors in Error Logs Menu, then you would need to Choose Enable from dropdown or vice-versa"
688
+ msgstr "หากต้องการรายงานข้อผิดพลาดในเมนูบันทึกข้อผิดพลาดคุณจะต้องเลือกเปิดใช้งานจากเมนูแบบเลื่อนลง หรือปิด"
689
+
690
+ #: includes/translations.php:368
691
+ msgid "Show Mail Bank Menu"
692
+ msgstr "แสดงเมนูของ Mail Bank"
693
+
694
+ #: includes/translations.php:369
695
+ msgid "Please choose a specific role who can see Sidebar Menu"
696
+ msgstr "โปรดเลือกบทบาทเฉพาะที่สามารถดูเมนูแถบด้านข้าง"
697
+
698
+ #: includes/translations.php:370
699
+ msgid "Administrator"
700
+ msgstr "ผู้ดูแลระบบ"
701
+
702
+ #: includes/translations.php:371
703
+ msgid "Author"
704
+ msgstr "ผู้แต่ง"
705
+
706
+ #: includes/translations.php:372
707
+ msgid "Editor"
708
+ msgstr "บรรณาธิการ"
709
+
710
+ #: includes/translations.php:373
711
+ msgid "Contributor"
712
+ msgstr "ผู้สนับสนุน"
713
+
714
+ #: includes/translations.php:374
715
+ msgid "Subscriber"
716
+ msgstr "สมาชิก"
717
+
718
+ #: includes/translations.php:375
719
+ msgid "Others"
720
+ msgstr "อื่นๆ"
721
+
722
+ #: includes/translations.php:376
723
+ msgid "Show Mail Bank Top Bar Menu"
724
+ msgstr "แสดงเมนูด้านบนของ Mail Bank"
725
+
726
+ #: includes/translations.php:377
727
+ msgid "Please choose a specific option from Mail Bank Top Bar Menu"
728
+ msgstr "โปรดเลือกตัวเลือกเฉพาะจากเมนูแถบด้านบนของ Mail Bank"
729
+
730
+ #: includes/translations.php:378
731
+ msgid "An Administrator Role can do the following "
732
+ msgstr "ผู้ดูแลระบบมีสิทธิทำได้ดังต่อไปนี้"
733
+
734
+ #: includes/translations.php:379
735
+ msgid "Please choose specific page available for the Administrator Access"
736
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของผู้ดูแลระบบ"
737
+
738
+ #: includes/translations.php:380
739
+ msgid "Full Control"
740
+ msgstr "ควบคุมทั้งหมด"
741
+
742
+ #: includes/translations.php:381
743
+ msgid "An Author Role can do the following "
744
+ msgstr "ผู้แต่งมีสิทธิทำได้ดังต่อไปนี้"
745
+
746
+ #: includes/translations.php:382
747
+ msgid "Please choose specific page available for Author Access"
748
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของผู้แต่ง"
749
+
750
+ #: includes/translations.php:383
751
+ msgid "An Editor Role can do the following "
752
+ msgstr "บรรณาธิการมีสิทธิทำได้ดังต่อไปนี้"
753
+
754
+ #: includes/translations.php:384
755
+ msgid "Please choose specific page available for Editor Access"
756
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของบรรณาธิการ"
757
+
758
+ #: includes/translations.php:385
759
+ msgid "A Contributor Role can do the following "
760
+ msgstr "ผู้สนับสนุนมีสิทธิทำได้ดังต่อไปนี้"
761
+
762
+ #: includes/translations.php:386
763
+ msgid "Please choose specific page available for Contributor Access"
764
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของผู้สนับสนุน"
765
+
766
+ #: includes/translations.php:387
767
+ msgid "Other Roles can do the following "
768
+ msgstr "อื่นๆ มีสิทธิทำได้ดังต่อไปนี้"
769
+
770
+ #: includes/translations.php:388
771
+ msgid "Please choose specific page available for Others Role Access"
772
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของอื่นๆ"
773
+
774
+ #: includes/translations.php:389
775
+ msgid "Please tick the appropriate capabilities for security purposes "
776
+ msgstr "โปรดเลือกตามที่เหมาะสมเพื่อความปลอดภัย"
777
+
778
+ #: includes/translations.php:390
779
+ msgid "Only users with these capabilities can access Mail Bank"
780
+ msgstr "เฉพาะผู้ใช้ที่มีคุณสมบัติเหล่านี้เท่านั้นที่สามารถเข้าถึง Mail Bank"
781
+
782
+ #: includes/translations.php:391
783
+ msgid "A Subscriber Role can do the following"
784
+ msgstr "สมาชิกมีสิทธิทำได้ดังต่อไปนี้"
785
+
786
+ #: includes/translations.php:392
787
+ msgid "Please choose specific page available for Subscriber Access"
788
+ msgstr "กรุณาเลือกหน้าเฉพาะสำหรับเข้าถึงข้อมูลของสมาชิก"
789
+
790
+ #: includes/translations.php:395
791
+ msgid "Thank You!"
792
+ msgstr "ขอบคุณ!"
793
+
794
+ #: includes/translations.php:396
795
+ msgid "Kindly fill in the below form, if you would like to suggest some features which are not in the Plugin"
796
+ msgstr "กรุณากรอกข้อมูลในแบบฟอร์มด้านล่าง หากคุณต้องการแนะนำคุณลักษณะบางอย่างที่ไม่ได้อยู่ในปลั๊กอิน"
797
+
798
+ #: includes/translations.php:397
799
+ msgid "If you also have any suggestion/complaint, you can use the same form below"
800
+ msgstr "หากคุณมีข้อเสนอแนะ / คำร้องเรียนใด ๆ คุณสามารถใช้แบบฟอร์มด้านล่างนี้ได้"
801
+
802
+ #: includes/translations.php:398
803
+ msgid "You can also write us on"
804
+ msgstr "คุณยังสามารถเขียนถึงเราได้"
805
+
806
+ #: includes/translations.php:400
807
+ msgid "Please provide your Name which will be sent along with your Feedback"
808
+ msgstr "โปรดระบุชื่อของคุณ ซึ่งจะถูกส่งไปพร้อมกับข้อเสนอแนะของคุณ"
809
+
810
+ #: includes/translations.php:403
811
+ msgid "Please provide your Email Address which will be sent along with your Feedback"
812
+ msgstr "โปรดระบุอีเมลของคุณ ซึ่งจะถูกส่งไปพร้อมกับข้อเสนอแนะของคุณ"
813
+
814
+ #: includes/translations.php:405
815
+ msgid "Please provide your Feedback which will be sent along"
816
+ msgstr "โปรดระบุข้อเสนอแนะของคุณ ซึ่งจะถูกส่งไปพร้อมกัน"
817
+
818
+ #: includes/translations.php:406
819
+ msgid "Please provide your Feedback"
820
+ msgstr "โปรดระบุข้อเสนอแนะของคุณ"
821
+
822
+ #: includes/translations.php:407
823
+ msgid "Send Feedback"
824
+ msgstr "ส่งข้อเสนอแนะ"
825
+
826
+ #: includes/translations.php:408
827
+ msgid "Your request Email has been sent Successfully"
828
+ msgstr "อีเมลคำร้องของคุณได้ส่งไปเรียบร้อยแล้ว"
829
+
830
+ #: includes/translations.php:411
831
+ msgid "Sending Test Email to"
832
+ msgstr "กำลังส่งอีเมลไปยัง"
833
+
834
+ #: includes/translations.php:412
835
+ msgid "Email Status"
836
+ msgstr "สถานะอีเมล"
837
+
838
+ #: includes/translations.php:415
839
+ msgid "Connectivity Test"
840
+ msgstr "ทดสอบระบบการติดต่อ"
841
+
842
+ #: includes/translations.php:416
843
+ msgid "Transport"
844
+ msgstr "ขนส่ง"
845
+
846
+ #: includes/translations.php:417
847
+ msgid "Socket"
848
+ msgstr "Socket"
849
+
850
+ #: includes/translations.php:419
851
+ msgid "Service Available"
852
+ msgstr "พร้อมบริการ"
853
+
854
+ #: includes/translations.php:420
855
+ msgid "Server ID"
856
+ msgstr "Server ID"
857
+
858
+ #: includes/translations.php:422
859
+ msgid "Plain"
860
+ msgstr "Plain"
861
+
862
+ #: includes/translations.php:423
863
+ msgid "CRAM-MD5"
864
+ msgstr "CRAM-MD5"
865
+
866
+ #: includes/translations.php:424
867
+ msgid "OAuth 2.0"
868
+ msgstr "OAuth 2.0"
869
+
870
+ #: includes/translations.php:425
871
+ msgid "SMTP"
872
+ msgstr "SMTP"
873
+
874
+ #: includes/translations.php:426
875
+ msgid "Gmail API"
876
+ msgstr "Gmail API"
877
+
878
+ #: includes/translations.php:427
879
+ msgid "Outgoing Mail Server Hostname"
880
+ msgstr "Outgoing Mail Server Hostname"
881
+
882
+ #: includes/translations.php:428
883
+ msgid "Begin Test"
884
+ msgstr "เริ่มต้นทดสอบ"
885
+
886
+ #: includes/translations.php:429
887
+ msgid "localhost"
888
+ msgstr "localhost"
889
+
890
+ #: includes/translations.php:430
891
+ msgid "In this field, you would need to provide Outgoing Mail Server Hostname"
892
+ msgstr "ในฟิลด์นี้ คุณจำเป็นต้องระบุ Outgoing Mail Server Hostname"
893
+
894
+ #: includes/translations.php:435
895
+ msgid "In this field you would be able to see all PHP Errors"
896
+ msgstr "ในฟิลด์นี้ คุณจะสามารถเห็นข้อผิดพลาดทั้งหมดของ PHP"
897
+
898
+ #: includes/translations.php:436
899
+ msgid "Download Error Logs"
900
+ msgstr "ดาวน์โหลดบันทึกข้อผิดพลาด"
901
+
902
+ #: includes/translations.php:437
903
+ msgid "Clear Error Logs"
904
+ msgstr "ล้างบันทึกข้อผิดพลาด"
905
+
906
+ #: includes/translations.php:438
907
+ msgid "Output"
908
+ msgstr "ผลลัพธ์"
909
+
910
+ #: includes/translations.php:439
911
+ msgid "Error Logs has been cleared successfully"
912
+ msgstr "บันทึกข้อผิดพลาดได้ถูกล้างเรียบร้อยแล้ว"
913
+
914
+ #~ msgid "Email Log Details"
915
+ #~ msgstr "รายละเอียดการบันทึกอีเมล"
916
+
917
+ #~ msgid "Your request email has been sent Successfully"
918
+ #~ msgstr "อีเมลคำร้องของคุณได้ส่งไปเรียบร้อยแล้ว"
919
+
920
+ #~ msgid "Roles & Capabilities have been updated Successfully"
921
+ #~ msgstr "บทบาทและความสามารถ ได้ปรับปรุงเรียบร้อยแล้ว"
922
+
923
+ #~ msgid "Please choose an Action from Dropdown!"
924
+ #~ msgstr "กรุณาเลือก การกระทำ จากรายการเลื่อนลงนี้!"
925
+
926
+ #~ msgid "Please choose at least 1 record to delete!"
927
+ #~ msgstr "กรุณาเลือกอย่างน้อย 1 ข้อมูล เพื่อทำการลบ!"
928
+
929
+ #~ msgid "Are you sure you want to delete Email Logs?"
930
+ #~ msgstr "คุณมั่นใจหรือไม่ที่จะลบบัยทึกอีเมล?"
931
+
932
+ #~ msgid "Selected Logs have been deleted Successfully"
933
+ #~ msgstr "บันทึกที่เลือกไว้ได้ถูกลบเรียบร้อยแล้ว"
934
+
935
+ #~ msgid "Are you sure you want to delete Email Log?"
936
+ #~ msgstr "คุณมั่นใจหรือไม่ที่จะลบบัยทึกอีเมล?"
937
+
938
+ #~ msgid "Email Log has been deleted Successfully"
939
+ #~ msgstr "บันทึกอีเมลได้ถูกลบเรียบร้อยแล้ว"
940
+
941
+ #~ msgid "Invalid Secret Key. Please rectify and try again!"
942
+ #~ msgstr "Secret Key ไม่ถูกต้อง กรุณาปรับปรุงแก้ไข และทดลองใหม่!"
943
+
944
+ #~ msgid "Licensing"
945
+ #~ msgstr "การออกใบอนุญาต"
946
+
947
+ #~ msgid "Your Email has been Resent Successfully"
948
+ #~ msgstr "อีเมลของคุณได้ส่งใหม่เรียบร้อยแล้ว"
949
+
950
+ #~ msgid "Unfortunately, Your Email has not been Sent"
951
+ #~ msgstr "ขออภัย อีเมลของคุณยังไม่ได้รับการส่ง"
952
+
953
+ #~ msgid "Are you sure you want to Resend Email?"
954
+ #~ msgstr "คุณแน่ใจหรือว่าต้องการจะส่งอีเมลอีกครั้ง?"
955
+
956
+ #~ msgid "Like Button has been deleted Successfully"
957
+ #~ msgstr "ปุ่ม Like ได้ถูกลบเรียบร้อยแล้ว"
958
+
959
+ #~ msgid "In this field, you would need to provide your Name which will be sent along with your Feature Request"
960
+ #~ msgstr "ในฟิลด์นี้ คุณจะต้องระบุชื่อของคุณซึ่งจะถูกส่งไปพร้อมกับคำขอคุณลักษณะของคุณ"
961
+
962
+ #~ msgid "Your License has been activated Successfully"
963
+ #~ msgstr "ใบอนุญาตของคุณได้รับการเปิดใช้งานเรียบร้อยแล้ว"
964
+
965
+ #~ msgid "Settings"
966
+ #~ msgstr "การตั้งค่า"
967
+
968
+ #~ msgid "Not available"
969
+ #~ msgstr "ไม่พร้อมใช้งาน"
970
+
971
+ #~ msgid ""
972
+ #~ "The following php extensions are not found on your server or are currently disabled. These might create few problems in configuring Mail "
973
+ #~ "Bank. Please contact your WebHost to setup these extensions on your server."
974
+ #~ msgstr ""
975
+ #~ "php extensions ต่อไปนี้ไม่พบในเซิร์ฟเวอร์ของคุณหรือถูกปิดการใช้งานอยู่ในขณะนี้ ปัญหาเหล่านี้อาจสร้างปัญหาในการกำหนดค่า Mail Bank โปรดติดต่อ WebHost "
976
+ #~ "เพื่อตั้งค่าส่วนขยายเหล่านี้บนเซิร์ฟเวอร์ของคุณ"
977
+
978
+ #~ msgid "Email Details"
979
+ #~ msgstr "รายละเอียดอีเมล"
980
+
981
+ #~ msgid "Email Debugging output"
982
+ #~ msgstr "Email Debugging output"
983
+
984
+ #~ msgid "Important Notice!"
985
+ #~ msgstr "ข้อควรระวัง!"
986
+
987
+ #~ msgid ""
988
+ #~ "Congratulations! You have recently purchased Mail Bank Business Edition and now you would need to activate the license in order to unlock "
989
+ #~ "it!"
990
+ #~ msgstr "ขอแสดงความยินดี! คุณเพิ่งซื้อ Mail Bank Business Edition เมื่อเร็ว ๆ นี้และตอนนี้คุณจะต้องเปิดใช้งานใบอนุญาตเพื่อปลดล็อก!"
991
+
992
+ #~ msgid "Kindly fill in the required details and click on Validate License to unlock it"
993
+ #~ msgstr "กรุณากรอกรายละเอียดที่จำเป็นและคลิกที่ \"ตรวจสอบใบอนุญาต\" เพื่อปลดล็อค"
994
+
995
+ #~ msgid "If you face any issues activating the license, you may contact us at "
996
+ #~ msgstr "หากคุณประสบปัญหาใด ๆ ในการเปิดใช้งานใบอนุญาตคุณสามารถติดต่อเราได้ที่"
997
+
998
+ #~ msgid "Product Name"
999
+ #~ msgstr "ชื่อสินค้า"
1000
+
1001
+ #~ msgid "Current Version"
1002
+ #~ msgstr "เวอร์ชันปัจจุบัน"
1003
+
1004
+ #~ msgid "Website URL"
1005
+ #~ msgstr "URL เว็บไซต์"
1006
+
1007
+ #~ msgid "Order ID"
1008
+ #~ msgstr "รหัสคำสั่งซื้อ"
1009
+
1010
+ #~ msgid "API KEY"
1011
+ #~ msgstr "API KEY"
1012
+
1013
+ #~ msgid "Validate License"
1014
+ #~ msgstr "ตรวจสอบใบอนุญาต"
1015
+
1016
+ #~ msgid "This field shows your Installed Product"
1017
+ #~ msgstr "ฟิลด์นี้แสดงผลิตภัณฑ์ที่ติดตั้งของคุณ"
1018
+
1019
+ #~ msgid "This field shows your Installed Product Version"
1020
+ #~ msgstr "ฟิลด์นี้แสดงเวอร์ชันผลิตภัณฑ์ที่ติดตั้งไว้"
1021
+
1022
+ #~ msgid "This field shows your Website URL"
1023
+ #~ msgstr "ฟิลด์นี้แสดง URL เว็บไซต์"
1024
+
1025
+ #~ msgid "Please provide your Order ID which you have received after purchasing the Product. This will be used for Validating the License"
1026
+ #~ msgstr "โปรดระบุรหัสคำสั่งซื้อที่คุณได้รับหลังจากซื้อผลิตภัณฑ์ นี้จะใช้สำหรับการตรวจสอบสิทธิ์การใช้งาน"
1027
+
1028
+ #~ msgid "Please provide your API Key which you have received after purchasing the Product. This will be used for Validating the License"
1029
+ #~ msgstr "โปรดระบุ API Key ที่คุณได้รับหลังจากซื้อผลิตภัณฑ์ นี้จะใช้สำหรับการตรวจสอบสิทธิ์การใช้งาน"
1030
+
1031
+ #~ msgid "Please provide Order ID received after making the purchase"
1032
+ #~ msgstr "โปรดระบุรหัสคำสั่งซื้อที่ได้รับหลังจากทำการสั่งซื้อ"
1033
+
1034
+ #~ msgid "Please provide API Key received after making the purchase"
1035
+ #~ msgstr "โปรดระบุ API Key ที่ได้รับหลังจากทำการสั่งซื้อ"
1036
+
1037
+ #~ msgid "This feature is only available in Business and Developer Editions! <br> Kindly Purchase to unlock it!."
1038
+ #~ msgstr "คุณลักษณะนี้ใช้ได้เฉพาะใน Business and Developer Editions เท่านั้น! <br> กรุณาสั่งซื้อเพื่อปลดล็อก!"
1039
+
1040
+ #~ msgid "Business Edition"
1041
+ #~ msgstr "Business Edition"
lib/action-library.php CHANGED
@@ -1,411 +1,349 @@
1
  <?php
2
  /**
3
- * This file is used for managing data in database.
4
- *
5
- * @author Tech Banker
6
- * @package wp-mail-bank/lib
7
- * @version 2.0.0
8
- */
9
-
10
- if(!defined("ABSPATH")) exit; // Exit if accessed directly
11
- if(!is_user_logged_in())
12
- {
13
- return;
14
- }
15
- else
16
- {
17
- $access_granted = false;
18
- foreach($user_role_permission as $permission)
19
- {
20
- if(current_user_can($permission))
21
- {
22
- $access_granted = true;
23
- break;
24
- }
25
- }
26
- if(!$access_granted)
27
- {
28
- return;
29
- }
30
- else
31
- {
32
- if(!function_exists("get_mail_bank_details_unserialize"))
33
- {
34
- function get_mail_bank_details_unserialize($email_data_manage,$mb_date1,$mb_date2)
35
- {
36
- $email_details = array();
37
- foreach($email_data_manage as $raw_row)
38
- {
39
- $unserialize_data = unserialize($raw_row->meta_value);
40
- $unserialize_data["id"] = $raw_row->id;
41
- $unserialize_data["meta_id"] = $raw_row->meta_id;
42
- if($unserialize_data["timestamp"] >= $mb_date1 && $unserialize_data["timestamp"] <= $mb_date2)
43
- array_push($email_details,$unserialize_data);
44
- }
45
- return $email_details;
46
- }
47
- }
48
-
49
- if(isset($_REQUEST["param"]))
50
- {
51
- $obj_dbHelper_mail_bank = new dbHelper_mail_bank();
52
- switch(esc_attr($_REQUEST["param"]))
53
- {
54
- case "wizard_wp_mail_bank":
55
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "wp_mail_bank_check_status"))
56
- {
57
- $plugin_info_wp_mail_bank= new plugin_info_wp_mail_bank();
58
-
59
- global $wp_version;
60
-
61
- $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
62
- $type = isset($_REQUEST["type"]) ? esc_attr($_REQUEST["type"]) : "";
63
-
64
- update_option("wp-mail-bank-wizard-set-up", $type);
65
-
66
- $theme_details = array();
67
- if($wp_version >= 3.4)
68
- {
69
- $active_theme = wp_get_theme();
70
- $theme_details["theme_name"] = strip_tags($active_theme->Name);
71
- $theme_details["theme_version"] = strip_tags($active_theme->Version);
72
- $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
73
- }
74
-
75
- $plugin_stat_data = array();
76
- $plugin_stat_data["plugin_slug"] = "wp-mail-bank";
77
- $plugin_stat_data["type"] = "standard_edition";
78
- $plugin_stat_data["version_number"] = mail_bank_version_number;
79
- $plugin_stat_data["status"] = $type;
80
- $plugin_stat_data["event"] = "activate";
81
- $plugin_stat_data["domain_url"] = site_url();
82
- $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
83
-
84
- switch($type)
85
- {
86
- case "opt_in" :
87
- $plugin_stat_data["email"] = get_option("admin_email");
88
- $plugin_stat_data["wp_version"] = $wp_version;
89
- $plugin_stat_data["php_version"] = esc_html(phpversion());
90
- $plugin_stat_data["mysql_version"] = $wpdb->db_version();
91
- $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
92
- $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
93
- $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
94
- $plugin_stat_data["extensions"] = get_loaded_extensions();
95
- $plugin_stat_data["plugins"] = $plugin_info_wp_mail_bank->get_plugin_info_wp_mail_bank();
96
- $plugin_stat_data["themes"] = $theme_details;
97
- break;
98
- }
99
-
100
- if(function_exists("curl_init"))
101
- {
102
- $ch = curl_init();
103
- curl_setopt($ch, CURLOPT_URL, $url);
104
- curl_setopt($ch, CURLOPT_POST, 1);
105
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
106
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
107
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
108
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
109
- curl_setopt($ch, CURLOPT_POSTFIELDS,
110
- http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") !="" ? get_option("mb_tech_banker_site_id") : "", "action"=>"plugin_analysis_data")));
111
- $result = curl_exec($ch);
112
- update_option("mb_tech_banker_site_id",$result);
113
- curl_close($ch);
114
- }
115
- else
116
- {
117
- $response = wp_safe_remote_post($url, array
118
- (
119
- "method" => "POST",
120
- "timeout" => 45,
121
- "redirection" => 5,
122
- "httpversion" => "1.0",
123
- "blocking" => false,
124
- "headers" => array(),
125
- "body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "","action"=>"plugin_analysis_data")
126
- ));
127
-
128
- if(!is_wp_error($response))
129
- {
130
- $response["body"] != "" ? update_option("mb_tech_banker_site_id", $response["body"]) : "";
131
- }
132
- else
133
- {
134
- update_option("mb_tech_banker_site_id", "error");
135
- }
136
- }
137
- }
138
- break;
139
-
140
- case "mail_bank_set_hostname_port_module":
141
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_set_hostname_port" ))
142
- {
143
- $smtp_user = isset($_REQUEST["smtp_user"]) ? esc_attr($_REQUEST["smtp_user"]) : "";
144
- $hostname = substr(strrchr($smtp_user,"@"),1);
145
- $obj_mail_bank_discover_host = new mail_bank_discover_host();
146
- $hostname_to_set = $obj_mail_bank_discover_host->get_smtp_from_email($hostname);
147
- echo $hostname_to_set;
148
- }
149
- break;
150
-
151
- case "mail_bank_test_email_configuration_module":
152
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_test_email_configuration"))
153
- {
154
-
155
- parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "",$form_data);
156
- global $phpmailer;
157
- $logs = array();
158
- if(!is_object($phpmailer) || !is_a($phpmailer,"PHPMailer"))
159
- {
160
- if(file_exists(ABSPATH . WPINC . "/class-phpmailer.php"))
161
- require_once ABSPATH . WPINC . "/class-phpmailer.php";
162
-
163
- if(file_exists(ABSPATH . WPINC . "/class-smtp.php"))
164
- require_once ABSPATH . WPINC . "/class-smtp.php";
165
-
166
- $phpmailer = new PHPMailer(true) ;
167
- }
168
- $phpmailer->SMTPDebug = true;
169
-
170
- $to = esc_attr($form_data["ux_txt_email"]);
171
- $subject = stripcslashes(htmlspecialchars_decode($form_data["ux_txt_subject"], ENT_QUOTES));
172
- $message = htmlspecialchars_decode(!empty($form_data["ux_email_configuration_text_area"]) ? esc_attr($form_data["ux_email_configuration_text_area"]) : "This is a demo Test Email for Email Setup - Mail Bank");
173
- $headers = "Content-Type: text/html; charset= utf-8". "\r\n";
174
- $result = wp_mail($to,$subject,$message,$headers);
175
- $mb_email_configuration_data = $wpdb->get_row
176
- (
177
- $wpdb->prepare
178
- (
179
- "SELECT meta_value FROM ".mail_bank_meta().
180
- " WHERE meta_key = %s",
181
- "email_configuration"
182
- )
183
- );
184
- $unserialized_email_configuration_data = unserialize($mb_email_configuration_data->meta_value);
185
-
186
- $settings_data = $wpdb->get_var
187
- (
188
- $wpdb->prepare
189
- (
190
- "SELECT meta_value FROM ".mail_bank_meta().
191
- " WHERE meta_key=%s",
192
- "settings"
193
- )
194
- );
195
- $settings_data_array = unserialize($settings_data);
196
- $debugging_output = "";
197
-
198
- if($unserialized_email_configuration_data["mailer_type"] == "smtp")
199
- {
200
- $mail_bank_mail_status = get_option("mail_bank_mail_status");
201
- if($settings_data_array["debug_mode"] == "enable")
202
- {
203
- $debugging_output .= $mb_email_configuration_send_test_email_textarea."\n";
204
- $debugging_output .= $mb_test_email_sending_test_email." ".$to."\n";
205
- $debugging_output .= $mb_test_email_status." : ";
206
- $debugging_output .= get_option("mail_bank_is_mail_sent") == "Sent" ? $mb_status_sent : $mb_status_not_sent;
207
- $debugging_output .= "\n----------------------------------------------------------------------------------------\n";
208
- $debugging_output .= $mb_email_logs_debugging_output." :\n";
209
- $debugging_output .= "----------------------------------------------------------------------------------------\n";
210
- }
211
- $debugging_output .= $mail_bank_mail_status;
212
- echo $debugging_output;
213
- }
214
- else
215
- {
216
- $to_address = $phpmailer->getToAddresses();
217
-
218
- $email_logs_data_array = array();
219
- $email_logs_data_array["email_to"] = $to_address[0][0];
220
-
221
- if($settings_data_array["monitor_email_logs"] == "enable")
222
- {
223
- $email_logs_data_array["sender_name"] = $unserialized_email_configuration_data["sender_name"];
224
- $email_logs_data_array["sender_email"] = $unserialized_email_configuration_data["sender_email"];
225
- $email_logs_data_array["cc"] = "";
226
- $email_logs_data_array["bcc"] = "";
227
- $email_logs_data_array["subject"] = $phpmailer->Subject;
228
- $email_logs_data_array["content"] = $phpmailer->Body;
229
- $email_logs_data_array["timestamp"] = MAIL_BANK_LOCAL_TIME;
230
-
231
- if($result == "true" || $result == "1")
232
- {
233
- $email_logs_data_array["status"] = "Sent";
234
- }
235
- else
236
- {
237
- $email_logs_data_array["status"] = "Not Sent";
238
- }
239
- $email_logs_id = $wpdb->get_var
240
- (
241
- $wpdb->prepare
242
- (
243
- "SELECT id FROM ".mail_bank().
244
- " WHERE type = %s",
245
- "email_logs"
246
- )
247
- );
248
-
249
- $email_logs_data = array();
250
- $email_logs_data["meta_id"] = $email_logs_id;
251
- $email_logs_data["meta_key"] = "email_logs";
252
- $email_logs_data["meta_value"] = serialize($email_logs_data_array);
253
- $obj_dbHelper_mail_bank->insertCommand(mail_bank_meta(),$email_logs_data);
254
- }
255
- echo $result;
256
- }
257
- }
258
- break;
259
-
260
- case "mail_bank_settings_module":
261
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_settings"))
262
- {
263
- parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "",$settings_array);
264
-
265
- $settings_data = array();
266
- $settings_data["automatic_plugin_update"] = esc_attr($settings_array["ux_ddl_automatic_plugin_updates"]);
267
- $settings_data["debug_mode"] = esc_attr($settings_array["ux_ddl_debug_mode"]);
268
- $settings_data["remove_tables_at_uninstall"] = esc_attr($settings_array["ux_ddl_remove_tables"]);
269
- $settings_data["monitor_email_logs"] = esc_attr($settings_array["ux_ddl_monitor_email_logs"]);
270
- $settings_data["error_reporting"] = esc_attr($settings_array["ux_ddl_error_reporting"]);
271
-
272
- $where = array();
273
- $settings_data_array = array();
274
- $where["meta_key"] = "settings";
275
- $settings_data_array["meta_value"] = serialize($settings_data);
276
- $obj_dbHelper_mail_bank->updateCommand(mail_bank_meta(),$settings_data_array,$where);
277
- }
278
- break;
279
-
280
- case "mail_bank_email_configuration_settings_module":
281
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_email_configuration_settings"))
282
- {
283
- parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "",$form_data);
284
- $update_email_configuration_array = array();
285
- $update_email_configuration_array["email_address"] = esc_attr($form_data["ux_txt_email_address"]);
286
- $update_email_configuration_array["reply_to"] = "";
287
- $update_email_configuration_array["cc"] = "";
288
- $update_email_configuration_array["bcc"] = "";
289
- $update_email_configuration_array["mailer_type"] = esc_attr($form_data["ux_ddl_type"]);
290
- $update_email_configuration_array["sender_name_configuration"] = esc_attr($form_data["ux_ddl_from_name"]);
291
- $update_email_configuration_array["sender_name"] = isset($form_data["ux_txt_mb_from_name"]) ? esc_html($form_data["ux_txt_mb_from_name"]) : "";
292
- $update_email_configuration_array["from_email_configuration"] = esc_attr($form_data["ux_ddl_from_email"]);
293
- $update_email_configuration_array["sender_email"] = isset($form_data["ux_txt_mb_from_email_configuration"]) ? esc_html($form_data["ux_txt_mb_from_email_configuration"]) : "";
294
- $update_email_configuration_array["hostname"] = esc_html($form_data["ux_txt_host"]);
295
- $update_email_configuration_array["port"] = intval($form_data["ux_txt_port"]);
296
- $update_email_configuration_array["enc_type"]= esc_attr($form_data["ux_ddl_encryption"]);
297
- $update_email_configuration_array["auth_type"] = esc_attr($form_data["ux_ddl_mb_authentication"]);
298
- $update_email_configuration_array["client_id"] = esc_html(trim($form_data["ux_txt_client_id"]));
299
- $update_email_configuration_array["client_secret"] = esc_html(trim($form_data["ux_txt_client_secret"]));
300
- $update_email_configuration_array["username"] = esc_html($form_data["ux_txt_username"]);
301
- $update_email_configuration_array["automatic_mail"] = isset($form_data["ux_chk_automatic_sent_mail"]) ? esc_html($form_data["ux_chk_automatic_sent_mail"]) : "";
302
-
303
- if(preg_match( '/^\**$/',$form_data["ux_txt_password"]))
304
- {
305
- $email_configuration_data = $wpdb->get_var
306
- (
307
- $wpdb->prepare
308
- (
309
- "SELECT meta_value FROM ".mail_bank_meta().
310
- " WHERE meta_key=%s",
311
- "email_configuration"
312
- )
313
- );
314
- $email_configuration_array = unserialize($email_configuration_data);
315
- $update_email_configuration_array["password"] = $email_configuration_array["password"];
316
- }
317
- else
318
- {
319
- $update_email_configuration_array["password"] = base64_encode(esc_html($form_data["ux_txt_password"]));
320
- }
321
-
322
- $update_email_configuration_array["redirect_uri"] = esc_html($form_data["ux_txt_redirect_uri"]);
323
-
324
- update_option("update_email_configuration",$update_email_configuration_array);
325
-
326
- $mail_bank_auth_host = new mail_bank_auth_host($update_email_configuration_array);
327
- if(!in_array($form_data["ux_txt_host"],$mail_bank_auth_host->oauth_domains) && $form_data["ux_ddl_mb_authentication"] == "oauth2")
328
- {
329
- echo "100";
330
- die();
331
- }
332
-
333
- if($update_email_configuration_array["auth_type"] == "oauth2" && $update_email_configuration_array["mailer_type"] == "smtp")
334
- {
335
- if($update_email_configuration_array["hostname"] == "smtp.gmail.com")
336
- {
337
- $mail_bank_auth_host->google_authentication();
338
- }
339
- elseif($update_email_configuration_array["hostname"] == "smtp.live.com" && $update_email_configuration_array["mailer_type"] == "smtp")
340
- {
341
- $mail_bank_auth_host->microsoft_authentication();
342
- }
343
- elseif(in_array($update_email_configuration_array["hostname"],$mail_bank_auth_host->yahoo_domains))
344
- {
345
- $mail_bank_auth_host->yahoo_authentication();
346
- }
347
- }
348
- else
349
- {
350
- $update_email_configuration_data_array = array();
351
- $where = array();
352
- $where["meta_key"] = "email_configuration";
353
- $update_email_configuration_data_array["meta_value"] = serialize($update_email_configuration_array);
354
- $obj_dbHelper_mail_bank->updateCommand(mail_bank_meta(),$update_email_configuration_data_array,$where);
355
- }
356
- }
357
- break;
358
-
359
- case "error_logs_module":
360
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "","clear_error_logs_nonce"))
361
- {
362
- if(file_exists(MAIL_BANK_ERROR_LOGS_FILE))
363
- {
364
- file_put_contents(MAIL_BANK_ERROR_LOGS_FILE,"");
365
- }
366
- }
367
- break;
368
-
369
- case "mail_bank_connectivity_test":
370
- if(wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "connectivity_test_nonce"))
371
- {
372
- $host = isset($_REQUEST["smtp_host"]) ? esc_attr($_REQUEST["smtp_host"]) : "";
373
- $ports = array(25, 587, 465, 2525, 4065, 25025);
374
- $ports_result = array();
375
- foreach ($ports as $port)
376
- {
377
- $connection = @fsockopen($host, $port);
378
- if(is_resource($connection))
379
- {
380
- $ports_result[$port] = "Open";
381
- fclose($connection);
382
- }
383
- else
384
- {
385
- $ports_result[$port] = "Close";
386
- }
387
- }
388
- foreach($ports_result as $results => $val)
389
- {
390
- ?>
391
- <tr>
392
- <td>
393
- <?php echo $mb_smtp;?>
394
- </td>
395
- <td>
396
- <?php echo $host .":". intval($results);?>
397
- </td>
398
- <td>
399
- <span style="<?php echo $val == 'Close' ? 'color:red' : "";?>"><?php echo $val;?>
400
- </td>
401
- </tr>
402
- <?php
403
- }
404
- }
405
- break;
406
- }
407
- die();
408
- }
409
- }
410
  }
411
  ?>
1
  <?php
2
  /**
3
+ * This file is used for managing data in database.
4
+ *
5
+ * @author Tech Banker
6
+ * @package wp-mail-bank/lib
7
+ * @version 2.0.0
8
+ */
9
+ if (!defined("ABSPATH"))
10
+ exit; // Exit if accessed directly
11
+ if (!is_user_logged_in()) {
12
+ return;
13
+ } else {
14
+ $access_granted = false;
15
+ foreach ($user_role_permission as $permission) {
16
+ if (current_user_can($permission)) {
17
+ $access_granted = true;
18
+ break;
19
+ }
20
+ }
21
+ if (!$access_granted) {
22
+ return;
23
+ } else {
24
+ if (!function_exists("get_mail_bank_details_unserialize")) {
25
+
26
+ function get_mail_bank_details_unserialize($email_data_manage, $mb_date1, $mb_date2) {
27
+ $email_details = array();
28
+ foreach ($email_data_manage as $raw_row) {
29
+ $unserialize_data = unserialize($raw_row->meta_value);
30
+ $unserialize_data["id"] = $raw_row->id;
31
+ $unserialize_data["meta_id"] = $raw_row->meta_id;
32
+ if ($unserialize_data["timestamp"] >= $mb_date1 && $unserialize_data["timestamp"] <= $mb_date2)
33
+ array_push($email_details, $unserialize_data);
34
+ }
35
+ return $email_details;
36
+ }
37
+
38
+ }
39
+
40
+ if (isset($_REQUEST["param"])) {
41
+ $obj_dbHelper_mail_bank = new dbHelper_mail_bank();
42
+ switch (esc_attr($_REQUEST["param"])) {
43
+ case "wizard_wp_mail_bank":
44
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "wp_mail_bank_check_status")) {
45
+ $type = isset($_REQUEST["type"]) ? esc_attr($_REQUEST["type"]) : "";
46
+ update_option("wp-mail-bank-wizard-set-up", $type);
47
+ if ($type == "opt_in") {
48
+ $plugin_info_wp_mail_bank = new plugin_info_wp_mail_bank();
49
+
50
+ global $wp_version;
51
+
52
+ $url = tech_banker_stats_url . "/wp-admin/admin-ajax.php";
53
+
54
+ $theme_details = array();
55
+ if ($wp_version >= 3.4) {
56
+ $active_theme = wp_get_theme();
57
+ $theme_details["theme_name"] = strip_tags($active_theme->Name);
58
+ $theme_details["theme_version"] = strip_tags($active_theme->Version);
59
+ $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
60
+ }
61
+
62
+ $plugin_stat_data = array();
63
+ $plugin_stat_data["plugin_slug"] = "wp-mail-bank";
64
+ $plugin_stat_data["type"] = "standard_edition";
65
+ $plugin_stat_data["version_number"] = mail_bank_version_number;
66
+ $plugin_stat_data["status"] = $type;
67
+ $plugin_stat_data["event"] = "activate";
68
+ $plugin_stat_data["domain_url"] = site_url();
69
+ $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
70
+ $plugin_stat_data["email"] = get_option("admin_email");
71
+ $plugin_stat_data["wp_version"] = $wp_version;
72
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
73
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
74
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
75
+ $plugin_stat_data["operating_system"] = PHP_OS . " (" . PHP_INT_SIZE * 8 . ") BIT";
76
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
77
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
78
+ $plugin_stat_data["plugins"] = $plugin_info_wp_mail_bank->get_plugin_info_wp_mail_bank();
79
+ $plugin_stat_data["themes"] = $theme_details;
80
+
81
+
82
+ if (function_exists("curl_init")) {
83
+ $ch = curl_init();
84
+ curl_setopt($ch, CURLOPT_URL, $url);
85
+ curl_setopt($ch, CURLOPT_POST, 1);
86
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
87
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
88
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
89
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
90
+ curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array("data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "", "action" => "plugin_analysis_data")));
91
+ $result = curl_exec($ch);
92
+ update_option("mb_tech_banker_site_id", $result);
93
+ curl_close($ch);
94
+ } else {
95
+ $response = wp_safe_remote_post($url, array
96
+ (
97
+ "method" => "POST",
98
+ "timeout" => 45,
99
+ "redirection" => 5,
100
+ "httpversion" => "1.0",
101
+ "blocking" => false,
102
+ "headers" => array(),
103
+ "body" => array("data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "", "action" => "plugin_analysis_data")
104
+ ));
105
+
106
+ if (!is_wp_error($response)) {
107
+ $response["body"] != "" ? update_option("mb_tech_banker_site_id", $response["body"]) : "";
108
+ } else {
109
+ update_option("mb_tech_banker_site_id", "error");
110
+ }
111
+ }
112
+ }
113
+ }
114
+ break;
115
+
116
+ case "mail_bank_set_hostname_port_module":
117
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_set_hostname_port")) {
118
+ $smtp_user = isset($_REQUEST["smtp_user"]) ? esc_attr($_REQUEST["smtp_user"]) : "";
119
+ $hostname = substr(strrchr($smtp_user, "@"), 1);
120
+ $obj_mail_bank_discover_host = new mail_bank_discover_host();
121
+ $hostname_to_set = $obj_mail_bank_discover_host->get_smtp_from_email($hostname);
122
+ echo $hostname_to_set;
123
+ }
124
+ break;
125
+
126
+ case "mail_bank_test_email_configuration_module":
127
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_test_email_configuration")) {
128
+ parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "", $form_data);
129
+ global $phpmailer;
130
+ $logs = array();
131
+ if (!is_object($phpmailer) || !is_a($phpmailer, "PHPMailer")) {
132
+ if (file_exists(ABSPATH . WPINC . "/class-phpmailer.php"))
133
+ require_once ABSPATH . WPINC . "/class-phpmailer.php";
134
+
135
+ if (file_exists(ABSPATH . WPINC . "/class-smtp.php"))
136
+ require_once ABSPATH . WPINC . "/class-smtp.php";
137
+
138
+ $phpmailer = new PHPMailer(true);
139
+ }
140
+ $phpmailer->SMTPDebug = true;
141
+
142
+ $to = esc_attr($form_data["ux_txt_email"]);
143
+ $subject = stripcslashes(htmlspecialchars_decode($form_data["ux_txt_subject"], ENT_QUOTES));
144
+ $message = htmlspecialchars_decode(!empty($form_data["ux_email_configuration_text_area"]) ? esc_attr($form_data["ux_email_configuration_text_area"]) : "This is a demo Test Email for Email Setup - Mail Bank");
145
+ $headers = "Content-Type: text/html; charset= utf-8" . "\r\n";
146
+ $result = wp_mail($to, $subject, $message, $headers);
147
+ $mb_email_configuration_data = $wpdb->get_row
148
+ (
149
+ $wpdb->prepare
150
+ (
151
+ "SELECT meta_value FROM " . mail_bank_meta() .
152
+ " WHERE meta_key = %s", "email_configuration"
153
+ )
154
+ );
155
+ $unserialized_email_configuration_data = unserialize($mb_email_configuration_data->meta_value);
156
+
157
+ $settings_data = $wpdb->get_var
158
+ (
159
+ $wpdb->prepare
160
+ (
161
+ "SELECT meta_value FROM " . mail_bank_meta() .
162
+ " WHERE meta_key=%s", "settings"
163
+ )
164
+ );
165
+ $settings_data_array = unserialize($settings_data);
166
+ $debugging_output = "";
167
+
168
+ if ($unserialized_email_configuration_data["mailer_type"] == "smtp") {
169
+ $mail_bank_mail_status = get_option("mail_bank_mail_status");
170
+ if ($settings_data_array["debug_mode"] == "enable") {
171
+ $debugging_output .= $mb_email_configuration_send_test_email_textarea . "\n";
172
+ $debugging_output .= $mb_test_email_sending_test_email . " " . $to . "\n";
173
+ $debugging_output .= $mb_test_email_status . " : ";
174
+ $debugging_output .= get_option("mail_bank_is_mail_sent") == "Sent" ? $mb_status_sent : $mb_status_not_sent;
175
+ $debugging_output .= "\n----------------------------------------------------------------------------------------\n";
176
+ $debugging_output .= $mb_email_logs_debugging_output . " :\n";
177
+ $debugging_output .= "----------------------------------------------------------------------------------------\n";
178
+ }
179
+ $debugging_output .= $mail_bank_mail_status;
180
+ echo $debugging_output;
181
+ } else {
182
+ $to_address = $phpmailer->getToAddresses();
183
+
184
+ $email_logs_data_array = array();
185
+ $email_logs_data_array["email_to"] = $to_address[0][0];
186
+
187
+ if ($settings_data_array["monitor_email_logs"] == "enable") {
188
+ $email_logs_data_array["sender_name"] = $unserialized_email_configuration_data["sender_name"];
189
+ $email_logs_data_array["sender_email"] = $unserialized_email_configuration_data["sender_email"];
190
+ $email_logs_data_array["cc"] = "";
191
+ $email_logs_data_array["bcc"] = "";
192
+ $email_logs_data_array["subject"] = $phpmailer->Subject;
193
+ $email_logs_data_array["content"] = $phpmailer->Body;
194
+ $email_logs_data_array["timestamp"] = MAIL_BANK_LOCAL_TIME;
195
+
196
+ if ($result == "true" || $result == "1") {
197
+ $email_logs_data_array["status"] = "Sent";
198
+ } else {
199
+ $email_logs_data_array["status"] = "Not Sent";
200
+ }
201
+ $email_logs_id = $wpdb->get_var
202
+ (
203
+ $wpdb->prepare
204
+ (
205
+ "SELECT id FROM " . mail_bank() .
206
+ " WHERE type = %s", "email_logs"
207
+ )
208
+ );
209
+
210
+ $email_logs_data = array();
211
+ $email_logs_data["meta_id"] = $email_logs_id;
212
+ $email_logs_data["meta_key"] = "email_logs";
213
+ $email_logs_data["meta_value"] = serialize($email_logs_data_array);
214
+ $obj_dbHelper_mail_bank->insertCommand(mail_bank_meta(), $email_logs_data);
215
+ }
216
+ echo $result;
217
+ }
218
+ }
219
+ break;
220
+
221
+ case "mail_bank_settings_module":
222
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_settings")) {
223
+ parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "", $settings_array);
224
+
225
+ $settings_data = array();
226
+ $settings_data["automatic_plugin_update"] = esc_attr($settings_array["ux_ddl_automatic_plugin_updates"]);
227
+ $settings_data["debug_mode"] = esc_attr($settings_array["ux_ddl_debug_mode"]);
228
+ $settings_data["remove_tables_at_uninstall"] = esc_attr($settings_array["ux_ddl_remove_tables"]);
229
+ $settings_data["monitor_email_logs"] = esc_attr($settings_array["ux_ddl_monitor_email_logs"]);
230
+ $settings_data["error_reporting"] = esc_attr($settings_array["ux_ddl_error_reporting"]);
231
+
232
+ $where = array();
233
+ $settings_data_array = array();
234
+ $where["meta_key"] = "settings";
235
+ $settings_data_array["meta_value"] = serialize($settings_data);
236
+ $obj_dbHelper_mail_bank->updateCommand(mail_bank_meta(), $settings_data_array, $where);
237
+ }
238
+ break;
239
+
240
+ case "mail_bank_email_configuration_settings_module":
241
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "mail_bank_email_configuration_settings")) {
242
+ parse_str(isset($_REQUEST["data"]) ? base64_decode($_REQUEST["data"]) : "", $form_data);
243
+ $update_email_configuration_array = array();
244
+ $update_email_configuration_array["email_address"] = esc_attr($form_data["ux_txt_email_address"]);
245
+ $update_email_configuration_array["reply_to"] = "";
246
+ $update_email_configuration_array["cc"] = "";
247
+ $update_email_configuration_array["bcc"] = "";
248
+ $update_email_configuration_array["mailer_type"] = esc_attr($form_data["ux_ddl_type"]);
249
+ $update_email_configuration_array["sender_name_configuration"] = esc_attr($form_data["ux_ddl_from_name"]);
250
+ $update_email_configuration_array["sender_name"] = isset($form_data["ux_txt_mb_from_name"]) ? esc_html($form_data["ux_txt_mb_from_name"]) : "";
251
+ $update_email_configuration_array["from_email_configuration"] = esc_attr($form_data["ux_ddl_from_email"]);
252
+ $update_email_configuration_array["sender_email"] = isset($form_data["ux_txt_mb_from_email_configuration"]) ? esc_html($form_data["ux_txt_mb_from_email_configuration"]) : "";
253
+ $update_email_configuration_array["hostname"] = esc_html($form_data["ux_txt_host"]);
254
+ $update_email_configuration_array["port"] = intval($form_data["ux_txt_port"]);
255
+ $update_email_configuration_array["enc_type"] = esc_attr($form_data["ux_ddl_encryption"]);
256
+ $update_email_configuration_array["auth_type"] = esc_attr($form_data["ux_ddl_mb_authentication"]);
257
+ $update_email_configuration_array["client_id"] = esc_html(trim($form_data["ux_txt_client_id"]));
258
+ $update_email_configuration_array["client_secret"] = esc_html(trim($form_data["ux_txt_client_secret"]));
259
+ $update_email_configuration_array["username"] = esc_html($form_data["ux_txt_username"]);
260
+ $update_email_configuration_array["automatic_mail"] = isset($form_data["ux_chk_automatic_sent_mail"]) ? esc_html($form_data["ux_chk_automatic_sent_mail"]) : "";
261
+
262
+ if (preg_match('/^\**$/', $form_data["ux_txt_password"])) {
263
+ $email_configuration_data = $wpdb->get_var
264
+ (
265
+ $wpdb->prepare
266
+ (
267
+ "SELECT meta_value FROM " . mail_bank_meta() .
268
+ " WHERE meta_key=%s", "email_configuration"
269
+ )
270
+ );
271
+ $email_configuration_array = unserialize($email_configuration_data);
272
+ $update_email_configuration_array["password"] = $email_configuration_array["password"];
273
+ } else {
274
+ $update_email_configuration_array["password"] = base64_encode(esc_html($form_data["ux_txt_password"]));
275
+ }
276
+
277
+ $update_email_configuration_array["redirect_uri"] = esc_html($form_data["ux_txt_redirect_uri"]);
278
+
279
+ update_option("update_email_configuration", $update_email_configuration_array);
280
+
281
+ $mail_bank_auth_host = new mail_bank_auth_host($update_email_configuration_array);
282
+ if (!in_array($form_data["ux_txt_host"], $mail_bank_auth_host->oauth_domains) && $form_data["ux_ddl_mb_authentication"] == "oauth2") {
283
+ echo "100";
284
+ die();
285
+ }
286
+
287
+ if ($update_email_configuration_array["auth_type"] == "oauth2" && $update_email_configuration_array["mailer_type"] == "smtp") {
288
+ if ($update_email_configuration_array["hostname"] == "smtp.gmail.com") {
289
+ $mail_bank_auth_host->google_authentication();
290
+ } elseif ($update_email_configuration_array["hostname"] == "smtp.live.com" && $update_email_configuration_array["mailer_type"] == "smtp") {
291
+ $mail_bank_auth_host->microsoft_authentication();
292
+ } elseif (in_array($update_email_configuration_array["hostname"], $mail_bank_auth_host->yahoo_domains)) {
293
+ $mail_bank_auth_host->yahoo_authentication();
294
+ }
295
+ } else {
296
+ $update_email_configuration_data_array = array();
297
+ $where = array();
298
+ $where["meta_key"] = "email_configuration";
299
+ $update_email_configuration_data_array["meta_value"] = serialize($update_email_configuration_array);
300
+ $obj_dbHelper_mail_bank->updateCommand(mail_bank_meta(), $update_email_configuration_data_array, $where);
301
+ }
302
+ }
303
+ break;
304
+
305
+ case "error_logs_module":
306
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "clear_error_logs_nonce")) {
307
+ if (file_exists(MAIL_BANK_ERROR_LOGS_FILE)) {
308
+ file_put_contents(MAIL_BANK_ERROR_LOGS_FILE, "");
309
+ }
310
+ }
311
+ break;
312
+
313
+ case "mail_bank_connectivity_test":
314
+ if (wp_verify_nonce(isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : "", "connectivity_test_nonce")) {
315
+ $host = isset($_REQUEST["smtp_host"]) ? esc_attr($_REQUEST["smtp_host"]) : "";
316
+ $ports = array(25, 587, 465, 2525, 4065, 25025);
317
+ $ports_result = array();
318
+ foreach ($ports as $port) {
319
+ $connection = @fsockopen($host, $port);
320
+ if (is_resource($connection)) {
321
+ $ports_result[$port] = "Open";
322
+ fclose($connection);
323
+ } else {
324
+ $ports_result[$port] = "Close";
325
+ }
326
+ }
327
+ foreach ($ports_result as $results => $val) {
328
+ ?>
329
+ <tr>
330
+ <td>
331
+ <?php echo $mb_smtp; ?>
332
+ </td>
333
+ <td>
334
+ <?php echo $host . ":" . intval($results); ?>
335
+ </td>
336
+ <td>
337
+ <span style="<?php echo $val == 'Close' ? 'color:red' : ""; ?>"><?php echo $val; ?>
338
+ </td>
339
+ </tr>
340
+ <?php
341
+ }
342
+ }
343
+ break;
344
+ }
345
+ die();
346
+ }
347
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  }
349
  ?>
lib/admin-bar-menu.php CHANGED
@@ -50,7 +50,7 @@ else
50
  }
51
  else
52
  {
53
- $mb_role = check_user_roles_mail_bank($current_user);
54
  }
55
  switch($mb_role)
56
  {
50
  }
51
  else
52
  {
53
+ $mb_role = check_user_roles_mail_bank();
54
  }
55
  switch($mb_role)
56
  {
lib/helper.php CHANGED
@@ -213,7 +213,6 @@ else
213
  }
214
  }
215
 
216
-
217
  if(!class_exists("plugin_info_wp_mail_bank"))
218
  {
219
  class plugin_info_wp_mail_bank
213
  }
214
  }
215
 
 
216
  if(!class_exists("plugin_info_wp_mail_bank"))
217
  {
218
  class plugin_info_wp_mail_bank
lib/sidebar-menu.php CHANGED
@@ -50,7 +50,7 @@ else
50
  }
51
  else
52
  {
53
- $mb_role = check_user_roles_mail_bank($current_user);
54
  }
55
  switch($mb_role)
56
  {
@@ -134,33 +134,33 @@ else
134
 
135
 
136
  /*
137
- Function Name: wp_mail_bank_wizard
138
- Parameters: No
139
- Description: This function is used for creating wp_mail_bank_wizard.
140
- Created On: 21-04-2017 10:17
141
- Created By: Tech Banker Team
142
- */
143
-
144
- if(!function_exists("wp_mail_bank_wizard"))
145
- {
146
- function wp_mail_bank_wizard()
147
  {
148
- global $wpdb;
149
- $user_role_permission = get_users_capabilities_mail_bank();
150
- if(file_exists(MAIL_BANK_DIR_PATH."includes/translations.php"))
151
- {
152
- include MAIL_BANK_DIR_PATH."includes/translations.php";
153
- }
154
- if(file_exists(MAIL_BANK_DIR_PATH."views/wizard/wizard.php"))
155
- {
156
- include_once MAIL_BANK_DIR_PATH."views/wizard/wizard.php";
157
- }
158
- if(file_exists(MAIL_BANK_DIR_PATH."includes/footer.php"))
159
  {
160
- include_once MAIL_BANK_DIR_PATH."includes/footer.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  }
162
  }
163
- }
164
  /*
165
  Function Name: mb_email_configuration
166
  Parameters: No
@@ -366,7 +366,6 @@ else
366
  }
367
  }
368
 
369
-
370
  /*
371
  Function Name: mb_roles_and_capabilities
372
  Parameters: No
50
  }
51
  else
52
  {
53
+ $mb_role = check_user_roles_mail_bank();
54
  }
55
  switch($mb_role)
56
  {
134
 
135
 
136
  /*
137
+ Function Name: wp_mail_bank_wizard
138
+ Parameters: No
139
+ Description: This function is used for creating wp_mail_bank_wizard.
140
+ Created On: 21-04-2017 10:17
141
+ Created By: Tech Banker Team
142
+ */
143
+
144
+ if(!function_exists("wp_mail_bank_wizard"))
 
 
145
  {
146
+ function wp_mail_bank_wizard()
 
 
 
 
 
 
 
 
 
 
147
  {
148
+ global $wpdb;
149
+ $user_role_permission = get_users_capabilities_mail_bank();
150
+ if(file_exists(MAIL_BANK_DIR_PATH."includes/translations.php"))
151
+ {
152
+ include MAIL_BANK_DIR_PATH."includes/translations.php";
153
+ }
154
+ if(file_exists(MAIL_BANK_DIR_PATH."views/wizard/wizard.php"))
155
+ {
156
+ include_once MAIL_BANK_DIR_PATH."views/wizard/wizard.php";
157
+ }
158
+ if(file_exists(MAIL_BANK_DIR_PATH."includes/footer.php"))
159
+ {
160
+ include_once MAIL_BANK_DIR_PATH."includes/footer.php";
161
+ }
162
  }
163
  }
 
164
  /*
165
  Function Name: mb_email_configuration
166
  Parameters: No
366
  }
367
  }
368
 
 
369
  /*
370
  Function Name: mb_roles_and_capabilities
371
  Parameters: No
lib/uninstall-script.php CHANGED
@@ -20,16 +20,19 @@ else
20
  }
21
  else
22
  {
23
- global $wp_version, $wpdb;
 
 
 
 
24
  $user_role_permission = get_users_capabilities_mail_bank();
25
  if(file_exists(MAIL_BANK_DIR_PATH."lib/helper.php"))
26
  {
27
  include_once MAIL_BANK_DIR_PATH."lib/helper.php";
28
  }
 
29
  $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
30
- $type = get_option("wp-mail-bank-wizard-set-up");
31
 
32
- delete_option("wp-mail-bank-wizard-set-up");
33
 
34
  $theme_details = array();
35
 
@@ -48,21 +51,17 @@ else
48
  $plugin_stat_data["event"] = "uninstall";
49
  $plugin_stat_data["domain_url"] = site_url();
50
  $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
51
- switch($type)
52
- {
53
- case "opt_in" :
54
- $plugin_stat_data["email"] = get_option("admin_email");
55
- $plugin_stat_data["wp_version"] = $wp_version;
56
- $plugin_stat_data["php_version"] = esc_html(phpversion());
57
- $plugin_stat_data["mysql_version"] = $wpdb->db_version();
58
- $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
59
- $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
60
- $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
61
- $plugin_stat_data["extensions"] = get_loaded_extensions();
62
- $plugin_stat_data["plugins"] = plugin_info_wp_mail_bank::get_plugin_info_wp_mail_bank();
63
- $plugin_stat_data["themes"] = $theme_details;
64
- break;
65
- }
66
 
67
  if(function_exists("curl_init"))
68
  {
@@ -100,6 +99,8 @@ else
100
  delete_option("mb_tech_banker_site_id");
101
  }
102
  }
 
 
103
  // Drop Tables
104
  global $wpdb;
105
  $settings_remove_tables = $wpdb->get_var
20
  }
21
  else
22
  {
23
+ $type = get_option("wp-mail-bank-wizard-set-up");
24
+ delete_option("wp-mail-bank-wizard-set-up");
25
+ if($type == "opt_in")
26
+ {
27
+ global $wp_version, $wpdb;
28
  $user_role_permission = get_users_capabilities_mail_bank();
29
  if(file_exists(MAIL_BANK_DIR_PATH."lib/helper.php"))
30
  {
31
  include_once MAIL_BANK_DIR_PATH."lib/helper.php";
32
  }
33
+ $plugin_info_wp_mail_bank = new plugin_info_wp_mail_bank();
34
  $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
 
35
 
 
36
 
37
  $theme_details = array();
38
 
51
  $plugin_stat_data["event"] = "uninstall";
52
  $plugin_stat_data["domain_url"] = site_url();
53
  $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
54
+ $plugin_stat_data["email"] = get_option("admin_email");
55
+ $plugin_stat_data["wp_version"] = $wp_version;
56
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
57
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
58
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
59
+ $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
60
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
61
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
62
+ $plugin_stat_data["plugins"] = $plugin_info_wp_mail_bank->get_plugin_info_wp_mail_bank();
63
+ $plugin_stat_data["themes"] = $theme_details;
64
+
 
 
 
 
65
 
66
  if(function_exists("curl_init"))
67
  {
99
  delete_option("mb_tech_banker_site_id");
100
  }
101
  }
102
+ }
103
+
104
  // Drop Tables
105
  global $wpdb;
106
  $settings_remove_tables = $wpdb->get_var
lib/zend/mail/protocol/smtp.php CHANGED
@@ -218,15 +218,18 @@ class mail_bank_Zend_Mail_Protocol_Smtp extends mail_bank_Zend_Mail_Protocol_Abs
218
  $this->_expect(220, 180);
219
  stream_context_set_option($this->_socket, 'ssl', 'verify_peer', false);
220
  stream_context_set_option($this->_socket, 'ssl', 'verify_peer_name', false);
221
- if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT))
222
  {
223
- /**
224
- * @see mail_bank_Zend_Mail_Protocol_Exception
225
- */
226
- if(file_exists(MAIL_BANK_DIR_PATH.'lib/zend/mail/protocol/exception.php'))
227
- require_once MAIL_BANK_DIR_PATH.'lib/zend/mail/protocol/exception.php';
 
 
228
 
229
- throw new mail_bank_Zend_Mail_Protocol_Exception('Unable to connect via TLS');
 
230
  }
231
  $this->_ehlo($host);
232
  }
218
  $this->_expect(220, 180);
219
  stream_context_set_option($this->_socket, 'ssl', 'verify_peer', false);
220
  stream_context_set_option($this->_socket, 'ssl', 'verify_peer_name', false);
221
+ if(extension_loaded("openssl"))
222
  {
223
+ if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT))
224
+ {
225
+ /**
226
+ * @see mail_bank_Zend_Mail_Protocol_Exception
227
+ */
228
+ if(file_exists(MAIL_BANK_DIR_PATH.'lib/zend/mail/protocol/exception.php'))
229
+ require_once MAIL_BANK_DIR_PATH.'lib/zend/mail/protocol/exception.php';
230
 
231
+ throw new mail_bank_Zend_Mail_Protocol_Exception('Unable to connect via TLS');
232
+ }
233
  }
234
  $this->_ehlo($host);
235
  }
lib/zend/validate/hostname.php CHANGED
@@ -1757,13 +1757,18 @@ class mail_bank_Zend_Validate_Hostname extends mail_bank_Zend_Validate_Abstract
1757
  if((count($domainParts) > 1) && (strlen($value) >= 4) && (strlen($value) <= 254))
1758
  {
1759
  $status = false;
 
 
 
 
 
1760
 
1761
- $origenc = PHP_VERSION_ID < 50600
1762
- ? iconv_get_encoding('internal_encoding')
1763
- : ini_get('default_charset');
1764
  if(PHP_VERSION_ID < 50600)
1765
  {
1766
- iconv_set_encoding('internal_encoding', 'UTF-8');
 
 
 
1767
  }
1768
  else
1769
  {
@@ -1821,47 +1826,49 @@ class mail_bank_Zend_Validate_Hostname extends mail_bank_Zend_Validate_Abstract
1821
  $check = 0;
1822
  foreach ($domainParts as $domainPart)
1823
  {
1824
- // If some domain part is empty (i.e. zend..com), it's invalid
1825
- if(empty($domainPart) && $domainPart !== '0')
 
 
 
 
 
 
 
 
 
 
1826
  {
1827
- $this->_error(self::INVALID_HOSTNAME);
1828
  return false;
1829
  }
 
1830
 
1831
- // Decode Punycode domainnames to IDN
1832
- if(strpos($domainPart, 'xn--') === 0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1833
  {
1834
- $domainPart = $this->decodePunycode(substr($domainPart, 4));
1835
- if($domainPart === false)
 
1836
  {
1837
- return false;
1838
  }
1839
- }
1840
-
1841
- // Check dash (-) does not start, end or appear in 3rd and 4th positions
1842
- if((strpos($domainPart, '-') === 0)
1843
- || ((strlen($domainPart) > 2) && (strpos($domainPart, '-', 2) == 2) && (strpos($domainPart, '-', 3) == 3))
1844
- || (strpos($domainPart, '-') === (strlen($domainPart) - 1)))
1845
- {
1846
- $this->_error(self::INVALID_DASH);
1847
- $status = false;
1848
- break 2;
1849
- }
1850
 
1851
- // Check each domain part
1852
- $checked = false;
1853
- foreach($regexChars as $regexKey => $regexChar)
1854
- {
1855
- $status = preg_match($regexChar, $domainPart);
1856
- if($status > 0)
1857
  {
1858
- $length = 63;
1859
- if(array_key_exists(strtoupper($this->_tld), $this->_idnLength)
1860
- && (array_key_exists($regexKey, $this->_idnLength[strtoupper($this->_tld)])))
1861
- {
1862
- $length = $this->_idnLength[strtoupper($this->_tld)];
1863
- }
1864
-
1865
  if(iconv_strlen($domainPart, 'UTF-8') > $length)
1866
  {
1867
  $this->_error(self::INVALID_HOSTNAME);
@@ -1872,6 +1879,12 @@ class mail_bank_Zend_Validate_Hostname extends mail_bank_Zend_Validate_Abstract
1872
  break;
1873
  }
1874
  }
 
 
 
 
 
 
1875
  }
1876
  if($checked)
1877
  {
@@ -1897,7 +1910,10 @@ class mail_bank_Zend_Validate_Hostname extends mail_bank_Zend_Validate_Abstract
1897
 
1898
  if(PHP_VERSION_ID < 50600)
1899
  {
1900
- iconv_set_encoding('internal_encoding', $origenc);
 
 
 
1901
  }
1902
  else
1903
  {
1757
  if((count($domainParts) > 1) && (strlen($value) >= 4) && (strlen($value) <= 254))
1758
  {
1759
  $status = false;
1760
+ $origenc = "UTF-8";
1761
+ if(function_exists("iconv_get_encoding"))
1762
+ {
1763
+ $origenc = PHP_VERSION_ID < 50600 ? iconv_get_encoding('internal_encoding') : ini_get('default_charset');
1764
+ }
1765
 
 
 
 
1766
  if(PHP_VERSION_ID < 50600)
1767
  {
1768
+ if(function_exists("iconv_get_encoding"))
1769
+ {
1770
+ iconv_set_encoding('internal_encoding', 'UTF-8');
1771
+ }
1772
  }
1773
  else
1774
  {
1826
  $check = 0;
1827
  foreach ($domainParts as $domainPart)
1828
  {
1829
+ // If some domain part is empty (i.e. zend..com), it's invalid
1830
+ if(empty($domainPart) && $domainPart !== '0')
1831
+ {
1832
+ $this->_error(self::INVALID_HOSTNAME);
1833
+ return false;
1834
+ }
1835
+
1836
+ // Decode Punycode domainnames to IDN
1837
+ if(strpos($domainPart, 'xn--') === 0)
1838
+ {
1839
+ $domainPart = $this->decodePunycode(substr($domainPart, 4));
1840
+ if($domainPart === false)
1841
  {
 
1842
  return false;
1843
  }
1844
+ }
1845
 
1846
+ // Check dash (-) does not start, end or appear in 3rd and 4th positions
1847
+ if((strpos($domainPart, '-') === 0)
1848
+ || ((strlen($domainPart) > 2) && (strpos($domainPart, '-', 2) == 2) && (strpos($domainPart, '-', 3) == 3))
1849
+ || (strpos($domainPart, '-') === (strlen($domainPart) - 1)))
1850
+ {
1851
+ $this->_error(self::INVALID_DASH);
1852
+ $status = false;
1853
+ break 2;
1854
+ }
1855
+
1856
+ // Check each domain part
1857
+ $checked = false;
1858
+ foreach($regexChars as $regexKey => $regexChar)
1859
+ {
1860
+ $status = preg_match($regexChar, $domainPart);
1861
+ if($status > 0)
1862
  {
1863
+ $length = 63;
1864
+ if(array_key_exists(strtoupper($this->_tld), $this->_idnLength)
1865
+ && (array_key_exists($regexKey, $this->_idnLength[strtoupper($this->_tld)])))
1866
  {
1867
+ $length = $this->_idnLength[strtoupper($this->_tld)];
1868
  }
 
 
 
 
 
 
 
 
 
 
 
1869
 
1870
+ if(function_exists("iconv_strlen"))
 
 
 
 
 
1871
  {
 
 
 
 
 
 
 
1872
  if(iconv_strlen($domainPart, 'UTF-8') > $length)
1873
  {
1874
  $this->_error(self::INVALID_HOSTNAME);
1879
  break;
1880
  }
1881
  }
1882
+ else
1883
+ {
1884
+ $checked = true;
1885
+ break;
1886
+ }
1887
+ }
1888
  }
1889
  if($checked)
1890
  {
1910
 
1911
  if(PHP_VERSION_ID < 50600)
1912
  {
1913
+ if(function_exists("iconv_get_encoding"))
1914
+ {
1915
+ iconv_set_encoding('internal_encoding', $origenc);
1916
+ }
1917
  }
1918
  else
1919
  {
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: contact-banker, Gallery-Bank, wordpress-empire
3
  Tags: email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, sendmail, smtp, ssl, tls, wordpress smtp, wp mail, wp smtp
4
  Requires at least: 2.7
5
- Tested up to: 4.7.4
6
  Stable tag: trunk
7
 
8
  Mail Bank easily configures sending emails and logging them from your WordPress site using your preferred PHPMailer or SMTP server.
@@ -294,16 +294,13 @@ It allows the users to view the debugging output of logged emails.
294
 
295
  == Changelog ==
296
 
297
- = 3.0.2 =
298
 
299
- * TWEAK: Translations File updated
300
- * TWEAK: Code for Including JSS, CSS Optimized
301
- * FIX: Redirection Bug Fixed
302
- * FIX: WP Editor Edition Bug Fixed
303
- * FIX: Install Script Optimized
304
- * FIX: Internal Server Error Fixed on Uninstall
305
  * FIX: Obsolete Code Removed
306
-
307
 
308
  = 3.0.1 =
309
 
2
  Contributors: contact-banker, Gallery-Bank, wordpress-empire
3
  Tags: email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, sendmail, smtp, ssl, tls, wordpress smtp, wp mail, wp smtp
4
  Requires at least: 2.7
5
+ Tested up to: 4.7.5
6
  Stable tag: trunk
7
 
8
  Mail Bank easily configures sending emails and logging them from your WordPress site using your preferred PHPMailer or SMTP server.
294
 
295
  == Changelog ==
296
 
297
+ = 3.0.3 =
298
 
299
+ * FIX: Code Removed from Skip Action Hook on Wizard Page
300
+ * FIX: Code Removed from De-activation Hook in case of Skipped Wizard Page
301
+ * FIX: Code Removed from Uninstall Hook in case of Skipped Wizard Page
302
+ * FIX: Obsolete Code Removed
 
 
303
  * FIX: Obsolete Code Removed
 
304
 
305
  = 3.0.1 =
306
 
views/connectivity-test/connectivity-test.php CHANGED
@@ -59,17 +59,17 @@ else
59
  <form id="ux_frm_settings">
60
  <div class="form-body">
61
  <?php
62
- if($mb_message_translate_help != "")
63
- {
64
- ?>
65
- <div class="note note-danger">
66
- <h4 class="block">
67
- <?php echo $mb_important_disclaimer; ?>
68
- </h4>
69
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
70
- </div>
71
- <?php
72
- }
73
  ?>
74
  <div class="form-group">
75
  <label class="control-label">
59
  <form id="ux_frm_settings">
60
  <div class="form-body">
61
  <?php
62
+ if($mb_message_translate_help != "")
63
+ {
64
+ ?>
65
+ <div class="note note-danger">
66
+ <h4 class="block">
67
+ <?php echo $mb_important_disclaimer; ?>
68
+ </h4>
69
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
70
+ </div>
71
+ <?php
72
+ }
73
  ?>
74
  <div class="form-group">
75
  <label class="control-label">
views/email-logs/email-logs.php CHANGED
@@ -60,17 +60,17 @@ else
60
  <form id="ux_frm_email_logs">
61
  <div class="form-body">
62
  <?php
63
- if($mb_message_translate_help != "")
64
- {
65
- ?>
66
- <div class="note note-danger">
67
- <h4 class="block">
68
- <?php echo $mb_important_disclaimer; ?>
69
- </h4>
70
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
71
- </div>
72
- <?php
73
- }
74
  ?>
75
  <div class="row">
76
  <div class="col-md-6">
60
  <form id="ux_frm_email_logs">
61
  <div class="form-body">
62
  <?php
63
+ if($mb_message_translate_help != "")
64
+ {
65
+ ?>
66
+ <div class="note note-danger">
67
+ <h4 class="block">
68
+ <?php echo $mb_important_disclaimer; ?>
69
+ </h4>
70
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
71
+ </div>
72
+ <?php
73
+ }
74
  ?>
75
  <div class="row">
76
  <div class="col-md-6">
views/email-setup/email-setup.php CHANGED
@@ -61,17 +61,17 @@ else
61
  <div class="portlet-body form">
62
  <div class="form-body">
63
  <?php
64
- if($mb_message_translate_help != "")
65
- {
66
- ?>
67
- <div class="note note-danger">
68
- <h4 class="block">
69
- <?php echo $mb_important_disclaimer; ?>
70
- </h4>
71
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
72
- </div>
73
- <?php
74
- }
75
  ?>
76
  <div class="form-wizard" id="ux_div_frm_wizard">
77
  <ul class="nav nav-pills nav-justified steps">
61
  <div class="portlet-body form">
62
  <div class="form-body">
63
  <?php
64
+ if($mb_message_translate_help != "")
65
+ {
66
+ ?>
67
+ <div class="note note-danger">
68
+ <h4 class="block">
69
+ <?php echo $mb_important_disclaimer; ?>
70
+ </h4>
71
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
72
+ </div>
73
+ <?php
74
+ }
75
  ?>
76
  <div class="form-wizard" id="ux_div_frm_wizard">
77
  <ul class="nav nav-pills nav-justified steps">
views/error-logs/error-logs.php CHANGED
@@ -63,17 +63,17 @@ else
63
  <form id="ux_frm_other_settings">
64
  <div class="form-body">
65
  <?php
66
- if($mb_message_translate_help != "")
67
- {
68
- ?>
69
- <div class="note note-danger">
70
- <h4 class="block">
71
- <?php echo $mb_important_disclaimer; ?>
72
- </h4>
73
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
74
- </div>
75
- <?php
76
- }
77
  ?>
78
  <div class="form-actions">
79
  <div class="pull-right">
63
  <form id="ux_frm_other_settings">
64
  <div class="form-body">
65
  <?php
66
+ if($mb_message_translate_help != "")
67
+ {
68
+ ?>
69
+ <div class="note note-danger">
70
+ <h4 class="block">
71
+ <?php echo $mb_important_disclaimer; ?>
72
+ </h4>
73
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
74
+ </div>
75
+ <?php
76
+ }
77
  ?>
78
  <div class="form-actions">
79
  <div class="pull-right">
views/feedbacks/feedbacks.php CHANGED
@@ -75,9 +75,9 @@ else
75
  <?php
76
  if($mb_message_translate_help != "")
77
  {
78
- ?>
79
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links_feature" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
80
- <?php
81
  }
82
  ?>
83
  </h4>
75
  <?php
76
  if($mb_message_translate_help != "")
77
  {
78
+ ?>
79
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links_feature" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
80
+ <?php
81
  }
82
  ?>
83
  </h4>
views/premium-editions/premium-editions.php CHANGED
@@ -59,211 +59,314 @@ else
59
  <form id="ux_frm_premium_editions">
60
  <div class="form-body">
61
  <div class="wpb_wrapper">
62
- <div id="go-pricing-table-862" style="margin-bottom:20px;">
63
- <div class="gw-go gw-go-clearfix gw-go-enlarge-current gw-go-disable-box-shadow gw-go-3cols" data-id="862" data-colnum="3" data-equalize="{&quot;column&quot;:1,&quot;body&quot;:1,&quot;footer&quot;:1}" data-views="{&quot;tp&quot;:{&quot;min&quot;:&quot;768&quot;,&quot;max&quot;:&quot;959&quot;,&quot;cols&quot;:&quot;&quot;},&quot;ml&quot;:{&quot;min&quot;:&quot;480&quot;,&quot;max&quot;:&quot;767&quot;,&quot;cols&quot;:&quot;2&quot;},&quot;mp&quot;:{&quot;min&quot;:&quot;&quot;,&quot;max&quot;:&quot;479&quot;,&quot;cols&quot;:&quot;1&quot;}}" style="opacity: 1;">
64
- <div class="gw-go-col-wrap gw-go-col-wrap-0 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="0" style="height: 600px;">
65
- <div class="gw-go-col gw-go-clean-style14">
66
- <div class="gw-go-col-inner">
67
- <div class="gw-go-col-inner-layer"></div>
68
- <div class="gw-go-col-inner-layer-over"></div>
69
- <div class="gw-go-header"></div>
70
- <ul class="gw-go-body">
71
- <li data-row-index="0">
72
- <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>PERSONAL</span>
73
- <br>Ideal for Individuals
74
- </div>
75
- </li>
76
- <li class="gw-go-even" data-row-index="1">
77
- <div class="gw-go-body-cell" style="height: 16px;">____</div>
78
- </li>
79
- <li data-row-index="2">
80
- <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">3<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
81
- </li>
82
- <li class="gw-go-even" data-row-index="3">
83
- <div class="gw-go-body-cell" style="height: 16px;">1 Installation per License</div>
84
- </li>
85
- <li data-row-index="4">
86
- <div class="gw-go-body-cell" style="height: 16px;">1 week of Technical Support</div>
87
- </li>
88
-
89
- <li class="gw-go-even" data-row-index="5">
90
- <div class="gw-go-body-cell" style="height: 16px;">1 year of Free Updates</div>
91
- </li>
92
- <li class="gw-go-even" data-row-index="7">
93
- <div class="gw-go-body-cell" style="height: 16px;">____</div>
94
- </li>
95
- <li data-row-index="6">
96
- <div class="gw-go-body-cell" style="height: 16px;">____</div>
97
- </li>
98
- </ul>
99
- <div class="gw-go-footer-wrap">
100
- <div class="gw-go-footer-spacer"></div>
101
- <div class="gw-go-footer">
102
- <div class="gw-go-footer-rows">
103
- <div class="gw-go-footer-row" data-row-index="0">
104
- <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-personal-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
105
- </div>
106
- <div class="gw-go-footer-row gw-go-even" data-row-index="1">
107
- <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
108
- </div>
109
- <div class="gw-go-footer-row" data-row-index="2">
110
- <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
111
- </div>
112
- </div>
113
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  </div>
115
- </div>
116
- <div class="gw-go-tooltip"></div>
117
- </div>
118
- </div>
119
- <div class="gw-go-col-wrap gw-go-col-wrap-1 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="1" style="height: 600px;">
120
- <div class="gw-go-col gw-go-clean-style14">
121
- <div class="gw-go-col-inner">
122
- <div class="gw-go-col-inner-layer"></div>
123
- <div class="gw-go-col-inner-layer-over"></div>
124
- <div class="gw-go-ribbon-right"><img src='<?php echo plugins_url("assets/global/img/ribbon_green_right_top.png",dirname(dirname(__FILE__)))?>'></div>
125
- <div class="gw-go-header"></div>
126
- <ul class="gw-go-body">
127
- <li data-row-index="0">
128
- <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>BUSINESS</span>
129
- <br>Ideal for Businesses
130
- </div>
131
- </li>
132
- <li class="gw-go-even" data-row-index="1">
133
- <div class="gw-go-body-cell" style="height: 16px;">____</div>
134
- </li>
135
- <li data-row-index="2">
136
- <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">9<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
137
- </li>
138
- <li class="gw-go-even" data-row-index="3">
139
- <div class="gw-go-body-cell" style="height: 16px;">1 Installation per License</div>
140
- </li>
141
- <li data-row-index="4">
142
- <div class="gw-go-body-cell" style="height: 16px;">1 month of Technical Support</div>
143
- </li>
144
- <li class="gw-go-even" data-row-index="5">
145
- <div class="gw-go-body-cell" style="height: 16px;">1 year of Free Updates</div>
146
- </li>
147
- <li data-row-index="6">
148
- <div class="gw-go-body-cell" style="height: 16px;">Email Logs</div>
149
- </li>
150
- <li class="gw-go-even" data-row-index="7">
151
- <div class="gw-go-body-cell" style="height: 16px;">Bulk Deletion Records</div>
152
- </li>
153
- </ul>
154
- <div class="gw-go-footer-wrap">
155
- <div class="gw-go-footer-spacer"></div>
156
- <div class="gw-go-footer">
157
- <div class="gw-go-footer-rows">
158
- <div class="gw-go-footer-row" data-row-index="0">
159
- <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-business-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
160
- </div>
161
- <div class="gw-go-footer-row gw-go-even" data-row-index="1">
162
- <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
163
- </div>
164
- <div class="gw-go-footer-row" data-row-index="2">
165
- <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
166
- </div>
167
- </div>
168
- </div>
169
  </div>
170
- </div>
171
- <div class="gw-go-tooltip"></div>
172
- </div>
173
- </div>
174
- <div class="gw-go-col-wrap gw-go-col-wrap-2 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="2" style="height: 600px;">
175
- <div class="gw-go-col gw-go-clean-style14">
176
- <div class="gw-go-col-inner">
177
- <div class="gw-go-col-inner-layer"></div>
178
- <div class="gw-go-col-inner-layer-over"></div>
179
- <div class="gw-go-header"></div>
180
- <ul class="gw-go-body">
181
- <li data-row-index="0">
182
- <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>DEVELOPER</span>
183
- <br>Ideal for Webmasters
184
- </div>
185
- </li>
186
- <li class="gw-go-even" data-row-index="1">
187
- <div class="gw-go-body-cell" style="height: 16px;">____</div>
188
- </li>
189
- <li data-row-index="2">
190
- <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">28<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
191
- </li>
192
- <li class="gw-go-even" data-row-index="3">
193
- <div class="gw-go-body-cell" style="height: 16px;">5 Installations per License</div>
194
- </li>
195
- <li data-row-index="4">
196
- <div class="gw-go-body-cell" style="height: 16px;">6 months of Technical Support </div>
197
- </li>
198
- <li class="gw-go-even" data-row-index="5">
199
- <div class="gw-go-body-cell" style="height: 16px;">Life Time Free Updates</div>
200
- </li>
201
- <li data-row-index="6">
202
- <div class="gw-go-body-cell" style="height: 16px;">Email Logs</div>
203
- </li>
204
- <li class="gw-go-even" data-row-index="7">
205
- <div class="gw-go-body-cell" style="height: 16px;">Bulk Deletion Records</div>
206
- </li>
207
- </ul>
208
- <div class="gw-go-footer-wrap">
209
- <div class="gw-go-footer-spacer"></div>
210
- <div class="gw-go-footer">
211
- <div class="gw-go-footer-rows">
212
- <div class="gw-go-footer-row" data-row-index="0">
213
- <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-developer-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
214
- </div>
215
- <div class="gw-go-footer-row gw-go-even" data-row-index="1">
216
- <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
217
- </div>
218
- <div class="gw-go-footer-row" data-row-index="2">
219
- <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
220
- </div>
221
- </div>
222
- </div>
223
  </div>
224
- </div>
 
225
  </div>
226
- </div>
 
 
227
  </div>
228
- </div>
229
- </div>
230
- <h3>All Plans Include</h3>
231
- <h5 style="color: rgba(0,0,0,0.64);">(This Plugin comes Packed Full with Features which Are Specified below For every user.)</h5>
232
- <div class="hr-thin style-line" style="width: 100%;border-top-width: 5px;"></div>
233
- <div class="row">
234
- <div class="col-md-6">
235
- <div class="standard-arrow">
236
- <ul>
237
- <li>Setup Wizard</li>
238
- <li>Automatic Plugin Updates</li>
239
- <li>Email Logs</li>
240
- <li>Email Configuration</li>
241
- <li>Plugin Settings</li>
242
- <li>Compatibility With Major Plugins</li>
243
- <li>Test Emails</li>
244
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  </div>
246
- </div>
247
- <div class="col-md-6">
248
- <div class="standard-arrow">
249
- <ul>
250
- <li>Mailer Types</li>
251
- <li>SMTP Settings</li>
252
- <li>OAuth 2.0 Authentication</li>
253
- <li>Debug Mode</li>
254
- <li>Different Authentication Parameters</li>
255
- <li>Various Encryption Methods</li>
256
- <li>Roles & Capabilities</li>
257
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  </div>
259
  </div>
260
  </div>
261
- </div>
262
- </form>
 
263
  </div>
264
  </div>
265
  </div>
266
- </div>
267
  <?php
268
  }
269
  }
59
  <form id="ux_frm_premium_editions">
60
  <div class="form-body">
61
  <div class="wpb_wrapper">
62
+ <div id="go-pricing-table-862" style="margin-bottom:20px;">
63
+ <div class="gw-go gw-go-clearfix gw-go-enlarge-current gw-go-disable-box-shadow gw-go-3cols" data-id="862" data-colnum="3" data-equalize="{&quot;column&quot;:1,&quot;body&quot;:1,&quot;footer&quot;:1}" data-views="{&quot;tp&quot;:{&quot;min&quot;:&quot;768&quot;,&quot;max&quot;:&quot;959&quot;,&quot;cols&quot;:&quot;&quot;},&quot;ml&quot;:{&quot;min&quot;:&quot;480&quot;,&quot;max&quot;:&quot;767&quot;,&quot;cols&quot;:&quot;2&quot;},&quot;mp&quot;:{&quot;min&quot;:&quot;&quot;,&quot;max&quot;:&quot;479&quot;,&quot;cols&quot;:&quot;1&quot;}}" style="opacity: 1;">
64
+ <div class="gw-go-col-wrap gw-go-col-wrap-0 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="0" style="height: 1150;">
65
+ <div class="gw-go-col gw-go-clean-style14">
66
+ <div class="gw-go-col-inner">
67
+ <div class="gw-go-col-inner-layer"></div>
68
+ <div class="gw-go-col-inner-layer-over"></div>
69
+ <div class="gw-go-header"></div>
70
+ <ul class="gw-go-body">
71
+ <li data-row-index="0">
72
+ <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>PERSONAL</span>
73
+ <br>Ideal for Individuals
74
+ </div>
75
+ </li>
76
+ <li class="gw-go-even" data-row-index="1">
77
+ <div class="gw-go-body-cell" style="height: 16px;">____</div>
78
+ </li>
79
+ <li data-row-index="2">
80
+ <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">3<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
81
+ </li>
82
+ <li class="gw-go-even" data-row-index="3">
83
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 Installation per License</strong></div>
84
+ </li>
85
+ <li data-row-index="4">
86
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 week of Technical Support</strong></div>
87
+ </li>
88
+ <li class="gw-go-even" data-row-index="5">
89
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 year of Free Updates</strong></div>
90
+ </li>
91
+ <li class="gw-go-even" data-row-index="6">
92
+ <div class="gw-go-body-cell" style="height: 16px;">Automatic Plugin Updates</div>
93
+ </li>
94
+ <li class="gw-go-even" data-row-index="7">
95
+ <div class="gw-go-body-cell" style="height: 16px;">Compatibility With Major Plugins</div>
96
+ </li>
97
+ <li class="gw-go-even" data-row-index="8">
98
+ <div class="gw-go-body-cell" style="height: 16px;">Setup Wizard</div>
99
+ </li>
100
+ <li class="gw-go-even" data-row-index="9">
101
+ <div class="gw-go-body-cell" style="height: 16px;">Email Setup</div>
102
+ </li>
103
+ <li class="gw-go-even" data-row-index="10">
104
+ <div class="gw-go-body-cell" style="height: 16px;">Mailer Types</div>
105
+ </li>
106
+ <li class="gw-go-even" data-row-index="11">
107
+ <div class="gw-go-body-cell" style="height: 16px;">SMTP Settings</div>
108
+ </li>
109
+ <li class="gw-go-even" data-row-index="12">
110
+ <div class="gw-go-body-cell" style="height: 16px;">OAuth 2.0 Authentication</div>
111
+ </li>
112
+ <li class="gw-go-even" data-row-index="13">
113
+ <div class="gw-go-body-cell" style="height: 16px;">Test Emails</div>
114
+ </li>
115
+ <li class="gw-go-even" data-row-index="14">
116
+ <div class="gw-go-body-cell" style="height: 16px;">Debug Mode</div>
117
+ </li>
118
+ <li class="gw-go-even" data-row-index="15">
119
+ <div class="gw-go-body-cell" style="height: 16px;">Connectivity Test</div>
120
+ </li>
121
+ <li class="gw-go-even" data-row-index="16">
122
+ <div class="gw-go-body-cell" style="height: 16px;">Different Authentication Parameters</div>
123
+ </li>
124
+ <li data-row-index="17">
125
+ <div class="gw-go-body-cell" style="height: 16px;">Various Encryption Methods</div>
126
+ </li>
127
+ <li data-row-index="18">
128
+ <div class="gw-go-body-cell" style="height: 16px;">Plugin Settings</div>
129
+ </li>
130
+ <li data-row-index="19">
131
+ <div class="gw-go-body-cell" style="height: 16px;">Error Logs</div>
132
+ </li>
133
+ <li data-row-index="20">
134
+ <div class="gw-go-body-cell" style="height: 16px;">Roles & Capabilities</div>
135
+ </li>
136
+ <li data-row-index="21">
137
+ <div class="gw-go-body-cell" style="height: 16px;">____</div>
138
+ </li>
139
+ <li data-row-index="22">
140
+ <div class="gw-go-body-cell" style="height: 16px;">____</div>
141
+ </li>
142
+ </ul>
143
+ <div class="gw-go-footer-wrap">
144
+ <div class="gw-go-footer-spacer"></div>
145
+ <div class="gw-go-footer">
146
+ <div class="gw-go-footer-rows">
147
+ <div class="gw-go-footer-row" data-row-index="0">
148
+ <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-personal-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
149
  </div>
150
+ <div class="gw-go-footer-row gw-go-even" data-row-index="1">
151
+ <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </div>
153
+ <div class="gw-go-footer-row" data-row-index="2">
154
+ <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  </div>
156
+ </div>
157
+ </div>
158
  </div>
159
+ </div>
160
+ <div class="gw-go-tooltip"></div>
161
+ </div>
162
  </div>
163
+ <div class="gw-go-col-wrap gw-go-col-wrap-1 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="1" style="height: 600px;">
164
+ <div class="gw-go-col gw-go-clean-style14">
165
+ <div class="gw-go-col-inner">
166
+ <div class="gw-go-col-inner-layer"></div>
167
+ <div class="gw-go-col-inner-layer-over"></div>
168
+ <div class="gw-go-ribbon-right"><img src='<?php echo plugins_url("assets/global/img/ribbon_green_right_top.png",dirname(dirname(__FILE__)))?>'></div>
169
+ <div class="gw-go-header"></div>
170
+ <ul class="gw-go-body">
171
+ <li data-row-index="0">
172
+ <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>BUSINESS</span>
173
+ <br>Ideal for Businesses
174
+ </div>
175
+ </li>
176
+ <li class="gw-go-even" data-row-index="1">
177
+ <div class="gw-go-body-cell" style="height: 16px;">____</div>
178
+ </li>
179
+ <li data-row-index="2">
180
+ <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">9<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
181
+ </li>
182
+ <li class="gw-go-even" data-row-index="3">
183
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 Installation per License</strong></div>
184
+ </li>
185
+ <li data-row-index="4">
186
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 month of Technical Support</strong></div>
187
+ </li>
188
+ <li class="gw-go-even" data-row-index="5">
189
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>1 year of Free Updates</strong></div>
190
+ </li>
191
+ <li data-row-index="6">
192
+ <div class="gw-go-body-cell" style="height: 16px;">Automatic Plugin Updates</div>
193
+ </li>
194
+ <li data-row-index="7">
195
+ <div class="gw-go-body-cell" style="height: 16px;">Compatibility With Major Plugins</div>
196
+ </li>
197
+ <li data-row-index="8">
198
+ <div class="gw-go-body-cell" style="height: 16px;">Setup Wizard</div>
199
+ </li>
200
+ <li data-row-index="9">
201
+ <div class="gw-go-body-cell" style="height: 16px;">Email Setup</div>
202
+ </li>
203
+ <li data-row-index="10">
204
+ <div class="gw-go-body-cell" style="height: 16px;">Mailer Types</div>
205
+ </li>
206
+ <li data-row-index="6">
207
+ <div class="gw-go-body-cell" style="height: 16px;">SMTP Settings</div>
208
+ </li>
209
+ <li data-row-index="11">
210
+ <div class="gw-go-body-cell" style="height: 16px;">OAuth 2.0 Authentication</div>
211
+ </li>
212
+ <li data-row-index="12">
213
+ <div class="gw-go-body-cell" style="height: 16px;">Test Emails</div>
214
+ </li>
215
+ <li data-row-index="13">
216
+ <div class="gw-go-body-cell" style="height: 16px;">Debug Mode</div>
217
+ </li>
218
+ <li data-row-index="14">
219
+ <div class="gw-go-body-cell" style="height: 16px;">Connectivity Test</div>
220
+ </li>
221
+ <li data-row-index="15">
222
+ <div class="gw-go-body-cell" style="height: 16px;">Different Authentication Parameters</div>
223
+ </li>
224
+ <li data-row-index="15">
225
+ <div class="gw-go-body-cell" style="height: 16px;">Various Encryption Methods</div>
226
+ </li>
227
+ <li data-row-index="15">
228
+ <div class="gw-go-body-cell" style="height: 16px;">Plugin Settings</div>
229
+ </li>
230
+ <li data-row-index="15">
231
+ <div class="gw-go-body-cell" style="height: 16px;">Error Logs</div>
232
+ </li>
233
+ <li data-row-index="15">
234
+ <div class="gw-go-body-cell" style="height: 16px;">Roles & Capabilities</div>
235
+ </li>
236
+ <li data-row-index="16">
237
+ <div class="gw-go-body-cell" style="height: 16px;">Email Logs</div>
238
+ </li>
239
+ <li class="gw-go-even" data-row-index="17">
240
+ <div class="gw-go-body-cell" style="height: 16px;">Bulk Deletion Records</div>
241
+ </li>
242
+ </ul>
243
+ <div class="gw-go-footer-wrap">
244
+ <div class="gw-go-footer-spacer"></div>
245
+ <div class="gw-go-footer">
246
+ <div class="gw-go-footer-rows">
247
+ <div class="gw-go-footer-row" data-row-index="0">
248
+ <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-business-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
249
+ </div>
250
+ <div class="gw-go-footer-row gw-go-even" data-row-index="1">
251
+ <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
252
+ </div>
253
+ <div class="gw-go-footer-row" data-row-index="2">
254
+ <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
255
+ </div>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ <div class="gw-go-tooltip"></div>
261
+ </div>
262
  </div>
263
+ <div class="gw-go-col-wrap gw-go-col-wrap-2 gw-go-hover gw-go-disable-enlarge gw-go-disable-hover" data-current="1" data-col-index="2" style="height: 600px;">
264
+ <div class="gw-go-col gw-go-clean-style14">
265
+ <div class="gw-go-col-inner">
266
+ <div class="gw-go-col-inner-layer"></div>
267
+ <div class="gw-go-col-inner-layer-over"></div>
268
+ <div class="gw-go-header"></div>
269
+ <ul class="gw-go-body">
270
+ <li data-row-index="0">
271
+ <div class="gw-go-body-cell" style="height: 79px;"><span style="font-size:20px;"><br>DEVELOPER</span>
272
+ <br>Ideal for Webmasters
273
+ </div>
274
+ </li>
275
+ <li class="gw-go-even" data-row-index="1">
276
+ <div class="gw-go-body-cell" style="height: 16px;">____</div>
277
+ </li>
278
+ <li data-row-index="2">
279
+ <div class="gw-go-body-cell" style="height: 75px;"><span style="color:#A4CD39;">$</span><span style="font-size:52px;color:#A4CD39;">28<br></span><span style="color:#A4CD39;">It's a one time purchase.</span></div>
280
+ </li>
281
+ <li class="gw-go-even" data-row-index="3">
282
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>5 Installations per License</strong></div>
283
+ </li>
284
+ <li data-row-index="4">
285
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>6 months of Technical Support</strong></div>
286
+ </li>
287
+ <li class="gw-go-even" data-row-index="5">
288
+ <div class="gw-go-body-cell" style="height: 16px;"><strong>Life Time Free Updates</strong></div>
289
+ </li>
290
+ <li data-row-index="6">
291
+ <div class="gw-go-body-cell" style="height: 16px;">Automatic Plugin Updates</div>
292
+ </li>
293
+ <li data-row-index="6">
294
+ <div class="gw-go-body-cell" style="height: 16px;">Compatibility With Major Plugins</div>
295
+ </li>
296
+ <li data-row-index="6">
297
+ <div class="gw-go-body-cell" style="height: 16px;">Setup Wizard</div>
298
+ </li>
299
+ <li data-row-index="6">
300
+ <div class="gw-go-body-cell" style="height: 16px;">Email Setup</div>
301
+ </li>
302
+ <li data-row-index="6">
303
+ <div class="gw-go-body-cell" style="height: 16px;">Mailer Types</div>
304
+ </li>
305
+ <li data-row-index="6">
306
+ <div class="gw-go-body-cell" style="height: 16px;">SMTP Settings</div>
307
+ </li>
308
+ <li data-row-index="6">
309
+ <div class="gw-go-body-cell" style="height: 16px;">OAuth 2.0 Authentication</div>
310
+ </li>
311
+ <li data-row-index="6">
312
+ <div class="gw-go-body-cell" style="height: 16px;">Test Emails</div>
313
+ </li>
314
+ <li data-row-index="6">
315
+ <div class="gw-go-body-cell" style="height: 16px;">Debug Mode</div>
316
+ </li>
317
+ <li data-row-index="6">
318
+ <div class="gw-go-body-cell" style="height: 16px;">Connectivity Test</div>
319
+ </li>
320
+ <li data-row-index="6">
321
+ <div class="gw-go-body-cell" style="height: 16px;">Different Authentication Parameters</div>
322
+ </li>
323
+ <li data-row-index="6">
324
+ <div class="gw-go-body-cell" style="height: 16px;">Various Encryption Methods</div>
325
+ </li>
326
+ <li data-row-index="6">
327
+ <div class="gw-go-body-cell" style="height: 16px;">Plugin Settings</div>
328
+ </li>
329
+ <li data-row-index="6">
330
+ <div class="gw-go-body-cell" style="height: 16px;">Error Logs</div>
331
+ </li>
332
+ <li data-row-index="6">
333
+ <div class="gw-go-body-cell" style="height: 16px;">Roles & Capabilities</div>
334
+ </li>
335
+ <li data-row-index="6">
336
+ <div class="gw-go-body-cell" style="height: 16px;">Email Logs</div>
337
+ </li>
338
+ <li class="gw-go-even" data-row-index="7">
339
+ <div class="gw-go-body-cell" style="height: 16px;">Bulk Deletion Records</div>
340
+ </li>
341
+ </ul>
342
+ <div class="gw-go-footer-wrap">
343
+ <div class="gw-go-footer-spacer"></div>
344
+ <div class="gw-go-footer">
345
+ <div class="gw-go-footer-rows">
346
+ <div class="gw-go-footer-row" data-row-index="0">
347
+ <div class="gw-go-footer-row-inner" style="height: 44px;"><a href="http://beta.tech-banker.com/product/mail-bank-developer-edition/" class="gw-go-btn gw-go-btn-large"><span class="gw-go-btn-inner">BUY NOW</span></a></div>
348
+ </div>
349
+ <div class="gw-go-footer-row gw-go-even" data-row-index="1">
350
+ <div class="gw-go-footer-row-inner" style="height: 0px;"></div>
351
+ </div>
352
+ <div class="gw-go-footer-row" data-row-index="2">
353
+ <div class="gw-go-footer-row-inner" style="height: 10px;">&nbsp;</div>
354
+ </div>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ </div>
359
+ </div>
360
+ </div>
361
  </div>
362
  </div>
363
  </div>
364
+ </div>
365
+ </form>
366
+ </div>
367
  </div>
368
  </div>
369
  </div>
 
370
  <?php
371
  }
372
  }
views/roles-and-capabilities/roles-and-capabilities.php CHANGED
@@ -64,17 +64,17 @@ else
64
  <form id="ux_frm_roles_and_capabilities">
65
  <div class="form-body">
66
  <?php
67
- if($mb_message_translate_help != "")
68
- {
69
- ?>
70
- <div class="note note-danger">
71
- <h4 class="block">
72
- <?php echo $mb_important_disclaimer; ?>
73
- </h4>
74
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
75
- </div>
76
- <?php
77
- }
78
  ?>
79
  <div class="form-group">
80
  <label class="control-label">
64
  <form id="ux_frm_roles_and_capabilities">
65
  <div class="form-body">
66
  <?php
67
+ if($mb_message_translate_help != "")
68
+ {
69
+ ?>
70
+ <div class="note note-danger">
71
+ <h4 class="block">
72
+ <?php echo $mb_important_disclaimer; ?>
73
+ </h4>
74
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
75
+ </div>
76
+ <?php
77
+ }
78
  ?>
79
  <div class="form-group">
80
  <label class="control-label">
views/system-information/system-information.php CHANGED
@@ -160,7 +160,7 @@ else
160
  </td>
161
  <td>
162
  <span>
163
- <?php echo esc_html($_SERVER["SERVER_SOFTWARE"]);?>
164
  </span>
165
  </td>
166
  </tr>
160
  </td>
161
  <td>
162
  <span>
163
+ <?php echo esc_html(isset($_SERVER["SERVER_SOFTWARE"]) ? $_SERVER["SERVER_SOFTWARE"] : "");?>
164
  </span>
165
  </td>
166
  </tr>
views/test-email/test-email.php CHANGED
@@ -58,17 +58,17 @@ else
58
  <div class="portlet-body form">
59
  <div class="form-body">
60
  <?php
61
- if($mb_message_translate_help != "")
62
- {
63
- ?>
64
- <div class="note note-danger">
65
- <h4 class="block">
66
- <?php echo $mb_important_disclaimer; ?>
67
- </h4>
68
- <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
69
- </div>
70
- <?php
71
- }
72
  ?>
73
  <form id="ux_frm_test_email_configuration">
74
  <div id="ux_div_test_mail">
58
  <div class="portlet-body form">
59
  <div class="form-body">
60
  <?php
61
+ if($mb_message_translate_help != "")
62
+ {
63
+ ?>
64
+ <div class="note note-danger">
65
+ <h4 class="block">
66
+ <?php echo $mb_important_disclaimer; ?>
67
+ </h4>
68
+ <strong><?php echo $mb_message_translate_help;?><br/><?php echo $mb_kindly_click;?><a href="javascript:void(0);" data-popup-open="ux_open_popup_translator" class="custom_links" onclick="show_pop_up_mail_bank();"><?php echo $mb_message_translate_here; ?></a></strong>
69
+ </div>
70
+ <?php
71
+ }
72
  ?>
73
  <form id="ux_frm_test_email_configuration">
74
  <div id="ux_div_test_mail">
views/wizard/wizard.php CHANGED
@@ -54,10 +54,10 @@ else
54
  </div>
55
  <div class="row row-custom">
56
  <div class="col-md-12 textalign">
57
- <p>Hi there!</p>
58
- <p>Don't ever miss an important opportunity to opt in for Latest Features &amp; Security Updates as well as non-sensitive diagnostic tracking.</p>
59
- <p>If you're not ready to Opt-In, that's ok too!</p>
60
- <p><strong> Mail Bank will still work fine.</strong></p>
61
  </div>
62
  </div>
63
  <div class="row row-custom">
@@ -65,50 +65,50 @@ else
65
  <a class="permissions" onclick="show_hide_details_wp_mail_bank();">What permissions are being granted?</a>
66
  </div>
67
  <div class="col-md-12" style="display:none;" id="ux_div_wizard_set_up">
68
- <div class="col-md-6">
69
- <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <li>
71
- <i class="dashicons dashicons-admin-users"></i>
72
- <div class="admin">
73
- <span><strong>User Details</strong></span>
74
- <p>Name and Email Address</p>
75
  </div>
76
  </li>
77
- </ul>
78
- </div>
79
- <div class="col-md-6 align align2">
80
- <ul>
81
- <li>
82
- <i class="dashicons dashicons-admin-plugins"></i>
83
- <div class="admin-plugins">
84
- <span><strong>Current Plugin Status</strong></span>
85
- <p>Activation, Deactivation and Uninstall</p>
86
- </div>
87
- </li>
88
- </ul>
89
- </div>
90
- <div class="col-md-6">
91
- <ul>
92
- <li>
93
- <i class="dashicons dashicons-testimonial"></i>
94
- <div class="testimonial">
95
- <span><strong>Notifications</strong></span>
96
- <p>Updates &amp; Announcements</p>
97
- </div>
98
- </li>
99
- </ul>
100
- </div>
101
- <div class="col-md-6 align2">
102
- <ul>
103
- <li>
104
- <i class="dashicons dashicons-welcome-view-site"></i>
105
- <div class="settings">
106
- <span><strong>Website Overview</strong></span>
107
- <p>Site URL, WP Version, PHP Info, Plugins &amp; Themes Info</p>
108
- </div>
109
- </li>
110
- </ul>
111
- </div>
112
  </div>
113
  <div class="col-md-12 allow">
114
  <div class="tech-banker-actions">
@@ -121,14 +121,14 @@ else
121
  <i class="dashicons dashicons-arrow-right-alt"></i>
122
  </a>
123
  <div class="clearfix"></div>
 
 
 
 
 
 
124
  </div>
125
  </div>
126
- <div class="col-md-12 terms">
127
- <a href="http://beta.tech-banker.com/privacy-policy/" target="_blank">Privacy Policy</a>
128
- <span> - </span>
129
- <a href="http://beta.tech-banker.com/terms-conditions/" target="_blank">Terms &amp; Conditions</a>
130
- </div>
131
- </div>
132
  </div>
133
  </div>
134
  </body>
54
  </div>
55
  <div class="row row-custom">
56
  <div class="col-md-12 textalign">
57
+ <p>Hi there!</p>
58
+ <p>Don't ever miss an important opportunity to opt in for Latest Features &amp; Security Updates as well as non-sensitive diagnostic tracking.</p>
59
+ <p>If you're not ready to Opt-In, that's ok too!</p>
60
+ <p><strong> Mail Bank will still work fine.</strong></p>
61
  </div>
62
  </div>
63
  <div class="row row-custom">
65
  <a class="permissions" onclick="show_hide_details_wp_mail_bank();">What permissions are being granted?</a>
66
  </div>
67
  <div class="col-md-12" style="display:none;" id="ux_div_wizard_set_up">
68
+ <div class="col-md-6">
69
+ <ul>
70
+ <li>
71
+ <i class="dashicons dashicons-admin-users"></i>
72
+ <div class="admin">
73
+ <span><strong>User Details</strong></span>
74
+ <p>Name and Email Address</p>
75
+ </div>
76
+ </li>
77
+ </ul>
78
+ </div>
79
+ <div class="col-md-6 align align2">
80
+ <ul>
81
+ <li>
82
+ <i class="dashicons dashicons-admin-plugins"></i>
83
+ <div class="admin-plugins">
84
+ <span><strong>Current Plugin Status</strong></span>
85
+ <p>Activation, Deactivation and Uninstall</p>
86
+ </div>
87
+ </li>
88
+ </ul>
89
+ </div>
90
+ <div class="col-md-6">
91
+ <ul>
92
+ <li>
93
+ <i class="dashicons dashicons-testimonial"></i>
94
+ <div class="testimonial">
95
+ <span><strong>Notifications</strong></span>
96
+ <p>Updates &amp; Announcements</p>
97
+ </div>
98
+ </li>
99
+ </ul>
100
+ </div>
101
+ <div class="col-md-6 align2">
102
+ <ul>
103
  <li>
104
+ <i class="dashicons dashicons-welcome-view-site"></i>
105
+ <div class="settings">
106
+ <span><strong>Website Overview</strong></span>
107
+ <p>Site URL, WP Version, PHP Info, Plugins &amp; Themes Info</p>
108
  </div>
109
  </li>
110
+ </ul>
111
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  </div>
113
  <div class="col-md-12 allow">
114
  <div class="tech-banker-actions">
121
  <i class="dashicons dashicons-arrow-right-alt"></i>
122
  </a>
123
  <div class="clearfix"></div>
124
+ </div>
125
+ </div>
126
+ <div class="col-md-12 terms">
127
+ <a href="http://beta.tech-banker.com/privacy-policy/" target="_blank">Privacy Policy</a>
128
+ <span> - </span>
129
+ <a href="http://beta.tech-banker.com/terms-conditions/" target="_blank">Terms &amp; Conditions</a>
130
  </div>
131
  </div>
 
 
 
 
 
 
132
  </div>
133
  </div>
134
  </body>
wp-mail-bank.php CHANGED
@@ -1,1000 +1,930 @@
1
  <?php
 
2
  /*
3
- Plugin Name: SMTP Mailer Plugin by Mail Bank
4
- Plugin URI: http://beta.tech-banker.com/
5
- Description: Mail Bank easily configures sending emails and logging them from your WordPress site using your preferred PHPMailer or SMTP server.
6
- Author: Tech Banker
7
- Author URI: http://beta.tech-banker.com
8
- Version: 3.0.2
9
- License: GPLv3
10
- Text Domain: wp-mail-bank
11
- Domain Path: /languages
12
- */
13
-
14
- if(!defined("ABSPATH")) exit; // Exit if accessed directly
15
- /* Constant Declaration */
16
- if(!defined("MAIL_BANK_FILE")) define("MAIL_BANK_FILE",plugin_basename(__FILE__));
17
- if(!defined("MAIL_BANK_DIR_PATH")) define("MAIL_BANK_DIR_PATH",plugin_dir_path(__FILE__));
18
- if(!defined("MAIL_BANK_PLUGIN_DIRNAME")) define("MAIL_BANK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
19
- if (!defined("MAIL_BANK_MAIN_DIR")) define("MAIL_BANK_MAIN_DIR", dirname(dirname(MAIL_BANK_DIR_PATH))."/wp-mail-bank");
20
- if(!defined("MAIL_BANK_ERROR_LOGS_FILE")) define("MAIL_BANK_ERROR_LOGS_FILE",MAIL_BANK_MAIN_DIR."/error-logs.txt");
21
- if(!defined("MAIL_BANK_LOCAL_TIME")) define("MAIL_BANK_LOCAL_TIME",strtotime(date_i18n("Y-m-d H:i:s")));
22
- if(!is_dir(MAIL_BANK_MAIN_DIR))
23
- {
24
- wp_mkdir_p(MAIL_BANK_MAIN_DIR);
 
 
 
 
 
 
25
  }
26
- if(is_ssl())
27
- {
28
- if(!defined("tech_banker_url")) define("tech_banker_url","https://tech-banker.com");
29
- if(!defined("tech_banker_beta_url")) define("tech_banker_beta_url","https://beta.tech-banker.com");
 
30
  }
31
- else
32
- {
33
- if(!defined("tech_banker_url")) define("tech_banker_url","http://tech-banker.com");
34
- if(!defined("tech_banker_beta_url")) define("tech_banker_beta_url","http://beta.tech-banker.com");
 
35
  }
36
- if(!defined("tech_banker_stats_url")) define("tech_banker_stats_url", "http://stats.tech-banker-services.org");
37
- if(!defined("mail_bank_version_number")) define("mail_bank_version_number","3.0.2");
38
-
39
- if(!function_exists("mail_bank_error_log_file"))
40
- {
41
- function mail_bank_error_log_file()
42
- {
43
- if(!file_exists(MAIL_BANK_ERROR_LOGS_FILE))
44
- {
45
- $mb_error_file = fopen(MAIL_BANK_ERROR_LOGS_FILE, 'wb');
46
- fclose($mb_error_file);
47
- }
48
- }
 
49
  }
50
 
51
  $memory_limit_mail_bank = intval(ini_get("memory_limit"));
52
- if(!extension_loaded('suhosin') && $memory_limit_mail_bank < 512)
53
- {
54
- @ini_set("memory_limit", "512M");
55
  }
56
 
57
  @ini_set("max_execution_time", 6000);
58
  @ini_set("max_input_vars", 10000);
59
 
60
  /*
61
- Function Name: get_users_capabilities_mail_bank
62
- Parameters: No
63
- Description: This function is used to get users capabilities.
64
- Created On: 21-10-2016 15:21
65
- Created By: Tech Banker Team
66
- */
67
-
68
- if(!function_exists("get_users_capabilities_mail_bank"))
69
- {
70
- function get_users_capabilities_mail_bank()
71
- {
72
- global $wpdb;
73
- $capabilities = $wpdb->get_var
74
- (
75
- $wpdb->prepare
76
- (
77
- "SELECT meta_value FROM ".mail_bank_meta()."
78
- WHERE meta_key = %s",
79
- "roles_and_capabilities"
80
- )
81
- );
82
- $core_roles = array(
83
- "manage_options",
84
- "edit_plugins",
85
- "edit_posts",
86
- "publish_posts",
87
- "publish_pages",
88
- "edit_pages",
89
- "read"
90
- );
91
- $unserialized_capabilities = unserialize($capabilities);
92
- return isset($unserialized_capabilities["capabilities"]) ? $unserialized_capabilities["capabilities"] : $core_roles;
93
- }
94
  }
95
 
96
  /*
97
- Function Name: install_script_for_mail_bank
98
- Parameters: No
99
- Description: This function is used to create Tables in Database.
100
- Created On: 15-06-2016 09:52
101
- Created By: Tech Banker Team
102
- */
103
-
104
- if(!function_exists("install_script_for_mail_bank"))
105
- {
106
- function install_script_for_mail_bank()
107
- {
108
- global $wpdb;
109
- if(is_multisite())
110
- {
111
- $blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
112
- foreach($blog_ids as $blog_id)
113
- {
114
- switch_to_blog($blog_id);
115
- $version = get_option("mail-bank-version-number");
116
- if($version < "3.0.0")
117
- {
118
- if(file_exists(MAIL_BANK_DIR_PATH."lib/install-script.php"))
119
- {
120
- include MAIL_BANK_DIR_PATH."lib/install-script.php";
121
- }
122
- }
123
- restore_current_blog();
124
- }
125
- }
126
- else
127
- {
128
- $version = get_option("mail-bank-version-number");
129
- if($version < "3.0.0")
130
- {
131
- if(file_exists(MAIL_BANK_DIR_PATH."lib/install-script.php"))
132
- {
133
- include_once MAIL_BANK_DIR_PATH."lib/install-script.php";
134
- }
135
- }
136
- }
137
- }
138
  }
139
 
140
  /*
141
- Function Name: check_user_roles_mail_bank
142
- Parameters: Yes($user)
143
- Description: This function is used for checking roles of different users.
144
- Created On: 19-10-2016 03:40
145
- Created By: Tech Banker Team
146
- */
147
-
148
- if(!function_exists("check_user_roles_mail_bank"))
149
- {
150
- function check_user_roles_mail_bank($user = null)
151
- {
152
- $user = $user ? new WP_User( $user ) : wp_get_current_user();
153
- return $user->roles ? $user->roles[0] : false;
154
- }
 
155
  }
156
 
157
 
158
  /*
159
- Function Name: mail_bank
160
- Parameters: No
161
- Description: This function is used to return Parent Table name with prefix.
162
- Created On: 15-06-2016 10:44
163
- Created By: Tech Banker Team
164
- */
165
-
166
- if(!function_exists("mail_bank"))
167
- {
168
- function mail_bank()
169
- {
170
- global $wpdb;
171
- return $wpdb->prefix."mail_bank";
172
- }
173
  }
174
 
175
  /*
176
- Function Name: mail_bank_meta
177
- Parameters: No
178
- Description: This function is used to return Meta Table name with prefix.
179
- Created On: 15-06-2016 10:44
180
- Created By: Tech Banker Team
181
- */
182
-
183
- if(!function_exists("mail_bank_meta"))
184
- {
185
- function mail_bank_meta()
186
- {
187
- global $wpdb;
188
- return $wpdb->prefix."mail_bank_meta";
189
- }
190
  }
191
 
192
  /*
193
- Function Name: get_others_capabilities_mail_bank
194
- Parameters: No
195
- Description: This function is used to get all the roles available in WordPress
196
- Created On: 21-10-2016 12:06
197
- Created By: Tech Banker Team
198
- */
199
-
200
- if(!function_exists("get_others_capabilities_mail_bank"))
201
- {
202
- function get_others_capabilities_mail_bank()
203
- {
204
- $user_capabilities = array();
205
- if(function_exists("get_editable_roles"))
206
- {
207
- foreach(get_editable_roles() as $role_name => $role_info)
208
- {
209
- foreach($role_info["capabilities"] as $capability => $_)
210
- {
211
- if(!in_array($capability,$user_capabilities))
212
- {
213
- array_push($user_capabilities,$capability);
214
- }
215
- }
216
- }
217
- }
218
- else
219
- {
220
- $user_capabilities = array(
221
- "manage_options",
222
- "edit_plugins",
223
- "edit_posts",
224
- "publish_posts",
225
- "publish_pages",
226
- "edit_pages",
227
- "read"
228
- );
229
- }
230
-
231
- return $user_capabilities;
232
- }
233
  }
234
 
235
  /*
236
- Function Name: mail_bank_action_links
237
- Parameters: Yes
238
- Description: This function is used to create link for Pro Editions.
239
- Created On: 24-04-2017 12:20
240
- Created By: Tech Banker Team
241
- */
242
- if(!function_exists("mail_bank_action_links"))
243
- {
244
- function mail_bank_action_links($plugin_link)
245
- {
246
- $plugin_link[] = "<a href=\"http://beta.tech-banker.com/products/mail-bank/\" style=\"color: red; font-weight: bold;\" target=\"_blank\">Go Pro!</a>";
247
- return $plugin_link;
248
- }
249
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
 
251
  $version = get_option("mail-bank-version-number");
252
- if($version == "3.0.0")
253
- {
254
- /* admin_enqueue_scripts for backend_js_css_for_mail_bank
255
- Description: This hook is used for calling css and js files for backend
256
- Created On: 26-09-2016 11:18
257
- Created by: Tech Banker Team
258
- */
259
-
260
- if(is_admin())
261
- {
262
- if(!function_exists("backend_js_css_for_mail_bank"))
263
- {
264
- function backend_js_css_for_mail_bank()
265
- {
266
- $pages_mail_bank = array(
267
- "wp_mail_bank_wizard",
268
- "mb_email_configuration",
269
- "mb_test_email",
270
- "mb_connectivity_test",
271
- "mb_email_logs",
272
- "mb_settings",
273
- "mb_roles_and_capabilities",
274
- "mb_feedbacks",
275
- "mb_system_information",
276
- "mb_error_logs",
277
- "mb_upgrade"
278
- );
279
- if(in_array(isset($_REQUEST["page"]) ? esc_attr($_REQUEST["page"]) : "",$pages_mail_bank))
280
- {
281
- wp_enqueue_script("jquery");
282
- wp_enqueue_script("jquery-ui-datepicker");
283
- wp_enqueue_script("mail-bank-bootstrap.js",plugins_url("assets/global/plugins/custom/js/custom.js",__FILE__));
284
- wp_enqueue_script("mail-bank-jquery.validate.js",plugins_url("assets/global/plugins/validation/jquery.validate.js",__FILE__));
285
- wp_enqueue_script("mail-bank-jquery.datatables.js",plugins_url("assets/global/plugins/datatables/media/js/jquery.datatables.js",__FILE__));
286
- wp_enqueue_script("mail-bank-jquery.fngetfilterednodes.js",plugins_url("assets/global/plugins/datatables/media/js/fngetfilterednodes.js",__FILE__));
287
- wp_enqueue_script("mail-bank-toastr.js",plugins_url("assets/global/plugins/toastr/toastr.js",__FILE__));
288
-
289
- wp_enqueue_style("mail-bank-simple-line-icons.css", plugins_url("assets/global/plugins/icons/icons.css",__FILE__));
290
- wp_enqueue_style("mail-bank-components.css", plugins_url("assets/global/css/components.css",__FILE__));
291
- wp_enqueue_style("mail-bank-custom.css", plugins_url("assets/admin/layout/css/mail-bank-custom.css",__FILE__));
292
- wp_enqueue_style("mail-bank-premium-editions.css", plugins_url("assets/admin/layout/css/premium-edition.css",__FILE__));
293
- if(is_rtl())
294
- {
295
- wp_enqueue_style("mail-bank-bootstrap.css", plugins_url("assets/global/plugins/custom/css/custom-rtl.css",__FILE__));
296
- wp_enqueue_style("mail-bank-layout.css", plugins_url("assets/admin/layout/css/layout-rtl.css",__FILE__));
297
- wp_enqueue_style("mail-bank-tech-banker-custom.css", plugins_url("assets/admin/layout/css/tech-banker-custom-rtl.css",__FILE__));
298
- }
299
- else
300
- {
301
- wp_enqueue_style("mail-bank-bootstrap.css", plugins_url("assets/global/plugins/custom/css/custom.css",__FILE__));
302
- wp_enqueue_style("mail-bank-layout.css", plugins_url("assets/admin/layout/css/layout.css",__FILE__));
303
- wp_enqueue_style("mail-bank-tech-banker-custom.css", plugins_url("assets/admin/layout/css/tech-banker-custom.css",__FILE__));
304
- }
305
- wp_enqueue_style("mail-bank-default.css", plugins_url("assets/admin/layout/css/themes/default.css",__FILE__));
306
- wp_enqueue_style("mail-bank-toastr.min.css", plugins_url("assets/global/plugins/toastr/toastr.css",__FILE__));
307
- wp_enqueue_style("mail-bank-jquery-ui.css", plugins_url("assets/global/plugins/datepicker/jquery-ui.css",__FILE__),false,"2.0",false);
308
- wp_enqueue_style("mail-bank-datatables.foundation.css", plugins_url("assets/global/plugins/datatables/media/css/datatables.foundation.css",__FILE__));
309
- }
310
-
311
- }
312
- }
313
- add_action("admin_enqueue_scripts", "backend_js_css_for_mail_bank");
314
- }
315
-
316
- /*
317
- Function Name: helper_file_for_mail_bank
318
- Parameters: No
319
- Description: This function is used to create Class and Function to perform operations.
320
- Created On: 15-06-2016 09:52
321
- Created By: Tech Banker Team
322
- */
323
-
324
- if(!function_exists("helper_file_for_mail_bank"))
325
- {
326
- function helper_file_for_mail_bank()
327
- {
328
- global $wpdb;
329
- $user_role_permission = get_users_capabilities_mail_bank();
330
- if(file_exists(MAIL_BANK_DIR_PATH."lib/helper.php"))
331
- {
332
- include_once MAIL_BANK_DIR_PATH."lib/helper.php";
333
- }
334
- }
335
- }
336
-
337
- /*
338
- Function Name: sidebar_menu_for_mail_bank
339
- Parameters: No
340
- Description: This function is used to create Admin sidebar menus.
341
- Created On: 15-06-2016 09:52
342
- Created By: Tech Banker Team
343
- */
344
-
345
- if(!function_exists("sidebar_menu_for_mail_bank"))
346
- {
347
- function sidebar_menu_for_mail_bank()
348
- {
349
- global $wpdb,$current_user;
350
- $user_role_permission = get_users_capabilities_mail_bank();
351
- if(file_exists(MAIL_BANK_DIR_PATH."includes/translations.php"))
352
- {
353
- include MAIL_BANK_DIR_PATH."includes/translations.php";
354
- }
355
- if(file_exists(MAIL_BANK_DIR_PATH."lib/sidebar-menu.php"))
356
- {
357
- include_once MAIL_BANK_DIR_PATH."lib/sidebar-menu.php";
358
- }
359
- }
360
- }
361
-
362
- /*
363
- Function Name: topbar_menu_for_mail_bank
364
- Parameters: No
365
- Description: This function is used for creating Top bar menu.
366
- Created On: 15-06-2016 10:44
367
- Created By: Tech Banker Team
368
- */
369
-
370
- if(!function_exists("topbar_menu_for_mail_bank"))
371
- {
372
- function topbar_menu_for_mail_bank()
373
- {
374
- global $wpdb,$current_user,$wp_admin_bar;
375
- $role_capabilities = $wpdb->get_var
376
- (
377
- $wpdb->prepare
378
- (
379
- "SELECT meta_value FROM ".mail_bank_meta()."
380
- WHERE meta_key = %s",
381
- "roles_and_capabilities"
382
- )
383
- );
384
- $roles_and_capabilities_unserialized_data = unserialize($role_capabilities);
385
- $top_bar_menu = $roles_and_capabilities_unserialized_data["show_mail_bank_top_bar_menu"];
386
-
387
- if($top_bar_menu == "enable")
388
- {
389
- $user_role_permission = get_users_capabilities_mail_bank();
390
- if(file_exists(MAIL_BANK_DIR_PATH."includes/translations.php"))
391
- {
392
- include MAIL_BANK_DIR_PATH."includes/translations.php";
393
- }
394
- if(get_option("wp-mail-bank-wizard-set-up"))
395
- {
396
- if(file_exists(MAIL_BANK_DIR_PATH."lib/admin-bar-menu.php"))
397
- {
398
- include_once MAIL_BANK_DIR_PATH."lib/admin-bar-menu.php";
399
- }
400
- }
401
- }
402
- }
403
- }
404
-
405
- /*
406
- Function Name: ajax_register_for_mail_bank
407
- Parameters: No
408
- Description: This function is used for register ajax.
409
- Created On: 15-06-2016 10:44
410
- Created By: Tech Banker Team
411
- */
412
-
413
- if(!function_exists("ajax_register_for_mail_bank"))
414
- {
415
- function ajax_register_for_mail_bank()
416
- {
417
- global $wpdb;
418
- $user_role_permission = get_users_capabilities_mail_bank();
419
- if(file_exists(MAIL_BANK_DIR_PATH."includes/translations.php"))
420
- {
421
- include MAIL_BANK_DIR_PATH."includes/translations.php";
422
- }
423
- if(file_exists(MAIL_BANK_DIR_PATH."lib/action-library.php"))
424
- {
425
- include_once MAIL_BANK_DIR_PATH."lib/action-library.php";
426
- }
427
- }
428
- }
429
-
430
- /*
431
- Function Name: mail_bank_settings_link
432
- Parameters: No
433
- Description: This function is used to add settings link.
434
- Created On: 09-08-2016 02:50
435
- Created By: Tech Banker Team
436
- */
437
-
438
- if(!function_exists("mail_bank_settings_link"))
439
- {
440
- function mail_bank_settings_link($action)
441
- {
442
- global $wpdb;
443
- $user_role_permission = get_users_capabilities_mail_bank();
444
- $settings_link = '<a href = "'.admin_url('admin.php?page=mb_email_configuration').'">' . "Settings" . '</a>';
445
- array_unshift($action, $settings_link);
446
- return $action;
447
- }
448
- }
449
-
450
- /*
451
- Function Name: plugin_load_textdomain_mail_bank
452
- Parameters: No
453
- Description: This function is used to load the plugin's translated strings.
454
- Created On: 16-06-2016 09:47
455
- Created By: Tech Banker Team
456
- */
457
-
458
- if(!function_exists("plugin_load_textdomain_mail_bank"))
459
- {
460
- function plugin_load_textdomain_mail_bank()
461
- {
462
- if(function_exists("load_plugin_textdomain"))
463
- {
464
- load_plugin_textdomain("wp-mail-bank", false, MAIL_BANK_PLUGIN_DIRNAME ."/languages");
465
- }
466
- }
467
- }
468
-
469
- /*
470
- Function Name: oauth_handling_mail_bank
471
- Parameters: No
472
- Description: This function is used to Manage Redirect.
473
- Created On: 11-08-2016 11:53
474
- Created By: Tech Banker Team
475
- */
476
-
477
- if(!function_exists("oauth_handling_mail_bank"))
478
- {
479
- function oauth_handling_mail_bank()
480
- {
481
- if(is_admin())
482
- {
483
- if((count($_REQUEST) <= 2) && isset($_REQUEST["code"]))
484
- {
485
- if(file_exists(MAIL_BANK_DIR_PATH."lib/callback.php"))
486
- {
487
- include_once MAIL_BANK_DIR_PATH."lib/callback.php";
488
- }
489
- }
490
- elseif((count($_REQUEST) <= 2) && isset($_REQUEST["error"]))
491
- {
492
- $url = admin_url("admin.php?page=mb_email_configuration");
493
- header("location: $url");
494
- }
495
- }
496
- }
497
- }
498
-
499
- /*
500
- Function Name: email_configuration_mail_bank
501
- Parameters: 1($phpmailer)
502
- Description: This function is used for checking test email.
503
- Created On: 15-06-2016 10:44
504
- Created By: Tech Banker Team
505
- */
506
-
507
- if(!function_exists("email_configuration_mail_bank"))
508
- {
509
- function email_configuration_mail_bank($phpmailer)
510
- {
511
- global $wpdb;
512
- $email_configuration_data = $wpdb->get_var
513
- (
514
- $wpdb->prepare
515
- (
516
- "SELECT meta_value FROM " . mail_bank_meta(). "
517
- WHERE meta_key = %s",
518
- "email_configuration"
519
- )
520
- );
521
- $email_configuration_data_array = unserialize($email_configuration_data);
522
-
523
- $phpmailer->Mailer = "mail";
524
- if($email_configuration_data_array["sender_name_configuration"] == "override")
525
- {
526
- $phpmailer->FromName = stripcslashes(htmlspecialchars_decode($email_configuration_data_array["sender_name"], ENT_QUOTES));
527
- }
528
- if($email_configuration_data_array["from_email_configuration"] == "override")
529
- {
530
- $phpmailer->From = $email_configuration_data_array["sender_email"];
531
- }
532
- if($email_configuration_data_array["reply_to"] != "")
533
- {
534
- $phpmailer->clearReplyTos();
535
- $phpmailer->AddReplyTo($email_configuration_data_array["reply_to"]);
536
- }
537
- if($email_configuration_data_array["cc"] != "")
538
- {
539
- $phpmailer->clearCCs();
540
- $cc_address_array = explode(",",$email_configuration_data_array["cc"]);
541
- foreach($cc_address_array as $cc_address)
542
- {
543
- $phpmailer->AddCc($cc_address);
544
- }
545
- }
546
- if($email_configuration_data_array["bcc"] != "")
547
- {
548
- $phpmailer->clearBCCs();
549
- $bcc_address_array = explode(",",$email_configuration_data_array["bcc"]);
550
- foreach($bcc_address_array as $bcc_address)
551
- {
552
- $phpmailer->AddBcc($bcc_address);
553
- }
554
- }
555
- $phpmailer->Sender = $email_configuration_data_array["email_address"];
556
- }
557
- }
558
-
559
- /*
560
- Function Name: admin_functions_for_mail_bank
561
- Parameters: No
562
- Description: This function is used for calling admin_init functions.
563
- Created On: 15-06-2016 10:44
564
- Created By: Tech Banker Team
565
- */
566
-
567
- if(!function_exists("admin_functions_for_mail_bank"))
568
- {
569
- function admin_functions_for_mail_bank()
570
- {
571
- install_script_for_mail_bank();
572
- helper_file_for_mail_bank();
573
- }
574
- }
575
-
576
- /*
577
- Function Name: plugin_auto_update_mail_bank
578
- Parameters: No
579
- Description: This function is used to Update the plugin's version.
580
- Created On: 16-06-2016 11:02
581
- Created By: Tech Banker Team
582
- */
583
-
584
- if(!function_exists("plugin_auto_update_mail_bank"))
585
- {
586
- function plugin_auto_update_mail_bank()
587
- {
588
- if(!wp_next_scheduled("automatic_updates_mail_bank"))
589
- {
590
- wp_schedule_event(MAIL_BANK_LOCAL_TIME, "daily", "automatic_updates_mail_bank");
591
- }
592
- add_action("automatic_updates_mail_bank", "mail_bank_plugin_autoupdate");
593
- }
594
- }
595
-
596
- /*
597
- Function Name: mailer_file_for_mail_bank
598
- Parameters: No
599
- Description: This function is used for including Mailer File.
600
- Created On: 30-06-2016 02:13
601
- Created By: Tech Banker Team
602
- */
603
-
604
- if(!function_exists("mailer_file_for_mail_bank"))
605
- {
606
- function mailer_file_for_mail_bank()
607
- {
608
- if(file_exists(MAIL_BANK_DIR_PATH."includes/mailer.php"))
609
- {
610
- include_once MAIL_BANK_DIR_PATH."includes/mailer.php";
611
- }
612
- }
613
- }
614
-
615
- /*
616
- Function Name: mail_bank_plugin_autoupdate
617
- Parameters: No
618
- Description: This function is used to Update the plugin automatically.
619
- Created On: 16-06-2016 11:18
620
- Created By: Tech Banker Team
621
- */
622
-
623
- if(!function_exists("mail_bank_plugin_autoupdate"))
624
- {
625
- function mail_bank_plugin_autoupdate()
626
- {
627
- try
628
- {
629
- require_once(ABSPATH . "wp-admin/includes/class-wp-upgrader.php");
630
- require_once(ABSPATH . "wp-admin/includes/misc.php");
631
- define("FS_METHOD", "direct");
632
- require_once(ABSPATH . "wp-includes/update.php");
633
- require_once(ABSPATH . "wp-admin/includes/file.php");
634
- wp_update_plugins();
635
- ob_start();
636
- $plugin_upgrader = new Plugin_Upgrader();
637
- $plugin_upgrader->upgrade(MAIL_BANK_FILE);
638
- $output = @ob_get_contents();
639
- @ob_end_clean();
640
- }
641
- catch(Exception $e)
642
- {
643
- }
644
- }
645
- }
646
-
647
- /*
648
- Function Name: user_functions_for_mail_bank
649
- Parameters: No
650
- Description: This function is used to call on init hook.
651
- Created On: 16-06-2016 11:08
652
- Created By: Tech Banker Team
653
- */
654
- if(!function_exists("user_functions_for_mail_bank"))
655
- {
656
- function user_functions_for_mail_bank()
657
- {
658
- mail_bank_error_log_file();
659
- global $wpdb;
660
- $meta_values = $wpdb->get_results
661
- (
662
- $wpdb->prepare
663
- (
664
- "SELECT meta_value FROM " . mail_bank_meta(). "
665
- WHERE meta_key IN(%s,%s)",
666
- "settings",
667
- "email_configuration"
668
- )
669
- );
670
-
671
- $meta_data_array = array();
672
- foreach($meta_values as $value)
673
- {
674
- $unserialize_data = unserialize($value->meta_value);
675
- array_push($meta_data_array,$unserialize_data);
676
- }
677
- if($meta_data_array[1]["error_reporting"] == "enable")
678
- {
679
- @ini_set("log_errors",1);
680
- @ini_set("error_log",MAIL_BANK_ERROR_LOGS_FILE);
681
- }
682
- if(isset($meta_data_array[1]["automatic_plugin_update"]) && $meta_data_array[1]["automatic_plugin_update"] == "enable")
683
- {
684
- plugin_auto_update_mail_bank();
685
- }
686
- else
687
- {
688
- wp_clear_scheduled_hook("automatic_updates_mail_bank");
689
- }
690
- mailer_file_for_mail_bank();
691
- if($meta_data_array[0]["mailer_type"] == "php_mail_function")
692
- {
693
- add_action("phpmailer_init","email_configuration_mail_bank");
694
- }
695
- else
696
- {
697
- apply_filters("wp_mail","wp_mail");
698
- }
699
- oauth_handling_mail_bank();
700
- }
701
- }
702
-
703
- /*
704
- Description: Override Mail Function here.
705
- Created On: 30-06-2016 02:13
706
- Created By: Tech Banker Team
707
- */
708
-
709
- mailer_file_for_mail_bank();
710
- mail_bank_auth_host::override_wp_mail_function();
711
-
712
- /*
713
- Function Name: uninstall_script_for_mail_bank
714
- Parameters: No
715
- Description: This function is used to delete schedulers and options on Uninstall Hook.
716
- Created On: 16-06-2016 12:00
717
- Created By: Tech Banker Team
718
- */
719
-
720
- if(!function_exists("uninstall_script_for_mail_bank"))
721
- {
722
- function uninstall_script_for_mail_bank()
723
- {
724
- global $wpdb;
725
- if(is_multisite())
726
- {
727
- $blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
728
- foreach($blog_ids as $blog_id)
729
- {
730
- switch_to_blog($blog_id);
731
- if(file_exists(MAIL_BANK_DIR_PATH."lib/uninstall-script.php"))
732
- {
733
- include MAIL_BANK_DIR_PATH."lib/uninstall-script.php";
734
- }
735
- restore_current_blog();
736
- }
737
- }
738
- else
739
- {
740
- if(file_exists(MAIL_BANK_DIR_PATH."lib/uninstall-script.php"))
741
- {
742
- include MAIL_BANK_DIR_PATH."lib/uninstall-script.php";
743
- }
744
- }
745
- }
746
- }
747
- /*
748
- Function Name: deactivation_function_for_wp_mail_bank
749
- Parameters: No
750
- Description: This function is used for executing the code on deactivation.
751
- Created On: 21-04-2017 09:22
752
- Created by: Tech Banker Team
753
- */
754
-
755
- if(!function_exists("deactivation_function_for_wp_mail_bank"))
756
- {
757
- function deactivation_function_for_wp_mail_bank()
758
- {
759
- $plugin_info_wp_mail_bank= new plugin_info_wp_mail_bank();
760
- global $wp_version, $wpdb;
761
-
762
- $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
763
- $type = get_option("wp-mail-bank-wizard-set-up");
764
-
765
- $theme_details = array();
766
-
767
- if($wp_version >= 3.4)
768
- {
769
- $active_theme = wp_get_theme();
770
- $theme_details["theme_name"] = strip_tags($active_theme->Name);
771
- $theme_details["theme_version"] = strip_tags($active_theme->Version);
772
- $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
773
- }
774
-
775
- $plugin_stat_data = array();
776
- $plugin_stat_data["plugin_slug"] = "wp-mail-bank";
777
- $plugin_stat_data["type"] = "standard_edition";
778
- $plugin_stat_data["version_number"] = mail_bank_version_number;
779
- $plugin_stat_data["status"] = $type;
780
- $plugin_stat_data["event"] = "de-activate";
781
- $plugin_stat_data["domain_url"] = site_url();
782
- $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
783
-
784
- switch($type)
785
- {
786
- case "opt_in" :
787
- $plugin_stat_data["email"] = get_option("admin_email");
788
- $plugin_stat_data["wp_version"] = $wp_version;
789
- $plugin_stat_data["php_version"] = esc_html(phpversion());
790
- $plugin_stat_data["mysql_version"] = $wpdb->db_version();
791
- $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
792
- $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
793
- $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
794
- $plugin_stat_data["extensions"] = get_loaded_extensions();
795
- $plugin_stat_data["plugins"] = $plugin_info_wp_mail_bank->get_plugin_info_wp_mail_bank();
796
- $plugin_stat_data["themes"] = $theme_details;
797
- break;
798
- }
799
-
800
- if(function_exists("curl_init"))
801
- {
802
- $ch = curl_init();
803
- curl_setopt($ch, CURLOPT_URL, $url);
804
- curl_setopt($ch, CURLOPT_POST, 1);
805
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
806
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
807
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
808
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
809
- curl_setopt($ch, CURLOPT_POSTFIELDS,
810
- http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") !="" ? get_option("mb_tech_banker_site_id") : "", "action"=>"plugin_analysis_data")));
811
- $result = curl_exec($ch);
812
- update_option("mb_tech_banker_site_id",$result);
813
- curl_close($ch);
814
- }
815
- else
816
- {
817
- $response = wp_safe_remote_post($url, array
818
- (
819
- "method" => "POST",
820
- "timeout" => 45,
821
- "redirection" => 5,
822
- "httpversion" => "1.0",
823
- "blocking" => false,
824
- "headers" => array(),
825
- "body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "", "action"=>"plugin_analysis_data")
826
- ));
827
-
828
- if(!is_wp_error($response))
829
- {
830
- $response["body"] != "" ? update_option("mb_tech_banker_site_id", $response["body"]) : "";
831
- }
832
- else
833
- {
834
- update_option("mb_tech_banker_site_id", "error");
835
- }
836
- }
837
- }
838
- }
839
-
840
- /*hooks */
841
-
842
- /*
843
- register_activation_hook for install_script_for_mail_bank
844
- Description: This hook is used for calling the function of install script.
845
- Created On: 15-06-2016 09:46
846
- Created By: Tech Banker Team
847
- */
848
-
849
- register_activation_hook(__FILE__,"install_script_for_mail_bank");
850
-
851
- /*
852
- add_action for admin_functions_for_mail_bank
853
- Description: This hook contains all admin_init functions.
854
- Created On: 15-06-2016 09:46
855
- Created By: Tech Banker Team
856
- */
857
-
858
- add_action("admin_init","admin_functions_for_mail_bank");
859
-
860
-
861
- /*
862
- add_action for user_functions_for_mail_bank
863
- Description: This hook is used for calling the function of user functions.
864
- Created On: 16-06-2016 11:07
865
- Created By: Tech Banker Team
866
- */
867
-
868
- add_action("init","user_functions_for_mail_bank");
869
-
870
- /*
871
- add_action for sidebar_menu_for_mail_bank
872
- Description: This hook is used for calling the function of sidebar menu.
873
- Created On: 15-06-2016 09:46
874
- Created By: Tech Banker Team
875
- */
876
-
877
- add_action("admin_menu","sidebar_menu_for_mail_bank");
878
-
879
- /*
880
- add_action for sidebar_menu_for_mail_bank
881
- Description: This hook is used for calling the function of sidebar menu in multisite case.
882
- Created On: 19-10-2016 05:18
883
- Created By: Tech Banker Team
884
- */
885
-
886
- add_action("network_admin_menu","sidebar_menu_for_mail_bank");
887
-
888
- /*
889
- add_action for topbar_menu_for_mail_bank
890
- Description: This hook is used for calling the function of topbar menu.
891
- Created On: 15-06-2016 09:46
892
- Created By: Tech Banker Team
893
- */
894
-
895
- add_action("admin_bar_menu","topbar_menu_for_mail_bank",100);
896
-
897
- /*
898
- add_filter for mail_bank_settings_link
899
- Description: This hook is used for calling the function of settings link.
900
- Created On: 09-08-2016 02:51
901
- Created By: Tech Banker Team
902
- */
903
-
904
- add_filter("plugin_action_links_".plugin_basename(__FILE__),"mail_bank_settings_link",10,2);
905
-
906
- /*
907
- add_action for plugin_load_textdomain_mail_bank
908
- Description: This hook is used for calling the function of languages.
909
- Created On: 16-06-2016 09:47
910
- Created By: Tech Banker Team
911
- */
912
-
913
- add_action("init", "plugin_load_textdomain_mail_bank");
914
-
915
- /*
916
- register_uninstall_hook
917
- Description: This hook is used for calling the function of uninstall script.
918
- Created On: 16-06-2016 12:00
919
- Created By: Tech Banker Team
920
- */
921
- register_uninstall_hook( __FILE__, "uninstall_script_for_mail_bank");
922
-
923
- /*
924
- add_action hook for ajax_register_for_mail_bank
925
- Description: This hook is used to register ajax.
926
- Created On: 16-06-2016 12:00
927
- Created By: Tech Banker Team
928
- */
929
- add_action("wp_ajax_mail_bank_action", "ajax_register_for_mail_bank");
930
  }
931
 
932
  /*
933
- register_activation_hook for install_script_for_mail_bank
934
- Description: This hook is used for calling the function of install script.
935
- Created On: 15-06-2016 09:46
936
- Created By: Tech Banker Team
937
- */
938
 
939
- register_activation_hook(__FILE__,"install_script_for_mail_bank");
940
 
941
  /*
942
- add_action for install_script_for_mail_bank
943
- Description: This hook used for calling the function of install script.
944
- Created On: 15-06-2016 09:46
945
- Created By: Tech Banker Team
946
- */
947
 
948
- add_action("admin_init","install_script_for_mail_bank");
949
 
950
  /* deactivation_function_for_wp_mail_bank
951
- Description: This hook is used to sets the deactivation hook for a plugin.
952
- Created On: 21-04-2017 09:22
953
- Created by: Tech Banker Team
954
- */
955
 
956
  register_deactivation_hook(__FILE__, "deactivation_function_for_wp_mail_bank");
957
 
958
  /* add_filter create Go Pro link for Mail Bank
959
- Description: This hook is used for create link for premium Editions.
960
- Created On: 24-04-2017 12:21
961
- Created by: Tech Banker Team
962
- */
963
  add_filter("plugin_action_links_" . plugin_basename(__FILE__), "mail_bank_action_links");
964
 
 
965
  /*
966
- Class Name: plugin_activate_wp_mail_bank
967
- Description: This function is used to add option on plugin activation.
968
- Created On: 24-04-2017 12:04
969
- Created By: Tech Banker Team
970
- */
971
-
972
- if(!function_exists("plugin_activate_wp_mail_bank"))
973
- {
974
- function plugin_activate_wp_mail_bank()
975
- {
976
- add_option("wp_mail_bank_do_activation_redirect", true);
977
- }
 
 
 
 
 
 
 
 
 
978
  }
979
 
980
  /*
981
- Class Name: wp_mail_bank_redirect
982
- Description: This function is used to redirect to email setup.
983
- Created On: 24-04-2017 12:04
984
- Created By: Tech Banker Team
985
- */
986
-
987
- if(!function_exists("wp_mail_bank_redirect"))
988
- {
989
- function wp_mail_bank_redirect()
990
- {
991
- if(get_option("wp_mail_bank_do_activation_redirect", false))
992
- {
993
- delete_option("wp_mail_bank_do_activation_redirect");
994
- wp_redirect(admin_url("admin.php?page=mb_email_configuration"));
995
- exit;
996
- }
997
- }
998
  }
999
  register_activation_hook(__FILE__, "plugin_activate_wp_mail_bank");
1000
  add_action("admin_init", "wp_mail_bank_redirect");
1
  <?php
2
+
3
  /*
4
+ Plugin Name: SMTP Mailer Plugin by Mail Bank
5
+ Plugin URI: http://beta.tech-banker.com/
6
+ Description: Mail Bank easily configures sending emails and logging them from your WordPress site using your preferred PHPMailer or SMTP server.
7
+ Author: Tech Banker
8
+ Author URI: http://beta.tech-banker.com
9
+ Version: 3.0.3
10
+ License: GPLv3
11
+ Text Domain: wp-mail-bank
12
+ Domain Path: /languages
13
+ */
14
+
15
+ if (!defined("ABSPATH"))
16
+ exit; // Exit if accessed directly
17
+ /* Constant Declaration */
18
+ if (!defined("MAIL_BANK_FILE"))
19
+ define("MAIL_BANK_FILE", plugin_basename(__FILE__));
20
+ if (!defined("MAIL_BANK_DIR_PATH"))
21
+ define("MAIL_BANK_DIR_PATH", plugin_dir_path(__FILE__));
22
+ if (!defined("MAIL_BANK_PLUGIN_DIRNAME"))
23
+ define("MAIL_BANK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
24
+ if (!defined("MAIL_BANK_MAIN_DIR"))
25
+ define("MAIL_BANK_MAIN_DIR", dirname(dirname(MAIL_BANK_DIR_PATH)) . "/wp-mail-bank");
26
+ if (!defined("MAIL_BANK_ERROR_LOGS_FILE"))
27
+ define("MAIL_BANK_ERROR_LOGS_FILE", MAIL_BANK_MAIN_DIR . "/error-logs.txt");
28
+ if (!defined("MAIL_BANK_LOCAL_TIME"))
29
+ define("MAIL_BANK_LOCAL_TIME", strtotime(date_i18n("Y-m-d H:i:s")));
30
+ if (!is_dir(MAIL_BANK_MAIN_DIR)) {
31
+ wp_mkdir_p(MAIL_BANK_MAIN_DIR);
32
  }
33
+ if (is_ssl()) {
34
+ if (!defined("tech_banker_url"))
35
+ define("tech_banker_url", "https://tech-banker.com");
36
+ if (!defined("tech_banker_beta_url"))
37
+ define("tech_banker_beta_url", "https://beta.tech-banker.com");
38
  }
39
+ else {
40
+ if (!defined("tech_banker_url"))
41
+ define("tech_banker_url", "http://tech-banker.com");
42
+ if (!defined("tech_banker_beta_url"))
43
+ define("tech_banker_beta_url", "http://beta.tech-banker.com");
44
  }
45
+ if (!defined("tech_banker_stats_url"))
46
+ define("tech_banker_stats_url", "http://stats.tech-banker-services.org");
47
+ if (!defined("mail_bank_version_number"))
48
+ define("mail_bank_version_number", "3.0.3");
49
+
50
+ if (!function_exists("mail_bank_error_log_file")) {
51
+
52
+ function mail_bank_error_log_file() {
53
+ if (!file_exists(MAIL_BANK_ERROR_LOGS_FILE)) {
54
+ $mb_error_file = fopen(MAIL_BANK_ERROR_LOGS_FILE, 'wb');
55
+ fclose($mb_error_file);
56
+ }
57
+ }
58
+
59
  }
60
 
61
  $memory_limit_mail_bank = intval(ini_get("memory_limit"));
62
+ if (!extension_loaded('suhosin') && $memory_limit_mail_bank < 512) {
63
+ @ini_set("memory_limit", "512M");
 
64
  }
65
 
66
  @ini_set("max_execution_time", 6000);
67
  @ini_set("max_input_vars", 10000);
68
 
69
  /*
70
+ Function Name: get_users_capabilities_mail_bank
71
+ Parameters: No
72
+ Description: This function is used to get users capabilities.
73
+ Created On: 21-10-2016 15:21
74
+ Created By: Tech Banker Team
75
+ */
76
+
77
+ if (!function_exists("get_users_capabilities_mail_bank")) {
78
+
79
+ function get_users_capabilities_mail_bank() {
80
+ global $wpdb;
81
+ $capabilities = $wpdb->get_var
82
+ (
83
+ $wpdb->prepare
84
+ (
85
+ "SELECT meta_value FROM " . mail_bank_meta() . "
86
+ WHERE meta_key = %s", "roles_and_capabilities"
87
+ )
88
+ );
89
+ $core_roles = array(
90
+ "manage_options",
91
+ "edit_plugins",
92
+ "edit_posts",
93
+ "publish_posts",
94
+ "publish_pages",
95
+ "edit_pages",
96
+ "read"
97
+ );
98
+ $unserialized_capabilities = unserialize($capabilities);
99
+ return isset($unserialized_capabilities["capabilities"]) ? $unserialized_capabilities["capabilities"] : $core_roles;
100
+ }
101
+
 
102
  }
103
 
104
  /*
105
+ Function Name: install_script_for_mail_bank
106
+ Parameters: No
107
+ Description: This function is used to create Tables in Database.
108
+ Created On: 15-06-2016 09:52
109
+ Created By: Tech Banker Team
110
+ */
111
+
112
+ if (!function_exists("install_script_for_mail_bank")) {
113
+
114
+ function install_script_for_mail_bank() {
115
+ global $wpdb;
116
+ if (is_multisite()) {
117
+ $blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
118
+ foreach ($blog_ids as $blog_id) {
119
+ switch_to_blog($blog_id);
120
+ $version = get_option("mail-bank-version-number");
121
+ if ($version < "3.0.0") {
122
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/install-script.php")) {
123
+ include MAIL_BANK_DIR_PATH . "lib/install-script.php";
124
+ }
125
+ }
126
+ restore_current_blog();
127
+ }
128
+ } else {
129
+ $version = get_option("mail-bank-version-number");
130
+ if ($version < "3.0.0") {
131
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/install-script.php")) {
132
+ include_once MAIL_BANK_DIR_PATH . "lib/install-script.php";
133
+ }
134
+ }
135
+ }
136
+ }
137
+
 
 
 
 
 
 
 
 
138
  }
139
 
140
  /*
141
+ Function Name: check_user_roles_mail_bank
142
+ Parameters: Yes($user)
143
+ Description: This function is used for checking roles of different users.
144
+ Created On: 19-10-2016 03:40
145
+ Created By: Tech Banker Team
146
+ */
147
+
148
+ if (!function_exists("check_user_roles_mail_bank")) {
149
+
150
+ function check_user_roles_mail_bank() {
151
+ global $current_user;
152
+ $user = $current_user ? new WP_User($current_user) : wp_get_current_user();
153
+ return $user->roles ? $user->roles[0] : false;
154
+ }
155
+
156
  }
157
 
158
 
159
  /*
160
+ Function Name: mail_bank
161
+ Parameters: No
162
+ Description: This function is used to return Parent Table name with prefix.
163
+ Created On: 15-06-2016 10:44
164
+ Created By: Tech Banker Team
165
+ */
166
+
167
+ if (!function_exists("mail_bank")) {
168
+
169
+ function mail_bank() {
170
+ global $wpdb;
171
+ return $wpdb->prefix . "mail_bank";
172
+ }
173
+
174
  }
175
 
176
  /*
177
+ Function Name: mail_bank_meta
178
+ Parameters: No
179
+ Description: This function is used to return Meta Table name with prefix.
180
+ Created On: 15-06-2016 10:44
181
+ Created By: Tech Banker Team
182
+ */
183
+
184
+ if (!function_exists("mail_bank_meta")) {
185
+
186
+ function mail_bank_meta() {
187
+ global $wpdb;
188
+ return $wpdb->prefix . "mail_bank_meta";
189
+ }
190
+
191
  }
192
 
193
  /*
194
+ Function Name: get_others_capabilities_mail_bank
195
+ Parameters: No
196
+ Description: This function is used to get all the roles available in WordPress
197
+ Created On: 21-10-2016 12:06
198
+ Created By: Tech Banker Team
199
+ */
200
+
201
+ if (!function_exists("get_others_capabilities_mail_bank")) {
202
+
203
+ function get_others_capabilities_mail_bank() {
204
+ $user_capabilities = array();
205
+ if (function_exists("get_editable_roles")) {
206
+ foreach (get_editable_roles() as $role_name => $role_info) {
207
+ foreach ($role_info["capabilities"] as $capability => $_) {
208
+ if (!in_array($capability, $user_capabilities)) {
209
+ array_push($user_capabilities, $capability);
210
+ }
211
+ }
212
+ }
213
+ } else {
214
+ $user_capabilities = array(
215
+ "manage_options",
216
+ "edit_plugins",
217
+ "edit_posts",
218
+ "publish_posts",
219
+ "publish_pages",
220
+ "edit_pages",
221
+ "read"
222
+ );
223
+ }
224
+
225
+ return $user_capabilities;
226
+ }
227
+
 
 
 
 
 
 
228
  }
229
 
230
  /*
231
+ Function Name: mail_bank_action_links
232
+ Parameters: Yes
233
+ Description: This function is used to create link for Pro Editions.
234
+ Created On: 24-04-2017 12:20
235
+ Created By: Tech Banker Team
236
+ */
237
+ if (!function_exists("mail_bank_action_links")) {
238
+
239
+ function mail_bank_action_links($plugin_link) {
240
+ $plugin_link[] = "<a href=\"http://beta.tech-banker.com/products/mail-bank/\" style=\"color: red; font-weight: bold;\" target=\"_blank\">Go Pro!</a>";
241
+ return $plugin_link;
242
+ }
243
+
244
  }
245
+ /*
246
+ Function Name: mail_bank_settings_link
247
+ Parameters: No
248
+ Description: This function is used to add settings link.
249
+ Created On: 09-08-2016 02:50
250
+ Created By: Tech Banker Team
251
+ */
252
+
253
+ if (!function_exists("mail_bank_settings_link")) {
254
+
255
+ function mail_bank_settings_link($action) {
256
+ global $wpdb;
257
+ $user_role_permission = get_users_capabilities_mail_bank();
258
+ $settings_link = '<a href = "' . admin_url('admin.php?page=mb_email_configuration') . '">' . "Settings" . '</a>';
259
+ array_unshift($action, $settings_link);
260
+ return $action;
261
+ }
262
 
263
+ }
264
  $version = get_option("mail-bank-version-number");
265
+ if ($version >= "3.0.0") {
266
+ /* admin_enqueue_scripts for backend_js_css_for_mail_bank
267
+ Description: This hook is used for calling css and js files for backend
268
+ Created On: 26-09-2016 11:18
269
+ Created by: Tech Banker Team
270
+ */
271
+
272
+ if (is_admin()) {
273
+ if (!function_exists("backend_js_css_for_mail_bank")) {
274
+
275
+ function backend_js_css_for_mail_bank() {
276
+ $pages_mail_bank = array(
277
+ "wp_mail_bank_wizard",
278
+ "mb_email_configuration",
279
+ "mb_test_email",
280
+ "mb_connectivity_test",
281
+ "mb_email_logs",
282
+ "mb_settings",
283
+ "mb_roles_and_capabilities",
284
+ "mb_feedbacks",
285
+ "mb_system_information",
286
+ "mb_error_logs",
287
+ "mb_upgrade"
288
+ );
289
+ if (in_array(isset($_REQUEST["page"]) ? esc_attr($_REQUEST["page"]) : "", $pages_mail_bank)) {
290
+ wp_enqueue_script("jquery");
291
+ wp_enqueue_script("jquery-ui-datepicker");
292
+ wp_enqueue_script("mail-bank-bootstrap.js", plugins_url("assets/global/plugins/custom/js/custom.js", __FILE__));
293
+ wp_enqueue_script("mail-bank-jquery.validate.js", plugins_url("assets/global/plugins/validation/jquery.validate.js", __FILE__));
294
+ wp_enqueue_script("mail-bank-jquery.datatables.js", plugins_url("assets/global/plugins/datatables/media/js/jquery.datatables.js", __FILE__));
295
+ wp_enqueue_script("mail-bank-jquery.fngetfilterednodes.js", plugins_url("assets/global/plugins/datatables/media/js/fngetfilterednodes.js", __FILE__));
296
+ wp_enqueue_script("mail-bank-toastr.js", plugins_url("assets/global/plugins/toastr/toastr.js", __FILE__));
297
+
298
+ wp_enqueue_style("mail-bank-simple-line-icons.css", plugins_url("assets/global/plugins/icons/icons.css", __FILE__));
299
+ wp_enqueue_style("mail-bank-components.css", plugins_url("assets/global/css/components.css", __FILE__));
300
+ wp_enqueue_style("mail-bank-custom.css", plugins_url("assets/admin/layout/css/mail-bank-custom.css", __FILE__));
301
+ wp_enqueue_style("mail-bank-premium-editions.css", plugins_url("assets/admin/layout/css/premium-edition.css", __FILE__));
302
+ if (is_rtl()) {
303
+ wp_enqueue_style("mail-bank-bootstrap.css", plugins_url("assets/global/plugins/custom/css/custom-rtl.css", __FILE__));
304
+ wp_enqueue_style("mail-bank-layout.css", plugins_url("assets/admin/layout/css/layout-rtl.css", __FILE__));
305
+ wp_enqueue_style("mail-bank-tech-banker-custom.css", plugins_url("assets/admin/layout/css/tech-banker-custom-rtl.css", __FILE__));
306
+ } else {
307
+ wp_enqueue_style("mail-bank-bootstrap.css", plugins_url("assets/global/plugins/custom/css/custom.css", __FILE__));
308
+ wp_enqueue_style("mail-bank-layout.css", plugins_url("assets/admin/layout/css/layout.css", __FILE__));
309
+ wp_enqueue_style("mail-bank-tech-banker-custom.css", plugins_url("assets/admin/layout/css/tech-banker-custom.css", __FILE__));
310
+ }
311
+ wp_enqueue_style("mail-bank-default.css", plugins_url("assets/admin/layout/css/themes/default.css", __FILE__));
312
+ wp_enqueue_style("mail-bank-toastr.min.css", plugins_url("assets/global/plugins/toastr/toastr.css", __FILE__));
313
+ wp_enqueue_style("mail-bank-jquery-ui.css", plugins_url("assets/global/plugins/datepicker/jquery-ui.css", __FILE__), false, "2.0", false);
314
+ wp_enqueue_style("mail-bank-datatables.foundation.css", plugins_url("assets/global/plugins/datatables/media/css/datatables.foundation.css", __FILE__));
315
+ }
316
+ }
317
+
318
+ }
319
+ add_action("admin_enqueue_scripts", "backend_js_css_for_mail_bank");
320
+ }
321
+
322
+ /*
323
+ Function Name: helper_file_for_mail_bank
324
+ Parameters: No
325
+ Description: This function is used to create Class and Function to perform operations.
326
+ Created On: 15-06-2016 09:52
327
+ Created By: Tech Banker Team
328
+ */
329
+
330
+ if (!function_exists("helper_file_for_mail_bank")) {
331
+
332
+ function helper_file_for_mail_bank() {
333
+ global $wpdb;
334
+ $user_role_permission = get_users_capabilities_mail_bank();
335
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/helper.php")) {
336
+ include_once MAIL_BANK_DIR_PATH . "lib/helper.php";
337
+ }
338
+ }
339
+
340
+ }
341
+
342
+ /*
343
+ Function Name: sidebar_menu_for_mail_bank
344
+ Parameters: No
345
+ Description: This function is used to create Admin sidebar menus.
346
+ Created On: 15-06-2016 09:52
347
+ Created By: Tech Banker Team
348
+ */
349
+
350
+ if (!function_exists("sidebar_menu_for_mail_bank")) {
351
+
352
+ function sidebar_menu_for_mail_bank() {
353
+ global $wpdb, $current_user;
354
+ $user_role_permission = get_users_capabilities_mail_bank();
355
+ if (file_exists(MAIL_BANK_DIR_PATH . "includes/translations.php")) {
356
+ include MAIL_BANK_DIR_PATH . "includes/translations.php";
357
+ }
358
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/sidebar-menu.php")) {
359
+ include_once MAIL_BANK_DIR_PATH . "lib/sidebar-menu.php";
360
+ }
361
+ }
362
+
363
+ }
364
+
365
+ /*
366
+ Function Name: topbar_menu_for_mail_bank
367
+ Parameters: No
368
+ Description: This function is used for creating Top bar menu.
369
+ Created On: 15-06-2016 10:44
370
+ Created By: Tech Banker Team
371
+ */
372
+
373
+ if (!function_exists("topbar_menu_for_mail_bank")) {
374
+
375
+ function topbar_menu_for_mail_bank() {
376
+ global $wpdb, $current_user, $wp_admin_bar;
377
+ $role_capabilities = $wpdb->get_var
378
+ (
379
+ $wpdb->prepare
380
+ (
381
+ "SELECT meta_value FROM " . mail_bank_meta() . "
382
+ WHERE meta_key = %s", "roles_and_capabilities"
383
+ )
384
+ );
385
+ $roles_and_capabilities_unserialized_data = unserialize($role_capabilities);
386
+ $top_bar_menu = $roles_and_capabilities_unserialized_data["show_mail_bank_top_bar_menu"];
387
+
388
+ if ($top_bar_menu == "enable") {
389
+ $user_role_permission = get_users_capabilities_mail_bank();
390
+ if (file_exists(MAIL_BANK_DIR_PATH . "includes/translations.php")) {
391
+ include MAIL_BANK_DIR_PATH . "includes/translations.php";
392
+ }
393
+ if (get_option("wp-mail-bank-wizard-set-up")) {
394
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/admin-bar-menu.php")) {
395
+ include_once MAIL_BANK_DIR_PATH . "lib/admin-bar-menu.php";
396
+ }
397
+ }
398
+ }
399
+ }
400
+
401
+ }
402
+
403
+ /*
404
+ Function Name: ajax_register_for_mail_bank
405
+ Parameters: No
406
+ Description: This function is used for register ajax.
407
+ Created On: 15-06-2016 10:44
408
+ Created By: Tech Banker Team
409
+ */
410
+
411
+ if (!function_exists("ajax_register_for_mail_bank")) {
412
+
413
+ function ajax_register_for_mail_bank() {
414
+ global $wpdb;
415
+ $user_role_permission = get_users_capabilities_mail_bank();
416
+ if (file_exists(MAIL_BANK_DIR_PATH . "includes/translations.php")) {
417
+ include MAIL_BANK_DIR_PATH . "includes/translations.php";
418
+ }
419
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/action-library.php")) {
420
+ include_once MAIL_BANK_DIR_PATH . "lib/action-library.php";
421
+ }
422
+ }
423
+
424
+ }
425
+
426
+ /*
427
+ Function Name: plugin_load_textdomain_mail_bank
428
+ Parameters: No
429
+ Description: This function is used to load the plugin's translated strings.
430
+ Created On: 16-06-2016 09:47
431
+ Created By: Tech Banker Team
432
+ */
433
+
434
+ if (!function_exists("plugin_load_textdomain_mail_bank")) {
435
+
436
+ function plugin_load_textdomain_mail_bank() {
437
+ if (function_exists("load_plugin_textdomain")) {
438
+ load_plugin_textdomain("wp-mail-bank", false, MAIL_BANK_PLUGIN_DIRNAME . "/languages");
439
+ }
440
+ }
441
+
442
+ }
443
+
444
+ /*
445
+ Function Name: oauth_handling_mail_bank
446
+ Parameters: No
447
+ Description: This function is used to Manage Redirect.
448
+ Created On: 11-08-2016 11:53
449
+ Created By: Tech Banker Team
450
+ */
451
+
452
+ if (!function_exists("oauth_handling_mail_bank")) {
453
+
454
+ function oauth_handling_mail_bank() {
455
+ if (is_admin()) {
456
+ if ((count($_REQUEST) <= 2) && isset($_REQUEST["code"])) {
457
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/callback.php")) {
458
+ include_once MAIL_BANK_DIR_PATH . "lib/callback.php";
459
+ }
460
+ } elseif ((count($_REQUEST) <= 2) && isset($_REQUEST["error"])) {
461
+ $url = admin_url("admin.php?page=mb_email_configuration");
462
+ header("location: $url");
463
+ }
464
+ }
465
+ }
466
+
467
+ }
468
+
469
+ /*
470
+ Function Name: email_configuration_mail_bank
471
+ Parameters: 1($phpmailer)
472
+ Description: This function is used for checking test email.
473
+ Created On: 15-06-2016 10:44
474
+ Created By: Tech Banker Team
475
+ */
476
+
477
+ if (!function_exists("email_configuration_mail_bank")) {
478
+
479
+ function email_configuration_mail_bank($phpmailer) {
480
+ global $wpdb;
481
+ $email_configuration_data = $wpdb->get_var
482
+ (
483
+ $wpdb->prepare
484
+ (
485
+ "SELECT meta_value FROM " . mail_bank_meta() . "
486
+ WHERE meta_key = %s", "email_configuration"
487
+ )
488
+ );
489
+ $email_configuration_data_array = unserialize($email_configuration_data);
490
+
491
+ $phpmailer->Mailer = "mail";
492
+ if ($email_configuration_data_array["sender_name_configuration"] == "override") {
493
+ $phpmailer->FromName = stripcslashes(htmlspecialchars_decode($email_configuration_data_array["sender_name"], ENT_QUOTES));
494
+ }
495
+ if ($email_configuration_data_array["from_email_configuration"] == "override") {
496
+ $phpmailer->From = $email_configuration_data_array["sender_email"];
497
+ }
498
+ if ($email_configuration_data_array["reply_to"] != "") {
499
+ $phpmailer->clearReplyTos();
500
+ $phpmailer->AddReplyTo($email_configuration_data_array["reply_to"]);
501
+ }
502
+ if ($email_configuration_data_array["cc"] != "") {
503
+ $phpmailer->clearCCs();
504
+ $cc_address_array = explode(",", $email_configuration_data_array["cc"]);
505
+ foreach ($cc_address_array as $cc_address) {
506
+ $phpmailer->AddCc($cc_address);
507
+ }
508
+ }
509
+ if ($email_configuration_data_array["bcc"] != "") {
510
+ $phpmailer->clearBCCs();
511
+ $bcc_address_array = explode(",", $email_configuration_data_array["bcc"]);
512
+ foreach ($bcc_address_array as $bcc_address) {
513
+ $phpmailer->AddBcc($bcc_address);
514
+ }
515
+ }
516
+ $phpmailer->Sender = $email_configuration_data_array["email_address"];
517
+ }
518
+
519
+ }
520
+
521
+ /*
522
+ Function Name: admin_functions_for_mail_bank
523
+ Parameters: No
524
+ Description: This function is used for calling admin_init functions.
525
+ Created On: 15-06-2016 10:44
526
+ Created By: Tech Banker Team
527
+ */
528
+
529
+ if (!function_exists("admin_functions_for_mail_bank")) {
530
+
531
+ function admin_functions_for_mail_bank() {
532
+ install_script_for_mail_bank();
533
+ helper_file_for_mail_bank();
534
+ }
535
+
536
+ }
537
+
538
+ /*
539
+ Function Name: plugin_auto_update_mail_bank
540
+ Parameters: No
541
+ Description: This function is used to Update the plugin's version.
542
+ Created On: 16-06-2016 11:02
543
+ Created By: Tech Banker Team
544
+ */
545
+
546
+ if (!function_exists("plugin_auto_update_mail_bank")) {
547
+
548
+ function plugin_auto_update_mail_bank() {
549
+ if (!wp_next_scheduled("automatic_updates_mail_bank")) {
550
+ wp_schedule_event(MAIL_BANK_LOCAL_TIME, "daily", "automatic_updates_mail_bank");
551
+ }
552
+ add_action("automatic_updates_mail_bank", "mail_bank_plugin_autoupdate");
553
+ }
554
+
555
+ }
556
+
557
+ /*
558
+ Function Name: mailer_file_for_mail_bank
559
+ Parameters: No
560
+ Description: This function is used for including Mailer File.
561
+ Created On: 30-06-2016 02:13
562
+ Created By: Tech Banker Team
563
+ */
564
+
565
+ if (!function_exists("mailer_file_for_mail_bank")) {
566
+
567
+ function mailer_file_for_mail_bank() {
568
+ if (file_exists(MAIL_BANK_DIR_PATH . "includes/mailer.php")) {
569
+ include_once MAIL_BANK_DIR_PATH . "includes/mailer.php";
570
+ }
571
+ }
572
+
573
+ }
574
+
575
+ /*
576
+ Function Name: mail_bank_plugin_autoupdate
577
+ Parameters: No
578
+ Description: This function is used to Update the plugin automatically.
579
+ Created On: 16-06-2016 11:18
580
+ Created By: Tech Banker Team
581
+ */
582
+
583
+ if (!function_exists("mail_bank_plugin_autoupdate")) {
584
+
585
+ function mail_bank_plugin_autoupdate() {
586
+ try {
587
+ require_once(ABSPATH . "wp-admin/includes/class-wp-upgrader.php");
588
+ require_once(ABSPATH . "wp-admin/includes/misc.php");
589
+ define("FS_METHOD", "direct");
590
+ require_once(ABSPATH . "wp-includes/update.php");
591
+ require_once(ABSPATH . "wp-admin/includes/file.php");
592
+ wp_update_plugins();
593
+ ob_start();
594
+ $plugin_upgrader = new Plugin_Upgrader();
595
+ $plugin_upgrader->upgrade(MAIL_BANK_FILE);
596
+ $output = @ob_get_contents();
597
+ @ob_end_clean();
598
+ } catch (Exception $e) {
599
+
600
+ }
601
+ }
602
+
603
+ }
604
+
605
+ /*
606
+ Function Name: user_functions_for_mail_bank
607
+ Parameters: No
608
+ Description: This function is used to call on init hook.
609
+ Created On: 16-06-2016 11:08
610
+ Created By: Tech Banker Team
611
+ */
612
+ if (!function_exists("user_functions_for_mail_bank")) {
613
+
614
+ function user_functions_for_mail_bank() {
615
+ mail_bank_error_log_file();
616
+ global $wpdb;
617
+ $meta_values = $wpdb->get_results
618
+ (
619
+ $wpdb->prepare
620
+ (
621
+ "SELECT meta_value FROM " . mail_bank_meta() . "
622
+ WHERE meta_key IN(%s,%s)", "settings", "email_configuration"
623
+ )
624
+ );
625
+
626
+ $meta_data_array = array();
627
+ foreach ($meta_values as $value) {
628
+ $unserialize_data = unserialize($value->meta_value);
629
+ array_push($meta_data_array, $unserialize_data);
630
+ }
631
+ if ($meta_data_array[1]["error_reporting"] == "enable") {
632
+ @ini_set("log_errors", 1);
633
+ @ini_set("error_log", MAIL_BANK_ERROR_LOGS_FILE);
634
+ }
635
+ if (isset($meta_data_array[1]["automatic_plugin_update"]) && $meta_data_array[1]["automatic_plugin_update"] == "enable") {
636
+ plugin_auto_update_mail_bank();
637
+ } else {
638
+ wp_clear_scheduled_hook("automatic_updates_mail_bank");
639
+ }
640
+ mailer_file_for_mail_bank();
641
+ if ($meta_data_array[0]["mailer_type"] == "php_mail_function") {
642
+ add_action("phpmailer_init", "email_configuration_mail_bank");
643
+ } else {
644
+ apply_filters("wp_mail", "wp_mail");
645
+ }
646
+ oauth_handling_mail_bank();
647
+ }
648
+
649
+ }
650
+
651
+ /*
652
+ Description: Override Mail Function here.
653
+ Created On: 30-06-2016 02:13
654
+ Created By: Tech Banker Team
655
+ */
656
+
657
+ mailer_file_for_mail_bank();
658
+ mail_bank_auth_host::override_wp_mail_function();
659
+
660
+ /*
661
+ Function Name: uninstall_script_for_mail_bank
662
+ Parameters: No
663
+ Description: This function is used to delete schedulers and options on Uninstall Hook.
664
+ Created On: 16-06-2016 12:00
665
+ Created By: Tech Banker Team
666
+ */
667
+
668
+ if (!function_exists("uninstall_script_for_mail_bank")) {
669
+
670
+ function uninstall_script_for_mail_bank() {
671
+ global $wpdb;
672
+ if (is_multisite()) {
673
+ $blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
674
+ foreach ($blog_ids as $blog_id) {
675
+ switch_to_blog($blog_id);
676
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/uninstall-script.php")) {
677
+ include MAIL_BANK_DIR_PATH . "lib/uninstall-script.php";
678
+ }
679
+ restore_current_blog();
680
+ }
681
+ } else {
682
+ if (file_exists(MAIL_BANK_DIR_PATH . "lib/uninstall-script.php")) {
683
+ include MAIL_BANK_DIR_PATH . "lib/uninstall-script.php";
684
+ }
685
+ }
686
+ }
687
+
688
+ }
689
+ /*
690
+ Function Name: deactivation_function_for_wp_mail_bank
691
+ Parameters: No
692
+ Description: This function is used for executing the code on deactivation.
693
+ Created On: 21-04-2017 09:22
694
+ Created by: Tech Banker Team
695
+ */
696
+
697
+ if (!function_exists("deactivation_function_for_wp_mail_bank")) {
698
+
699
+ function deactivation_function_for_wp_mail_bank() {
700
+ $type = get_option("wp-mail-bank-wizard-set-up");
701
+ if ($type == "opt_in") {
702
+ $plugin_info_wp_mail_bank = new plugin_info_wp_mail_bank();
703
+ global $wp_version, $wpdb;
704
+
705
+ $url = tech_banker_stats_url . "/wp-admin/admin-ajax.php";
706
+
707
+
708
+ $theme_details = array();
709
+
710
+ if ($wp_version >= 3.4) {
711
+ $active_theme = wp_get_theme();
712
+ $theme_details["theme_name"] = strip_tags($active_theme->Name);
713
+ $theme_details["theme_version"] = strip_tags($active_theme->Version);
714
+ $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
715
+ }
716
+
717
+ $plugin_stat_data = array();
718
+ $plugin_stat_data["plugin_slug"] = "wp-mail-bank";
719
+ $plugin_stat_data["type"] = "standard_edition";
720
+ $plugin_stat_data["version_number"] = mail_bank_version_number;
721
+ $plugin_stat_data["status"] = $type;
722
+ $plugin_stat_data["event"] = "de-activate";
723
+ $plugin_stat_data["domain_url"] = site_url();
724
+ $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
725
+ $plugin_stat_data["email"] = get_option("admin_email");
726
+ $plugin_stat_data["wp_version"] = $wp_version;
727
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
728
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
729
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
730
+ $plugin_stat_data["operating_system"] = PHP_OS . " (" . PHP_INT_SIZE * 8 . ") BIT";
731
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
732
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
733
+ $plugin_stat_data["plugins"] = $plugin_info_wp_mail_bank->get_plugin_info_wp_mail_bank();
734
+ $plugin_stat_data["themes"] = $theme_details;
735
+ if (function_exists("curl_init")) {
736
+ $ch = curl_init();
737
+ curl_setopt($ch, CURLOPT_URL, $url);
738
+ curl_setopt($ch, CURLOPT_POST, 1);
739
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
740
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
741
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
742
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
743
+ curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array("data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "", "action" => "plugin_analysis_data")));
744
+ $result = curl_exec($ch);
745
+ update_option("mb_tech_banker_site_id", $result);
746
+ curl_close($ch);
747
+ } else {
748
+ $response = wp_safe_remote_post($url, array
749
+ (
750
+ "method" => "POST",
751
+ "timeout" => 45,
752
+ "redirection" => 5,
753
+ "httpversion" => "1.0",
754
+ "blocking" => false,
755
+ "headers" => array(),
756
+ "body" => array("data" => serialize($plugin_stat_data), "site_id" => get_option("mb_tech_banker_site_id") != "" ? get_option("mb_tech_banker_site_id") : "", "action" => "plugin_analysis_data")
757
+ ));
758
+
759
+ if (!is_wp_error($response)) {
760
+ $response["body"] != "" ? update_option("mb_tech_banker_site_id", $response["body"]) : "";
761
+ } else {
762
+ update_option("mb_tech_banker_site_id", "error");
763
+ }
764
+ }
765
+ }
766
+ }
767
+
768
+ }
769
+
770
+ /* hooks */
771
+
772
+ /*
773
+ register_activation_hook for install_script_for_mail_bank
774
+ Description: This hook is used for calling the function of install script.
775
+ Created On: 15-06-2016 09:46
776
+ Created By: Tech Banker Team
777
+ */
778
+
779
+ register_activation_hook(__FILE__, "install_script_for_mail_bank");
780
+
781
+ /*
782
+ add_action for admin_functions_for_mail_bank
783
+ Description: This hook contains all admin_init functions.
784
+ Created On: 15-06-2016 09:46
785
+ Created By: Tech Banker Team
786
+ */
787
+
788
+ add_action("admin_init", "admin_functions_for_mail_bank");
789
+
790
+
791
+ /*
792
+ add_action for user_functions_for_mail_bank
793
+ Description: This hook is used for calling the function of user functions.
794
+ Created On: 16-06-2016 11:07
795
+ Created By: Tech Banker Team
796
+ */
797
+
798
+ add_action("init", "user_functions_for_mail_bank");
799
+
800
+ /*
801
+ add_action for sidebar_menu_for_mail_bank
802
+ Description: This hook is used for calling the function of sidebar menu.
803
+ Created On: 15-06-2016 09:46
804
+ Created By: Tech Banker Team
805
+ */
806
+
807
+ add_action("admin_menu", "sidebar_menu_for_mail_bank");
808
+
809
+ /*
810
+ add_action for sidebar_menu_for_mail_bank
811
+ Description: This hook is used for calling the function of sidebar menu in multisite case.
812
+ Created On: 19-10-2016 05:18
813
+ Created By: Tech Banker Team
814
+ */
815
+
816
+ add_action("network_admin_menu", "sidebar_menu_for_mail_bank");
817
+
818
+ /*
819
+ add_action for topbar_menu_for_mail_bank
820
+ Description: This hook is used for calling the function of topbar menu.
821
+ Created On: 15-06-2016 09:46
822
+ Created By: Tech Banker Team
823
+ */
824
+
825
+ add_action("admin_bar_menu", "topbar_menu_for_mail_bank", 100);
826
+
827
+ /*
828
+ add_action for plugin_load_textdomain_mail_bank
829
+ Description: This hook is used for calling the function of languages.
830
+ Created On: 16-06-2016 09:47
831
+ Created By: Tech Banker Team
832
+ */
833
+
834
+ add_action("init", "plugin_load_textdomain_mail_bank");
835
+
836
+ /*
837
+ register_uninstall_hook
838
+ Description: This hook is used for calling the function of uninstall script.
839
+ Created On: 16-06-2016 12:00
840
+ Created By: Tech Banker Team
841
+ */
842
+ register_uninstall_hook(__FILE__, "uninstall_script_for_mail_bank");
843
+
844
+ /*
845
+ add_action hook for ajax_register_for_mail_bank
846
+ Description: This hook is used to register ajax.
847
+ Created On: 16-06-2016 12:00
848
+ Created By: Tech Banker Team
849
+ */
850
+ add_action("wp_ajax_mail_bank_action", "ajax_register_for_mail_bank");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
851
  }
852
 
853
  /*
854
+ register_activation_hook for install_script_for_mail_bank
855
+ Description: This hook is used for calling the function of install script.
856
+ Created On: 15-06-2016 09:46
857
+ Created By: Tech Banker Team
858
+ */
859
 
860
+ register_activation_hook(__FILE__, "install_script_for_mail_bank");
861
 
862
  /*
863
+ add_action for install_script_for_mail_bank
864
+ Description: This hook used for calling the function of install script.
865
+ Created On: 15-06-2016 09:46
866
+ Created By: Tech Banker Team
867
+ */
868
 
869
+ add_action("admin_init", "install_script_for_mail_bank");
870
 
871
  /* deactivation_function_for_wp_mail_bank
872
+ Description: This hook is used to sets the deactivation hook for a plugin.
873
+ Created On: 21-04-2017 09:22
874
+ Created by: Tech Banker Team
875
+ */
876
 
877
  register_deactivation_hook(__FILE__, "deactivation_function_for_wp_mail_bank");
878
 
879
  /* add_filter create Go Pro link for Mail Bank
880
+ Description: This hook is used for create link for premium Editions.
881
+ Created On: 24-04-2017 12:21
882
+ Created by: Tech Banker Team
883
+ */
884
  add_filter("plugin_action_links_" . plugin_basename(__FILE__), "mail_bank_action_links");
885
 
886
+
887
  /*
888
+ add_filter for mail_bank_settings_link
889
+ Description: This hook is used for calling the function of settings link.
890
+ Created On: 09-08-2016 02:51
891
+ Created By: Tech Banker Team
892
+ */
893
+
894
+ add_filter("plugin_action_links_" . plugin_basename(__FILE__), "mail_bank_settings_link", 10, 2);
895
+
896
+ /*
897
+ Class Name: plugin_activate_wp_mail_bank
898
+ Description: This function is used to add option on plugin activation.
899
+ Created On: 24-04-2017 12:04
900
+ Created By: Tech Banker Team
901
+ */
902
+
903
+ if (!function_exists("plugin_activate_wp_mail_bank")) {
904
+
905
+ function plugin_activate_wp_mail_bank() {
906
+ add_option("wp_mail_bank_do_activation_redirect", true);
907
+ }
908
+
909
  }
910
 
911
  /*
912
+ Function Name: wp_mail_bank_redirect
913
+ Description: This function is used to redirect to email setup.
914
+ Created On: 24-04-2017 12:04
915
+ Created By: Tech Banker Team
916
+ */
917
+
918
+ if (!function_exists("wp_mail_bank_redirect")) {
919
+
920
+ function wp_mail_bank_redirect() {
921
+ if (get_option("wp_mail_bank_do_activation_redirect", false)) {
922
+ delete_option("wp_mail_bank_do_activation_redirect");
923
+ wp_redirect(admin_url("admin.php?page=mb_email_configuration"));
924
+ exit;
925
+ }
926
+ }
927
+
 
928
  }
929
  register_activation_hook(__FILE__, "plugin_activate_wp_mail_bank");
930
  add_action("admin_init", "wp_mail_bank_redirect");