Contact Bank: WordPress Form Builder for Contact Forms - Version 2.0.51

Version Description

  • Few Possible Security Issues Addressed
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 Contact Bank: WordPress Form Builder for Contact Forms
Version 2.0.51
Comparing to
See all releases

Code changes from version 2.0.50 to 2.0.51

contact-bank.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Bank Standard Edition
4
  Plugin URI: http://tech-banker.com
5
  Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
6
  Author: Tech Banker
7
- Version: 2.0.50
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -114,6 +114,10 @@ function create_global_menus_for_contact_bank()
114
  */
115
  function contact_bank()
116
  {
 
 
 
 
117
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
118
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_view.php";
119
  include_once CONTACT_BK_PLUGIN_DIR . "/views/includes_common_after.php";
@@ -121,36 +125,60 @@ function contact_bank()
121
  }
122
  function dashboard()
123
  {
 
 
 
 
124
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
125
  include_once CONTACT_BK_PLUGIN_DIR ."/views/dashboard.php";
126
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
127
  }
128
  function edit_contact_view()
129
  {
 
 
 
 
130
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
131
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_view.php";
132
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
133
  }
134
  function contact_email()
135
  {
 
 
 
 
136
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
137
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_email_settings.php";
138
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
139
  }
140
  function frontend_data()
141
  {
 
 
 
 
142
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
143
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_frontend_data.php";
144
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
145
  }
146
  function add_contact_email_settings()
147
  {
 
 
 
 
148
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
149
  include_once CONTACT_BK_PLUGIN_DIR ."/views/add_contact_email.php";
150
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
151
  }
152
  function layout_settings()
153
  {
 
 
 
 
154
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
155
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_layout_settings.php";
156
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
@@ -158,6 +186,10 @@ function layout_settings()
158
 
159
  function system_status()
160
  {
 
 
 
 
161
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
162
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact-bank-system-report.php";
163
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
@@ -165,18 +197,30 @@ function system_status()
165
 
166
  function form_preview()
167
  {
 
 
 
 
168
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
169
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_form_preview.php";
170
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
171
  }
172
  function pro_version()
173
  {
 
 
 
 
174
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
175
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_pro_version.php";
176
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
177
  }
178
  function short_code()
179
  {
 
 
 
 
180
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
181
  include_once CONTACT_BK_PLUGIN_DIR ."/views/shortcode.php";
182
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
@@ -225,6 +269,10 @@ if(isset($_REQUEST["action"]))
225
  add_action( "admin_init", "add_contact_form_library");
226
  function add_contact_form_library()
227
  {
 
 
 
 
228
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_view-class.php";
229
  }
230
  break;
@@ -239,6 +287,10 @@ if(isset($_REQUEST["action"]))
239
  add_action( "admin_init", "email_contact_form_library");
240
  function email_contact_form_library()
241
  {
 
 
 
 
242
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_email-class.php";
243
  }
244
  break;
@@ -253,6 +305,10 @@ if(isset($_REQUEST["action"]))
253
  add_action( "admin_init", "frontend_data_contact_library");
254
  function frontend_data_contact_library()
255
  {
 
 
 
 
256
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_frontend_data_class.php";
257
  }
258
  break;
@@ -261,6 +317,10 @@ if(isset($_REQUEST["action"]))
261
  add_action( "admin_init", "show_form_control_data_contact_library");
262
  function show_form_control_data_contact_library()
263
  {
 
 
 
 
264
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_show_form_control_data-class.php";
265
  }
266
  break;
@@ -268,6 +328,10 @@ if(isset($_REQUEST["action"]))
268
  add_action( "admin_init", "layout_settings_contact_library");
269
  function layout_settings_contact_library()
270
  {
 
 
 
 
271
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_layout_settings-class.php";
272
  }
273
  break;
4
  Plugin URI: http://tech-banker.com
5
  Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It's Really That Easy.
6
  Author: Tech Banker
7
+ Version: 2.0.51
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
114
  */
115
  function contact_bank()
116
  {
117
+ global $wpdb,$current_user,$cb_user_role_permission;
118
+ $cb_role = $wpdb->prefix . "capabilities";
119
+ $current_user->role = array_keys($current_user->$cb_role);
120
+ $cb_role = $current_user->role[0];
121
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
122
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_view.php";
123
  include_once CONTACT_BK_PLUGIN_DIR . "/views/includes_common_after.php";
125
  }
126
  function dashboard()
127
  {
128
+ global $wpdb,$current_user,$cb_user_role_permission;
129
+ $cb_role = $wpdb->prefix . "capabilities";
130
+ $current_user->role = array_keys($current_user->$cb_role);
131
+ $cb_role = $current_user->role[0];
132
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
133
  include_once CONTACT_BK_PLUGIN_DIR ."/views/dashboard.php";
134
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
135
  }
136
  function edit_contact_view()
137
  {
138
+ global $wpdb,$current_user,$cb_user_role_permission;
139
+ $cb_role = $wpdb->prefix . "capabilities";
140
+ $current_user->role = array_keys($current_user->$cb_role);
141
+ $cb_role = $current_user->role[0];
142
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
143
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_view.php";
144
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
145
  }
146
  function contact_email()
147
  {
148
+ global $wpdb,$current_user,$cb_user_role_permission;
149
+ $cb_role = $wpdb->prefix . "capabilities";
150
+ $current_user->role = array_keys($current_user->$cb_role);
151
+ $cb_role = $current_user->role[0];
152
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
153
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_email_settings.php";
154
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
155
  }
156
  function frontend_data()
157
  {
158
+ global $wpdb,$current_user,$cb_user_role_permission;
159
+ $cb_role = $wpdb->prefix . "capabilities";
160
+ $current_user->role = array_keys($current_user->$cb_role);
161
+ $cb_role = $current_user->role[0];
162
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
163
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_frontend_data.php";
164
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
165
  }
166
  function add_contact_email_settings()
167
  {
168
+ global $wpdb,$current_user,$cb_user_role_permission;
169
+ $cb_role = $wpdb->prefix . "capabilities";
170
+ $current_user->role = array_keys($current_user->$cb_role);
171
+ $cb_role = $current_user->role[0];
172
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
173
  include_once CONTACT_BK_PLUGIN_DIR ."/views/add_contact_email.php";
174
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
175
  }
176
  function layout_settings()
177
  {
178
+ global $wpdb,$current_user,$cb_user_role_permission;
179
+ $cb_role = $wpdb->prefix . "capabilities";
180
+ $current_user->role = array_keys($current_user->$cb_role);
181
+ $cb_role = $current_user->role[0];
182
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
183
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_layout_settings.php";
184
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
186
 
187
  function system_status()
188
  {
189
+ global $wpdb,$current_user,$cb_user_role_permission,$wp_version;
190
+ $cb_role = $wpdb->prefix . "capabilities";
191
+ $current_user->role = array_keys($current_user->$cb_role);
192
+ $cb_role = $current_user->role[0];
193
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
194
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact-bank-system-report.php";
195
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
197
 
198
  function form_preview()
199
  {
200
+ global $wpdb,$current_user,$cb_user_role_permission;
201
+ $cb_role = $wpdb->prefix . "capabilities";
202
+ $current_user->role = array_keys($current_user->$cb_role);
203
+ $cb_role = $current_user->role[0];
204
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
205
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_form_preview.php";
206
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
207
  }
208
  function pro_version()
209
  {
210
+ global $wpdb,$current_user,$cb_user_role_permission;
211
+ $cb_role = $wpdb->prefix . "capabilities";
212
+ $current_user->role = array_keys($current_user->$cb_role);
213
+ $cb_role = $current_user->role[0];
214
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
215
  include_once CONTACT_BK_PLUGIN_DIR ."/views/contact_bank_pro_version.php";
216
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
217
  }
218
  function short_code()
219
  {
220
+ global $wpdb,$current_user,$cb_user_role_permission;
221
+ $cb_role = $wpdb->prefix . "capabilities";
222
+ $current_user->role = array_keys($current_user->$cb_role);
223
+ $cb_role = $current_user->role[0];
224
  include_once CONTACT_BK_PLUGIN_DIR ."/views/header.php";
225
  include_once CONTACT_BK_PLUGIN_DIR ."/views/shortcode.php";
226
  include_once CONTACT_BK_PLUGIN_DIR ."/views/footer.php";
269
  add_action( "admin_init", "add_contact_form_library");
270
  function add_contact_form_library()
271
  {
272
+ global $wpdb,$current_user,$cb_user_role_permission;
273
+ $cb_role = $wpdb->prefix . "capabilities";
274
+ $current_user->role = array_keys($current_user->$cb_role);
275
+ $cb_role = $current_user->role[0];
276
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_view-class.php";
277
  }
278
  break;
287
  add_action( "admin_init", "email_contact_form_library");
288
  function email_contact_form_library()
289
  {
290
+ global $wpdb,$current_user,$cb_user_role_permission;
291
+ $cb_role = $wpdb->prefix . "capabilities";
292
+ $current_user->role = array_keys($current_user->$cb_role);
293
+ $cb_role = $current_user->role[0];
294
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_email-class.php";
295
  }
296
  break;
305
  add_action( "admin_init", "frontend_data_contact_library");
306
  function frontend_data_contact_library()
307
  {
308
+ global $wpdb,$current_user,$cb_user_role_permission;
309
+ $cb_role = $wpdb->prefix . "capabilities";
310
+ $current_user->role = array_keys($current_user->$cb_role);
311
+ $cb_role = $current_user->role[0];
312
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_frontend_data_class.php";
313
  }
314
  break;
317
  add_action( "admin_init", "show_form_control_data_contact_library");
318
  function show_form_control_data_contact_library()
319
  {
320
+ global $wpdb,$current_user,$cb_user_role_permission;
321
+ $cb_role = $wpdb->prefix . "capabilities";
322
+ $current_user->role = array_keys($current_user->$cb_role);
323
+ $cb_role = $current_user->role[0];
324
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_show_form_control_data-class.php";
325
  }
326
  break;
328
  add_action( "admin_init", "layout_settings_contact_library");
329
  function layout_settings_contact_library()
330
  {
331
+ global $wpdb,$current_user,$cb_user_role_permission;
332
+ $cb_role = $wpdb->prefix . "capabilities";
333
+ $current_user->role = array_keys($current_user->$cb_role);
334
+ $cb_role = $current_user->role[0];
335
  include_once CONTACT_BK_PLUGIN_DIR . "/lib/contact_bank_layout_settings-class.php";
336
  }
337
  break;
lib/contact_bank_email-class.php CHANGED
@@ -1,8 +1,4 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +10,7 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
 
 
 
 
2
  switch($cb_role)
3
  {
4
  case "administrator":
10
  case "author":
11
  $cb_user_role_permission = "publish_posts";
12
  break;
13
+
 
 
 
 
 
14
  }
15
  if (!current_user_can($cb_user_role_permission))
16
  {
lib/contact_bank_layout-class.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,6 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
 
 
 
 
 
 
14
  }
15
  if (!current_user_can($cb_user_role_permission))
16
  {
lib/contact_bank_layout_settings-class.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
lib/contact_bank_show_form_control_data-class.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
lib/contact_frontend_data_class.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if(!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if(!current_user_can($cb_user_role_permission))
17
  {
lib/contact_view-class.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if(!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if(!current_user_can($cb_user_role_permission))
17
  {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link : http://tech-banker.com/contact-bank/
4
  Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
5
  Requires at least: 3.3
6
  Tested up to: 3.9.1
7
- Stable tag: 2.0.50
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -34,7 +34,7 @@ It provides a powerful engine for uploading and managing dynamic forms with more
34
 
35
  ***The Contact Bank WordPress Plugin is now proudly maintained by <a href="http://www.tech-banker.com">Tech Banker</a> since March 2014.***
36
 
37
- ***July 22, 2014: We're happy to announce that Contact Bank reached 71,200+ plugin downloads in only 10 months. We frequently receive positive feedback from people using our Contact Bank Plugin for WordPress. Thanks so much for your support!***
38
 
39
  <a href="http://tech-banker.com/forum/contact-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
40
 
@@ -545,6 +545,10 @@ In order to set Shortcode for a Form, you need to follow these steps :
545
 
546
  == Changelog ==
547
 
 
 
 
 
548
  = 2.0.50 =
549
 
550
  * Slovak Language Updated
4
  Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
5
  Requires at least: 3.3
6
  Tested up to: 3.9.1
7
+ Stable tag: 2.0.51
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
34
 
35
  ***The Contact Bank WordPress Plugin is now proudly maintained by <a href="http://www.tech-banker.com">Tech Banker</a> since March 2014.***
36
 
37
+ ***July 28, 2014: We're happy to announce that Contact Bank reached 74,400+ plugin downloads in only 10 months. We frequently receive positive feedback from people using our Contact Bank Plugin for WordPress. Thanks so much for your support!***
38
 
39
  <a href="http://tech-banker.com/forum/contact-bank-support/" target="_blank">Support Desk - feel free to ask your Queries</a>
40
 
545
 
546
  == Changelog ==
547
 
548
+ = 2.0.51 =
549
+
550
+ * Few Possible Security Issues Addressed
551
+
552
  = 2.0.50 =
553
 
554
  * Slovak Language Updated
views/add_contact_email.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
views/contact-bank-system-report.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission,$wp_version;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
@@ -108,7 +100,12 @@ else
108
  <div class="layout-control-group">
109
  <label class="layout-label-control-group">MySQL Version :</label>
110
  <div class="layout-controls">
111
- <span><?php if (function_exists("mysql_get_server_info")) echo esc_html(mysql_get_server_info()); ?></span>
 
 
 
 
 
112
  </div>
113
  </div>
114
  </div>
@@ -459,25 +456,25 @@ else
459
  </div>
460
  <div id="library_settings" class="collapse in">
461
  <?php
 
 
 
 
 
 
 
462
  if (function_exists("gd_info")) {
463
  $information = gd_info();
464
  $key = array_keys($information);
465
  for ($i = 0; $i < count($key); $i++) {
466
  if (is_bool($information[$key[$i]]))
467
- echo "<div class=\"widget-layout-body\"><div class=\"layout-control-group\"><label class=\"layout-label-control-group\">" . $key[$i] . " : </label><div class=\"layout-controls\"> <span>" . ngg_gd_yesNo($information[$key[$i]]) . " </span></div></div></div>";
468
  else
469
  echo "<div class=\"widget-layout-body\"><div class=\"layout-control-group\"><label class=\"layout-label-control-group\">" . $key[$i] . " : </label><div class=\"layout-controls\"> <span>" . $information[$key[$i]] . "</span></div></div></div>";
470
  }
471
  } else {
472
  echo "<h4>" . "No GD support" . "!</h4>";
473
  }
474
- function ngg_gd_yesNo($bool)
475
- {
476
- if ($bool)
477
- return "Yes";
478
- else
479
- return "No";
480
- }
481
  ?>
482
  </div>
483
  </div>
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
100
  <div class="layout-control-group">
101
  <label class="layout-label-control-group">MySQL Version :</label>
102
  <div class="layout-controls">
103
+ <span>
104
+ <?php
105
+ global $wpdb;
106
+ echo $wpdb->db_version();
107
+ ?>
108
+ </span>
109
  </div>
110
  </div>
111
  </div>
456
  </div>
457
  <div id="library_settings" class="collapse in">
458
  <?php
459
+ function gd_yesNo($bool)
460
+ {
461
+ if ($bool)
462
+ return "Yes";
463
+ else
464
+ return "No";
465
+ }
466
  if (function_exists("gd_info")) {
467
  $information = gd_info();
468
  $key = array_keys($information);
469
  for ($i = 0; $i < count($key); $i++) {
470
  if (is_bool($information[$key[$i]]))
471
+ echo "<div class=\"widget-layout-body\"><div class=\"layout-control-group\"><label class=\"layout-label-control-group\">" . $key[$i] . " : </label><div class=\"layout-controls\"> <span>" . gd_yesNo($information[$key[$i]]) . " </span></div></div></div>";
472
  else
473
  echo "<div class=\"widget-layout-body\"><div class=\"layout-control-group\"><label class=\"layout-label-control-group\">" . $key[$i] . " : </label><div class=\"layout-controls\"> <span>" . $information[$key[$i]] . "</span></div></div></div>";
474
  }
475
  } else {
476
  echo "<h4>" . "No GD support" . "!</h4>";
477
  }
 
 
 
 
 
 
 
478
  ?>
479
  </div>
480
  </div>
views/contact_bank_form_preview.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
views/contact_bank_layout_settings.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
views/contact_bank_pro_version.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
views/contact_documentation.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
views/contact_email_settings.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
views/contact_frontend_data.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
views/contact_view.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +11,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
2
+
 
 
 
3
  switch($cb_role)
4
  {
5
  case "administrator":
11
  case "author":
12
  $cb_user_role_permission = "publish_posts";
13
  break;
14
+
 
 
 
 
 
15
  }
16
  if (!current_user_can($cb_user_role_permission))
17
  {
views/dashboard.php CHANGED
@@ -1,8 +1,4 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +10,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
 
 
 
 
2
  switch($cb_role)
3
  {
4
  case "administrator":
10
  case "author":
11
  $cb_user_role_permission = "publish_posts";
12
  break;
13
+
 
 
 
 
 
14
  }
15
  if (!current_user_can($cb_user_role_permission))
16
  {
views/header.php CHANGED
@@ -16,10 +16,6 @@ if($show_banner == "")
16
  </div>';
17
 
18
  }
19
- global $wpdb,$current_user;
20
- $role = $wpdb->prefix . "capabilities";
21
- $current_user->role = array_keys($current_user->$role);
22
- $role = $current_user->role[0];
23
  $cb_lang = array();
24
  $cb_lang_translated_languages = array();
25
  array_push($cb_lang_translated_languages,"fr_FR","ru_RU","en_US","es_ES", "nl_NL","hu_HU","de_DE", "pt_BR","pt_PT","he_IL", "tr","it_IT", "da_DK", "pl_PL", "sv_SE", "zh_CN","cs_CZ","en_GB", "sk_SK");
16
  </div>';
17
 
18
  }
 
 
 
 
19
  $cb_lang = array();
20
  $cb_lang_translated_languages = array();
21
  array_push($cb_lang_translated_languages,"fr_FR","ru_RU","en_US","es_ES", "nl_NL","hu_HU","de_DE", "pt_BR","pt_PT","he_IL", "tr","it_IT", "da_DK", "pl_PL", "sv_SE", "zh_CN","cs_CZ","en_GB", "sk_SK");
views/shortcode.php CHANGED
@@ -1,8 +1,4 @@
1
  <?php
2
- global $wpdb,$current_user,$cb_user_role_permission;
3
- $cb_role = $wpdb->prefix . "capabilities";
4
- $current_user->role = array_keys($current_user->$cb_role);
5
- $cb_role = $current_user->role[0];
6
  switch($cb_role)
7
  {
8
  case "administrator":
@@ -14,12 +10,7 @@ switch($cb_role)
14
  case "author":
15
  $cb_user_role_permission = "publish_posts";
16
  break;
17
- case "contributor":
18
- $cb_user_role_permission = "edit_posts";
19
- break;
20
- case "subscriber":
21
- $cb_user_role_permission = "read";
22
- break;
23
  }
24
  if (!current_user_can($cb_user_role_permission))
25
  {
1
  <?php
 
 
 
 
2
  switch($cb_role)
3
  {
4
  case "administrator":
10
  case "author":
11
  $cb_user_role_permission = "publish_posts";
12
  break;
13
+
 
 
 
 
 
14
  }
15
  if (!current_user_can($cb_user_role_permission))
16
  {