Visitors Traffic Real Time Statistics - Version 4.2

Version Description

  1. Bug fixes & sanitizating
Download this release

Release Info

Developer osamaesh
Plugin Icon 128x128 Visitors Traffic Real Time Statistics
Version 4.2
Comparing to
See all releases

Code changes from version 4.1 to 4.2

Visitors-Traffic-Real-Time-Statistics.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Visitor Traffic Real Time Statistics
4
  Description: Hits counter that shows analytical numbers of your WordPress site visitors and hits.
5
  Author: wp-buy
6
  Author URI: https://www.wp-buy.com/
7
- Version: 4.1
8
  Text Domain: visitors-traffic-real-time-statistics
9
  Domain Path: /languages
10
  */
@@ -71,14 +71,14 @@ function ahcfree_after_plugin_row($plugin_file, $plugin_data, $status) {
71
 
72
  <script type="text/javascript">
73
  jQuery(document).ready(function() {
74
- var row = jQuery('#<?php echo $class_name;?>-plugin-update-tr').closest('tr').prev();
75
  jQuery(row).addClass('update');
76
 
77
 
78
  jQuery("#HideMe").click(function(){
79
 
80
- jQuery("#<?php echo $class_name;?>-upgradeMsg").empty();
81
- jQuery("#<?php echo $class_name;?>-upgradeMsg").removeAttr("style");
82
 
83
  localStorage.setItem("vtrts_hide_upgrade_message", "hide_msg");
84
 
@@ -88,8 +88,8 @@ function ahcfree_after_plugin_row($plugin_file, $plugin_data, $status) {
88
  if(localStorage.getItem("vtrts_hide_upgrade_message") == "hide_msg")
89
  {
90
 
91
- jQuery("#<?php echo $class_name;?>-upgradeMsg").empty();
92
- jQuery("#<?php echo $class_name;?>-upgradeMsg").removeAttr("style");
93
  }
94
 
95
  });
4
  Description: Hits counter that shows analytical numbers of your WordPress site visitors and hits.
5
  Author: wp-buy
6
  Author URI: https://www.wp-buy.com/
7
+ Version: 4.2
8
  Text Domain: visitors-traffic-real-time-statistics
9
  Domain Path: /languages
10
  */
71
 
72
  <script type="text/javascript">
73
  jQuery(document).ready(function() {
74
+ var row = jQuery('#<?php echo esc_js($class_name);?>-plugin-update-tr').closest('tr').prev();
75
  jQuery(row).addClass('update');
76
 
77
 
78
  jQuery("#HideMe").click(function(){
79
 
80
+ jQuery("#<?php echo esc_js($class_name);?>-upgradeMsg").empty();
81
+ jQuery("#<?php echo esc_js($class_name);?>-upgradeMsg").removeAttr("style");
82
 
83
  localStorage.setItem("vtrts_hide_upgrade_message", "hide_msg");
84
 
88
  if(localStorage.getItem("vtrts_hide_upgrade_message") == "hide_msg")
89
  {
90
 
91
+ jQuery("#<?php echo esc_js($class_name);?>-upgradeMsg").empty();
92
+ jQuery("#<?php echo esc_js($class_name);?>-upgradeMsg").removeAttr("style");
93
  }
94
 
95
  });
ahc_about.php CHANGED
@@ -10,9 +10,7 @@ function imgFlagError(image){
10
 
11
  <div class="ahc_main_container">
12
 
13
- <div style="width:97%; margin-top:10px; margin-left:16px;" >
14
- <?php echo ahcfree_rate_us('https://wordpress.org/support/view/plugin-reviews/visitors-traffic-real-time-statistics?rate=5#postform', '#191E23')?>
15
- </div>
16
  <h1><img src="<?php echo plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE) ?>">&nbsp;Visitor Traffic Real Time Statistics Free <a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></a></h1><br />
17
  <div class="row">
18
  <div class="col-md-6">
10
 
11
  <div class="ahc_main_container">
12
 
13
+
 
 
14
  <h1><img src="<?php echo plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE) ?>">&nbsp;Visitor Traffic Real Time Statistics Free <a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></a></h1><br />
15
  <div class="row">
16
  <div class="col-md-6">
ahc_help.php CHANGED
@@ -10,9 +10,7 @@ function imgFlagError(image){
10
 
11
 
12
  <div class="ahc_main_container">
13
- <div style="width:97%; margin-top:10px; margin-left:16px;" >
14
- <?php echo ahcfree_rate_us('https://wordpress.org/support/view/plugin-reviews/visitors-traffic-real-time-statistics?rate=5#postform', '#191E23')?>
15
- </div>
16
  <h1><img src="<?php echo plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE) ?>">&nbsp;Visitor Traffic Real Time Statistics Free <a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></a></h1><br />
17
  <div class="row">
18
  <div class="col-md-6">
10
 
11
 
12
  <div class="ahc_main_container">
13
+
 
 
14
  <h1><img src="<?php echo plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE) ?>">&nbsp;Visitor Traffic Real Time Statistics Free <a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></a></h1><br />
15
  <div class="row">
16
  <div class="col-md-6">
ahc_settings.php CHANGED
@@ -154,7 +154,7 @@ $ahcproRobots = get_option('ahcproRobots');
154
  <div class="form-group col-md-6">
155
  <label for='exampleInput'>Plugin Accessibility</label><br>
156
  <?php
157
- $html = '';
158
 
159
  global $wp_roles;
160
  if ( !isset( $wp_roles ) ) $wp_roles = new WP_Roles();
@@ -169,11 +169,13 @@ $ahcproRobots = get_option('ahcproRobots');
169
 
170
  }
171
 
172
- $html .= '';
173
  $UserRoles = get_option('ahcproUserRoles');
174
 
175
  $UserRoles_arr = explode(',',$UserRoles);
176
- $html .="<select id='ahcproUserRoles' name='ahcproUserRoles[]' multiple='true' style='width:50%;'>";
 
 
177
  foreach($available_roles_capable as $role)
178
  {
179
  $translated_role_name = $role;
@@ -183,14 +185,14 @@ $ahcproRobots = get_option('ahcproRobots');
183
  }else{
184
  $selected_value = '';
185
  }
186
- $html .="<option ".$selected_value." value='".$translated_role_name."'>".$translated_role_name."</option>";
 
 
187
  }
188
 
189
- $html .='</select>';
190
 
191
 
192
- echo $html;
193
- ?>
194
 
195
  <script language="javascript" type="text/javascript">
196
  jQuery(document).ready(function() {
154
  <div class="form-group col-md-6">
155
  <label for='exampleInput'>Plugin Accessibility</label><br>
156
  <?php
157
+
158
 
159
  global $wp_roles;
160
  if ( !isset( $wp_roles ) ) $wp_roles = new WP_Roles();
169
 
170
  }
171
 
172
+
173
  $UserRoles = get_option('ahcproUserRoles');
174
 
175
  $UserRoles_arr = explode(',',$UserRoles);
176
+ ?>
177
+ <select id='ahcproUserRoles' name='ahcproUserRoles[]' multiple='true' style='width:50%;'>
178
+ <?php
179
  foreach($available_roles_capable as $role)
180
  {
181
  $translated_role_name = $role;
185
  }else{
186
  $selected_value = '';
187
  }
188
+ ?>
189
+ <option <?php echo $selected_value;?> value="<?php echo esc_attr($translated_role_name); ?>"><?php echo esc_html($translated_role_name); ?></option>
190
+ <?php
191
  }
192
 
193
+ ?></select>
194
 
195
 
 
 
196
 
197
  <script language="javascript" type="text/javascript">
198
  jQuery(document).ready(function() {
deactivation.php DELETED
@@ -1,166 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- // Exit if accessed directly.
4
- exit;
5
- }
6
-
7
- // please use your plugin here
8
- if (!function_exists('visitors_traffic_real_time_statistics_footer')){
9
- function visitors_traffic_real_time_statistics_footer(){
10
-
11
-
12
- $deactivation_options_slug = 'visitors-traffic-real-time-statistics'; // plugin slug
13
- $deactivation_options_vote_id = 10622878; //ref: https://polldaddy.com
14
- ?>
15
-
16
- <style type="text/css">
17
- .<?php echo $deactivation_options_slug;?>-deactivate-survey-modal {
18
- display: none;
19
- table-layout: fixed;
20
- position: fixed;
21
- z-index: 9999;
22
- width: 100%;
23
- height: 100%;
24
- text-align: center;
25
- font-size: 14px;
26
- top: 0;
27
- left: 0;
28
- background: rgba(0,0,0,0.8);
29
- }
30
- .<?php echo $deactivation_options_slug;?>-deactivate-survey-wrap {
31
- display: table-cell;
32
- vertical-align: middle;
33
- }
34
-
35
- .<?php echo $deactivation_options_slug;?>-deactivate-survey {
36
-
37
- border: 0 solid #ccc;
38
- border-radius: 3px;
39
- margin: 0 auto;
40
- padding: 12px;
41
- width: 400px;
42
- direction: ltr;
43
- }
44
-
45
- @media only screen and (max-width: 360px)
46
- {
47
- .<?php echo $deactivation_options_slug;?>-deactivate-survey {
48
-
49
- border: 0 solid #ccc;
50
- border-radius: 3px;
51
- margin: 0 auto;
52
- padding: 12px;
53
- width: 100%;
54
- direction: ltr;
55
- }
56
- }
57
- .pds-question-top
58
- {
59
- margin-bottom:20px;
60
- }
61
- #PDI_container<?php echo $deactivation_options_vote_id;?> .pds-box
62
- {
63
- width:400px !important
64
- }
65
-
66
- .<?php echo $deactivation_options_slug;?>-deactivate-survey a.button {
67
- white-space: normal;
68
- height: auto;
69
- background-color: #F1F1F1 !important;
70
- border: #829237 solid 1px !important;
71
- margin-top:-50px;
72
- color:#829237;
73
-
74
-
75
- }
76
- .<?php echo $deactivation_options_slug;?>-deactivate-survey a.button:hover {
77
-
78
- color:black;
79
- background-color:#cccccc !important;
80
- }
81
- .css-links pds-links{
82
- display:none !important;
83
- }
84
-
85
- @media only screen and (max-width: 360px) {
86
- #PDI_container<?php echo $deactivation_options_vote_id;?> .pds-box
87
- {
88
- width:95% !important
89
- }
90
- }
91
- #PDI_container<?php echo $deactivation_options_vote_id;?> .pds-box .pds-vote-button, .pds-box .pds-vote-button-load
92
- {
93
- background-color: #0073AA !important;
94
- cursor: pointer !important;
95
- border: none !important;
96
-
97
- }
98
-
99
- #PDI_container<?php echo $deactivation_options_vote_id;?> .pds-box
100
- {
101
- min-height: 100px !important;
102
- text-align: center;
103
- }
104
-
105
- #PDI_container<?php echo $deactivation_options_vote_id;?> .pds-box .pds-links a, .pds-box .pds-links-back a{
106
- font-size:10px;
107
- margin-bottom:-20px
108
-
109
-
110
- }
111
-
112
- .pds-return-poll, .pds-pd-link{
113
- display:none !important;
114
- }
115
- </style>
116
-
117
-
118
- <script type="text/javascript">
119
- jQuery(function($){
120
- var deactivateLink = $('#the-list').find('[data-slug="<?php echo $deactivation_options_slug;?>"] span.deactivate a');
121
- var overlay = $('#<?php echo $deactivation_options_slug;?>-deactivate-survey');
122
- var closeButton = $('#<?php echo $deactivation_options_slug;?>-deactivate-survey-close');
123
- var formOpen = false;
124
-
125
- deactivateLink.on('click', function(event) {
126
- event.preventDefault();
127
- overlay.css('display', 'table');
128
- formOpen = true;
129
- });
130
-
131
- closeButton.on('click', function(event) {
132
-
133
- event.preventDefault();
134
- overlay.css('display', 'none');
135
- formOpen = false;
136
- location.href = deactivateLink.attr('href');
137
- });
138
-
139
- $(document).keyup(function(event) {
140
- if ((event.keyCode === 27) && formOpen) {
141
- location.href = deactivateLink.attr('href');
142
- }
143
- });
144
-
145
- $('#pd-vote-button10622878').html('Submit');
146
-
147
-
148
- });
149
- </script>
150
-
151
- <div class="<?php echo $deactivation_options_slug;?>-deactivate-survey-modal" id="<?php echo $deactivation_options_slug;?>-deactivate-survey">
152
- <div class="<?php echo $deactivation_options_slug;?>-deactivate-survey-wrap">
153
- <div class="<?php echo $deactivation_options_slug;?>-deactivate-survey">
154
-
155
- <script type="text/javascript" charset="utf-8" src="https://secure.polldaddy.com/p/<?php echo $deactivation_options_vote_id;?>.js"></script>
156
-
157
- <a class="button" id="<?php echo $deactivation_options_slug;?>-deactivate-survey-close"><?php _e('Close this window & deactivate', $deactivation_options_slug); ?></a>
158
- </div>
159
- </div>
160
- </div>
161
-
162
- <?php
163
- }
164
- }
165
- add_action( 'admin_footer', 'visitors_traffic_real_time_statistics_footer');
166
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functions.php CHANGED
@@ -90,71 +90,6 @@ function ahcfree_getVisitsTime() {
90
  return false;
91
  }
92
 
93
- function ahcfree_google_map($map_option) {
94
- ahcfree_include_scripts();
95
-
96
- global $wpdb;
97
-
98
- $ahcfree_get_save_settings = ahcfree_get_save_settings();
99
- $map_status = $ahcfree_get_save_settings[0]->set_google_map;
100
-
101
- if ($map_status == 'online') {
102
- $ctrArr = ahcfree_get_online_visitors_for_map();
103
-
104
- } else if ($map_status == 'all') { // top 10 coutries
105
- $ctrArr = ahcfree_get_all_visitors_for_map();
106
-
107
- } else if($map_status == 'this_month') // this month visitors
108
- {
109
- $ctrArr = ahcfree_get_today_visitors_for_map('this_month'); // today visitors
110
- }else if($map_status == 'past_month') // this month visitors
111
- {
112
- $ctrArr = ahcfree_get_today_visitors_for_map('past_month'); // today visitors
113
- }else{
114
- $ctrArr = ahcfree_get_today_visitors_for_map(); // default : today visitors
115
- }
116
-
117
- $ret = '<div id="OSMap" style="width: 100%; height:540px;"></div>
118
- <script language="javascript" type="text/javascript">
119
- jQuery(document).ready(function(){
120
- var map = L.map( "OSMap", {
121
- center: [34.307144, -8.789062],
122
- minZoom: 2,
123
- zoom: 2
124
- });
125
- L.tileLayer( "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
126
- attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
127
- subdomains: ["a","b","c"]
128
- }).addTo( map );
129
- ';
130
-
131
-
132
-
133
- $counter = 1;
134
- if ($ctrArr['success'] && isset($ctrArr['data']) && count($ctrArr['data']) > 0) {
135
-
136
- foreach ($ctrArr['data'] as $vc) {
137
- $info = '<div style="overflow: auto;">';
138
- $info .= '<div class="countryMarker"><img src="' .
139
- plugins_url('/images/flags/' . strtolower($vc['ctr_internet_code']) . '.png', AHCFREE_PLUGIN_MAIN_FILE) .
140
- '" border="0" width="20" height="16" onerror="imgFlagError(this)" /></span><span class="countryName">' . str_replace("'", "", $vc['ctr_name']) . '&nbsp;&nbsp;<span class="countryName">(' . str_replace("'", "", $vc['visitors']) . ')</span></div>';
141
- $info .= '</div>';
142
-
143
- $ret .='L.marker( ['.$vc['ctr_latitude'].', '.$vc['ctr_longitude'].'] )
144
- .bindPopup( \''.$info.'\').addTo( map ).openPopup();';
145
-
146
-
147
- $counter++;
148
- }
149
- }
150
- $ret .= '
151
- });
152
- </script>';
153
-
154
-
155
-
156
- echo $ret;
157
- }
158
 
159
  /**
160
  * change plugin settings
@@ -219,7 +154,7 @@ function ahcfree_savesettings() {
219
  }
220
 
221
  //--------------------------------------------
222
-
223
  function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
224
 
225
  $ret = '
@@ -234,8 +169,9 @@ function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
234
 
235
  .rate_box{
236
 
237
- background-color:' . $box_color . ';
238
  color:#ffffff;
 
239
 
240
 
241
  }
@@ -270,21 +206,21 @@ function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
270
  <div class="col-md-6">
271
  <br />
272
  <p>
273
- <strong>Do you like this plugin?</strong><br /> Please take a few seconds to <a class="link_wp" href="' . $plugin_url . '" target="_blank">rate it on WordPress.org!</a></p>
274
  </div>
275
  <div class="col-md-6">
276
  <div class="rating">';
277
 
278
  for ($r = 1; $r <= 5; $r++) {
279
 
280
- $ret .= '<span onclick="window.open(\'' . $plugin_url . '\',\'_blank\')">☆</span>';
281
  }
282
 
283
  $ret .= '</div>
284
  </div>
285
  </div>';
286
  return $ret;
287
- }
288
 
289
  function ahcfree_get_save_settings() {
290
  global $wpdb;
@@ -3499,7 +3435,7 @@ class ahcfree_vtrts_widget extends WP_Widget {
3499
 
3500
  <p>
3501
  <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Widget Title:'); ?></label>
3502
- <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
3503
  </p>
3504
 
3505
 
@@ -3507,8 +3443,8 @@ class ahcfree_vtrts_widget extends WP_Widget {
3507
 
3508
 
3509
  <p>
3510
- <label for="<?php echo $this->get_field_id('fontTypeCombo'); ?>"><?php _e('Font Type:'); ?></label>
3511
- <select class="widefat" id="<?php echo $this->get_field_id('fontTypeCombo'); ?>" name="<?php echo $this->get_field_name('fontTypeCombo'); ?>">
3512
  <optgroup class='verdana'>
3513
  <option <?php selected($fontTypeCombo, 'font-family:Verdana, Geneva, sans-serif'); ?> value="font-family:Verdana, Geneva, sans-serif">Verdana</option>
3514
  </optgroup>
@@ -3537,7 +3473,7 @@ class ahcfree_vtrts_widget extends WP_Widget {
3537
  </select>
3538
 
3539
  </p>
3540
- <label for="<?php echo $this->get_field_id('fontSizeCombo'); ?>"><?php _e('Font Size:'); ?></label>
3541
  <select class="widefat" id="<?php echo esc_attr($this->get_field_id('fontSizeCombo')); ?>" name="<?php echo esc_attr($this->get_field_name('fontSizeCombo')); ?>">
3542
  <?php
3543
  for ($fs = 8; $fs <= 22; $fs++) {
90
  return false;
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
  /**
95
  * change plugin settings
154
  }
155
 
156
  //--------------------------------------------
157
+ /*
158
  function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
159
 
160
  $ret = '
169
 
170
  .rate_box{
171
 
172
+ background-color:' . esc_js($box_color) . ';
173
  color:#ffffff;
174
+ padding:3px;
175
 
176
 
177
  }
206
  <div class="col-md-6">
207
  <br />
208
  <p>
209
+ <strong>Do you like this plugin?</strong><br /> Please take a few seconds to <a class="link_wp" href="' . esc_url($plugin_url) . '" target="_blank">rate it on WordPress.org!</a></p>
210
  </div>
211
  <div class="col-md-6">
212
  <div class="rating">';
213
 
214
  for ($r = 1; $r <= 5; $r++) {
215
 
216
+ $ret .= '<span onclick="window.open(\'' . esc_js($plugin_url) . '\',\'_blank\')">☆</span>';
217
  }
218
 
219
  $ret .= '</div>
220
  </div>
221
  </div>';
222
  return $ret;
223
+ }*/
224
 
225
  function ahcfree_get_save_settings() {
226
  global $wpdb;
3435
 
3436
  <p>
3437
  <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Widget Title:'); ?></label>
3438
+ <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
3439
  </p>
3440
 
3441
 
3443
 
3444
 
3445
  <p>
3446
+ <label for="<?php echo esc_attr($this->get_field_id('fontTypeCombo')); ?>"><?php _e('Font Type:'); ?></label>
3447
+ <select class="widefat" id="<?php echo esc_attr($this->get_field_id('fontTypeCombo')); ?>" name="<?php echo esc_attr($this->get_field_name('fontTypeCombo')); ?>">
3448
  <optgroup class='verdana'>
3449
  <option <?php selected($fontTypeCombo, 'font-family:Verdana, Geneva, sans-serif'); ?> value="font-family:Verdana, Geneva, sans-serif">Verdana</option>
3450
  </optgroup>
3473
  </select>
3474
 
3475
  </p>
3476
+ <label for="<?php echo esc_attr($this->get_field_id('fontSizeCombo')); ?>"><?php _e('Font Size:'); ?></label>
3477
  <select class="widefat" id="<?php echo esc_attr($this->get_field_id('fontSizeCombo')); ?>" name="<?php echo esc_attr($this->get_field_name('fontSizeCombo')); ?>">
3478
  <?php
3479
  for ($fs = 8; $fs <= 22; $fs++) {
init.php CHANGED
@@ -75,7 +75,7 @@ $admincore = '';
75
 
76
 
77
  add_action('admin_menu', 'ahcfree_create_admin_menu_link');
78
- add_shortcode('ahcfree_show_google_map', 'ahcfree_google_map' );
79
  //[ahcfree_show_google_map map_status="online"]
80
 
81
  add_action('wp_ajax_ahcfree_get_hits_by_custom_duration','ahcfree_get_hits_by_custom_duration_callback');
75
 
76
 
77
  add_action('admin_menu', 'ahcfree_create_admin_menu_link');
78
+
79
  //[ahcfree_show_google_map map_status="online"]
80
 
81
  add_action('wp_ajax_ahcfree_get_hits_by_custom_duration','ahcfree_get_hits_by_custom_duration_callback');
lib/jscolor/demo.html DELETED
@@ -1,12 +0,0 @@
1
- <html>
2
- <head>
3
- <title>jscolor demo</title>
4
- </head>
5
- <body>
6
-
7
- <script type="text/javascript" src="jscolor.js"></script>
8
-
9
- Click here: <input class="color" value="66ff00">
10
-
11
- </body>
12
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
notifications.php CHANGED
@@ -139,10 +139,10 @@ if ( ! class_exists( 'wp_visitors_traffic_statistics' ) ) :
139
  <h3><?php echo $this->notify_array_data["message_header"]; ?></h3>
140
  <p><?php echo $this->notify_array_data["message_body"]; ?></p>
141
  <ul class="notification_bar_review-ul">
142
- <li><a href="<?php echo $this->notify_array_data["rating_url"]; ?>" target="_blank"><span class="dashicons dashicons-external"></span><?php _e( 'Sure! I\'d love to!', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
143
- <li><a href="<?php echo $dismiss_url ?>"><span class="dashicons dashicons-smiley"></span><?php _e( 'I\'ve already left a review', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
144
- <li><a href="<?php echo $later_url ?>"><span class="dashicons dashicons-calendar-alt"></span><?php _e( 'Will Rate Later', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
145
- <li><a href="<?php echo $dismiss_url ?>"><span class="dashicons dashicons-dismiss"></span><?php _e( 'Hide Forever', $this->notify_array_data["plugin_real_slug"] ) ?></a></li></ul>
146
  </div>
147
  </div>
148
  <?php
139
  <h3><?php echo $this->notify_array_data["message_header"]; ?></h3>
140
  <p><?php echo $this->notify_array_data["message_body"]; ?></p>
141
  <ul class="notification_bar_review-ul">
142
+ <li><a href="<?php echo esc_url($this->notify_array_data["rating_url"]); ?>" target="_blank"><span class="dashicons dashicons-external"></span><?php _e( 'Sure! I\'d love to!', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
143
+ <li><a href="<?php echo esc_url($dismiss_url); ?>"><span class="dashicons dashicons-smiley"></span><?php _e( 'I\'ve already left a review', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
144
+ <li><a href="<?php echo esc_url($later_url); ?>"><span class="dashicons dashicons-calendar-alt"></span><?php _e( 'Will Rate Later', $this->notify_array_data["plugin_real_slug"] ) ?></a></li>
145
+ <li><a href="<?php echo esc_url($dismiss_url); ?>"><span class="dashicons dashicons-dismiss"></span><?php _e( 'Hide Forever', $this->notify_array_data["plugin_real_slug"] ) ?></a></li></ul>
146
  </div>
147
  </div>
148
  <?php
overview.php CHANGED
@@ -120,7 +120,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
120
  </div>
121
  <div class="row" >
122
  <div class="col-lg-8">
123
- <h1><img height="55px" src="<?php echo esc_url(plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE)); ?>">&nbsp;Visitor Traffic Real Time Statistics free &nbsp;<a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></a></h1>
124
 
125
  </div>
126
  <div class="col-lg-4">
@@ -132,8 +132,8 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
132
  <div class="row" >
133
  <div class="col-lg-3">
134
  <div class="box_widget greenBox" >
135
- <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true"><img src="<?php echo plugins_url('/images/upgrade_now.png', AHCFREE_PLUGIN_MAIN_FILE) ?>"></a>
136
- <br /><span class="txt"><img src="<?php echo plugins_url('/images/live.gif', AHCFREE_PLUGIN_MAIN_FILE) ?>">&nbsp; Online Users</span>
137
  </div>
138
  </div>
139
  <div class="col-lg-3">
@@ -284,8 +284,8 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
284
  ?>
285
  <tr>
286
  <td><div>
287
- <span><b><?php echo $ser; ?></b></span></div></td>
288
- <td class="values"><?php echo ahcfree_NumFormat($v); ?></td>
289
 
290
  </tr>
291
  <?php
@@ -294,7 +294,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
294
  ?>
295
  <tr>
296
  <td><strong>Total </strong></td>
297
- <td class="values" ><strong id="today_search"><?php echo ahcfree_NumFormat($tot_srch); ?></strong></td>
298
 
299
  </tr>
300
 
@@ -533,7 +533,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
533
  $times = array();
534
  ?>
535
  <div class="panel" style="width:100% !important">
536
- <h2 class="box-heading">Today <?php echo ahc_visits_time_graph ?><span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span><span class="export_data"><a href="#" class="dashicons dashicons-external" title="Export Data"></a></span></h2>
537
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="visit_time") ? "open" : ''; ?>">
538
  <form method="post" class="search_frm">
539
  <?php
@@ -582,8 +582,8 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
582
  </div>
583
  <div class="visitorsPercent">(<?php echo ceil($t['percent']) ?>)%..</div>
584
  </td>
585
- <td class="values"><?php echo $t['vtm_visitors'] ?></td>
586
- <td class="values"><?php echo $t['vtm_visits'] ?></td>
587
  </tr>
588
  <?php
589
  }
@@ -622,10 +622,10 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
622
  foreach ($tTitles as $t) {
623
  ?>
624
  <tr>
625
- <td class="values"><?php echo $t['rank'] ?></td>
626
- <td class="values"><a href="<?php echo esc_url(get_permalink($t['til_page_id'])); ?>" target="_blank"><?php echo $t['til_page_title'] ?></a></td>
627
- <td class="values"><?php echo ahcfree_NumFormat($t['til_hits']); ?></td>
628
- <td class="values"><?php echo $t['percent'] ?></td>
629
  </tr>
630
  <?php
631
  }
@@ -690,14 +690,14 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
690
  ?>
691
  <tr>
692
  <td>
693
- <span><?php if ($searchWord['ctr_internet_code'] != '') { ?><img src="<?php echo plugins_url('/images/flags/' . strtolower($searchWord['ctr_internet_code']) . '.png', AHCFREE_PLUGIN_MAIN_FILE); ?>" border="0" width="22" height="18" title="<?php echo $searchWord['ctr_name'] ?>" onerror="imgFlagError(this)" /><?php } ?></span>
694
  </td>
695
- <td class="hide"><?php echo $searchWord['csb'];?></td>
696
  <td>
697
- <span class="searchKeyWords"><a href="<?php echo $searchWord['hit_referer'] ?>" target="_blank"><?php echo $searchWord['hit_search_words'] ?></a></span>
698
  </td>
699
  <td>
700
- <span class="visitDateTime">&nbsp;<?php echo $visitDate->format('d/m/Y') ?></span>
701
  </td>
702
  </tr>
703
  <?php
@@ -730,7 +730,11 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
730
  $visits_visitors_data = ahcfree_get_visits_by_custom_duration_callback($mystart_date,$myend_date,$stat='');
731
  ?>
732
 
733
- <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
 
 
 
 
734
  <script language="javascript" type="text/javascript">
735
 
736
 
120
  </div>
121
  <div class="row" >
122
  <div class="col-lg-8">
123
+ <h1><img height="55px" src="<?php echo esc_url(plugins_url('/images/logo.png', AHCFREE_PLUGIN_MAIN_FILE)); ?>">&nbsp;Visitor Traffic Real Time Statistics free &nbsp;<a title="change settings" href="admin.php?page=ahc_hits_counter_settings"><img src="<?php echo esc_url(plugins_url('/images/settings.jpg', AHCFREE_PLUGIN_MAIN_FILE)) ?>" /></a></h1>
124
 
125
  </div>
126
  <div class="col-lg-4">
132
  <div class="row" >
133
  <div class="col-lg-3">
134
  <div class="box_widget greenBox" >
135
+ <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true"><img src="<?php echo esc_url(plugins_url('/images/upgrade_now.png', AHCFREE_PLUGIN_MAIN_FILE)) ?>"></a>
136
+ <br /><span class="txt"><img src="<?php echo esc_url(plugins_url('/images/live.gif', AHCFREE_PLUGIN_MAIN_FILE)) ?>">&nbsp; Online Users</span>
137
  </div>
138
  </div>
139
  <div class="col-lg-3">
284
  ?>
285
  <tr>
286
  <td><div>
287
+ <span><b><?php echo esc_html($ser); ?></b></span></div></td>
288
+ <td class="values"><?php echo ahcfree_NumFormat(intval($v)); ?></td>
289
 
290
  </tr>
291
  <?php
294
  ?>
295
  <tr>
296
  <td><strong>Total </strong></td>
297
+ <td class="values" ><strong id="today_search"><?php echo ahcfree_NumFormat(intval($tot_srch)); ?></strong></td>
298
 
299
  </tr>
300
 
533
  $times = array();
534
  ?>
535
  <div class="panel" style="width:100% !important">
536
+ <h2 class="box-heading">Today's time graph<span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span><span class="export_data"><a href="#" class="dashicons dashicons-external" title="Export Data"></a></span></h2>
537
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="visit_time") ? "open" : ''; ?>">
538
  <form method="post" class="search_frm">
539
  <?php
582
  </div>
583
  <div class="visitorsPercent">(<?php echo ceil($t['percent']) ?>)%..</div>
584
  </td>
585
+ <td class="values"><?php echo intval($t['vtm_visitors']); ?></td>
586
+ <td class="values"><?php echo intval($t['vtm_visits']); ?></td>
587
  </tr>
588
  <?php
589
  }
622
  foreach ($tTitles as $t) {
623
  ?>
624
  <tr>
625
+ <td class="values"><?php echo intval($t['rank']) ?></td>
626
+ <td class="values"><a href="<?php echo esc_url(get_permalink($t['til_page_id'])); ?>" target="_blank"><?php echo esc_html($t['til_page_title']); ?></a></td>
627
+ <td class="values"><?php echo ahcfree_NumFormat(intval($t['til_hits'])); ?></td>
628
+ <td class="values"><?php echo esc_html($t['percent']) ?></td>
629
  </tr>
630
  <?php
631
  }
690
  ?>
691
  <tr>
692
  <td>
693
+ <span><?php if ($searchWord['ctr_internet_code'] != '') { ?><img src="<?php echo plugins_url('/images/flags/' . strtolower($searchWord['ctr_internet_code']) . '.png', AHCFREE_PLUGIN_MAIN_FILE); ?>" border="0" width="22" height="18" title="<?php echo esc_html($searchWord['ctr_name']) ?>" onerror="imgFlagError(this)" /><?php } ?></span>
694
  </td>
695
+ <td class="hide"><?php echo esc_html($searchWord['csb']);?></td>
696
  <td>
697
+ <span class="searchKeyWords"><a href="<?php echo esc_url($searchWord['hit_referer']); ?>" target="_blank"><?php echo esc_html($searchWord['hit_search_words']) ?></a></span>
698
  </td>
699
  <td>
700
+ <span class="visitDateTime">&nbsp;<?php echo esc_html($visitDate->format('d/m/Y')); ?></span>
701
  </td>
702
  </tr>
703
  <?php
730
  $visits_visitors_data = ahcfree_get_visits_by_custom_duration_callback($mystart_date,$myend_date,$stat='');
731
  ?>
732
 
733
+
734
+ <?php
735
+ wp_register_script('ahc_gstatic_js', 'https://www.gstatic.com/charts/loader.js' ,array(), '1.0.0', true);
736
+ wp_enqueue_script('ahc_gstatic_js');
737
+ ?>
738
  <script language="javascript" type="text/javascript">
739
 
740
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wp-buy, osamaesh
3
  Tags: visitor, traffic, statistics, analytics, stats, online, Visit, WordPress analytics ,visitors online, count visitor, google analytics, analytics, GeoIP, Geo locations, analytics dashboard, visits, chart, browser, blog, today, yesterday, week, month, wp Statistics, year, post, page, sidebar, summary, feedburner, hits, pagerank, google, histats, alexa, live visit, counter, diagram, graph
4
  Requires at least: 3.0.1
5
  Tested up to: 5.8.2
6
- Stable tag: 4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -150,6 +150,12 @@ This plugin supports IPv6; however, PHP must be compiled with IPv6 support enabl
150
 
151
  == Changelog ==
152
 
 
 
 
 
 
 
153
  = 4.1 =
154
  1. Security bug fixes
155
  2. fix IP exclusion issue
3
  Tags: visitor, traffic, statistics, analytics, stats, online, Visit, WordPress analytics ,visitors online, count visitor, google analytics, analytics, GeoIP, Geo locations, analytics dashboard, visits, chart, browser, blog, today, yesterday, week, month, wp Statistics, year, post, page, sidebar, summary, feedburner, hits, pagerank, google, histats, alexa, live visit, counter, diagram, graph
4
  Requires at least: 3.0.1
5
  Tested up to: 5.8.2
6
+ Stable tag: 4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
150
 
151
  == Changelog ==
152
 
153
+
154
+ = 4.2 =
155
+ 1. Bug fixes & sanitizating
156
+
157
+
158
+
159
  = 4.1 =
160
  1. Security bug fixes
161
  2. fix IP exclusion issue