Visitors Traffic Real Time Statistics - Version 2.13

Version Description

  1. Removing start index page
Download this release

Release Info

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

Code changes from version 2.6 to 2.13

Visitors-Traffic-Real-Time-Statistics.php CHANGED
@@ -4,14 +4,11 @@ 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: 2.6
8
- Text Domain: vtrts-free
9
  Domain Path: /languages
10
  */
11
 
12
-
13
-
14
-
15
  define('AHCFREE_PLUGIN_MAIN_FILE', __FILE__);
16
  define('AHCFREE_PLUGIN_ROOT_DIR', dirname(__FILE__));
17
 
@@ -26,6 +23,7 @@ if( !function_exists('get_plugin_data') or !function_exists('wp_get_current_user
26
  include_once("notifications.php");
27
 
28
 
 
29
  if ( function_exists('get_plugin_data') ) {
30
  $woodhl_detail = get_plugin_data( __FILE__ );
31
  $installed_version = get_option( 'visitors-traffic-real-time-statistics-pro-version' );
@@ -55,7 +53,7 @@ function ahcfree_after_plugin_row($plugin_file, $plugin_data, $status) {
55
  $class_name = $plugin_data['slug'];
56
 
57
  $upgradeMsg = '<tr id="' .$class_name. '-plugin-update-tr" class="plugin-update-tr active">';
58
- $upgradeMsg .= '<td colspan="3" class="plugin-update">';
59
  $upgradeMsg .= '<div id="' .$class_name. '-upgradeMsg" class="update-message" style="background:#FFF8E5; padding-left:10px; border-left:#FFB900 solid 4px" >';
60
 
61
  $upgradeMsg .= 'You are running visitor traffic free. To get more features (<b style="color:red">Online users, GEO locations and visitors on the map</b>), you can <a href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/#plugins-page" target="_blank"><strong>upgrade now</strong></a> or ';
@@ -103,7 +101,7 @@ function ahcfree_after_plugin_row($plugin_file, $plugin_data, $status) {
103
 
104
  function ahcfree_action_links( $links ) {
105
  $links = array_merge( array(
106
- '<a href="' . esc_url( admin_url( '/admin.php?page=ahc_hits_counter_menu_free' ) ) . '">' . __( 'Dashboard', 'textdomain' ) . '</a>',
107
  '<a href="' . esc_url( admin_url( '/admin.php?page=ahc_hits_counter_settings' ) ) . '">' . __( 'Settings', 'textdomain' ) . '</a>'
108
  ), $links );
109
  return $links;
@@ -134,12 +132,20 @@ function ahcfree_row_meta( $meta_fields, $file ) {
134
  }
135
 
136
 
137
- $path = plugin_basename( __FILE__ );
138
  add_action("after_plugin_row_{$path}", 'ahcfree_after_plugin_row', 10, 3);
139
  add_action( 'wp_ajax_ahcfree_HideMessageAjaxFunction', 'ahcfree_HideMessageAjaxFunction' );
140
  add_filter( 'plugin_row_meta', 'ahcfree_row_meta', 10, 4 );
141
  add_action( 'plugin_action_links_' . $path, 'ahcfree_action_links' );
142
  add_option( 'ahcfree_new_updates', date('Y-m-d', time()));
143
 
 
 
 
 
 
 
 
 
144
  //--------------------------------------------
145
  ?>
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: 2.13
8
+ Text Domain: visitors-traffic-real-time-statistics
9
  Domain Path: /languages
10
  */
11
 
 
 
 
12
  define('AHCFREE_PLUGIN_MAIN_FILE', __FILE__);
13
  define('AHCFREE_PLUGIN_ROOT_DIR', dirname(__FILE__));
14
 
23
  include_once("notifications.php");
24
 
25
 
26
+
27
  if ( function_exists('get_plugin_data') ) {
28
  $woodhl_detail = get_plugin_data( __FILE__ );
29
  $installed_version = get_option( 'visitors-traffic-real-time-statistics-pro-version' );
53
  $class_name = $plugin_data['slug'];
54
 
55
  $upgradeMsg = '<tr id="' .$class_name. '-plugin-update-tr" class="plugin-update-tr active">';
56
+ $upgradeMsg .= '<td colspan="4" class="plugin-update">';
57
  $upgradeMsg .= '<div id="' .$class_name. '-upgradeMsg" class="update-message" style="background:#FFF8E5; padding-left:10px; border-left:#FFB900 solid 4px" >';
58
 
59
  $upgradeMsg .= 'You are running visitor traffic free. To get more features (<b style="color:red">Online users, GEO locations and visitors on the map</b>), you can <a href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/#plugins-page" target="_blank"><strong>upgrade now</strong></a> or ';
101
 
102
  function ahcfree_action_links( $links ) {
103
  $links = array_merge( array(
104
+ '<a href="' . esc_url( admin_url( '/admin.php?page=cp_plugins_settings_start_page_slug' ) ) . '">' . __( 'Dashboard', 'textdomain' ) . '</a>',
105
  '<a href="' . esc_url( admin_url( '/admin.php?page=ahc_hits_counter_settings' ) ) . '">' . __( 'Settings', 'textdomain' ) . '</a>'
106
  ), $links );
107
  return $links;
132
  }
133
 
134
 
135
+ $path = plugin_basename( __FILE__ );
136
  add_action("after_plugin_row_{$path}", 'ahcfree_after_plugin_row', 10, 3);
137
  add_action( 'wp_ajax_ahcfree_HideMessageAjaxFunction', 'ahcfree_HideMessageAjaxFunction' );
138
  add_filter( 'plugin_row_meta', 'ahcfree_row_meta', 10, 4 );
139
  add_action( 'plugin_action_links_' . $path, 'ahcfree_action_links' );
140
  add_option( 'ahcfree_new_updates', date('Y-m-d', time()));
141
 
142
+
143
+ if(get_option('ahcfree_hide_top_bar_icon') != '1')
144
+ {
145
+ add_action('admin_bar_menu', 'vtrts_free_add_items', 40);
146
+ add_action('wp_enqueue_scripts', 'vtrts_free_top_bar_enqueue_style');
147
+ add_action('admin_enqueue_scripts', 'vtrts_free_top_bar_enqueue_style');
148
+ }
149
+
150
  //--------------------------------------------
151
  ?>
WPHitsCounter.php CHANGED
@@ -357,15 +357,19 @@ class WPHitsCounter {
357
 
358
  protected function getCountryInternetCode() {
359
  //https://nominatim.openstreetmap.org/reverse?format=json&lat=31.354675&lon=34.308826&zoom=18&addressdetails=1
 
 
 
360
  if (!$this->ipIsUnknown) {
361
 
362
- $ip_data = ahcfree_advanced_get_link("https://geoip-db.com/json/".$this->ipAddress);
363
- $ip_data = json_decode($ip_data['body']);
364
 
365
-
366
- if(trim($ip_data->country_code) != '' && strlen($ip_data->country_code) == 2)
 
367
  {
368
- $this->countryInternetCode = $ip_data->country_code;
369
 
370
  }else{
371
 
@@ -831,37 +835,31 @@ class WPHitsCounter {
831
  global $wpdb;
832
 
833
 
834
- $ahc_city = 'UNKNOWN';
835
- $ahc_region = 'UNKNOWN';
836
 
837
 
838
 
839
- $ip_data = (ahcfree_advanced_get_link("https://ip-api.com/json/".$vtr_ip_address));
840
- $ip_data = json_decode($ip_data['body']);
841
-
842
 
843
- $ahc_city = $ip_data->city;
844
- $ahc_region = $ip_data->regionName;
845
 
846
- if(trim($ip_data->city) == '' or trim($ip_data->city) == null or trim($ip_data->city) == 'null' or empty($ip_data->city) or strlen($ip_data->city) <=2)
847
  {
848
  $ip_data = ahcfree_advanced_get_link("https://geoip-db.com/json/".$vtr_ip_address);
849
- $ip_data = json_decode($ip_data['body']);
850
-
851
- if(trim($ip_data->city) != '')
852
- {
853
-
854
- $ahc_city = $ip_data->city;
855
- $ahc_region = $ip_data->state;
856
- }
857
- else{
858
-
859
 
860
  $ip_data = (ahcfree_advanced_get_link("http://www.geoplugin.net/json.gp?ip=".$vtr_ip_address));
861
- $ip_data = json_decode($ip_data['body']);
862
 
863
- $ahc_city = $ip_data->geoplugin_city;
864
- $ahc_region = $ip_data->geoplugin_region;
865
 
866
 
867
  }
357
 
358
  protected function getCountryInternetCode() {
359
  //https://nominatim.openstreetmap.org/reverse?format=json&lat=31.354675&lon=34.308826&zoom=18&addressdetails=1
360
+
361
+
362
+
363
  if (!$this->ipIsUnknown) {
364
 
365
+ $ip_data = ahcfree_advanced_get_link("http://ip-api.com/json/".$this->ipAddress);
366
+ //$ip_data = json_decode($ip_data['body']);
367
 
368
+ $countryCode = isset($ip_data->countryCode) ? $ip_data->countryCode : '';
369
+
370
+ if(trim($countryCode) != '' && strlen($countryCode) == 2)
371
  {
372
+ $this->countryInternetCode = $countryCode;
373
 
374
  }else{
375
 
835
  global $wpdb;
836
 
837
 
838
+ $ahc_city = '';
839
+ $ahc_region = '';
840
 
841
 
842
 
843
+ $ip_data = (ahcfree_advanced_get_link("http://ip-api.com/json/".$vtr_ip_address));
844
+
 
845
 
846
+ $ahc_city = isset($ip_data->city) ? $ip_data->city : '';
847
+ $ahc_region = isset($ip_data->regionName) ? $ip_data->regionName : '';
848
 
849
+ if($ahc_city == '' || $ahc_city == 'null' || $ahc_city == null || empty($ahc_city))
850
  {
851
  $ip_data = ahcfree_advanced_get_link("https://geoip-db.com/json/".$vtr_ip_address);
852
+
853
+ $ahc_city = isset($ip_data->city) ? $ip_data->city : '';
854
+ $ahc_region = isset($ip_data->state) ? $ip_data->state : '';
855
+
856
+ if($ahc_city == '' || $ahc_city == 'null' || $ahc_city == null || empty($ahc_city))
857
+ {
 
 
 
 
858
 
859
  $ip_data = (ahcfree_advanced_get_link("http://www.geoplugin.net/json.gp?ip=".$vtr_ip_address));
 
860
 
861
+ $ahc_city = isset($ip_data->geoplugin_city) ? $ip_data->geoplugin_city : '';
862
+ $ahc_region = isset($ip_data->geoplugin_region) ? $ip_data->geoplugin_region : '';
863
 
864
 
865
  }
ahc_about.php CHANGED
@@ -11,9 +11,7 @@ function imgFlagError(image){
11
  }
12
  </script>
13
 
14
- <?php
15
- ahcfree_include_scripts();
16
- ?>
17
 
18
  <div class="ahc_main_container">
19
 
11
  }
12
  </script>
13
 
14
+
 
 
15
 
16
  <div class="ahc_main_container">
17
 
ahc_help.php CHANGED
@@ -11,12 +11,7 @@ function imgFlagError(image){
11
  }
12
  </script>
13
 
14
- <?php
15
- ahcfree_include_scripts();
16
 
17
-
18
-
19
- ?>
20
 
21
  <div class="ahc_main_container">
22
  <div style="width:97%; margin-top:10px; margin-left:16px;" >
11
  }
12
  </script>
13
 
 
 
14
 
 
 
 
15
 
16
  <div class="ahc_main_container">
17
  <div style="width:97%; margin-top:10px; margin-left:16px;" >
ahc_settings.php CHANGED
@@ -27,9 +27,49 @@ if(!current_user_can('manage_options'))
27
  i{
28
  color:#999
29
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  </style>
31
  <?php
32
- ahcfree_include_scripts();
33
  $msg = '';
34
  if (!empty($_POST['save'])) {
35
  if (ahcfree_savesettings()) {
@@ -42,6 +82,9 @@ $ajax_check = ($ahcfree_get_save_settings[0]->set_ajax_check * 1000);
42
  $set_ips = $ahcfree_get_save_settings[0]->set_ips;
43
 
44
  $delete_plugin_data = get_option('ahcfree_delete_plugin_data_on_uninstall');
 
 
 
45
  $ahcfree_save_ips = get_option('ahcfree_save_ips_opn');
46
  $ahcproUserRoles = get_option('ahcproUserRoles');
47
  $ahcproRobots = get_option('ahcproRobots');
@@ -49,7 +92,7 @@ $ahcproRobots = get_option('ahcproRobots');
49
  <div class="ahc_main_container" >
50
  <h1><img width="40px" 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 />
51
  <div class="panel">
52
- <h2 class="box-heading">Settings</h2>
53
  <div class="panelcontent">
54
  <form method="post" enctype="multipart/form-data" name="myform">
55
 
@@ -153,10 +196,32 @@ new SlimSelect({
153
  </div></div>
154
 
155
 
156
- <div class="row">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <div class="form-group col-md-6">
158
  <label for="exampleInput">Stats Data</label>
159
- <p> <label style="color:red"><input type="checkbox" value="1" name="delete_plugin_data" <?php echo ($delete_plugin_data == 1) ? 'checked=checked' : ''; ?> > If checked, all the stats will be deleted on deleting plugin. </label></p>
160
  <br />
161
  </div>
162
 
27
  i{
28
  color:#999
29
  }
30
+
31
+ .panel{
32
+ width:90% !important;
33
+ margin-bottom: 10px;
34
+ border: 1px solid transparent;
35
+ padding:20px;
36
+
37
+
38
+ }
39
+ a, div {
40
+ outline: 0;
41
+ }
42
+
43
+ body{
44
+ background-color:#F1F1F1
45
+ }
46
+
47
+
48
+ input[type=checkbox]{
49
+ border: 1px solid #7e8993;
50
+ border-radius: 4px;
51
+ background: #fff;
52
+ color: #555;
53
+ clear: none;
54
+ cursor: pointer;
55
+ display: inline-block;
56
+ line-height: 0;
57
+ height: auto !important;
58
+ margin: -.25rem .25rem 0 0;
59
+ outline: 0;
60
+ padding: 0!important;
61
+ text-align: center;
62
+ vertical-align: middle;
63
+ width: auto !important;
64
+ min-width: auto !important;
65
+ -webkit-appearance: auto !important;
66
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
67
+ transition: .05s border-color ease-in-out;
68
+ }
69
+
70
  </style>
71
  <?php
72
+ //ahcfree_include_scripts();
73
  $msg = '';
74
  if (!empty($_POST['save'])) {
75
  if (ahcfree_savesettings()) {
82
  $set_ips = $ahcfree_get_save_settings[0]->set_ips;
83
 
84
  $delete_plugin_data = get_option('ahcfree_delete_plugin_data_on_uninstall');
85
+ $ahcfree_hide_top_bar_icon = get_option('ahcfree_hide_top_bar_icon');
86
+
87
+ $ahcfree_ahcfree_haships = get_option('ahcfree_ahcfree_haships');
88
  $ahcfree_save_ips = get_option('ahcfree_save_ips_opn');
89
  $ahcproUserRoles = get_option('ahcproUserRoles');
90
  $ahcproRobots = get_option('ahcproRobots');
92
  <div class="ahc_main_container" >
93
  <h1><img width="40px" 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 />
94
  <div class="panel">
95
+ <h2 class="box-heading">Settings</h2><hr>
96
  <div class="panelcontent">
97
  <form method="post" enctype="multipart/form-data" name="myform">
98
 
196
  </div></div>
197
 
198
 
199
+
200
+ <div class="row">
201
+ <div class="form-group col-md-6">
202
+ <label for="exampleInput">Hide Top Bar Icon</label>
203
+ <p> <label><input type="checkbox" value="1" name="ahcfree_hide_top_bar_icon" <?php echo ($ahcfree_hide_top_bar_icon == 1) ? 'checked=checked' : ''; ?> > If checked, We will hide the top bar icon. </label></p>
204
+ <br />
205
+ </div>
206
+
207
+
208
+ </div>
209
+
210
+ <div class="row">
211
+ <div class="form-group col-md-6">
212
+ <label for="exampleInput">Hash IPs</label>
213
+ <p> <label><input type="checkbox" value="1" name="ahcfree_ahcfree_haships" <?php echo ($ahcfree_ahcfree_haships == 1) ? 'checked=checked' : ''; ?> > If checked, We will hide the last 3 digits in all IP's. </label></p>
214
+ <br />
215
+ </div>
216
+
217
+
218
+ </div>
219
+
220
+
221
+ <div class="row">
222
  <div class="form-group col-md-6">
223
  <label for="exampleInput">Stats Data</label>
224
+ <p> <label style="color:red"><input type="checkbox" value="1" name="delete_plugin_data" <?php echo ($delete_plugin_data == 1) ? 'checked=checked' : ''; ?> > If checked, all the stats data will be deleted on deleting plugin. </label></p>
225
  <br />
226
  </div>
227
 
css/vtrtspro_css_stylesheet.css CHANGED
@@ -1,5 +1,3 @@
1
- body { background:#F1F1F1 !important}
2
-
3
 
4
  #ahcfree_currenttime{
5
  color:gray;
@@ -143,6 +141,7 @@ float:left;
143
  .panelcontent{
144
  padding: 10px !important;
145
  background: #FFF;
 
146
  }
147
  .panelcontent table {
148
  width: 100% !important;
@@ -386,8 +385,9 @@ span.search_data {
386
  display: block;
387
  }
388
  .ahc_main_container .row {
389
- display: flex;
390
- align-items: stretch;
 
391
  }
392
 
393
  .ahc_main_container .row > div {
 
 
1
 
2
  #ahcfree_currenttime{
3
  color:gray;
141
  .panelcontent{
142
  padding: 10px !important;
143
  background: #FFF;
144
+ overflow:hidden
145
  }
146
  .panelcontent table {
147
  width: 100% !important;
385
  display: block;
386
  }
387
  .ahc_main_container .row {
388
+ display: revert;
389
+ align-items: stretch;
390
+ clear: both;
391
  }
392
 
393
  .ahc_main_container .row > div {
deactivation.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -1,4 +1,38 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  /**
4
  * Called when plugin is activated or upgraded
@@ -111,6 +145,8 @@ function ahcfree_savesettings() {
111
  $posts_type = '';
112
  $set_ips = esc_html($_POST['set_ips']);
113
  $set_google_map = '';
 
 
114
  $delete_plugin_data = isset($_POST['delete_plugin_data']) ? intval($_POST['delete_plugin_data']) : '';
115
 
116
  $custom_timezone_offset = sanitize_text_field($_POST['set_custom_timezone']);
@@ -119,9 +155,10 @@ function ahcfree_savesettings() {
119
  }
120
 
121
  $delete_plugin_data = (isset($delete_plugin_data)) ? intval($delete_plugin_data) : 0;
 
122
  update_option('ahcfree_delete_plugin_data_on_uninstall', $delete_plugin_data);
123
-
124
-
125
 
126
  $ahcproUserRoles = isset($_POST['ahcproUserRoles']) ? $_POST['ahcproUserRoles'] : '';
127
  if(isset($ahcproUserRoles))
@@ -131,15 +168,13 @@ function ahcfree_savesettings() {
131
  $ahcproUserRoles .= sanitize_text_field($v).",";
132
  }
133
 
134
-
135
-
136
  $ahcproUserRoles = substr($ahcproUserRoles,0,-1);
137
-
138
  update_option('ahcproUserRoles',$ahcproUserRoles);
139
  }
140
 
141
 
142
- $sql = $wpdb->prepare("UPDATE `ahc_settings` set `set_hits_days` = %s, `set_ajax_check` = %s, `set_ips` = %s, `set_google_map` = %s ", $set_hits_days, $set_ajax_check, $set_ips, $set_google_map);
 
143
 
144
  if ($wpdb->query($sql) !== false) {
145
 
@@ -196,20 +231,26 @@ function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
196
 
197
  background-color:' . $box_color . ';
198
  color:#ffffff;
199
-
200
-
201
 
202
  }
203
  .rating {
204
  unicode-bidi: bidi-override;
205
  direction: rtl;
206
-
207
-
208
  }
209
  .link_wp{
210
 
211
  color:#EDAE42 !important
212
  }
 
 
 
 
 
 
 
 
213
  .rating > span {
214
  display: inline-block;
215
  position: relative;
@@ -218,12 +259,6 @@ function ahcfree_rate_us($plugin_url, $box_color = '#1D1F21') {
218
  color:yellow;
219
  content: "\2605";
220
  }
221
- .rating > span:hover:before,
222
- .rating > span:hover ~ span:before {
223
- content: "\2605";
224
- position: absolute;
225
- color:yellow;
226
- }
227
  </style>';
228
 
229
  $ret .= '<div class="row rate_box" id="ratingdiv">
@@ -458,21 +493,23 @@ function ahcfree_unset_default_options() {
458
  function ahcfree_create_admin_menu_link() {
459
 
460
  global $current_user;
461
- $ahcproUserRole = explode(',',get_option('ahcproUserRoles'));
 
 
462
 
463
  $roles_arr = array();
464
 
465
- foreach($ahcproUserRole as $v) {
466
- $roles_arr[] = $v;
 
467
  }
468
 
469
  $current_use_roles_ = $current_user->roles;
470
- if (! in_array( $current_use_roles_, $roles_arr )) {
 
 
 
471
 
472
- if(!(current_user_can('manage_options')))
473
- {
474
- return;
475
- }
476
  }
477
 
478
 
@@ -1837,6 +1874,22 @@ function ahcfree_get_vsitors_by_country($all,$cnt=true,$start='',$limit='',$fdt=
1837
  }
1838
  }
1839
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1840
  //--------------------------------------------
1841
  /**
1842
  * Retrieves recent visitors
@@ -1929,7 +1982,7 @@ function ahcfree_get_recent_visitors($all,$cnt=true,$start='',$limit='',$fdt='',
1929
  $arr[$c]['hit_id'] = $hit->vtr_id;
1930
  $hit_referer = (parse_url($hit->vtr_referer, PHP_URL_HOST) == $_SERVER['SERVER_NAME']) ? '' : rawurldecode($hit->vtr_referer);
1931
  $hitip = (!empty($hit->hit_referer) ? '<a href="'.$hit_referer.'" target="_blank"><img src="'.plugins_url('/images/openW.jpg', AHCFREE_PLUGIN_MAIN_FILE).'" title="'.ahc_view_referer.'"></a>' : '');
1932
- $arr[$c]['hit_ip_address'] = $hit->vtr_ip_address ."&nbsp;". $hitip;
1933
  $img="";
1934
  if ( $hit->ctr_internet_code != '')
1935
  {
@@ -1937,13 +1990,13 @@ function ahcfree_get_recent_visitors($all,$cnt=true,$start='',$limit='',$fdt='',
1937
  $img = "<img src='".$imgurl."' border='0' width='22' height='18' title='".$hit->ctr_name."' onerror='imgFlagError(this)' />&nbsp;";
1938
  }
1939
 
1940
- $bimgurl = plugins_url('/images/browsers/' . $hit->bsr_icon, AHCFREE_PLUGIN_MAIN_FILE);
1941
  // $bimg = '<img src="'.$bimgurl.'" border="0" width="20" height="20" title="'.$hit->bsr_name.'" />&nbsp;';
1942
  $arr[$c]['hit_date'] = $hit->vtr_date;
1943
  $arr[$c]['hit_time'] = $hit->vtr_time;
1944
 
1945
  $arr[$c]['ctr_internet_code'] = $hit->ctr_internet_code;
1946
- $arr[$c]['bsr_name'] = $bimg.$hit->bsr_name;
1947
  $arr[$c]['bsr_icon'] = $hit->bsr_icon;
1948
 
1949
  if (strpos($hit->ahc_region, '}')) {
@@ -1958,7 +2011,10 @@ function ahcfree_get_recent_visitors($all,$cnt=true,$start='',$limit='',$fdt='',
1958
  $arr[$c]['ahc_city'] = $hit->ahc_city;
1959
  }
1960
 
1961
- $arr[$c]['ctr_name'] = $img.$hit->ctr_name.", ".$hit->ahc_city.", ".$hit->ahc_region;
 
 
 
1962
 
1963
  $arr[$c]['time'] = $visitDate->format('d M Y @ h:i a');
1964
 
@@ -2108,9 +2164,18 @@ function ahcfree_get_latest_search_key_words_used($all,$cnt=true,$start='',$limi
2108
  * @return boolean
2109
  */
2110
  function ahcfree_is_login_page() {
2111
- global $GlobalsAHC;
 
2112
 
2113
- return in_array($GlobalsAHC['pagenow'], array('wp-login.php', 'wp-register.php'));
 
 
 
 
 
 
 
 
2114
  }
2115
 
2116
  //--------------------------------------------
@@ -2680,65 +2745,9 @@ WHERE $cond GROUP BY $groupby";
2680
  }
2681
 
2682
  function ahcfree_advanced_get_link($url, $followRedirects = true) {
2683
- $url_parsed = @parse_url($url);
2684
- $header = '';
2685
- $body = '';
2686
- $port = '';
2687
-
2688
- if (empty($url_parsed['scheme'])) {
2689
- $url_parsed = @parse_url($url);
2690
- }
2691
- $rtn['url'] = $url_parsed;
2692
-
2693
- $port = $url_parsed["port"];
2694
- if (!$port) {
2695
- $port = 80;
2696
- }
2697
- $rtn['url']['port'] = $port;
2698
-
2699
- $path = $url_parsed["path"];
2700
- if (empty($path)) {
2701
- $path = "/";
2702
- }
2703
- if (!empty($url_parsed["query"])) {
2704
- $path .= "?" . $url_parsed["query"];
2705
- }
2706
- $rtn['url']['path'] = $path;
2707
-
2708
- $host = $url_parsed["host"];
2709
- $foundBody = false;
2710
-
2711
- $out = "GET $path HTTP/1.0\r\n";
2712
- $out .= "Host: $host\r\n";
2713
- $out .= "Connection: Close\r\n\r\n";
2714
-
2715
- if (!$fp = @fsockopen($host, $port, $errno, $errstr, 30)) {
2716
- $rtn['errornumber'] = $errno;
2717
- $rtn['errorstring'] = $errstr;
2718
- return $rtn;
2719
- }
2720
- fwrite($fp, $out);
2721
- while (!feof($fp)) {
2722
- $s = fgets($fp, 128);
2723
- if ($s == "\r\n") {
2724
- $foundBody = true;
2725
- continue;
2726
- }
2727
- if ($foundBody) {
2728
- $body .= $s;
2729
- } else {
2730
- if (($followRedirects) && (stristr($s, "location:") != false)) {
2731
- $redirect = preg_replace("/location:/i", "", $s);
2732
- return ffl_HttpGet(trim($redirect));
2733
- }
2734
- $header .= $s;
2735
- }
2736
- }
2737
- fclose($fp);
2738
-
2739
- $rtn['header'] = trim($header);
2740
- $rtn['body'] = trim($body);
2741
- return $rtn;
2742
  }
2743
 
2744
  //--------------------------------------------
@@ -2785,7 +2794,7 @@ function ahcfree_get_client_ip_address() {
2785
  * @return void
2786
  */
2787
  function ahcfree_include_scripts() {
2788
- wp_register_style('ahc_lang_css', plugins_url('/css/vtrtspro_css_stylesheet.css', AHCFREE_PLUGIN_MAIN_FILE), '', '1.21');
2789
  wp_enqueue_style('ahc_lang_css');
2790
 
2791
  wp_register_style('ahc_bootstrap_css', plugins_url('/lib/bootstrap/css/bootstrap.min.css',AHCFREE_PLUGIN_MAIN_FILE), '', '1.21');
1
  <?php
2
+ function vtrts_free_top_bar_enqueue_style() {
3
+
4
+ echo '<style>
5
+ #wpadminbar #wp-admin-bar-vtrts_free_top_button .ab-icon:before {
6
+ content: "\f185";
7
+ color: #1DAE22;
8
+ top: 3px;
9
+ }
10
+ </style>';
11
+
12
+ }
13
+
14
+
15
+ function vtrts_free_add_items($admin_bar)
16
+ {
17
+ if ( ! current_user_can( 'manage_options' ) ) {
18
+ return;
19
+ }
20
+ global $pluginsurl;
21
+ //The properties of the new item. Read More about the missing 'parent' parameter below
22
+ $args = array(
23
+ 'id' => 'vtrts_free_top_button',
24
+ 'parent' => null,
25
+ 'group' => null,
26
+ 'title' => '<span class="ab-icon"></span>'.'' . __('Stats', 'visitors-traffic-real-time-statistics'),
27
+ 'href' => admin_url('admin.php?page=ahc_hits_counter_menu_free'),
28
+ 'meta' => array('title' => __('visitor traffic real-time statistics', 'visitors-traffic-real-time-statistics'),//This title will show on hover
29
+ 'class' => '')
30
+ );
31
+
32
+ //This is where the magic works.
33
+ $admin_bar->add_menu( $args);
34
+ }
35
+
36
 
37
  /**
38
  * Called when plugin is activated or upgraded
145
  $posts_type = '';
146
  $set_ips = esc_html($_POST['set_ips']);
147
  $set_google_map = '';
148
+ $ahcfree_hide_top_bar_icon = isset($_POST['ahcfree_hide_top_bar_icon']) ? intval($_POST['ahcfree_hide_top_bar_icon']) : '0';
149
+ $ahcfree_ahcfree_haships = isset($_POST['ahcfree_ahcfree_haships']) ? intval($_POST['ahcfree_ahcfree_haships']) : '0';
150
  $delete_plugin_data = isset($_POST['delete_plugin_data']) ? intval($_POST['delete_plugin_data']) : '';
151
 
152
  $custom_timezone_offset = sanitize_text_field($_POST['set_custom_timezone']);
155
  }
156
 
157
  $delete_plugin_data = (isset($delete_plugin_data)) ? intval($delete_plugin_data) : 0;
158
+ update_option('ahcfree_ahcfree_haships', $ahcfree_ahcfree_haships);
159
  update_option('ahcfree_delete_plugin_data_on_uninstall', $delete_plugin_data);
160
+ update_option('ahcfree_hide_top_bar_icon', $ahcfree_hide_top_bar_icon);
161
+
162
 
163
  $ahcproUserRoles = isset($_POST['ahcproUserRoles']) ? $_POST['ahcproUserRoles'] : '';
164
  if(isset($ahcproUserRoles))
168
  $ahcproUserRoles .= sanitize_text_field($v).",";
169
  }
170
 
 
 
171
  $ahcproUserRoles = substr($ahcproUserRoles,0,-1);
 
172
  update_option('ahcproUserRoles',$ahcproUserRoles);
173
  }
174
 
175
 
176
+ $sql = $wpdb->prepare("UPDATE `ahc_settings` set `set_hits_days` = %s, `set_ajax_check` = %s, `set_ips` = %s, `set_google_map` = %s ",
177
+ $set_hits_days, $set_ajax_check, $set_ips, $set_google_map);
178
 
179
  if ($wpdb->query($sql) !== false) {
180
 
231
 
232
  background-color:' . $box_color . ';
233
  color:#ffffff;
234
+
 
235
 
236
  }
237
  .rating {
238
  unicode-bidi: bidi-override;
239
  direction: rtl;
240
+
 
241
  }
242
  .link_wp{
243
 
244
  color:#EDAE42 !important
245
  }
246
+
247
+ .rating > span:hover:before,
248
+ .rating > span:hover ~ span:before {
249
+ content: "\2605";
250
+ position: absolute;
251
+ color:yellow;
252
+ }
253
+
254
  .rating > span {
255
  display: inline-block;
256
  position: relative;
259
  color:yellow;
260
  content: "\2605";
261
  }
 
 
 
 
 
 
262
  </style>';
263
 
264
  $ret .= '<div class="row rate_box" id="ratingdiv">
493
  function ahcfree_create_admin_menu_link() {
494
 
495
  global $current_user;
496
+ $ahcUserRoles = str_ireplace('Array','',get_option('ahcproUserRoles'));
497
+
498
+ $ahcproUserRole = explode(',',$ahcUserRoles);
499
 
500
  $roles_arr = array();
501
 
502
+ foreach($ahcproUserRole as $k=>$v) {
503
+
504
+ $roles_arr[] = strtolower($v);
505
  }
506
 
507
  $current_use_roles_ = $current_user->roles;
508
+ $current_use_roles_ = strtolower($current_use_roles_[0]);
509
+
510
+ if (!in_array( $current_use_roles_, $roles_arr ) && !current_user_can('manage_options')) {
511
+ return;
512
 
 
 
 
 
513
  }
514
 
515
 
1874
  }
1875
  }
1876
 
1877
+ //--------------------------------------------
1878
+ /**
1879
+ * RHash IP
1880
+ *
1881
+ */
1882
+
1883
+ function ahcfree_haship($ip)
1884
+ {
1885
+ if($ip !='')
1886
+ {
1887
+ $ip = explode('.',$ip);
1888
+ return $ip[0].".".$ip[1].".".$ip[2].".***";
1889
+ }else{
1890
+ return '';
1891
+ }
1892
+ }
1893
  //--------------------------------------------
1894
  /**
1895
  * Retrieves recent visitors
1982
  $arr[$c]['hit_id'] = $hit->vtr_id;
1983
  $hit_referer = (parse_url($hit->vtr_referer, PHP_URL_HOST) == $_SERVER['SERVER_NAME']) ? '' : rawurldecode($hit->vtr_referer);
1984
  $hitip = (!empty($hit->hit_referer) ? '<a href="'.$hit_referer.'" target="_blank"><img src="'.plugins_url('/images/openW.jpg', AHCFREE_PLUGIN_MAIN_FILE).'" title="'.ahc_view_referer.'"></a>' : '');
1985
+ $arr[$c]['hit_ip_address'] = (get_option('ahcfree_ahcfree_haships') != '1') ? $hit->vtr_ip_address ."&nbsp;". $hitip : ahcfree_haship($hit->vtr_ip_address) ."&nbsp;". $hitip;
1986
  $img="";
1987
  if ( $hit->ctr_internet_code != '')
1988
  {
1990
  $img = "<img src='".$imgurl."' border='0' width='22' height='18' title='".$hit->ctr_name."' onerror='imgFlagError(this)' />&nbsp;";
1991
  }
1992
 
1993
+ // $bimgurl = plugins_url('/images/browsers/' . $hit->bsr_icon, AHCFREE_PLUGIN_MAIN_FILE);
1994
  // $bimg = '<img src="'.$bimgurl.'" border="0" width="20" height="20" title="'.$hit->bsr_name.'" />&nbsp;';
1995
  $arr[$c]['hit_date'] = $hit->vtr_date;
1996
  $arr[$c]['hit_time'] = $hit->vtr_time;
1997
 
1998
  $arr[$c]['ctr_internet_code'] = $hit->ctr_internet_code;
1999
+ $arr[$c]['bsr_name'] = $hit->bsr_name;
2000
  $arr[$c]['bsr_icon'] = $hit->bsr_icon;
2001
 
2002
  if (strpos($hit->ahc_region, '}')) {
2011
  $arr[$c]['ahc_city'] = $hit->ahc_city;
2012
  }
2013
 
2014
+ $arr[$c]['ctr_name'] = $img.$hit->ctr_name;
2015
+ $arr[$c]['ctr_name'] .= (!empty($hit->ahc_city)) ? ', '.$hit->ahc_city : '';
2016
+ $arr[$c]['ctr_name'] .= (!empty($hit->ahc_region)) ? ', '.$hit->ahc_region : '';
2017
+
2018
 
2019
  $arr[$c]['time'] = $visitDate->format('d M Y @ h:i a');
2020
 
2164
  * @return boolean
2165
  */
2166
  function ahcfree_is_login_page() {
2167
+ global $GLOBALS;
2168
+ // global $GlobalsAHC;
2169
 
2170
+ // return in_array($GlobalsAHC['pagenow'], array('wp-login.php', 'wp-register.php'));
2171
+
2172
+ if($GLOBALS['pagenow'] === 'wp-login.php' || $GLOBALS['pagenow'] === 'wp-register.php')
2173
+ {
2174
+ return true;
2175
+ }else{
2176
+ return false;
2177
+ }
2178
+
2179
  }
2180
 
2181
  //--------------------------------------------
2745
  }
2746
 
2747
  function ahcfree_advanced_get_link($url, $followRedirects = true) {
2748
+ $ahc_data = wp_remote_get($url);
2749
+ return json_decode(wp_remote_retrieve_body( $ahc_data ));
2750
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2751
  }
2752
 
2753
  //--------------------------------------------
2794
  * @return void
2795
  */
2796
  function ahcfree_include_scripts() {
2797
+ wp_register_style('ahc_lang_css', plugins_url('/css/vtrtspro_css_stylesheet.css', AHCFREE_PLUGIN_MAIN_FILE), '', '1.22');
2798
  wp_enqueue_style('ahc_lang_css');
2799
 
2800
  wp_register_style('ahc_bootstrap_css', plugins_url('/lib/bootstrap/css/bootstrap.min.css',AHCFREE_PLUGIN_MAIN_FILE), '', '1.21');
js/front.js CHANGED
@@ -15,43 +15,3 @@ var xhttp = new XMLHttpRequest();
15
  xhttp.open("POST", ahc_ajax_front.ajax_url, true);
16
  xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
17
  xhttp.send("action=ahcfree_track_visitor&page_id="+ page_id +"&page_title="+ page_title + "&post_type="+ post_type + "&referer="+ referer +"&useragent="+ useragent +"&servername="+ servername +"&hostname="+ hostname +"&request_uri="+request_uri);
18
- /*
19
-
20
- jQuery(document).ready(function ()
21
- {
22
- var pageid = ahc_ajax_front.page_id;
23
- var page_id = (pageid.length > 0) ? pageid : '';
24
- var pagetitle = ahc_ajax_front.page_title;
25
- var page_title = (pagetitle.length > 0) ? pagetitle : '';
26
- var posttype = ahc_ajax_front.post_type;
27
- var post_type = (posttype.length > 0) ? posttype : '';
28
- var referer = document.referrer;
29
- var useragent = window.navigator.userAgent;
30
- var servername = location.hostname;
31
- var hostname = location.host;
32
- var request_uri = location.pathname.substring(1);
33
-
34
- jQuery.ajax({
35
- type: 'POST',
36
- url : ahc_ajax_front.ajax_url,
37
- data: {
38
- 'action': 'ahcfree_track_visitor',
39
- 'page_id': page_id,
40
- 'page_title': page_title,
41
- 'post_type': post_type,
42
- 'referer': referer,
43
- 'useragent':useragent,
44
- 'servername':servername,
45
- 'hostname':hostname,
46
- 'request_uri':request_uri
47
- },
48
- success: function(data){
49
- console.log(data);
50
- },
51
- error: function(data)
52
- {
53
- console.log(data);
54
- }
55
- });
56
- });
57
- */
15
  xhttp.open("POST", ahc_ajax_front.ajax_url, true);
16
  xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
17
  xhttp.send("action=ahcfree_track_visitor&page_id="+ page_id +"&page_title="+ page_title + "&post_type="+ post_type + "&referer="+ referer +"&useragent="+ useragent +"&servername="+ servername +"&hostname="+ hostname +"&request_uri="+request_uri);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
notifications.php CHANGED
@@ -4,28 +4,34 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
 
7
- $icon_path = plugins_url( '/images/icon-128x128.png' , __FILE__);
8
- $rating_url = "https://wordpress.org/support/plugin/visitors-traffic-real-time-statistics/reviews/?filter=5&rate=5#new-post";
9
- $activation_time = 604800; // 7 days in seconds
10
- $file_version = 2.4;
11
- $development_mode = false; // Put yes to allow development mode, you will see the rating notice without timers
12
 
13
- /**
14
- * @since 1.9
15
- * @version 1.9
16
- * @class vtrts_free_Notification
17
- */
18
-
19
- if ( ! class_exists( 'vtrts_free_Notification' ) ) :
20
-
21
- class vtrts_free_Notification {
22
 
 
 
 
23
  /* * * * * * * * * *
24
  * Class constructor
25
  * * * * * * * * * */
26
  public function __construct() {
27
-
28
- $this->_hooks();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
30
 
31
  /**
@@ -34,7 +40,7 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
34
  * @version 1.2.1
35
  */
36
  private function _hooks() {
37
- add_action( 'admin_init', array( $this, 'vtrts_free_review_notice' ) );
38
  }
39
 
40
  /**
@@ -44,32 +50,31 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
44
  * @return boolean false
45
  * @version 1.1.3
46
  */
47
- public function vtrts_free_review_notice() {
48
-
49
- global $file_version, $activation_time, $development_mode;
50
 
51
- $this->vtrts_free_review_dismissal();
52
 
53
- $this->vtrts_free_review_pending();
54
 
55
- $activation_time = get_site_option( 'vtrts_free_active_time' );
56
 
57
- $review_dismissal = get_site_option( 'vtrts_free_review_dismiss' );
58
 
59
- if ($review_dismissal == 'yes' && !$development_mode) return;
60
 
61
- if ( !$activation_time && !$development_mode ) :
62
 
63
  $activation_time = time(); // Reset Time to current time.
64
- add_site_option( 'vtrts_free_active_time', $activation_time );
65
 
66
  endif;
67
- if ($development_mode) $activation_time = 432001; //This variable used to show the message always for testing purposes only
68
- // 432000 = 5 Days in seconds.
69
- if ( time() - $activation_time > 432000 ) :
70
-
71
- wp_enqueue_style( 'vtrts_free_review_stlye', plugins_url( '/css/css-review.css', __FILE__ ), array(), $file_version );
72
- add_action( 'admin_notices' , array( $this, 'vtrts_free_review_notice_message' ) );
73
 
74
  endif;
75
  }
@@ -79,18 +84,17 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
79
  *
80
  * @since 1.9
81
  */
82
- private function vtrts_free_review_dismissal() {
83
-
84
  if ( ! is_admin() ||
85
  ! current_user_can( 'manage_options' ) ||
86
  ! isset( $_GET['_wpnonce'] ) ||
87
- ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'vtrts_free_review-nonce' ) ||
88
- ! isset( $_GET['vtrts_free_review_dismiss'] ) ) :
89
 
90
  return;
91
  endif;
92
 
93
- add_site_option( 'vtrts_free_review_dismiss', 'yes' );
94
  }
95
 
96
  /**
@@ -98,19 +102,18 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
98
  *
99
  * @since 1.9
100
  */
101
- private function vtrts_free_review_pending() {
102
-
103
  if ( ! is_admin() ||
104
  ! current_user_can( 'manage_options' ) ||
105
  ! isset( $_GET['_wpnonce'] ) ||
106
- ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'vtrts_free_review-nonce' ) ||
107
- ! isset( $_GET['vtrts_free_review_later'] ) ) :
108
 
109
  return;
110
  endif;
111
 
112
  // Reset Time to current time.
113
- update_site_option( 'vtrts_free_active_time', time() );
114
  }
115
 
116
  /**
@@ -118,32 +121,28 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
118
  *
119
  * @since 1.0.11
120
  */
121
- public function vtrts_free_review_notice_message() {
122
-
123
- $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?';
124
- $url = $_SERVER['REQUEST_URI'] . $scheme . 'vtrts_free_review_dismiss=yes';
125
- $dismiss_url = wp_nonce_url( $url, 'vtrts_free_review-nonce' );
126
-
127
- $_later_link = $_SERVER['REQUEST_URI'] . $scheme . 'vtrts_free_review_later=yes';
128
- $later_url = wp_nonce_url( $_later_link, 'vtrts_free_review-nonce' );
129
-
130
- global $icon_path;
131
 
132
- global $rating_url;
 
 
 
 
 
133
  ?>
134
 
135
- <div class="vtrts_free_review-notice">
136
- <div class="vtrts_free_review-thumbnail">
137
- <img src="<?php echo $icon_path; ?>" alt="">
138
  </div>
139
- <div class="vtrts_free_review-text">
140
- <h3><?php _e( 'Leave A Review?', 'visitors-traffic-real-time-statistics' ) ?></h3>
141
- <p><?php _e( 'We hope you\'ve enjoyed using visitor traffic real time statistics :) Would you mind taking a few minutes to write a review on WordPress.org?<br>Just writing simple "thank you" will make us happy!', 'visitors-traffic-real-time-statistics' ) ?></p>
142
- <ul class="vtrts_free_review-ul">
143
- <li><a href="<?php echo $rating_url; ?>" target="_blank"><span class="dashicons dashicons-external"></span><?php _e( 'Sure! I\'d love to!', 'visitors-traffic-real-time-statistics' ) ?></a></li>
144
- <li><a href="<?php echo $dismiss_url ?>"><span class="dashicons dashicons-smiley"></span><?php _e( 'I\'ve already left a review', 'visitors-traffic-real-time-statistics' ) ?></a></li>
145
- <li><a href="<?php echo $later_url ?>"><span class="dashicons dashicons-calendar-alt"></span><?php _e( 'Will Rate Later', 'visitors-traffic-real-time-statistics' ) ?></a></li>
146
- <li><a href="<?php echo $dismiss_url ?>"><span class="dashicons dashicons-dismiss"></span><?php _e( 'Hide Forever', 'visitors-traffic-real-time-statistics' ) ?></a></li></ul>
147
  </div>
148
  </div>
149
  <?php
@@ -151,9 +150,7 @@ if ( ! class_exists( 'vtrts_free_Notification' ) ) :
151
  }
152
 
153
  endif;
154
- $admincore = '';
155
- if (isset($_GET['page'])) $admincore = sanitize_text_field($_GET['page']);
156
- if($admincore != 'wccpoptionspro') {
157
- new vtrts_free_Notification();
158
- }
159
  ?>
4
  exit;
5
  }
6
 
7
+ //////////CLASS NAME MUST BE UNIQUE RELATED TO PLUGIN NAME//////////
8
+ if ( ! class_exists( 'wp_visitors_traffic_statistics' ) ) :
 
 
 
9
 
10
+ class wp_visitors_traffic_statistics {//////////USE YOUR OWN CLASS NAME//////////
 
 
 
 
 
 
 
 
11
 
12
+ public $notify_array_data = array();
13
+ public $development_mode = false;// Put yes to allow development mode, you will see the rating notice without timers
14
+ public $file_version = 3.3;//
15
  /* * * * * * * * * *
16
  * Class constructor
17
  * * * * * * * * * */
18
  public function __construct() {
19
+ ///////////////////THIS MUST BE CHANGED FOR EACH PLUGIN BEGIN////////////////
20
+ $this->notify_array_data["plugin_real_slug"] = "visitors-traffic-real-time-statistics";
21
+ $this->notify_array_data["variable_slug"] = "wp_visitors_traffic_statistics_";// Use your own prefix
22
+ $this->notify_array_data["message_header"] = __( 'Leave A Review?', $this->notify_array_data["plugin_real_slug"]);// Use your own prefix
23
+ $this->notify_array_data["message_body"] = __( 'We hope you\'ve enjoyed using visitor traffic real time statistics plugin :), Would you mind taking a few minutes to write a review on WordPress.org?<br>Just writing simple "thank you" will make us happy!', $this->notify_array_data["plugin_real_slug"]);// Use your own prefix
24
+ ///////////////////THIS MUST BE CHANGED FOR EACH PLUGIN END////////////////
25
+
26
+ $this->notify_array_data["icon_path"] = plugins_url( '/notifications/icon-128x128.png' , __FILE__);
27
+ $this->notify_array_data["rating_url"] = "https://wordpress.org/support/plugin/".$this->notify_array_data["plugin_real_slug"]."/reviews/#new-post";
28
+ $this->notify_array_data["activation_period"] = 604800; // 7 DAYS IN SECONDS
29
+ if ($this->development_mode)
30
+ {
31
+ delete_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_active_time' );
32
+ delete_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_review_dismiss' );
33
+ }
34
+ $this->_hooks();
35
  }
36
 
37
  /**
40
  * @version 1.2.1
41
  */
42
  private function _hooks() {
43
+ add_action( 'admin_init', array( $this, "notification_bar_review_notice3" ) );
44
  }
45
 
46
  /**
50
  * @return boolean false
51
  * @version 1.1.3
52
  */
53
+
54
+ public function notification_bar_review_notice3() {
 
55
 
56
+ $this->notification_bar_review_dismissal();
57
 
58
+ $this->notification_bar_review_pending();
59
 
60
+ $activation_time = get_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_active_time' );
61
 
62
+ $review_dismissal = get_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_review_dismiss' );
63
 
64
+ if ($review_dismissal == 'yes' && !$this->development_mode) return;
65
 
66
+ if ( !$activation_time && !$this->development_mode ) :
67
 
68
  $activation_time = time(); // Reset Time to current time.
69
+ add_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_active_time', $activation_time );
70
 
71
  endif;
72
+ if ($this->development_mode) $this->notify_array_data["activation_period"] = 0; //This variable used to show the message always for testing purposes only
73
+
74
+ if ( time() - $activation_time > $this->notify_array_data["activation_period"] ) :
75
+
76
+ wp_enqueue_style( $this->notify_array_data["variable_slug"] . 'notification_bar_review_stlye', plugins_url( '/notifications/style-review.css', __FILE__ ), array(), $this->file_version );
77
+ add_action( 'admin_notices' , array( $this, 'notification_bar_review_notice_message' ) );
78
 
79
  endif;
80
  }
84
  *
85
  * @since 1.9
86
  */
87
+ private function notification_bar_review_dismissal() {
 
88
  if ( ! is_admin() ||
89
  ! current_user_can( 'manage_options' ) ||
90
  ! isset( $_GET['_wpnonce'] ) ||
91
+ ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), "notification_bar_review_nonce" ) ||
92
+ ! isset( $_GET[$this->notify_array_data["variable_slug"].'notification_bar_review_dismiss'] ) ) :
93
 
94
  return;
95
  endif;
96
 
97
+ add_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_review_dismiss', 'yes' );
98
  }
99
 
100
  /**
102
  *
103
  * @since 1.9
104
  */
105
+ private function notification_bar_review_pending() {
 
106
  if ( ! is_admin() ||
107
  ! current_user_can( 'manage_options' ) ||
108
  ! isset( $_GET['_wpnonce'] ) ||
109
+ ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), "notification_bar_review_nonce" ) ||
110
+ ! isset( $_GET[$this->notify_array_data["variable_slug"] . 'notification_bar_review_later'] ) ) :
111
 
112
  return;
113
  endif;
114
 
115
  // Reset Time to current time.
116
+ update_site_option( $this->notify_array_data["variable_slug"] . 'notification_bar_active_time', time() );
117
  }
118
 
119
  /**
121
  *
122
  * @since 1.0.11
123
  */
124
+ public function notification_bar_review_notice_message() {
 
 
 
 
 
 
 
 
 
125
 
126
+ $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?';
127
+ $url = $_SERVER['REQUEST_URI'] . $scheme . $this->notify_array_data["variable_slug"] . 'notification_bar_review_dismiss=yes';
128
+ $dismiss_url = wp_nonce_url( $url, "notification_bar_review_nonce" );
129
+
130
+ $_later_link = $_SERVER['REQUEST_URI'] . $scheme . $this->notify_array_data["variable_slug"] . 'notification_bar_review_later=yes';
131
+ $later_url = wp_nonce_url( $_later_link, "notification_bar_review_nonce" );
132
  ?>
133
 
134
+ <div class="notification_bar_review-notice">
135
+ <div class="notification_bar_review-thumbnail">
136
+ <img src="<?php echo $this->notify_array_data["icon_path"]; ?>" alt="">
137
  </div>
138
+ <div class="notification_bar_review-text">
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
150
  }
151
 
152
  endif;
153
+
154
+ //Call all that work
155
+ new wp_visitors_traffic_statistics(); //////////MUST BE RIGHT OBJECT SAME AS CLASS NAME//////////
 
 
156
  ?>
notifications/icon-128x128.png ADDED
Binary file
css/css-review.css → notifications/style-review.css RENAMED
@@ -1,69 +1,69 @@
1
- .vtrts_free_review-notice{
2
  padding: 15px 15px 15px 0;
3
  background-color: #fff;
4
  border-radius: 3px;
5
- margin: 20px 20px 0 0;
6
  border-left: 4px solid rgb(67, 129, 228);
7
  border-top: 1px solid #ccd0d4;
8
  border-bottom: 1px solid #ccd0d4;
9
  border-right: 1px solid #ccd0d4;
10
  }
11
- .vtrts_free_review-notice:after{
12
  content: '';
13
  display: table;
14
  clear: both;
15
  }
16
- .vtrts_free_review-thumbnail{
17
  width: 114px;
18
  float: left;
19
  line-height: 80px;
20
  text-align: center;
21
  border-right: 4px solid transparent;
22
  }
23
- .vtrts_free_review-thumbnail img{
24
  width: 68px;
25
  vertical-align: middle;
26
  }
27
- .vtrts_free_review-text{
28
  overflow: hidden;
29
  }
30
- .vtrts_free_review-text h3{
31
  font-size: 24px;
32
  margin: 0 0 5px;
33
  font-weight: 400;
34
  line-height: 1.3;
35
  }
36
- .vtrts_free_review-text p{
37
  font-size: 13px;
38
  margin: 0 0 5px;
39
  }
40
- .vtrts_free_review-ul{
41
  margin: 0;
42
  padding: 0;
43
  }
44
- .vtrts_free_review-ul li{
45
  display: inline-block;
46
  margin-right: 15px;
47
  }
48
- .vtrts_free_review-ul li a{
49
  display: inline-block;
50
  color: #10738B;
51
  text-decoration: none;
52
  padding-left: 26px;
53
  position: relative;
54
  }
55
- .vtrts_free_review-ul li a span{
56
  position: absolute;
57
  left: 0;
58
  top: -2px;
59
  }
60
- .vtrts_free_dasboard-pro-link{
61
  color: #0cbb0c;
62
  }
63
 
64
  /* LoginPress Add-ons CSS @since 1.1.3 */
65
 
66
- .vtrts_free_alert-notice{
67
  background: #fff;
68
  margin: 20px 20px 0 0;
69
  position: relative;
@@ -71,32 +71,32 @@
71
  align-items: center;
72
  clear: both;
73
  }
74
- .vtrts_free_alert-notice>*{
75
  -webkit-box-sizing: border-box;
76
  box-sizing: border-box;
77
  }
78
- .vtrts_free_alert-notice:after{
79
  content: '';
80
  display: table;
81
  clear: both;
82
  }
83
- .vtrts_free_alert-thumbnail{
84
  width: 300px;
85
  text-align: center;
86
  position: relative;
87
  }
88
- .vtrts_free_alert-thumbnail img{
89
  width: 250px;
90
  vertical-align: middle;
91
  }
92
- .vtrts_free_alert-text{
93
  padding: 16px 80px 16px 80px;
94
  overflow: hidden;
95
  background: #1a5fa4;
96
  position: relative;
97
  flex: 1;
98
  }
99
- .black_friday_notic .vtrts_free_alert-text {
100
  padding: 16px 10px 16px 80px;
101
  }
102
  .black_friday{
@@ -106,18 +106,18 @@
106
  .black_friday:after{
107
  display: none;
108
  }
109
- .black_friday_notic .vtrts_free_alert-text {
110
  display: flex;
111
  align-items: center;
112
  }
113
- .black_friday_notic .vtrts_free_alert-button-section {
114
  width: 450px;
115
  }
116
- .vtrts_free_addon-notice-link:focus{
117
  outline: none;
118
  box-shadow: none;
119
  }
120
- .vtrts_free_alert-text:after{
121
  width: 80px;
122
  height: 100%;
123
  background: #fff;
@@ -128,7 +128,7 @@
128
  transform: skewX(-20deg);
129
  z-index: 1;
130
  }
131
- .vtrts_free_alert-text:before{
132
  width: 80px;
133
  height: 100%;
134
  background: #fff;
@@ -139,18 +139,18 @@
139
  transform: skewX(-20deg);
140
  z-index: 1;
141
  }
142
- .vtrts_free_alert-text h3{
143
  font-size: 20px;
144
  line-height: 24px;
145
  margin: 0 0 10px;
146
  color: #fff;
147
  }
148
- .vtrts_free_alert-text p{
149
  font-size: 16px;
150
  margin: 0;
151
  color: #fff;
152
  }
153
- .black_friday_sale_btn .vtrts_free_alert-button {
154
  display: inline-block;
155
  padding: 24px 20px;
156
  font-size: 38px;
@@ -160,12 +160,12 @@ border-radius: 0px;
160
  text-decoration: none;
161
  font-weight: bold;
162
  }
163
- .vtrts_free_alert-button-section{
164
  width: 300px;
165
  text-align: center;
166
  position: relative;
167
  }
168
- .vtrts_free_alert-button{
169
  height: auto;
170
  padding: 0;
171
  color: #1a5fa4;
@@ -177,40 +177,40 @@ font-weight: bold;
177
  text-decoration: underline;
178
  cursor: pointer;
179
  }
180
- .vtrts_free_alert-button:focus{
181
  outline: none;
182
  box-shadow: none;
183
  }
184
- .wp-core-ui .vtrts_free_alert-notice.notice.is-dismissible{
185
  padding: 0px;
186
  border-left: 0px;
187
  }
188
- .vtrts_free_alert-notice .notice-dismiss{
189
  text-decoration: none;
190
  z-index: 1;
191
  }
192
- .vtrts_free_addon-notice-link{
193
  display: flex;
194
  align-items: center;
195
  flex: 1;
196
  text-decoration: none;
197
  }
198
- .vtrts_free_notice-logo{
199
  width: 72px;
200
  text-align: center;
201
  position: relative;
202
  margin: 10px;
203
  }
204
- .vtrts_free_notice-logo img{
205
  width: 50px;
206
  vertical-align: middle;
207
  }
208
 
209
- .vtrts_free_notice-discription{
210
  overflow: hidden;
211
  width: calc(100% - 50px);
212
  }
213
- .vtrts_free_notification.vtrts_free_notice-success{
214
  border:1px solid #6ab074;
215
  background: #e6f0e8;
216
  margin: 36px 20px 0 0;
@@ -221,58 +221,58 @@ font-weight: bold;
221
  -ms-flex-align: center;
222
  align-items: center;
223
  }
224
- .vtrts_free_notice-success .vtrts_free_notice-discription p{
225
  color: #21573a;
226
  }
227
- .vtrts_free_notification.vtrts_free_notice-success .vtrts_free_notification-close:before{
228
  color: #21573a;
229
  }
230
  @media screen and (max-width: 1300px) {
231
- .vtrts_free_alert-thumbnail{
232
  width: 200px;
233
  }
234
- .vtrts_free_alert-thumbnail img{
235
  width: 170px;
236
  }
237
- .vtrts_free_alert-button-section{
238
  width: 200px;
239
  }
240
  }
241
  @media screen and (max-width: 1100px) {
242
- .vtrts_free_alert-thumbnail{
243
  display: none;
244
  }
245
- .vtrts_free_alert-thumbnail img{
246
  width: 150px;
247
  }
248
- .vtrts_free_alert-text{
249
  padding-left: 30px;
250
  }
251
- .vtrts_free_alert-text:before,.vtrts_free_alert-text:after{
252
  display: none;
253
  }
254
  }
255
  @media screen and (max-width: 782px) {
256
- .vtrts_free_alert-text{
257
  padding-right: 40px;
258
  padding-bottom: 50px;
259
  }
260
- .vtrts_free_alert-button-section{
261
  width: auto;
262
  text-align: left;
263
  }
264
- .vtrts_free_alert-button-section{
265
  position: absolute;
266
  bottom: 20px;
267
  left: 33px;
268
  }
269
- .vtrts_free_alert-button{
270
  color: #fff;
271
  }
272
- .vtrts_free_alert-notice .notice-dismiss:before{
273
  color: #fff;
274
  }
275
- .black_friday_sale_btn .vtrts_free_alert-button{
276
  width: 310px;
277
  text-align: center;
278
  }
1
+ .notification_bar_review-notice{
2
  padding: 15px 15px 15px 0;
3
  background-color: #fff;
4
  border-radius: 3px;
5
+ margin: 50px 20px 0 0;
6
  border-left: 4px solid rgb(67, 129, 228);
7
  border-top: 1px solid #ccd0d4;
8
  border-bottom: 1px solid #ccd0d4;
9
  border-right: 1px solid #ccd0d4;
10
  }
11
+ .notification_bar_review-notice:after{
12
  content: '';
13
  display: table;
14
  clear: both;
15
  }
16
+ .notification_bar_review-thumbnail{
17
  width: 114px;
18
  float: left;
19
  line-height: 80px;
20
  text-align: center;
21
  border-right: 4px solid transparent;
22
  }
23
+ .notification_bar_review-thumbnail img{
24
  width: 68px;
25
  vertical-align: middle;
26
  }
27
+ .notification_bar_review-text{
28
  overflow: hidden;
29
  }
30
+ .notification_bar_review-text h3{
31
  font-size: 24px;
32
  margin: 0 0 5px;
33
  font-weight: 400;
34
  line-height: 1.3;
35
  }
36
+ .notification_bar_review-text p{
37
  font-size: 13px;
38
  margin: 0 0 5px;
39
  }
40
+ .notification_bar_review-ul{
41
  margin: 0;
42
  padding: 0;
43
  }
44
+ .notification_bar_review-ul li{
45
  display: inline-block;
46
  margin-right: 15px;
47
  }
48
+ .notification_bar_review-ul li a{
49
  display: inline-block;
50
  color: #10738B;
51
  text-decoration: none;
52
  padding-left: 26px;
53
  position: relative;
54
  }
55
+ .notification_bar_review-ul li a span{
56
  position: absolute;
57
  left: 0;
58
  top: -2px;
59
  }
60
+ .notification_bar_dasboard-pro-link{
61
  color: #0cbb0c;
62
  }
63
 
64
  /* LoginPress Add-ons CSS @since 1.1.3 */
65
 
66
+ .notification_bar_alert-notice{
67
  background: #fff;
68
  margin: 20px 20px 0 0;
69
  position: relative;
71
  align-items: center;
72
  clear: both;
73
  }
74
+ .notification_bar_alert-notice>*{
75
  -webkit-box-sizing: border-box;
76
  box-sizing: border-box;
77
  }
78
+ .notification_bar_alert-notice:after{
79
  content: '';
80
  display: table;
81
  clear: both;
82
  }
83
+ .notification_bar_alert-thumbnail{
84
  width: 300px;
85
  text-align: center;
86
  position: relative;
87
  }
88
+ .notification_bar_alert-thumbnail img{
89
  width: 250px;
90
  vertical-align: middle;
91
  }
92
+ .notification_bar_alert-text{
93
  padding: 16px 80px 16px 80px;
94
  overflow: hidden;
95
  background: #1a5fa4;
96
  position: relative;
97
  flex: 1;
98
  }
99
+ .black_friday_notic .notification_bar_alert-text {
100
  padding: 16px 10px 16px 80px;
101
  }
102
  .black_friday{
106
  .black_friday:after{
107
  display: none;
108
  }
109
+ .black_friday_notic .notification_bar_alert-text {
110
  display: flex;
111
  align-items: center;
112
  }
113
+ .black_friday_notic .notification_bar_alert-button-section {
114
  width: 450px;
115
  }
116
+ .notification_bar_addon-notice-link:focus{
117
  outline: none;
118
  box-shadow: none;
119
  }
120
+ .notification_bar_alert-text:after{
121
  width: 80px;
122
  height: 100%;
123
  background: #fff;
128
  transform: skewX(-20deg);
129
  z-index: 1;
130
  }
131
+ .notification_bar_alert-text:before{
132
  width: 80px;
133
  height: 100%;
134
  background: #fff;
139
  transform: skewX(-20deg);
140
  z-index: 1;
141
  }
142
+ .notification_bar_alert-text h3{
143
  font-size: 20px;
144
  line-height: 24px;
145
  margin: 0 0 10px;
146
  color: #fff;
147
  }
148
+ .notification_bar_alert-text p{
149
  font-size: 16px;
150
  margin: 0;
151
  color: #fff;
152
  }
153
+ .black_friday_sale_btn .notification_bar_alert-button {
154
  display: inline-block;
155
  padding: 24px 20px;
156
  font-size: 38px;
160
  text-decoration: none;
161
  font-weight: bold;
162
  }
163
+ .notification_bar_alert-button-section{
164
  width: 300px;
165
  text-align: center;
166
  position: relative;
167
  }
168
+ .notification_bar_alert-button{
169
  height: auto;
170
  padding: 0;
171
  color: #1a5fa4;
177
  text-decoration: underline;
178
  cursor: pointer;
179
  }
180
+ .notification_bar_alert-button:focus{
181
  outline: none;
182
  box-shadow: none;
183
  }
184
+ .wp-core-ui .notification_bar_alert-notice.notice.is-dismissible{
185
  padding: 0px;
186
  border-left: 0px;
187
  }
188
+ .notification_bar_alert-notice .notice-dismiss{
189
  text-decoration: none;
190
  z-index: 1;
191
  }
192
+ .notification_bar_addon-notice-link{
193
  display: flex;
194
  align-items: center;
195
  flex: 1;
196
  text-decoration: none;
197
  }
198
+ .notification_bar_notice-logo{
199
  width: 72px;
200
  text-align: center;
201
  position: relative;
202
  margin: 10px;
203
  }
204
+ .notification_bar_notice-logo img{
205
  width: 50px;
206
  vertical-align: middle;
207
  }
208
 
209
+ .notification_bar_notice-discription{
210
  overflow: hidden;
211
  width: calc(100% - 50px);
212
  }
213
+ .notification_bar_notification.notification_bar_notice-success{
214
  border:1px solid #6ab074;
215
  background: #e6f0e8;
216
  margin: 36px 20px 0 0;
221
  -ms-flex-align: center;
222
  align-items: center;
223
  }
224
+ .notification_bar_notice-success .notification_bar_notice-discription p{
225
  color: #21573a;
226
  }
227
+ .notification_bar_notification.notification_bar_notice-success .notification_bar_notification-close:before{
228
  color: #21573a;
229
  }
230
  @media screen and (max-width: 1300px) {
231
+ .notification_bar_alert-thumbnail{
232
  width: 200px;
233
  }
234
+ .notification_bar_alert-thumbnail img{
235
  width: 170px;
236
  }
237
+ .notification_bar_alert-button-section{
238
  width: 200px;
239
  }
240
  }
241
  @media screen and (max-width: 1100px) {
242
+ .notification_bar_alert-thumbnail{
243
  display: none;
244
  }
245
+ .notification_bar_alert-thumbnail img{
246
  width: 150px;
247
  }
248
+ .notification_bar_alert-text{
249
  padding-left: 30px;
250
  }
251
+ .notification_bar_alert-text:before,.notification_bar_alert-text:after{
252
  display: none;
253
  }
254
  }
255
  @media screen and (max-width: 782px) {
256
+ .notification_bar_alert-text{
257
  padding-right: 40px;
258
  padding-bottom: 50px;
259
  }
260
+ .notification_bar_alert-button-section{
261
  width: auto;
262
  text-align: left;
263
  }
264
+ .notification_bar_alert-button-section{
265
  position: absolute;
266
  bottom: 20px;
267
  left: 33px;
268
  }
269
+ .notification_bar_alert-button{
270
  color: #fff;
271
  }
272
+ .notification_bar_alert-notice .notice-dismiss:before{
273
  color: #fff;
274
  }
275
+ .black_friday_sale_btn .notification_bar_alert-button{
276
  width: 310px;
277
  text-align: center;
278
  }
overview.php CHANGED
@@ -75,6 +75,11 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
75
  document.getElementById('ahcfree_currenttime').innerHTML = dateTime; }, 500);
76
 
77
  </script>
 
 
 
 
 
78
  <div class="ahc_main_container" >
79
 
80
  <div class="row" >
@@ -178,8 +183,8 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
178
 
179
 
180
  </div>
181
- <div class="panelcontent" id="visitors_graph_stats">
182
- <div id="visitscount" style="height:400px;"></div>
183
  </div>
184
  </div>
185
 
@@ -187,7 +192,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
187
  </div>
188
  <div class="row">
189
  <div class="col-lg-8">
190
- <div class="panel">
191
  <h2 class="box-heading"><?php
192
  if (SET_GOOGLE_MAP == 'online') {
193
  echo 'Online users';
@@ -202,7 +207,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
202
  echo 'Today visitors per country';
203
  }
204
  ?></h2>
205
- <div class="panelcontent">
206
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
207
  <img width="99%" src="<?php echo plugins_url('/images/map_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
208
  </a>
@@ -214,9 +219,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
214
  ?>
215
  <div class="col-lg-4">
216
  <div class="panel-group">
217
- <div class="panel">
218
  <h2 class="box-heading"><?php echo ahc_summary_statistics ?></h2>
219
- <div class="panelcontent">
220
  <table width="95%" border="0" cellspacing="0" id="summary_statistics">
221
  <thead>
222
  <tr>
@@ -268,9 +273,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
268
  </div>
269
  </div>
270
 
271
- <div class="panel">
272
  <h2 class="box-heading"><?php echo ahc_search_engines_statistics ?></h2>
273
- <div class="panelcontent">
274
  <table width="95%" border="0" cellspacing="0" id="search_engine">
275
  <thead>
276
  <tr>
@@ -315,7 +320,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
315
  </div>
316
  <div class="row">
317
  <div class="col-lg-8">
318
- <div class="panel">
319
  <h2 class="box-heading">Recent visitors by IP<span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span></h2>
320
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="recent_visitor_by_ip") ? "open" : ''; ?>">
321
  <form method="post" class="search_frm">
@@ -329,7 +334,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
329
  <input type="button" class="button button-primary clear_form" value="Clear"/>
330
  </form>
331
  </div>
332
- <div class="panelcontent" >
333
 
334
 
335
  <table width="95%" border="0" cellspacing="0" class="recentv" id="recent_visit_by_ip">
@@ -361,7 +366,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
361
  $countries =array();
362
  ?>
363
  <div class="col-lg-4">
364
- <div class="panel">
365
  <h2 class="box-heading">
366
  <?php
367
  if(isset($_POST['t_from_dt']) && $_POST['t_from_dt']!='' && isset($_POST['section']) && $_POST['section']=="traffic_index_country")
@@ -376,7 +381,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
376
  ?>
377
  <span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span></h2>
378
 
379
- <div class="panelcontent" >
380
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
381
  <img width="99%" src="<?php echo plugins_url('/images/today_traffic_by_country_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
382
  </a>
@@ -389,9 +394,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
389
  <div class="row">
390
  <div class="col-lg-6">
391
  <!-- browsers chart panel -->
392
- <div class="panel">
393
  <h2 class="box-heading"><?php echo ahc_browsers ?></h2>
394
- <div class="panelcontent">
395
  <div class="row">
396
  <div class="col-lg-7" >
397
  <canvas id="brsBiechartContainer" height="200px"></canvas>
@@ -410,9 +415,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
410
  <!-- search engines chart panel -->
411
 
412
 
413
- <div class="panel">
414
  <h2 class="box-heading">Search Engines</h2>
415
- <div class="panelcontent">
416
  <div class="row">
417
  <div class="col-lg-7" >
418
  <canvas id="srhEngBieChartContainer" height="200px"></canvas>
@@ -445,9 +450,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
445
  }
446
  ?>
447
  <div class="col-lg-6">
448
- <div class="panel">
449
  <h2 class="box-heading">Traffic by country (all time)</h2>
450
- <div class="panelcontent" >
451
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
452
  <img width="99%" src="<?php echo plugins_url('/images/traffic_by_country_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
453
  </a>
@@ -458,10 +463,10 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
458
 
459
  <div class="col-lg-6">
460
  <!-- Countries chart panel -->
461
- <div class="panel">
462
  <h2 class="box-heading">Top Referring Countries (all time)</h2>
463
 
464
- <div class="panelcontent">
465
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
466
  <img width="99%" src="<?php echo plugins_url('/images/top_refferring_countries_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
467
  </a>
@@ -474,9 +479,9 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
474
  <div class="row">
475
  <div class="col-lg-6">
476
 
477
- <div class="panel">
478
  <h2 class="box-heading"><?php echo ahc_refering_sites ?> (Top 20)<span class="export_data"><a href="#" class="dashicons dashicons-external" title="Export Data"></a></span></h2>
479
- <div class="panelcontent" >
480
  <table width="95%" border="0" cellspacing="0" id="top_refering_sites">
481
  <thead>
482
  <tr>
@@ -537,7 +542,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
537
  //$times = ahcfree_get_time_visits();
538
  $times = array();
539
  ?>
540
- <div class="panel">
541
  <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>
542
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="visit_time") ? "open" : ''; ?>">
543
  <form method="post" class="search_frm">
@@ -602,7 +607,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
602
  /*$tTitles = ahcfree_get_traffic_by_title();*/
603
  $tTitles=array();
604
  ?>
605
- <div class="panel">
606
  <h2 class="box-heading"><?php echo traffic_by_title ?> (all time)<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>
607
 
608
  <div class="panelcontent" style="padding-right: 50px;">
@@ -647,7 +652,7 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
647
  {*/
648
  ?>
649
  <!-- last search key words used -->
650
- <div class="panel">
651
  <h2 class="box-heading"><?php echo ahc_latest_search_words;?> (all time)<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>
652
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="lastest_search") ? "open" : ''; ?>">
653
  <form method="post" class="search_frm">
@@ -710,18 +715,23 @@ var dateTime = day+' '+monthNames[d.getMonth()]+' '+year+', '+hour+':'+minute+':
710
  <?php /*}*/ ?>
711
  </div>
712
  </div>
713
-
714
- <?php
715
- $visits_visitors_data = ahcfree_get_visits_by_custom_duration_callback($mystart_date,$myend_date,$stat='');
716
- ?>
717
-
718
- <center>
719
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&footer=true">
720
- <p style="color:#00F; font-size:15px;">if you need more statistics you can upgrade to professional version now, The premium version of Visitor Traffic real time statistics is completely different from the free version as there are a lot more features included.</p>
721
 
722
  <p><img style="border:#CCC solid 1px; margin-right:30px" height="auto" src="<?php echo plugins_url('/images/upgradenow-button.png', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></p>
723
  </a>
724
  </center>
 
 
 
 
 
 
 
 
725
  <script language="javascript" type="text/javascript">
726
 
727
 
75
  document.getElementById('ahcfree_currenttime').innerHTML = dateTime; }, 500);
76
 
77
  </script>
78
+
79
+ <style>
80
+ body { background:#F1F1F1 !important}
81
+ </style>
82
+
83
  <div class="ahc_main_container" >
84
 
85
  <div class="row" >
183
 
184
 
185
  </div>
186
+ <div class="panelcontent" id="visitors_graph_stats" style="width:100% !important; overflow:hidden">
187
+ <div id="visitscount" style="height:400px; width:100% !important"></div>
188
  </div>
189
  </div>
190
 
192
  </div>
193
  <div class="row">
194
  <div class="col-lg-8">
195
+ <div class="panel" style="width:100% !important">
196
  <h2 class="box-heading"><?php
197
  if (SET_GOOGLE_MAP == 'online') {
198
  echo 'Online users';
207
  echo 'Today visitors per country';
208
  }
209
  ?></h2>
210
+ <div class="panelcontent" style="width:100% !important">
211
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
212
  <img width="99%" src="<?php echo plugins_url('/images/map_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
213
  </a>
219
  ?>
220
  <div class="col-lg-4">
221
  <div class="panel-group">
222
+ <div class="panel" style="width:100% !important">
223
  <h2 class="box-heading"><?php echo ahc_summary_statistics ?></h2>
224
+ <div class="panelcontent" style="width:100% !important">
225
  <table width="95%" border="0" cellspacing="0" id="summary_statistics">
226
  <thead>
227
  <tr>
273
  </div>
274
  </div>
275
 
276
+ <div class="panel" style="width:100% !important">
277
  <h2 class="box-heading"><?php echo ahc_search_engines_statistics ?></h2>
278
+ <div class="panelcontent" style="width:100% !important">
279
  <table width="95%" border="0" cellspacing="0" id="search_engine">
280
  <thead>
281
  <tr>
320
  </div>
321
  <div class="row">
322
  <div class="col-lg-8">
323
+ <div class="panel" style="width:100% !important">
324
  <h2 class="box-heading">Recent visitors by IP<span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span></h2>
325
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="recent_visitor_by_ip") ? "open" : ''; ?>">
326
  <form method="post" class="search_frm">
334
  <input type="button" class="button button-primary clear_form" value="Clear"/>
335
  </form>
336
  </div>
337
+ <div class="panelcontent" style="width:100% !important">
338
 
339
 
340
  <table width="95%" border="0" cellspacing="0" class="recentv" id="recent_visit_by_ip">
366
  $countries =array();
367
  ?>
368
  <div class="col-lg-4">
369
+ <div class="panel" style="width:100% !important">
370
  <h2 class="box-heading">
371
  <?php
372
  if(isset($_POST['t_from_dt']) && $_POST['t_from_dt']!='' && isset($_POST['section']) && $_POST['section']=="traffic_index_country")
381
  ?>
382
  <span class="search_data"><a href="#" class="dashicons dashicons-search" title="Search"></a></span></h2>
383
 
384
+ <div class="panelcontent" style="width:100% !important">
385
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
386
  <img width="99%" src="<?php echo plugins_url('/images/today_traffic_by_country_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
387
  </a>
394
  <div class="row">
395
  <div class="col-lg-6">
396
  <!-- browsers chart panel -->
397
+ <div class="panel" style="width:100% !important; overflow:hidden">
398
  <h2 class="box-heading"><?php echo ahc_browsers ?></h2>
399
+ <div class="panelcontent" style="width:100% !important">
400
  <div class="row">
401
  <div class="col-lg-7" >
402
  <canvas id="brsBiechartContainer" height="200px"></canvas>
415
  <!-- search engines chart panel -->
416
 
417
 
418
+ <div class="panel" style="width:100% !important; overflow:hidden">
419
  <h2 class="box-heading">Search Engines</h2>
420
+ <div class="panelcontent" style="width:100% !important">
421
  <div class="row">
422
  <div class="col-lg-7" >
423
  <canvas id="srhEngBieChartContainer" height="200px"></canvas>
450
  }
451
  ?>
452
  <div class="col-lg-6">
453
+ <div class="panel" style="width:100% !important">
454
  <h2 class="box-heading">Traffic by country (all time)</h2>
455
+ <div class="panelcontent" style="width:100% !important">
456
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
457
  <img width="99%" src="<?php echo plugins_url('/images/traffic_by_country_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
458
  </a>
463
 
464
  <div class="col-lg-6">
465
  <!-- Countries chart panel -->
466
+ <div class="panel" style="width:100% !important">
467
  <h2 class="box-heading">Top Referring Countries (all time)</h2>
468
 
469
+ <div class="panelcontent" style="width:100% !important">
470
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&box=true">
471
  <img width="99%" src="<?php echo plugins_url('/images/top_refferring_countries_pro.jpg', AHCFREE_PLUGIN_MAIN_FILE) ?>">
472
  </a>
479
  <div class="row">
480
  <div class="col-lg-6">
481
 
482
+ <div class="panel" style="width:100% !important">
483
  <h2 class="box-heading"><?php echo ahc_refering_sites ?> (Top 20)<span class="export_data"><a href="#" class="dashicons dashicons-external" title="Export Data"></a></span></h2>
484
+ <div class="panelcontent" style="width:100% !important">
485
  <table width="95%" border="0" cellspacing="0" id="top_refering_sites">
486
  <thead>
487
  <tr>
542
  //$times = ahcfree_get_time_visits();
543
  $times = array();
544
  ?>
545
+ <div class="panel" style="width:100% !important">
546
  <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>
547
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="visit_time") ? "open" : ''; ?>">
548
  <form method="post" class="search_frm">
607
  /*$tTitles = ahcfree_get_traffic_by_title();*/
608
  $tTitles=array();
609
  ?>
610
+ <div class="panel" style="width:100% !important">
611
  <h2 class="box-heading"><?php echo traffic_by_title ?> (all time)<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>
612
 
613
  <div class="panelcontent" style="padding-right: 50px;">
652
  {*/
653
  ?>
654
  <!-- last search key words used -->
655
+ <div class="panel" style="width:100% !important">
656
  <h2 class="box-heading"><?php echo ahc_latest_search_words;?> (all time)<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>
657
  <div class="search-panel <?php echo (isset($_POST['section']) && $_POST['section']=="lastest_search") ? "open" : ''; ?>">
658
  <form method="post" class="search_frm">
715
  <?php /*}*/ ?>
716
  </div>
717
  </div>
718
+ <div class="row">
719
+ <div class="col-12">
720
+ <center>
 
 
 
721
  <a target="_blank" href="https://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro/?attribute_license=Single%20License%2029$&footer=true">
722
+ <p style="color:#00F; font-size:15px;">if you need more statistics you can upgrade to the professional version now, The premium version of Visitor Traffic real-time statistics is completely different from the free version as there are a lot more features included.</p>
723
 
724
  <p><img style="border:#CCC solid 1px; margin-right:30px" height="auto" src="<?php echo plugins_url('/images/upgradenow-button.png', AHCFREE_PLUGIN_MAIN_FILE) ?>" /></p>
725
  </a>
726
  </center>
727
+
728
+ </div>
729
+ </div>
730
+ <?php
731
+ $visits_visitors_data = ahcfree_get_visits_by_custom_duration_callback($mystart_date,$myend_date,$stat='');
732
+ ?>
733
+
734
+
735
  <script language="javascript" type="text/javascript">
736
 
737
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Visitor Traffic Real Time Statistics ===
2
  Contributors: wp-buy, osamaesh
3
- Tags: visitor, traffic, online, visitors online plugin,visitors online, count visitor, google analytics, analytics, GeoIP, Geo locations, analytics dashboard, visits, statistics, stats, visitors, 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.5
6
- Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -150,6 +150,50 @@ This plugin supports IPv6; however, PHP must be compiled with IPv6 support enabl
150
 
151
  == Changelog ==
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  = 2.6 =
154
  1. Track logged in users (admin user)
155
  2. css enhancements
1
  === Visitor Traffic Real Time Statistics ===
2
  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.7
6
+ Stable tag: 2.13
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
150
 
151
  == Changelog ==
152
 
153
+ = 2.13 =
154
+ 1. Removing start index page
155
+
156
+ = 2.12 =
157
+ 1. Urgent bug fixing (Security Notice) in the ajax calling
158
+
159
+ = 2.11 =
160
+ 1. Fix PHP Notice in the settings page
161
+
162
+ = 2.10 =
163
+ 1. Bug fixing (2) in the user roles (settings page)
164
+
165
+ = 2.9 =
166
+ 1. Bug fixing in the user roles (settings page)
167
+
168
+ = 2.8.1 =
169
+
170
+ 1. bug fixing in javascript
171
+
172
+ = 2.8 =
173
+ 1. Adding new options in the settings page
174
+ 2. bug fixing in javascript
175
+
176
+
177
+ = 2.7.4 =
178
+ 1. Hot fixes in GEO locations
179
+ 2. bug fixing - "PHP Notice: Undefined variable"
180
+
181
+ = 2.7.3 =
182
+
183
+ 1. bug fixing - "PHP Notice: Undefined variable"
184
+ 2. adding deactivation poll as modal window, This will help us figure out why the plugin was deactivated
185
+ 3. Enhancements in getting country and city names
186
+
187
+ = 2.7.2 =
188
+
189
+ 1. fix notice message in the plugins page after latest wordpress updates
190
+
191
+ = 2.7.1 =
192
+
193
+ 1. Add one starting page for all of our plugins
194
+ 2. CSS enhancements
195
+ 3. Hot fixes for the recent code
196
+
197
  = 2.6 =
198
  1. Track logged in users (admin user)
199
  2. css enhancements
settings.php DELETED
@@ -1 +0,0 @@
1
- <?php
 
wp-updates-plugin.php DELETED
@@ -1,116 +0,0 @@
1
- <?php
2
- /*
3
- WPUpdates Plugin Updater Class
4
- http://wp-updates.com
5
- v2.0
6
-
7
- Example Usage:
8
- require_once('wp-updates-plugin.php');
9
- new WPUpdatesPluginUpdater_931( 'http://wp-updates.com/api/2/plugin', plugin_basename(__FILE__) );
10
- */
11
-
12
- if( !class_exists('WPUpdatesPluginUpdater_931') ) {
13
- class WPUpdatesPluginUpdater_931 {
14
-
15
- var $api_url;
16
- var $plugin_id = 931;
17
- var $plugin_path;
18
- var $plugin_slug;
19
- var $license_key;
20
-
21
- function __construct( $api_url, $plugin_path, $license_key = null ) {
22
- $this->api_url = $api_url;
23
- $this->plugin_path = $plugin_path;
24
- $this->license_key = $license_key;
25
- if(strstr($plugin_path, '/')) list ($t1, $t2) = explode('/', $plugin_path);
26
- else $t2 = $plugin_path;
27
- $this->plugin_slug = str_replace('.php', '', $t2);
28
-
29
- add_filter( 'pre_set_site_transient_update_plugins', array(&$this, 'check_for_update') );
30
- add_filter( 'plugins_api', array(&$this, 'plugin_api_call'), 10, 3 );
31
-
32
- // This is for testing only!
33
- //set_site_transient( 'update_plugins', null );
34
-
35
- // Show which variables are being requested when query plugin API
36
- //add_filter( 'plugins_api_result', array(&$this, 'debug_result'), 10, 3 );
37
- }
38
-
39
- function check_for_update( $transient ) {
40
- if(empty($transient->checked)) return $transient;
41
-
42
- $request_args = array(
43
- 'id' => $this->plugin_id,
44
- 'slug' => $this->plugin_slug,
45
- 'version' => $transient->checked[$this->plugin_path]
46
- );
47
- if ($this->license_key) $request_args['license'] = $this->license_key;
48
-
49
- $request_string = $this->prepare_request( 'update_check', $request_args );
50
- $raw_response = wp_remote_post( $this->api_url, $request_string );
51
-
52
- $response = null;
53
- if( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) )
54
- $response = unserialize($raw_response['body']);
55
-
56
- if( is_object($response) && !empty($response) ) {
57
- // Feed the update data into WP updater
58
- $transient->response[$this->plugin_path] = $response;
59
- return $transient;
60
- }
61
-
62
- // Check to make sure there is not a similarly named plugin in the wordpress.org repository
63
- if ( isset( $transient->response[$this->plugin_path] ) ) {
64
- if ( strpos( $transient->response[$this->plugin_path]->package, 'wordpress.org' ) !== false ) {
65
- unset($transient->response[$this->plugin_path]);
66
- }
67
- }
68
-
69
- return $transient;
70
- }
71
-
72
- function plugin_api_call( $def, $action, $args ) {
73
- if( !isset($args->slug) || $args->slug != $this->plugin_slug ) return $def;
74
-
75
- $plugin_info = get_site_transient('update_plugins');
76
- $request_args = array(
77
- 'id' => $this->plugin_id,
78
- 'slug' => $this->plugin_slug,
79
- 'version' => (isset($plugin_info->checked)) ? $plugin_info->checked[$this->plugin_path] : 0 // Current version
80
- );
81
- if ($this->license_key) $request_args['license'] = $this->license_key;
82
-
83
- $request_string = $this->prepare_request( $action, $request_args );
84
- $raw_response = wp_remote_post( $this->api_url, $request_string );
85
-
86
- if( is_wp_error($raw_response) ){
87
- $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $raw_response->get_error_message());
88
- } else {
89
- $res = unserialize($raw_response['body']);
90
- if ($res === false)
91
- $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $raw_response['body']);
92
- }
93
-
94
- return $res;
95
- }
96
-
97
- function prepare_request( $action, $args ) {
98
- global $wp_version;
99
-
100
- return array(
101
- 'body' => array(
102
- 'action' => $action,
103
- 'request' => serialize($args),
104
- 'api-key' => md5(home_url())
105
- ),
106
- 'user-agent' => 'WordPress/'. $wp_version .'; '. home_url()
107
- );
108
- }
109
-
110
- function debug_result( $res, $action, $args ) {
111
- echo '<pre>'.print_r($res,true).'</pre>';
112
- return $res;
113
- }
114
-
115
- }
116
- }