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

Version Description

  • Major Bug fixed with Shapely Theme
Download this release

Release Info

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

Code changes from version 2.1.34 to 2.1.35

assets/css/stylesheet.css CHANGED
@@ -2080,7 +2080,6 @@ button.close {
2080
 
2081
  .collapse {
2082
  position: relative;
2083
- height: 0;
2084
  overflow: hidden;
2085
  -webkit-transition: height 0.35s ease;
2086
  -moz-transition: height 0.35s ease;
@@ -2901,3 +2900,217 @@ li.active a, li.active a:hover {
2901
  color: #fff;
2902
  margin: 0px !important;
2903
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2080
 
2081
  .collapse {
2082
  position: relative;
 
2083
  overflow: hidden;
2084
  -webkit-transition: height 0.35s ease;
2085
  -moz-transition: height 0.35s ease;
2900
  color: #fff;
2901
  margin: 0px !important;
2902
  }
2903
+
2904
+ .header-wizard
2905
+ {
2906
+ width : 50%;
2907
+ background-color : #fff;
2908
+ }
2909
+ .dashicons-wordpress
2910
+ {
2911
+ font-size : 90px;
2912
+ background : #01749a;
2913
+ color : #fff;
2914
+ width : 110px;
2915
+ height : 110px;
2916
+ padding : 10px;
2917
+ }
2918
+
2919
+ .dashicons-plus
2920
+ {
2921
+ position: absolute;
2922
+ top : 30px;
2923
+ left : 30%;
2924
+ font-size : 60px;
2925
+ color : #bbb;
2926
+ }
2927
+ .textalign p
2928
+ {
2929
+ font-size : 16px;
2930
+ color : #444;
2931
+ padding-left : 40px;
2932
+ padding-right : 40px;
2933
+ }
2934
+ .allow
2935
+ {
2936
+ padding-left : 0px;
2937
+ padding-right : 0px;
2938
+ }
2939
+ .tech-banker-actions
2940
+ {
2941
+ padding : 10px 20px 10px 20px;
2942
+ }
2943
+ .button.button-primary-wizard
2944
+ {
2945
+ padding : 5px 35px 5px 10px !important;
2946
+ border-width : 2px !important;
2947
+ font-size : 14px !important;
2948
+ font-weight : 800 !important;
2949
+ height : 100% !important;
2950
+ line-height : 30px !important;
2951
+
2952
+ }
2953
+ .button-primary-wizard
2954
+ {
2955
+ background-color : #a4cd39 !important;
2956
+ border-color : #a4cd39 !important;
2957
+ color : #fff !important;
2958
+ display : inline-block !important;
2959
+ text-decoration : none !important;
2960
+ border-style : outset !important;
2961
+ float : right !important;
2962
+ position : relative !important;
2963
+ }
2964
+ .button-primary-wizard:hover
2965
+ {
2966
+ color : #fff !important;
2967
+ text-decoration : none !important;
2968
+ }
2969
+ .button-secondary-wizard
2970
+ {
2971
+ color : #fff !important;
2972
+ background : #C0C7CA !important;
2973
+ text-decoration : none !important;
2974
+ font-size : 14px !important;
2975
+ padding : 5px 35px 5px 10px !important;
2976
+ border : 2px outset #f7f7f7 !important;
2977
+ display : inline-block !important;
2978
+ position : relative !important;
2979
+ font-weight : 800 !important;
2980
+ height : 100% !important;
2981
+ line-height : 30px !important;
2982
+ }
2983
+ .button-secondary-wizard:hover
2984
+ {
2985
+ color : #fff !important;
2986
+ }
2987
+ .permissions
2988
+ {
2989
+ font-size : 18px;
2990
+ text-decoration : none;
2991
+ text-align : center;
2992
+ display : block;
2993
+ color : #a4cd39;
2994
+ padding-top : 10px;
2995
+ padding-bottom : 10px;
2996
+ margin-bottom : 10px;
2997
+ cursor: -webkit-grab;
2998
+ }
2999
+ .permissions:hover
3000
+ {
3001
+ color : #a4cd39;
3002
+ }
3003
+ .dashicons-admin-users
3004
+ {
3005
+ float : left;
3006
+ font-size : 45px;
3007
+ width : 50px;
3008
+ height : 50px;
3009
+ margin-right : 30px;
3010
+ }
3011
+ .admin p
3012
+ {
3013
+ margin : 0px;
3014
+ font-size : 12px;
3015
+ }
3016
+ .admin span
3017
+ {
3018
+ font-size : 16px;
3019
+ }
3020
+ .dashicons-welcome-view-site
3021
+ {
3022
+ float : left;
3023
+ font-size : 45px;
3024
+ width : 50px;
3025
+ height : 50px;
3026
+ margin-right : 30px;
3027
+ }
3028
+ .settings p
3029
+ {
3030
+ margin : 0px;
3031
+ font-size : 12px;
3032
+ }
3033
+ .settings span
3034
+ {
3035
+ font-size : 16px;
3036
+ }
3037
+ .dashicons-testimonial
3038
+ {
3039
+ float : left;
3040
+ font-size : 45px;
3041
+ width : 50px;
3042
+ height : 50px;
3043
+ margin-right : 30px;
3044
+ }
3045
+ .testimonial p
3046
+ {
3047
+ margin : 0px;
3048
+ font-size : 12px;
3049
+ }
3050
+ .testimonial span
3051
+ {
3052
+ margin : 0px;
3053
+ font-size : 16px;
3054
+ }
3055
+ .dashicons-admin-plugins
3056
+ {
3057
+ float : left;
3058
+ font-size : 45px;
3059
+ width : 50px;
3060
+ height : 50px;
3061
+ margin-right : 30px;
3062
+ }
3063
+ .admin-plugins p
3064
+ {
3065
+ margin : 0px;
3066
+ font-size : 12px;
3067
+ }
3068
+ .admin-plugins span
3069
+ {
3070
+ font-size : 16px;
3071
+ }
3072
+ .terms
3073
+ {
3074
+ background : #e1e1e1;
3075
+ text-align : center;
3076
+ padding-top : 10px;
3077
+ padding-bottom : 10px;
3078
+ }
3079
+ .terms a, .terms span
3080
+ {
3081
+ color : #999;
3082
+ font-size : 10px;
3083
+ text-decoration : none !important;
3084
+ }
3085
+ .styling
3086
+ {
3087
+ padding : 20px 0 0 0 !important;
3088
+ }
3089
+ .dashicons-arrow-right-alt
3090
+ {
3091
+ position : absolute;
3092
+ top : 12px;
3093
+ right : 5px;
3094
+ }
3095
+ .center
3096
+ {
3097
+ text-align : center;
3098
+ }
3099
+ .align2
3100
+ {
3101
+ padding-left : 0px;
3102
+ }
3103
+ .p2
3104
+ {
3105
+ padding-top : 35px;
3106
+ }
3107
+ .row-custom
3108
+ {
3109
+ margin-right : 0px !important;
3110
+ margin-left : 0px !important
3111
+ }
3112
+ .row-bg
3113
+ {
3114
+ background-color : #e1e1e1;
3115
+ padding : 20px 0px 20px 0px;
3116
+ }
contact-bank.php CHANGED
@@ -4,7 +4,7 @@
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.1.34
8
  * Author URI: http://tech-banker.com
9
  * License: GPLv3 or later
10
  * Text Domain: contact-bank
@@ -14,18 +14,14 @@
14
  // D e f i n e CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////
15
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
16
  if(!defined("ABSPATH")) exit; //exit if accessed directly
17
- if (!defined("CONTACT_BK_PLUGIN_DIR")) define("CONTACT_BK_PLUGIN_DIR", plugin_dir_path( __FILE__ ));
18
- if (!defined("CONTACT_BK_PLUGIN_DIRNAME")) define("CONTACT_BK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
19
- if (!defined("CONTACT_BK")) define("CONTACT_BK","contact-bank/contact-bank.php");
20
- if (!defined("CONTACT_BK_PLUGIN_BASENAME")) define("CONTACT_BK_PLUGIN_BASENAME", plugin_basename(__FILE__));
 
 
 
21
 
22
- if(!function_exists("plugin_uninstall_script_for_contact_bank"))
23
- {
24
- function plugin_uninstall_script_for_contact_bank()
25
- {
26
- wp_clear_scheduled_hook("contact_bank_auto_update");
27
- }
28
- }
29
  /* Function Name : plugin_install_script_for_contact_bank
30
  * Paramters : None
31
  * Return : None
@@ -72,6 +68,217 @@ if(!function_exists("plugin_install_script_for_contact_bank"))
72
  }
73
  }
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /* Function Name : create_global_menus_for_contact_bank
76
  * Paramters : None
77
  * Return : None
@@ -95,55 +302,84 @@ if(!function_exists("create_global_menus_for_contact_bank"))
95
  $current_user->role = array_keys($current_user->$cb_role);
96
  $cb_role = $current_user->role[0];
97
  }
 
 
 
98
  switch ($cb_role) {
99
  case "administrator":
100
- add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
101
- add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard","contact_dashboard");
 
 
 
 
 
 
 
 
102
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
103
- add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", "contact_plugin_update" );
104
- add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", "contact_short_code" );
105
- add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data","contact_frontend_data");
106
- add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", "contact_email");
107
- add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", "contact_layout_settings");
108
- add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", "contact_feature_request");
109
- add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", "contact_system_status" );
110
- add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", "contact_bank_recommended_plugins");
111
- add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", "contact_pro_version" );
112
- add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", "contact_bank_other_services");
113
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
114
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
115
  break;
116
  case "editor":
 
 
 
 
 
 
 
 
 
117
  add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
118
  add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard","contact_dashboard");
119
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
120
- add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", "contact_plugin_update" );
121
- add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", "contact_short_code" );
122
- add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data","contact_frontend_data");
123
- add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", "contact_email");
124
- add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", "contact_layout_settings");
125
- add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", "contact_feature_request");
126
- add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", "contact_system_status" );
127
- add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", "contact_bank_recommended_plugins");
128
- add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", "contact_pro_version" );
129
- add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", "contact_bank_other_services");
130
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
131
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
132
  break;
133
  case "author":
 
 
 
 
 
 
 
 
 
134
  add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
135
  add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard","contact_dashboard");
136
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
137
- add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", "contact_plugin_update" );
138
- add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", "contact_short_code" );
139
- add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data","contact_frontend_data");
140
- add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", "contact_email");
141
- add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", "contact_layout_settings");
142
- add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", "contact_feature_request");
143
- add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", "contact_system_status" );
144
- add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", "contact_bank_recommended_plugins");
145
- add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", "contact_pro_version" );
146
- add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", "contact_bank_other_services");
147
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
148
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
149
  break;
@@ -225,6 +461,29 @@ if(!function_exists("contact_dashboard"))
225
  }
226
  }
227
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  if(!function_exists("edit_contact_view"))
229
  {
230
  function edit_contact_view()
@@ -656,7 +915,6 @@ if(isset($_REQUEST["action"]))
656
  switch(esc_attr($_REQUEST["action"]))
657
  {
658
  case "add_contact_form_library":
659
-
660
  add_action( "admin_init", "add_contact_form_library");
661
  if(!function_exists("add_contact_form_library"))
662
  {
@@ -1365,8 +1623,10 @@ add_action("admin_menu","create_global_menus_for_contact_bank");
1365
  register_activation_hook(__FILE__,"plugin_install_script_for_contact_bank");
1366
  // add_Shortcode Hook called for function contact_bank_short_code for FrontEnd
1367
  add_shortcode("contact_bank", "contact_bank_short_code");
1368
- // Uninstall Hook called for function plugin_install_script_for_contact_bank
1369
  register_uninstall_hook(__FILE__,"plugin_uninstall_script_for_contact_bank");
 
 
1370
 
1371
  add_action( "network_admin_menu", "create_global_menus_for_contact_bank" );
1372
  // in_plugin_update_message Hook called for function to check updates
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.1.35
8
  * Author URI: http://tech-banker.com
9
  * License: GPLv3 or later
10
  * Text Domain: contact-bank
14
  // D e f i n e CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////
15
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
16
  if(!defined("ABSPATH")) exit; //exit if accessed directly
17
+ if(!defined("CONTACT_BK_PLUGIN_DIR")) define("CONTACT_BK_PLUGIN_DIR", plugin_dir_path( __FILE__ ));
18
+ if(!defined("CONTACT_BK_PLUGIN_DIRNAME")) define("CONTACT_BK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
19
+ if(!defined("CONTACT_BK")) define("CONTACT_BK","contact-bank/contact-bank.php");
20
+ if(!defined("CONTACT_BK_PLUGIN_BASENAME")) define("CONTACT_BK_PLUGIN_BASENAME", plugin_basename(__FILE__));
21
+ if(!defined("tech_banker_stats_url")) define("tech_banker_stats_url", "stats.tech-banker-services.org");
22
+ if(!defined("contact_bank_version_number")) define("contact_bank_version_number","2.1.35");
23
+
24
 
 
 
 
 
 
 
 
25
  /* Function Name : plugin_install_script_for_contact_bank
26
  * Paramters : None
27
  * Return : None
68
  }
69
  }
70
 
71
+ /*************************************************************************************/
72
+
73
+ if(!class_exists("class_plugin_info_contact_bank"))
74
+ {
75
+ class class_plugin_info_contact_bank
76
+ {
77
+ function get_plugin_info()
78
+ {
79
+ $active_plugins = (array)get_option("active_plugins", array());
80
+ if (is_multisite())
81
+ $active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
82
+ $plugins = array();
83
+ if(count($active_plugins) > 0)
84
+ {
85
+ $get_plugins = array();
86
+ foreach ($active_plugins as $plugin)
87
+ {
88
+ $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
89
+
90
+ $get_plugins["plugin_name"] = strip_tags($plugin_data["Name"]);
91
+ $get_plugins["plugin_author"] = strip_tags($plugin_data["Author"]);
92
+ $get_plugins["plugin_version"] = strip_tags($plugin_data["Version"]);
93
+ array_push($plugins,$get_plugins);
94
+ }
95
+ return $plugins;
96
+ }
97
+ }
98
+ }
99
+ }
100
+
101
+ /*
102
+ Function Name: deactivation_function_for_contact_bank
103
+ Description: This function is used for executing the code on deactivation.
104
+ Parameters: No
105
+ Created On: 07-04-2017 09:54
106
+ Created By: Tech Banker Team
107
+ */
108
+ if(!function_exists("deactivation_function_for_contact_bank"))
109
+ {
110
+ function deactivation_function_for_contact_bank()
111
+ {
112
+ $class_plugin_info_contact_bank = new class_plugin_info_contact_bank();
113
+ global $wp_version,$wpdb;
114
+
115
+ $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
116
+ $type = get_option("contact-bank-wizard");
117
+
118
+ delete_option("contact-bank-wizard");
119
+
120
+ $theme_details = array();
121
+
122
+ if($wp_version >= 3.4)
123
+ {
124
+ $active_theme = wp_get_theme();
125
+ $theme_details["theme_name"] = strip_tags($active_theme->Name);
126
+ $theme_details["theme_version"] = strip_tags($active_theme->Version);
127
+ $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
128
+ }
129
+
130
+ $plugin_stat_data = array();
131
+ $plugin_stat_data["plugin_slug"] = "contact-bank";
132
+ $plugin_stat_data["type"] = "standard_edition";
133
+ $plugin_stat_data["version_number"] = contact_bank_version_number;
134
+ $plugin_stat_data["status"] = $type;
135
+ $plugin_stat_data["event"] = "de-activate";
136
+ $plugin_stat_data["domain_url"] = site_url();
137
+
138
+ switch($type)
139
+ {
140
+ case "opt_in" :
141
+ $plugin_stat_data["email"] = get_option("admin_email");
142
+ $plugin_stat_data["wp_version"] = $wp_version;
143
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
144
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
145
+ $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
146
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
147
+ $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
148
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
149
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
150
+ $plugin_stat_data["plugins"] = $class_plugin_info_contact_bank->get_plugin_info();
151
+ $plugin_stat_data["themes"] = $theme_details;
152
+ break;
153
+ }
154
+ if(function_exists("curl_init"))
155
+ {
156
+ $ch = curl_init();
157
+ curl_setopt($ch, CURLOPT_URL, $url);
158
+ curl_setopt($ch, CURLOPT_POST, 1);
159
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
160
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
161
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
162
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
163
+ curl_setopt($ch, CURLOPT_POSTFIELDS,
164
+ http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") !="" ? get_option("contact_bank_site_id") : "", "action"=>"plugin_analysis_data")));
165
+ $result = curl_exec($ch);
166
+ update_option("contact_bank_site_id",$result);
167
+ curl_close($ch);
168
+ }
169
+ else
170
+ {
171
+ $response = wp_safe_remote_post($url, array
172
+ (
173
+ "method" => "POST",
174
+ "timeout" => 45,
175
+ "redirection" => 5,
176
+ "httpversion" => "1.0",
177
+ "blocking" => true,
178
+ "headers" => array(),
179
+ "body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") != "" ? get_option("contact_bank_site_id") : "","action"=>"plugin_analysis_data")
180
+ ));
181
+
182
+ if(!is_wp_error($response))
183
+ {
184
+ $response["body"] != "" ? update_option("contact_bank_site_id", $response["body"]) : "";
185
+ }
186
+ else
187
+ {
188
+ update_option("contact_bank_site_id", "error");
189
+ }
190
+ }
191
+ }
192
+ }
193
+
194
+ if(!function_exists("plugin_uninstall_script_for_contact_bank"))
195
+ {
196
+ function plugin_uninstall_script_for_contact_bank()
197
+ {
198
+ wp_clear_scheduled_hook("contact_bank_auto_update");
199
+ $class_plugin_info_contact_bank = new class_plugin_info_contact_bank();
200
+ global $wp_version,$wpdb;
201
+
202
+ $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
203
+ $type = get_option("contact-bank-wizard");
204
+
205
+ delete_option("contact-bank-wizard");
206
+
207
+ $theme_details = array();
208
+
209
+ if($wp_version >= 3.4)
210
+ {
211
+ $active_theme = wp_get_theme();
212
+ $theme_details["theme_name"] = strip_tags($active_theme->Name);
213
+ $theme_details["theme_version"] = strip_tags($active_theme->Version);
214
+ $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
215
+ }
216
+
217
+ $plugin_stat_data = array();
218
+ $plugin_stat_data["plugin_slug"] = "contact-bank";
219
+ $plugin_stat_data["type"] = "standard_edition";
220
+ $plugin_stat_data["version_number"] = contact_bank_version_number;
221
+ $plugin_stat_data["status"] = $type;
222
+ $plugin_stat_data["event"] = "uninstall";
223
+ $plugin_stat_data["domain_url"] = site_url();
224
+
225
+ switch($type)
226
+ {
227
+ case "opt_in" :
228
+ $plugin_stat_data["email"] = get_option("admin_email");
229
+ $plugin_stat_data["wp_version"] = $wp_version;
230
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
231
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
232
+ $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
233
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
234
+ $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
235
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
236
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
237
+ $plugin_stat_data["plugins"] = $class_plugin_info_contact_bank->get_plugin_info();
238
+ $plugin_stat_data["themes"] = $theme_details;
239
+ break;
240
+ }
241
+ if(function_exists("curl_init"))
242
+ {
243
+ $ch = curl_init();
244
+ curl_setopt($ch, CURLOPT_URL, $url);
245
+ curl_setopt($ch, CURLOPT_POST, 1);
246
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
247
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
248
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
249
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
250
+ curl_setopt($ch, CURLOPT_POSTFIELDS,
251
+ http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") !="" ? get_option("contact_bank_site_id") : "", "action"=>"plugin_analysis_data")));
252
+ $result = curl_exec($ch);
253
+ update_option("contact_bank_site_id",$result);
254
+ curl_close($ch);
255
+ }
256
+ else
257
+ {
258
+ $response = wp_safe_remote_post($url, array
259
+ (
260
+ "method" => "POST",
261
+ "timeout" => 45,
262
+ "redirection" => 5,
263
+ "httpversion" => "1.0",
264
+ "blocking" => true,
265
+ "headers" => array(),
266
+ "body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") != "" ? get_option("contact_bank_site_id") : "","action"=>"plugin_analysis_data")
267
+ ));
268
+
269
+ if(!is_wp_error($response))
270
+ {
271
+ $response["body"] != "" ? update_option("contact_bank_site_id", $response["body"]) : "";
272
+ }
273
+ else
274
+ {
275
+ update_option("contact_bank_site_id", "error");
276
+ }
277
+ }
278
+ }
279
+ }
280
+
281
+
282
  /* Function Name : create_global_menus_for_contact_bank
283
  * Paramters : None
284
  * Return : None
302
  $current_user->role = array_keys($current_user->$cb_role);
303
  $cb_role = $current_user->role[0];
304
  }
305
+ $contact_bank_wizard = get_option("contact-bank-wizard");
306
+ global $wp_version;
307
+
308
  switch ($cb_role) {
309
  case "administrator":
310
+ if(get_option("contact-bank-wizard"))
311
+ {
312
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
313
+ }
314
+ else
315
+ {
316
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read","contact_bank_wizard","",plugins_url("/assets/images/icon.png" , __FILE__));
317
+ add_submenu_page("Contact Bank", __("Contact Bank", "contact-bank") ,"","read","contact_bank_wizard", "contact_bank_wizard");
318
+ }
319
+ add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_dashboard");
320
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
321
+ add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_plugin_update" );
322
+ add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_short_code" );
323
+ add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_frontend_data");
324
+ add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_email");
325
+ add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_layout_settings");
326
+ add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_feature_request");
327
+ add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_system_status" );
328
+ add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_recommended_plugins");
329
+ add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_pro_version" );
330
+ add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_other_services");
331
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
332
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
333
  break;
334
  case "editor":
335
+ if(get_option("contact-bank-wizard"))
336
+ {
337
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
338
+ }
339
+ else
340
+ {
341
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read","contact_bank_wizard","",plugins_url("/assets/images/icon.png" , __FILE__));
342
+ add_submenu_page("Contact Bank", __("Contact Bank", "contact-bank") ,"","read","contact_bank_wizard", "contact_bank_wizard");
343
+ }
344
  add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
345
  add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard","contact_dashboard");
346
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
347
+ add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_plugin_update" );
348
+ add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_short_code" );
349
+ add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_frontend_data");
350
+ add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_email");
351
+ add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_layout_settings");
352
+ add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_feature_request");
353
+ add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_system_status" );
354
+ add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_recommended_plugins");
355
+ add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_pro_version" );
356
+ add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_other_services");
357
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
358
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
359
  break;
360
  case "author":
361
+ if(get_option("contact-bank-wizard"))
362
+ {
363
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
364
+ }
365
+ else
366
+ {
367
+ add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read","contact_bank_wizard","",plugins_url("/assets/images/icon.png" , __FILE__));
368
+ add_submenu_page("Contact Bank", __("Contact Bank", "contact-bank") ,"","read","contact_bank_wizard", "contact_bank_wizard");
369
+ }
370
  add_menu_page("Contact Bank", __("Contact Bank", "contact-bank"), "read", "contact_dashboard","",plugins_url("/assets/images/icon.png" , __FILE__));
371
  add_submenu_page("contact_dashboard", "Dashboard", __("Dashboard", "contact-bank"), "read", "contact_dashboard","contact_dashboard");
372
  add_submenu_page("","","", "read", "contact_bank","contact_bank");
373
+ add_submenu_page("contact_dashboard", "Plugin Updates", __("Plugin Updates", "contact-bank"), "read", "contact_plugin_update", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_plugin_update" );
374
+ add_submenu_page("contact_dashboard", "Short-Codes", __("Short-Codes", "contact-bank"), "read", "contact_short_code", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_short_code" );
375
+ add_submenu_page("contact_dashboard", "Form Entries", __("Form Entries", "contact-bank"), "read", "contact_frontend_data", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_frontend_data");
376
+ add_submenu_page("contact_dashboard", "Email Settings", __("Email Settings", "contact-bank"), "read", "contact_email", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_email");
377
+ add_submenu_page("contact_dashboard", "Global Settings", __("Global Settings", "contact-bank"), "read", "contact_layout_settings", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_layout_settings");
378
+ add_submenu_page("contact_dashboard", "Feature Requests", __("Feature Requests", "contact-bank"), "read", "contact_feature_request", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_feature_request");
379
+ add_submenu_page("contact_dashboard", "System Status", __("System Status", "contact-bank"), "read", "contact_system_status", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_system_status" );
380
+ add_submenu_page("contact_dashboard", "Recommendations", __("Recommendations", "contact-bank"), "read", "contact_bank_recommended_plugins", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_recommended_plugins");
381
+ add_submenu_page("contact_dashboard", "Premium Editions", __("Premium Editions", "contact-bank"), "read", "contact_pro_version", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_pro_version" );
382
+ add_submenu_page("contact_dashboard", " Our Other Services ", __("Our Other Services", "contact-bank"), "read", "contact_bank_other_services", $contact_bank_wizard == "" ? "contact_bank_wizard" : "contact_bank_other_services");
383
  add_submenu_page("","","", "read", "add_contact_email_settings", "add_contact_email_settings" );
384
  add_submenu_page("","","", "read", "form_preview", "form_preview" );
385
  break;
461
  }
462
  }
463
  }
464
+
465
+ if(!function_exists("contact_bank_wizard"))
466
+ {
467
+ function contact_bank_wizard()
468
+ {
469
+ global $wpdb,$current_user,$cb_user_role_permission;
470
+ if (is_super_admin())
471
+ {
472
+ $cb_role = "administrator";
473
+ }
474
+ else
475
+ {
476
+ $cb_role = $wpdb->prefix . "capabilities";
477
+ $current_user->role = array_keys($current_user->$cb_role);
478
+ $cb_role = $current_user->role[0];
479
+ }
480
+ if(file_exists(CONTACT_BK_PLUGIN_DIR ."/views/wizard.php"))
481
+ {
482
+ include_once CONTACT_BK_PLUGIN_DIR ."/views/wizard.php";
483
+ }
484
+ }
485
+ }
486
+
487
  if(!function_exists("edit_contact_view"))
488
  {
489
  function edit_contact_view()
915
  switch(esc_attr($_REQUEST["action"]))
916
  {
917
  case "add_contact_form_library":
 
918
  add_action( "admin_init", "add_contact_form_library");
919
  if(!function_exists("add_contact_form_library"))
920
  {
1623
  register_activation_hook(__FILE__,"plugin_install_script_for_contact_bank");
1624
  // add_Shortcode Hook called for function contact_bank_short_code for FrontEnd
1625
  add_shortcode("contact_bank", "contact_bank_short_code");
1626
+ // Uninstall Hook called for function plugin_uninstall_script_for_contact_bank
1627
  register_uninstall_hook(__FILE__,"plugin_uninstall_script_for_contact_bank");
1628
+ // Deactivation Hook called for function deactivation_function_for_contact_bank
1629
+ register_deactivation_hook(__FILE__,"deactivation_function_for_contact_bank");
1630
 
1631
  add_action( "network_admin_menu", "create_global_menus_for_contact_bank" );
1632
  // in_plugin_update_message Hook called for function to check updates
lib/contact_view-class.php CHANGED
@@ -21,8 +21,115 @@ else
21
  {
22
  if(isset($_REQUEST["param"]))
23
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  switch(esc_attr($_REQUEST["param"]))
25
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  case "add_settings_div":
27
  $dynamicId = isset($_REQUEST["dynamicId"]) ? intval($_REQUEST["dynamicId"]) : 0;
28
  $field_type = isset($_REQUEST["field_type"]) ? intval($_REQUEST["field_type"]) : 0;
21
  {
22
  if(isset($_REQUEST["param"]))
23
  {
24
+ if(!class_exists("class_plugin_info_contact_bank"))
25
+ {
26
+ class class_plugin_info_contact_bank
27
+ {
28
+ function get_plugin_info()
29
+ {
30
+ $active_plugins = (array)get_option("active_plugins", array());
31
+ if (is_multisite())
32
+ $active_plugins = array_merge($active_plugins, get_site_option("active_sitewide_plugins", array()));
33
+ $plugins = array();
34
+ if(count($active_plugins) > 0)
35
+ {
36
+ $get_plugins = array();
37
+ foreach ($active_plugins as $plugin)
38
+ {
39
+ $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . "/" . $plugin);
40
+
41
+ $get_plugins["plugin_name"] = strip_tags($plugin_data["Name"]);
42
+ $get_plugins["plugin_author"] = strip_tags($plugin_data["Author"]);
43
+ $get_plugins["plugin_version"] = strip_tags($plugin_data["Version"]);
44
+ array_push($plugins,$get_plugins);
45
+ }
46
+ return $plugins;
47
+ }
48
+ }
49
+ }
50
+ }
51
  switch(esc_attr($_REQUEST["param"]))
52
  {
53
+ case "wizard_contact" :
54
+ if(wp_verify_nonce((isset($_REQUEST["_wp_nonce"]) ? esc_attr($_REQUEST["_wp_nonce"]) : ""), "contact_bank_check_status"))
55
+ {
56
+ $class_plugin_info_contact_bank = new class_plugin_info_contact_bank();
57
+ global $wp_version;
58
+
59
+ $url = tech_banker_stats_url."/wp-admin/admin-ajax.php";
60
+ $type = isset($_REQUEST["type"]) ? esc_attr($_REQUEST["type"]) : "";
61
+ update_option("contact-bank-wizard", $type);
62
+
63
+ $theme_details = array();
64
+ if($wp_version >= 3.4)
65
+ {
66
+ $active_theme = wp_get_theme();
67
+ $theme_details["theme_name"] = strip_tags($active_theme->Name);
68
+ $theme_details["theme_version"] = strip_tags($active_theme->Version);
69
+ $theme_details["author_url"] = strip_tags($active_theme->{"Author URI"});
70
+ }
71
+ $plugin_stat_data = array();
72
+ $plugin_stat_data["plugin_slug"] = "contact-bank";
73
+ $plugin_stat_data["type"] = "standard_edition";
74
+ $plugin_stat_data["version_number"] = contact_bank_version_number;
75
+ $plugin_stat_data["status"] = $type;
76
+ $plugin_stat_data["event"] = "activate";
77
+ $plugin_stat_data["domain_url"] = site_url();
78
+ switch($type)
79
+ {
80
+ case "opt_in" :
81
+ $plugin_stat_data["email"] = get_option("admin_email");
82
+ $plugin_stat_data["wp_version"] = $wp_version;
83
+ $plugin_stat_data["php_version"] = esc_html(phpversion());
84
+ $plugin_stat_data["mysql_version"] = $wpdb->db_version();
85
+ $plugin_stat_data["wp_language"] = defined("WPLANG") && WPLANG ? WPLANG : get_locale();
86
+ $plugin_stat_data["max_input_vars"] = ini_get("max_input_vars");
87
+ $plugin_stat_data["operating_system"] = PHP_OS ." (".PHP_INT_SIZE * 8 .") BIT";
88
+ $plugin_stat_data["php_memory_limit"] = ini_get("memory_limit") ? ini_get("memory_limit") : "N/A";
89
+ $plugin_stat_data["extensions"] = get_loaded_extensions();
90
+ $plugin_stat_data["plugins"] = $class_plugin_info_contact_bank->get_plugin_info();
91
+ $plugin_stat_data["themes"] = $theme_details;
92
+ break;
93
+ }
94
+ if(function_exists("curl_init"))
95
+ {
96
+ $ch = curl_init();
97
+ curl_setopt($ch, CURLOPT_URL, $url);
98
+ curl_setopt($ch, CURLOPT_POST, 1);
99
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
100
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
101
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
102
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
103
+ curl_setopt($ch, CURLOPT_POSTFIELDS,
104
+ http_build_query(array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") !="" ? get_option("contact_bank_site_id") : "", "action"=>"plugin_analysis_data")));
105
+ $result = curl_exec($ch);
106
+ update_option("contact_bank_site_id",$result);
107
+ curl_close($ch);
108
+ }
109
+ else
110
+ {
111
+ $response = wp_safe_remote_post($url, array
112
+ (
113
+ "method" => "POST",
114
+ "timeout" => 45,
115
+ "redirection" => 5,
116
+ "httpversion" => "1.0",
117
+ "blocking" => true,
118
+ "headers" => array(),
119
+ "body" => array( "data" => serialize($plugin_stat_data), "site_id" => get_option("contact_bank_site_id") != "" ? get_option("contact_bank_site_id") : "","action"=>"plugin_analysis_data")
120
+ ));
121
+ if(!is_wp_error($response))
122
+ {
123
+ $response["body"] != "" ? update_option("contact_bank_site_id", $response["body"]) : "";
124
+ }
125
+ else
126
+ {
127
+ update_option("contact_bank_site_id", "error");
128
+ }
129
+ }
130
+ }
131
+ break;
132
+
133
  case "add_settings_div":
134
  $dynamicId = isset($_REQUEST["dynamicId"]) ? intval($_REQUEST["dynamicId"]) : 0;
135
  $field_type = isset($_REQUEST["field_type"]) ? intval($_REQUEST["field_type"]) : 0;
lib/install-script.php CHANGED
@@ -963,10 +963,10 @@ else
963
  );
964
  for($flag = 0; $flag < count($contact_forms_for_settings); $flag++)
965
  {
966
- $sql = "";
967
  foreach($settings as $key => $value)
968
  {
969
- $sql[] = '('.$contact_forms_for_settings[$flag]->form_id.',"'.$key.'", "'.$value.'")';
970
  }
971
  $wpdb->query
972
  (
963
  );
964
  for($flag = 0; $flag < count($contact_forms_for_settings); $flag++)
965
  {
966
+ $sql = array();
967
  foreach($settings as $key => $value)
968
  {
969
+ array_push($sql,'('.$contact_forms_for_settings[$flag]->form_id.',"'.$key.'", "'.$value.'")');
970
  }
971
  $wpdb->query
972
  (
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank
3
  Tags: advanced form, best contact form plugin, contact form builder, contact manager, contact us form, custom form, feedback form, web form, contact us, contact bank, contact form, forms
4
  Requires at least: 3.1
5
  Tested up to: 4.7.3
6
- Stable Tag: 2.1.34
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -549,6 +549,10 @@ In order to set Short code for a Form, you need to follow these steps :
549
 
550
  == Changelog ==
551
 
 
 
 
 
552
  = 2.1.34 =
553
 
554
  * Few Urgent Bugs Fixed
3
  Tags: advanced form, best contact form plugin, contact form builder, contact manager, contact us form, custom form, feedback form, web form, contact us, contact bank, contact form, forms
4
  Requires at least: 3.1
5
  Tested up to: 4.7.3
6
+ Stable Tag: 2.1.35
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
549
 
550
  == Changelog ==
551
 
552
+ = 2.1.35 =
553
+
554
+ * Major Bug fixed with Shapely Theme
555
+
556
  = 2.1.34 =
557
 
558
  * Few Urgent Bugs Fixed
views/wizard.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if(!defined("ABSPATH")) exit; //exit if accessed directly
3
+ switch($cb_role)
4
+ {
5
+ case "administrator":
6
+ $cb_user_role_permission = "manage_options";
7
+ break;
8
+ case "editor":
9
+ $cb_user_role_permission = "publish_pages";
10
+ break;
11
+ case "author":
12
+ $cb_user_role_permission = "publish_posts";
13
+ break;
14
+ }
15
+ if (!current_user_can($cb_user_role_permission))
16
+ {
17
+ return;
18
+ }
19
+ else
20
+ {
21
+ $contact_bank_check_status = wp_create_nonce("contact_bank_check_status");
22
+ ?>
23
+ <div class="page-container header-wizard">
24
+ <div class="page-content">
25
+ <div class="fluid-layout">
26
+ <div class="layout-span6 center">
27
+ <img src="<?php echo plugins_url("assets/images/contact-bank.png",dirname(__FILE__));?>">
28
+ </div>
29
+ <div class="layout-span1">
30
+ </div>
31
+ </div>
32
+ <div class="fluid-layout">
33
+ <div class="layout-span12 textalign">
34
+ <p>Hi there!</p>
35
+ <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>
36
+ <p>If you're not ready to Opt-In, that's ok too!</p>
37
+ <p><strong>Contact Bank will still work fine.</strong></p>
38
+ </div>
39
+ </div>
40
+ <div class="fluid-layout">
41
+ <div class="layout-span12">
42
+ <a class="permissions" onclick="show_hide_details_contact_bank();">What permissions are being granted?</a>
43
+ </div>
44
+ </div>
45
+ <div style="display:none;" id="ux_div_wizard_set_up">
46
+ <div class="fluid-layout">
47
+ <div class="layout-span6">
48
+ <ul>
49
+ <li>
50
+ <i class="dashicons dashicons-admin-users"></i>
51
+ <div class="admin">
52
+ <span><strong>User Details</strong></span>
53
+ <p>Name and Email Address</p>
54
+ </div>
55
+ </li>
56
+ </ul>
57
+ </div>
58
+ <div class="layout-span6 align align2">
59
+ <ul>
60
+ <li>
61
+ <i class="dashicons dashicons-admin-plugins"></i>
62
+ <div class="admin-plugins">
63
+ <span><strong>Current Plugin Status</strong></span>
64
+ <p>Activation, Deactivation and Uninstall</p>
65
+ </div>
66
+ </li>
67
+ </ul>
68
+ </div>
69
+ </div>
70
+ <div class="fluid-layout">
71
+ <div class="layout-span6">
72
+ <ul>
73
+ <li>
74
+ <i class="dashicons dashicons-testimonial"></i>
75
+ <div class="testimonial">
76
+ <span><strong>Notifications</strong></span>
77
+ <p>Updates &amp; Announcements</p>
78
+ </div>
79
+ </li>
80
+ </ul>
81
+ </div>
82
+ <div class="layout-span6 align2">
83
+ <ul>
84
+ <li>
85
+ <i class="dashicons dashicons-welcome-view-site"></i>
86
+ <div class="settings">
87
+ <span><strong>Website Overview</strong></span>
88
+ <p>Site URL, WP Version, PHP Info, Plugins &amp; Themes Info</p>
89
+ </div>
90
+ </li>
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <div class="fluid-layout">
96
+ <div class="layout-span12 allow">
97
+ <div class="tech-banker-actions">
98
+ <a onclick="plugin_stats('opt_in');" class="button button-primary-wizard">
99
+ <strong>Opt-In &amp; Continue </strong>
100
+ <i class="dashicons dashicons-arrow-right-alt"></i>
101
+ </a>
102
+ <a onclick="plugin_stats('skip');" class="button button-secondary-wizard" tabindex="2">
103
+ <strong>Skip &amp; Continue </strong>
104
+ <i class="dashicons dashicons-arrow-right-alt"></i>
105
+ </a>
106
+ <div class="clearfix"></div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ <script type="text/javascript">
113
+ if(typeof(show_hide_details_contact_bank) != "function")
114
+ {
115
+ function show_hide_details_contact_bank()
116
+ {
117
+ if(jQuery("#ux_div_wizard_set_up").hasClass("wizard-set-up"))
118
+ {
119
+ jQuery("#ux_div_wizard_set_up").css("display","none");
120
+ jQuery("#ux_div_wizard_set_up").removeClass("wizard-set-up");
121
+ }
122
+ else
123
+ {
124
+ jQuery("#ux_div_wizard_set_up").css("display","block");
125
+ jQuery("#ux_div_wizard_set_up").addClass("wizard-set-up");
126
+ }
127
+ }
128
+ }
129
+ if(typeof(plugin_stats) != "function")
130
+ {
131
+ function plugin_stats(type)
132
+ {
133
+ jQuery.post(ajaxurl,
134
+ {
135
+ type: type,
136
+ param: "wizard_contact",
137
+ action: "add_contact_form_library",
138
+ _wp_nonce: "<?php echo $contact_bank_check_status; ?>"
139
+ },
140
+ function(data)
141
+ {
142
+ window.location.href = "admin.php?page=contact_dashboard";
143
+ });
144
+ }
145
+ }
146
+ </script>
147
+ <?php
148
+ }
149
+ ?>