Version Description
= 1.0= This is the first version of the plugin so you don't need any information about upgrade.
Download this release
Release Info
Developer | dots |
Plugin | Page Visit Counter |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- README.txt +61 -0
- admin/class-page-visit-counter-admin.php +472 -0
- admin/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- admin/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- admin/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- admin/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- admin/css/images/ui-icons_222222_256x240.png +0 -0
- admin/css/images/ui-icons_454545_256x240.png +0 -0
- admin/css/jquery-ui.css +489 -0
- admin/css/jquery.dataTables.css +220 -0
- admin/css/style.css +34 -0
- admin/images/icon.png +0 -0
- admin/images/sort_asc.png +0 -0
- admin/images/sort_both.png +0 -0
- admin/images/sort_desc.png +0 -0
- admin/js/custom.js +93 -0
- admin/js/jquery.dataTables.min.js +155 -0
- includes/class-page-visit-counter-activator.php +47 -0
- includes/class-page-visit-counter-deactivator.php +37 -0
- includes/class-page-visit-counter-loder.php +129 -0
- includes/class-page-visit-counter.php +181 -0
- page_visit_counter.php +61 -0
- public/class-page-visit-counter-public.php +200 -0
- public/js/custom.js +18 -0
README.txt
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Page Visit Counter ===
|
2 |
+
Plugin Name: Page Visit Counter
|
3 |
+
Plugin URI: http://multidots.com/
|
4 |
+
Author: Multidots
|
5 |
+
Author URI: http://multidots.com/
|
6 |
+
Contributors: dots
|
7 |
+
Version: 1.0.0
|
8 |
+
Stable tag: 1.0
|
9 |
+
Tags: page counter,page visit
|
10 |
+
Requires at least: 2.1
|
11 |
+
Tested up to: 4.3.1
|
12 |
+
Donate link:
|
13 |
+
Copyright: (c) 2014-2015 Multidots Solutions PVT LTD (info@multidots.com)
|
14 |
+
License: GPLv3 or later
|
15 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
16 |
+
|
17 |
+
This plugin will count the total visits of your sites pages.
|
18 |
+
|
19 |
+
== Description ==
|
20 |
+
This Plugin use for front side pages counter. Then provide settings for page count day, week, month, year facilities. Plugin provide search by page title and search by page published date facilities. settings are required for page counter.
|
21 |
+
|
22 |
+
= Plugin Functionality: =
|
23 |
+
|
24 |
+
* Page Count by date and ip address.
|
25 |
+
|
26 |
+
We always welcomes user suggestions. Let us know what you think about this plugin you liked or may have disliked. Users feedback is important for us to improve more our plugin.
|
27 |
+
|
28 |
+
== Installation ==
|
29 |
+
|
30 |
+
= Minimum Requirements =
|
31 |
+
|
32 |
+
* WordPress 2.1 or higher
|
33 |
+
|
34 |
+
= Automatic installation =
|
35 |
+
|
36 |
+
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don't need to leave your web browser. To do an automatic install of Page Visit Counter, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
|
37 |
+
|
38 |
+
In the search field type Page Visit Counter and click Search Plugins. Once you've found our plugin you can view details about it such as the the rating and description. Most importantly, of course, you can install it by simply clicking Install Now�.
|
39 |
+
|
40 |
+
= Manual Installation =
|
41 |
+
|
42 |
+
1. Unzip the files and upload the folder into your plugins folder (/wp-content/plugins/) overwriting older versions if they exist
|
43 |
+
2. Activate the plugin in your WordPress admin area.
|
44 |
+
|
45 |
+
== Screenshots ==
|
46 |
+
1. Page Visit Counter Screenshot 1.
|
47 |
+
2. Page Visit Counter Screenshot 2.
|
48 |
+
3. Page Visit Counter Screenshot 3.
|
49 |
+
== Frequently Asked Questions ==
|
50 |
+
|
51 |
+
In which WordPress version this Plugin is compatible?
|
52 |
+
|
53 |
+
It is compatible from 2.1 to 4.3.1 WordPress version.
|
54 |
+
|
55 |
+
== Upgrade Notice ==
|
56 |
+
|
57 |
+
= 1.0=
|
58 |
+
This is the first version of the plugin so you don't need any information about upgrade.
|
59 |
+
|
60 |
+
== Changelog ==
|
61 |
+
= 1.0=
|
admin/class-page-visit-counter-admin.php
ADDED
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin-specific functionality of the plugin.
|
4 |
+
*
|
5 |
+
* @link http://www.multidots.com/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package page-visit-counter
|
9 |
+
* @subpackage page-visit-counter/admin
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The admin-specific functionality of the plugin.
|
14 |
+
*
|
15 |
+
* Defines the plugin name, version, and two examples hooks for how to
|
16 |
+
* enqueue the admin-specific stylesheet and JavaScript.
|
17 |
+
*
|
18 |
+
* @package page-visit-counter
|
19 |
+
* @subpackage page-visit-counter/admin
|
20 |
+
* @author Multidots <wordpress@multidots.com>
|
21 |
+
*/
|
22 |
+
class page_visit_counter_Admin {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The ID of this plugin.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @access private
|
29 |
+
* @var string $plugin_name The ID of this plugin.
|
30 |
+
*/
|
31 |
+
private $plugin_name;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The version of this plugin.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
* @access private
|
38 |
+
* @var string $version The current version of this plugin.
|
39 |
+
*/
|
40 |
+
private $version;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Initialize the class and set its properties.
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
* @param string $plugin_name The name of this plugin.
|
47 |
+
* @param string $version The version of this plugin.
|
48 |
+
*/
|
49 |
+
public function __construct( $plugin_name, $version ) {
|
50 |
+
|
51 |
+
$this->plugin_name = $plugin_name;
|
52 |
+
$this->version = $version;
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Register the stylesheets for the admin area.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
*/
|
61 |
+
|
62 |
+
public function enqueue_styles() {
|
63 |
+
|
64 |
+
/**
|
65 |
+
* This function is provided for demonstration purposes only.
|
66 |
+
*
|
67 |
+
* An instance of this class should be passed to the run() function
|
68 |
+
* defined in Woo_Extra_Flat_Rate_Loader as all of the hooks are defined
|
69 |
+
* in that particular class.
|
70 |
+
*
|
71 |
+
* The Woo_Extra_Flat_Rate_Loader will then create the relationship
|
72 |
+
* between the defined hooks and the functions defined in this
|
73 |
+
* class.
|
74 |
+
*/
|
75 |
+
wp_enqueue_style('custom-style', plugin_dir_url( __FILE__ ) . 'css/style.css');
|
76 |
+
wp_enqueue_style('datatable-style', plugin_dir_url( __FILE__ ) . 'css/jquery.dataTables.css');
|
77 |
+
wp_enqueue_style('jquery-style', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.css');
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Register the JavaScript for the admin area.
|
83 |
+
*
|
84 |
+
* @since 1.0.0
|
85 |
+
*/
|
86 |
+
public function enqueue_scripts() {
|
87 |
+
|
88 |
+
/**
|
89 |
+
* This function is provided for demonstration purposes only.
|
90 |
+
*
|
91 |
+
* An instance of this class should be passed to the run() function
|
92 |
+
* defined in Woo_Extra_Flat_Rate_Loader as all of the hooks are defined
|
93 |
+
* in that particular class.
|
94 |
+
*
|
95 |
+
* The Woo_Extra_Flat_Rate_Loader will then create the relationship
|
96 |
+
* between the defined hooks and the functions defined in this
|
97 |
+
* class.
|
98 |
+
*/
|
99 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
100 |
+
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/jquery.dataTables.min.js', array( 'jquery' ), $this->version, false );
|
101 |
+
|
102 |
+
wp_enqueue_script('one', plugin_dir_url( __FILE__ ) . 'js/custom.js', array( 'jquery' ), $this->version, false );
|
103 |
+
|
104 |
+
wp_localize_script( 'one', 'pagevisit', array(
|
105 |
+
'ajaxurl' => admin_url( 'admin-ajax.php', $this->protocol ),
|
106 |
+
) );
|
107 |
+
}
|
108 |
+
/**
|
109 |
+
* admin menu page fnction
|
110 |
+
* add menu in admin menubar.
|
111 |
+
*
|
112 |
+
*/
|
113 |
+
public function page_visit_counter_menu() {
|
114 |
+
add_menu_page( 'Page-Visit-Counter','PageVisitCounter', 'manage_options','page_visit_counter', 'extra_page_visit_function_custom',plugins_url('page-visit-counter/admin/images/icon.png'),6);
|
115 |
+
add_submenu_page('page_visit_counter','Counter-Settings','Settings','manage_options','page_visit_settings','custom_page_visit_settings');
|
116 |
+
/**
|
117 |
+
* extra_page_visit_function_custom use the menu callback function
|
118 |
+
* $name pass the arguments
|
119 |
+
*/
|
120 |
+
function extra_page_visit_function_custom($name) {
|
121 |
+
global $wpdb;
|
122 |
+
$table_name = $wpdb->prefix."page_visit";
|
123 |
+
$html ='';
|
124 |
+
$html .='<div class="main-page-visit">';
|
125 |
+
$html .='<div class="page-title"><h1>Page Visit Counter</h1></div>';
|
126 |
+
$html .='<div class="page-input-text">';
|
127 |
+
$html .='<form method="POST">';
|
128 |
+
$html .='<input type="text" name="pagesearchtext" id="page-search-text" placeholder="Search by page title"><input type="text" id="MyDate" class="pagedateselect" name="MyDate" value="" placeholder="Search by page date"/><a href="javascript:void(0);" id="search-submit" class="button">Search Page</a>';
|
129 |
+
$html .='</form>';
|
130 |
+
$html .='</div>';
|
131 |
+
$html .='<div class="page-visit-summery">';
|
132 |
+
$html .='<table id="example" class="display" cellpadding="0" cellspacing="0">
|
133 |
+
<thead>
|
134 |
+
<tr>
|
135 |
+
<th width="10%">No</th>
|
136 |
+
<th width="10%">Page ID</th>
|
137 |
+
<th>Page Title</th>
|
138 |
+
<th width="20%">Total Count</th>
|
139 |
+
</tr></thead><tbody>';
|
140 |
+
$postperpage = -1;
|
141 |
+
$args = array(
|
142 |
+
'post_type' => 'page',
|
143 |
+
'post_status' => 'publish',
|
144 |
+
'order' => 'ASC',
|
145 |
+
'posts_per_page' => $postperpage,
|
146 |
+
);
|
147 |
+
$posts_array = get_posts( $args );
|
148 |
+
$counter = 0;
|
149 |
+
foreach ($posts_array as $results){
|
150 |
+
$counter = $counter + 1;
|
151 |
+
$html .='<tr>';
|
152 |
+
$html .='<td>'.$counter.'</td>';
|
153 |
+
$html .='<td>'.$results->ID.'</td>';
|
154 |
+
$html .='<td><a href="'.get_admin_url().'post.php?post='.$results->ID.'&action=edit">'.$results->post_title.'</a></td>';
|
155 |
+
$count_visit = $wpdb->get_results("SELECT * from $table_name where page_id ='".$results->ID."'");
|
156 |
+
$count = 0;
|
157 |
+
foreach ( $count_visit as $countval){
|
158 |
+
$count = $count + 1;
|
159 |
+
}
|
160 |
+
$html .='<td>'.$count.'</td>';
|
161 |
+
$html .='</tr>';
|
162 |
+
}
|
163 |
+
$html .='</tbody><tfoot>
|
164 |
+
<tr>
|
165 |
+
<th width="10%">No</th>
|
166 |
+
<th width="10%">Page ID</th>
|
167 |
+
<th>Page Title</th>
|
168 |
+
<th width="20%">Total Count</th>
|
169 |
+
</tr></tfoot><tbody></table>';
|
170 |
+
$html .='</div>';
|
171 |
+
$html .='</div>';
|
172 |
+
?>
|
173 |
+
|
174 |
+
<?php
|
175 |
+
echo $html;
|
176 |
+
}
|
177 |
+
/**
|
178 |
+
* function use to page settings
|
179 |
+
* $args is pass the arguments
|
180 |
+
*/
|
181 |
+
function custom_page_visit_settings( $args ) {
|
182 |
+
|
183 |
+
$html ='';
|
184 |
+
$html .='<div class="main-page-visit-settings">';
|
185 |
+
$html .='<div class="page-title-settings"><h1>Page Counter Settings</h1></div>';
|
186 |
+
$html .='<div class="page-settings-summery">';
|
187 |
+
$html .='<form method="POST">';
|
188 |
+
$get_option_value = json_decode(get_option( 'page_count_settings' ));
|
189 |
+
$input_values = isset( $get_option_value[1] ) ? $get_option_value[1] : array();
|
190 |
+
$select_values = isset($get_option_value[0] ) ? $get_option_value[0] : array();
|
191 |
+
$html .='<table border="0" cellpadding="10" cellspacing="0">';
|
192 |
+
$html .='<tr>';
|
193 |
+
$html .='<td>Page Count Options : </td>';
|
194 |
+
$html .='<td>';
|
195 |
+
$html .='<select id="page-setting-options" name="page-setting-options">
|
196 |
+
<option value="">Select page Options</option>
|
197 |
+
<option value="day" '.($get_option_value[0] == 'day' ? 'selected' : '').'>Day</option>
|
198 |
+
<option value="week" '.($get_option_value[0] == 'week' ? 'selected' : '').'>Week</option>
|
199 |
+
<option value="month" '.($get_option_value[0] == 'month' ? 'selected' : '').'>Month</option>
|
200 |
+
<option value="year" '.($get_option_value[0] == 'year' ? 'selected' : '').'>Year</option>
|
201 |
+
</select>';
|
202 |
+
$html .='</td>';
|
203 |
+
$html .='</tr>';
|
204 |
+
$html .='<tr>';
|
205 |
+
$html .='<td class="countduration" '.($get_option_value[1] == '' ? 'style="display:none;"' : 'style="display:block;"').'>Counter Duration : </td>';
|
206 |
+
$html .='<td>';
|
207 |
+
$html .='<input type="text" name="countduration" id="pagecountduration" '.($get_option_value[1] == '' ? 'style="display:none;"' : 'style="display:block;"').' value="'.($get_option_value[1] == '' ? '' : $get_option_value[1]).'"/>';
|
208 |
+
$html .='</td>';
|
209 |
+
$html .='</tr>';
|
210 |
+
$html .='<tr>';
|
211 |
+
$html .='<td><input type="button" name="submit" '.($get_option_value[1] == '' ? 'style="display:none;"' : 'style="display:block;"').' class="pagecountsubmit button" value="Save"></td>';
|
212 |
+
$html .='<td class="record-mesage"></td>';
|
213 |
+
$html .='</tr>';
|
214 |
+
$html .='<table>';
|
215 |
+
$html .='</form>';
|
216 |
+
$html .='</div>';
|
217 |
+
$html .="<br>";
|
218 |
+
$html .='</div>';
|
219 |
+
|
220 |
+
echo $html;
|
221 |
+
}
|
222 |
+
}
|
223 |
+
/**
|
224 |
+
* function create dashboad widget.
|
225 |
+
* view most visited page in dashboard.
|
226 |
+
*
|
227 |
+
*/
|
228 |
+
function my_custom_dashboard_widgets() {
|
229 |
+
global $wp_meta_boxes;
|
230 |
+
wp_add_dashboard_widget('custom_help_widget', 'Most Visited Page', 'custom_dashboard_help');
|
231 |
+
function custom_dashboard_help() {
|
232 |
+
global $wpdb;
|
233 |
+
$table_name = $wpdb->prefix."page_visit";
|
234 |
+
$html ='';
|
235 |
+
$count_visit = $wpdb->get_results("SELECT page_id,id,count(page_id) as c from $table_name group by page_id order by c DESC limit 5");
|
236 |
+
$html .='<div class="main_custom_dashboard_visit_page">';
|
237 |
+
if (!empty($count_visit) && isset($count_visit)) {
|
238 |
+
$html .='<table border="0" cellpadding="5" cellspacing="10">';
|
239 |
+
$html .='<tr>';
|
240 |
+
$html .='<th>Page id</th>';
|
241 |
+
$html .='<th>Page Name</th>';
|
242 |
+
$html .='<th>Total Count</th>';
|
243 |
+
$html .='</tr>';
|
244 |
+
|
245 |
+
foreach ($count_visit as $visitpage ){
|
246 |
+
$page = get_post($visitpage->page_id);
|
247 |
+
$html .='<tr>';
|
248 |
+
$html .='<td>'.$page->ID.'</td>';
|
249 |
+
$html .='<td><a href="'.get_admin_url().'post.php?post='.$page->ID.'&action=edit">'.$page->post_title.'</a></td>';
|
250 |
+
$html .='<td>'.$visitpage->c.'</td>';
|
251 |
+
$html .='</tr>';
|
252 |
+
}
|
253 |
+
$html .='</table>';
|
254 |
+
} else {
|
255 |
+
$html .='No Page Found.';
|
256 |
+
}
|
257 |
+
$html .='</div>';
|
258 |
+
echo $html;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* this function use to page settings submit callback function
|
264 |
+
* add option by option table
|
265 |
+
* add page count option and duration.
|
266 |
+
*/
|
267 |
+
public function add_page_count_option(){
|
268 |
+
global $wpdb;
|
269 |
+
if( $_POST['select_option'] != '' && !empty($_POST['select_option']) && $_POST['count_duration'] != '' && !empty($_POST['count_duration']) ){
|
270 |
+
$page_count_option = array();
|
271 |
+
$page_count_option[] = isset( $_POST['select_option'] ) ? $_POST['select_option'] : '';
|
272 |
+
$page_count_option[] = isset( $_POST['count_duration'] ) ? $_POST['count_duration'] : '';
|
273 |
+
delete_option('page_count_settings');
|
274 |
+
add_option( 'page_count_settings', json_encode( $page_count_option ) );
|
275 |
+
}
|
276 |
+
die();
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* select_input_page_value use in ajax callback function
|
281 |
+
* handle the date and page title on change event.
|
282 |
+
*/
|
283 |
+
public function select_input_page_value() {
|
284 |
+
global $wpdb;
|
285 |
+
$table_name = $wpdb->prefix."page_visit";
|
286 |
+
$table_post = $wpdb->prefix."posts";
|
287 |
+
$html = '';
|
288 |
+
$page_title = isset( $_POST['page_name'] ) ? $_POST['page_name'] : '';
|
289 |
+
$page_date = isset( $_POST['page_date'] ) ? $_POST['page_date'] : '';
|
290 |
+
$string ='';
|
291 |
+
if( $page_date == '' && $page_title =='' ){
|
292 |
+
$html .='<table id="example" class="display" cellpadding="8" cellspacing="2">
|
293 |
+
<thead>
|
294 |
+
<tr>
|
295 |
+
<th width="10%">No</th>
|
296 |
+
<th width="10%">Page ID</th>
|
297 |
+
<th>Page Title</th>
|
298 |
+
<th width="20%">Total Count</th>
|
299 |
+
</tr>
|
300 |
+
</thead>
|
301 |
+
<tbody>';
|
302 |
+
$postperpage = -1;
|
303 |
+
$args = array(
|
304 |
+
'post_type' => 'page',
|
305 |
+
'post_status' => 'publish',
|
306 |
+
'order' => 'ASC',
|
307 |
+
'posts_per_page' => $postperpage,
|
308 |
+
);
|
309 |
+
$posts_array = get_posts( $args );
|
310 |
+
$counter = 0;
|
311 |
+
foreach ( $posts_array as $results ){
|
312 |
+
$counter = $counter + 1;
|
313 |
+
$html .='<tr>';
|
314 |
+
$html .='<td>'.$counter.'</td>';
|
315 |
+
$html .='<td>'.$results->ID.'</td>';
|
316 |
+
$html .='<td><a href="'.get_admin_url().'post.php?post='.$results->ID.'&action=edit">'.$results->post_title.'</a></td>';
|
317 |
+
$count_visit = $wpdb->get_results("SELECT * from $table_name where page_id ='".$results->ID."'");
|
318 |
+
$count = 0;
|
319 |
+
foreach ( $count_visit as $countval){
|
320 |
+
$count = $count + 1;
|
321 |
+
}
|
322 |
+
$html .='<td>'.$count.'</td>';
|
323 |
+
$html .='</tr>';
|
324 |
+
}
|
325 |
+
$html .='</tbody></table>';
|
326 |
+
echo $html;
|
327 |
+
}else {
|
328 |
+
if( $page_title != '' ){
|
329 |
+
if($page_date){
|
330 |
+
$string .= "wposts.post_title LIKE '".$page_title."%' AND ";
|
331 |
+
}else{
|
332 |
+
$string .= "wposts.post_title LIKE '".$page_title."%' ";
|
333 |
+
}
|
334 |
+
}
|
335 |
+
if( $page_date != '' ){
|
336 |
+
if( $page_title ){
|
337 |
+
$string .= "$table_name.date = '".$page_date."' AND";
|
338 |
+
}else{
|
339 |
+
$string .= "$table_name.date = '".$page_date."'";
|
340 |
+
}
|
341 |
+
}
|
342 |
+
$clean = rtrim($string," AND ");
|
343 |
+
$dataquery =$wpdb->get_results("SELECT DISTINCT wposts.* FROM $table_post wposts INNER JOIN $table_name ON (wposts.ID = $table_name.page_id) WHERE $clean");
|
344 |
+
if(empty( $dataquery ) || $dataquery == ''){
|
345 |
+
$notvisit =$wpdb->get_results("SELECT * from $table_post where post_title LIKE'".$page_title."%' AND post_status='publish' AND post_type='page'");
|
346 |
+
$html .='<table id="example" class="display" cellpadding="0" cellspacing="0">
|
347 |
+
<thead>
|
348 |
+
<tr>
|
349 |
+
<th width="10%">No</th>
|
350 |
+
<th width="10%">Page ID</th>
|
351 |
+
<th>Page Title</th>
|
352 |
+
<th width="20%">Total Count</th>
|
353 |
+
</tr></thead><tbody>';
|
354 |
+
$counter = 0;
|
355 |
+
foreach ( $notvisit as $results ){
|
356 |
+
$counter = $counter + 1;
|
357 |
+
$html .='<tr>';
|
358 |
+
$html .='<td>'.$counter.'</td>';
|
359 |
+
$html .='<td>'.$results->ID.'</td>';
|
360 |
+
$html .='<td><a href="'.get_admin_url().'post.php?post='.$results->ID.'&action=edit">'.$results->post_title.'</a></td>';
|
361 |
+
$html .='<td> 0 </td>';
|
362 |
+
$html .='</tr>';
|
363 |
+
}
|
364 |
+
$html .='</tbody><tfoot>
|
365 |
+
<tr>
|
366 |
+
<th width="10%">No</th>
|
367 |
+
<th width="10%">Page ID</th>
|
368 |
+
<th>Page Title</th>
|
369 |
+
<th width="20%">Total Count</th>
|
370 |
+
</tr></tfoot</table>';
|
371 |
+
echo $html;
|
372 |
+
}else if( $dataquery != '' ){
|
373 |
+
$html .='<table id="example" class="display" cellpadding="0" cellspacing="0">
|
374 |
+
<thead>
|
375 |
+
<tr>
|
376 |
+
<th width="10%">No</th>
|
377 |
+
<th width="10%">Page ID</th>
|
378 |
+
<th>Page Title</th>
|
379 |
+
<th width="20%">Total Count</th>
|
380 |
+
</tr></thead><tbody>';
|
381 |
+
$counter = 0;
|
382 |
+
foreach ( $dataquery as $results ){
|
383 |
+
$counter = $counter + 1;
|
384 |
+
$html .='<tr>';
|
385 |
+
$html .='<td>'.$counter.'</td>';
|
386 |
+
$html .='<td>'.$results->ID.'</td>';
|
387 |
+
$html .='<td><a href="'.get_admin_url().'post.php?post='.$results->ID.'&action=edit">'.$results->post_title.'</a></td>';
|
388 |
+
$str ='';
|
389 |
+
if( $page_title != '' ){
|
390 |
+
if( $page_date != '' ){
|
391 |
+
$str .="page_id ='".$results->ID."' AND ";
|
392 |
+
}else{
|
393 |
+
$str .="page_id ='".$results->ID."'";
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
if($page_date != ''){
|
398 |
+
if( $page_title != '' ){
|
399 |
+
$str .="date ='".$page_date."' AND ";
|
400 |
+
}else{
|
401 |
+
$str .="date ='".$page_date."' ";
|
402 |
+
}
|
403 |
+
}
|
404 |
+
$remove = rtrim($str," AND ");
|
405 |
+
$count_visit = $wpdb->get_results("SELECT * from $table_name where page_id ='".$results->ID."' AND $remove");
|
406 |
+
$count = 0;
|
407 |
+
foreach ( $count_visit as $countval ){
|
408 |
+
$count = $count + 1;
|
409 |
+
}
|
410 |
+
$html .='<td>'. $count.'</td>';
|
411 |
+
$html .='</tr>';
|
412 |
+
}
|
413 |
+
$html .='</tbody><tfoot>
|
414 |
+
<tr>
|
415 |
+
<th width="10%">No</th>
|
416 |
+
<th width="10%">Page ID</th>
|
417 |
+
<th>Page Title</th>
|
418 |
+
<th width="20%">Total Count</th>
|
419 |
+
</tr></tfoot</table>';
|
420 |
+
echo $html;
|
421 |
+
}
|
422 |
+
}
|
423 |
+
die();
|
424 |
+
}
|
425 |
+
|
426 |
+
}
|
427 |
+
/**
|
428 |
+
* The Widget functionality for this plugin.
|
429 |
+
* widget provide Most visited page.
|
430 |
+
*
|
431 |
+
*/
|
432 |
+
class My_Widget extends WP_Widget {
|
433 |
+
public function __construct() {
|
434 |
+
$widget_ops = array('classname' => 'My_Widget', 'description' => 'Most Visited Pages' );
|
435 |
+
$this->WP_Widget('My_Widget', 'Recent Most Visit page', $widget_ops);
|
436 |
+
}
|
437 |
+
|
438 |
+
function widget($args, $instance) {
|
439 |
+
global $wpdb;
|
440 |
+
$table_name = $wpdb->prefix."page_visit";
|
441 |
+
$html ='';
|
442 |
+
extract($args, EXTR_SKIP);
|
443 |
+
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
444 |
+
$html .= (isset($before_widget)?$before_widget:'');
|
445 |
+
if (!empty($title))
|
446 |
+
$html .= $before_title . $title . $after_title;
|
447 |
+
$count_visit = $wpdb->get_results("SELECT page_id,id,count(page_id) as c from $table_name group by page_id order by c DESC limit 5");
|
448 |
+
foreach ($count_visit as $visitpage ){
|
449 |
+
$page = get_post($visitpage->page_id);
|
450 |
+
$html .='<h6 style="font-size: 14px;font-weight: normal;line-height: 14px;">'.$page->post_title.'</h6>';
|
451 |
+
$html .="<br>";
|
452 |
+
}
|
453 |
+
$html .= (isset($after_widget)?$after_widget:'');
|
454 |
+
echo $html;
|
455 |
+
}
|
456 |
+
public function form( $instance ) {
|
457 |
+
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
|
458 |
+
$title = $instance['title'];
|
459 |
+
$html ='';
|
460 |
+
$html .= '<p> <label for="'.$this->get_field_id("title").'">Title:
|
461 |
+
<input class="widefat" id="'.$this->get_field_id("title").'"
|
462 |
+
name="'.$this->get_field_name("title").'" type="text"
|
463 |
+
value="'.attribute_escape($title).'" /></label></p>';
|
464 |
+
echo $html;
|
465 |
+
}
|
466 |
+
function update($new_instance, $old_instance) {
|
467 |
+
$instance = $old_instance;
|
468 |
+
$instance['title'] = $new_instance['title'];
|
469 |
+
return $instance;
|
470 |
+
}
|
471 |
+
}
|
472 |
+
add_action( 'widgets_init', create_function('', 'return register_widget("My_Widget");') );
|
admin/css/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
admin/css/images/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
admin/css/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
admin/css/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
admin/css/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
admin/css/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
admin/css/jquery-ui.css
ADDED
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework
|
3 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
4 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
5 |
+
*/
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden { display: none; }
|
10 |
+
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
11 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
12 |
+
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
13 |
+
.ui-helper-clearfix { display: inline-block; }
|
14 |
+
/* required comment for clearfix to work in Opera \*/
|
15 |
+
* html .ui-helper-clearfix { height:1%; }
|
16 |
+
.ui-helper-clearfix { display:block; }
|
17 |
+
/* end clearfix */
|
18 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
19 |
+
|
20 |
+
|
21 |
+
/* Interaction Cues
|
22 |
+
----------------------------------*/
|
23 |
+
.ui-state-disabled { cursor: default !important; }
|
24 |
+
|
25 |
+
|
26 |
+
/* Icons
|
27 |
+
----------------------------------*/
|
28 |
+
|
29 |
+
/* states and images */
|
30 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
31 |
+
|
32 |
+
|
33 |
+
/* Misc visuals
|
34 |
+
----------------------------------*/
|
35 |
+
|
36 |
+
/* Overlays */
|
37 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
38 |
+
|
39 |
+
|
40 |
+
/*
|
41 |
+
* jQuery UI CSS Framework
|
42 |
+
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
43 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
44 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
45 |
+
*/
|
46 |
+
|
47 |
+
|
48 |
+
/* Component containers
|
49 |
+
----------------------------------*/
|
50 |
+
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
51 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
52 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
53 |
+
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
54 |
+
.ui-widget-content a { color: #222222; }
|
55 |
+
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
56 |
+
.ui-widget-header a { color: #222222; }
|
57 |
+
|
58 |
+
/* Interaction states
|
59 |
+
----------------------------------*/
|
60 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
61 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
62 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
63 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
64 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
65 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
66 |
+
.ui-widget :active { outline: none; }
|
67 |
+
|
68 |
+
/* Interaction Cues
|
69 |
+
----------------------------------*/
|
70 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
71 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
72 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
73 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
74 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
75 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
76 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
77 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
78 |
+
|
79 |
+
/* Icons
|
80 |
+
----------------------------------*/
|
81 |
+
|
82 |
+
/* states and images */
|
83 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
84 |
+
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
85 |
+
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
86 |
+
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
|
87 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
88 |
+
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
89 |
+
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
90 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
91 |
+
|
92 |
+
/* positioning */
|
93 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
94 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
95 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
96 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
97 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
98 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
99 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
100 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
101 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
102 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
103 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
104 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
105 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
106 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
107 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
108 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
109 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
110 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
111 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
112 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
113 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
114 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
115 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
116 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
117 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
118 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
119 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
120 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
121 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
122 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
123 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
124 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
125 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
126 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
127 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
128 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
129 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
130 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
131 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
132 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
133 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
134 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
135 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
136 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
137 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
138 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
139 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
140 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
141 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
142 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
143 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
144 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
145 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
146 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
147 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
148 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
149 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
150 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
151 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
152 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
153 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
154 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
155 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
156 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
157 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
158 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
159 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
160 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
161 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
162 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
163 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
164 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
165 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
166 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
167 |
+
.ui-icon-document { background-position: -32px -96px; }
|
168 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
169 |
+
.ui-icon-note { background-position: -64px -96px; }
|
170 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
171 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
172 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
173 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
174 |
+
.ui-icon-person { background-position: -144px -96px; }
|
175 |
+
.ui-icon-print { background-position: -160px -96px; }
|
176 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
177 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
178 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
179 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
180 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
181 |
+
.ui-icon-home { background-position: 0 -112px; }
|
182 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
183 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
184 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
185 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
186 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
187 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
188 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
189 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
190 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
191 |
+
.ui-icon-search { background-position: -160px -112px; }
|
192 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
193 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
194 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
195 |
+
.ui-icon-star { background-position: -224px -112px; }
|
196 |
+
.ui-icon-link { background-position: -240px -112px; }
|
197 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
198 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
199 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
200 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
201 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
202 |
+
.ui-icon-close { background-position: -80px -128px; }
|
203 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
204 |
+
.ui-icon-key { background-position: -112px -128px; }
|
205 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
206 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
207 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
208 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
209 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
210 |
+
.ui-icon-image { background-position: -208px -128px; }
|
211 |
+
.ui-icon-video { background-position: -224px -128px; }
|
212 |
+
.ui-icon-script { background-position: -240px -128px; }
|
213 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
214 |
+
.ui-icon-info { background-position: -16px -144px; }
|
215 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
216 |
+
.ui-icon-help { background-position: -48px -144px; }
|
217 |
+
.ui-icon-check { background-position: -64px -144px; }
|
218 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
219 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
220 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
221 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
222 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
223 |
+
.ui-icon-play { background-position: 0 -160px; }
|
224 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
225 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
226 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
227 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
228 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
229 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
230 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
231 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
232 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
233 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
234 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
235 |
+
.ui-icon-power { background-position: 0 -176px; }
|
236 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
237 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
238 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
239 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
240 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
241 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
242 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
243 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
244 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
245 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
246 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
247 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
248 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
249 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
250 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
251 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
252 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
253 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
254 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
255 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
256 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
257 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
258 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
259 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
260 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
261 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
262 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
263 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
264 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
265 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
266 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
267 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
268 |
+
|
269 |
+
|
270 |
+
/* Misc visuals
|
271 |
+
----------------------------------*/
|
272 |
+
|
273 |
+
/* Corner radius */
|
274 |
+
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
275 |
+
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
276 |
+
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
277 |
+
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
278 |
+
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
279 |
+
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
280 |
+
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
281 |
+
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
282 |
+
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
283 |
+
|
284 |
+
/* Overlays */
|
285 |
+
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
286 |
+
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Resizable
|
287 |
+
----------------------------------*/
|
288 |
+
.ui-resizable { position: relative;}
|
289 |
+
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
|
290 |
+
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
291 |
+
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
292 |
+
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
293 |
+
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
294 |
+
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
295 |
+
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
296 |
+
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
297 |
+
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
298 |
+
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable
|
299 |
+
----------------------------------*/
|
300 |
+
.ui-selectable-helper { border:1px dotted black }
|
301 |
+
/* Accordion
|
302 |
+
----------------------------------*/
|
303 |
+
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
304 |
+
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
305 |
+
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
306 |
+
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
307 |
+
/* IE7-/Win - Fix extra vertical space in lists */
|
308 |
+
.ui-accordion a { zoom: 1; }
|
309 |
+
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
310 |
+
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
311 |
+
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
312 |
+
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
|
313 |
+
----------------------------------*/
|
314 |
+
.ui-autocomplete { position: absolute; cursor: default; }
|
315 |
+
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
316 |
+
|
317 |
+
/* workarounds */
|
318 |
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
319 |
+
|
320 |
+
/* Menu
|
321 |
+
----------------------------------*/
|
322 |
+
.ui-menu {
|
323 |
+
list-style:none;
|
324 |
+
padding: 2px;
|
325 |
+
margin: 0;
|
326 |
+
display:block;
|
327 |
+
}
|
328 |
+
.ui-menu .ui-menu {
|
329 |
+
margin-top: -3px;
|
330 |
+
}
|
331 |
+
.ui-menu .ui-menu-item {
|
332 |
+
margin:0;
|
333 |
+
padding: 0;
|
334 |
+
zoom: 1;
|
335 |
+
float: left;
|
336 |
+
clear: left;
|
337 |
+
width: 100%;
|
338 |
+
}
|
339 |
+
.ui-menu .ui-menu-item a {
|
340 |
+
text-decoration:none;
|
341 |
+
display:block;
|
342 |
+
padding:.2em .4em;
|
343 |
+
line-height:1.5;
|
344 |
+
zoom:1;
|
345 |
+
}
|
346 |
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
347 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
348 |
+
font-weight: normal;
|
349 |
+
margin: -1px;
|
350 |
+
}
|
351 |
+
/* Button
|
352 |
+
----------------------------------*/
|
353 |
+
|
354 |
+
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
355 |
+
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
356 |
+
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
357 |
+
.ui-button-icons-only { width: 3.4em; }
|
358 |
+
button.ui-button-icons-only { width: 3.7em; }
|
359 |
+
|
360 |
+
/*button text element */
|
361 |
+
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
362 |
+
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
363 |
+
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
364 |
+
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
365 |
+
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
366 |
+
/* no icon support for input elements, provide padding by default */
|
367 |
+
input.ui-button { padding: .4em 1em; }
|
368 |
+
|
369 |
+
/*button icon element(s) */
|
370 |
+
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
371 |
+
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
372 |
+
.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
373 |
+
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
374 |
+
|
375 |
+
/*button sets*/
|
376 |
+
.ui-buttonset { margin-right: 7px; }
|
377 |
+
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
378 |
+
|
379 |
+
/* workarounds */
|
380 |
+
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
381 |
+
|
382 |
+
|
383 |
+
|
384 |
+
|
385 |
+
|
386 |
+
/* Dialog
|
387 |
+
----------------------------------*/
|
388 |
+
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
389 |
+
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
|
390 |
+
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
|
391 |
+
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
392 |
+
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
393 |
+
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
394 |
+
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
395 |
+
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
396 |
+
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
|
397 |
+
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
398 |
+
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
399 |
+
/* Slider
|
400 |
+
----------------------------------*/
|
401 |
+
.ui-slider { position: relative; text-align: left; }
|
402 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
403 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
404 |
+
|
405 |
+
.ui-slider-horizontal { height: .8em; }
|
406 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
407 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
408 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
409 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
410 |
+
|
411 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
412 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
413 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
414 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
415 |
+
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
|
416 |
+
----------------------------------*/
|
417 |
+
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
418 |
+
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
419 |
+
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
420 |
+
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
421 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
422 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
423 |
+
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
424 |
+
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
425 |
+
.ui-tabs .ui-tabs-hide { display: none !important; }
|
426 |
+
/* Datepicker
|
427 |
+
----------------------------------*/
|
428 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
429 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
430 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
431 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
432 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
433 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
434 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
435 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
436 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
437 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
438 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
439 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
440 |
+
.ui-datepicker select.ui-datepicker-month,
|
441 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
442 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
443 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
444 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
445 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
446 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
447 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
448 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
449 |
+
|
450 |
+
/* with multiple calendars */
|
451 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
452 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
453 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
454 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
455 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
456 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
457 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
458 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
459 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
460 |
+
.ui-datepicker-row-break { clear:both; width:100%; }
|
461 |
+
|
462 |
+
/* RTL support */
|
463 |
+
.ui-datepicker-rtl { direction: rtl; }
|
464 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
465 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
466 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
467 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
468 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
469 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
470 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
471 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
472 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
473 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
474 |
+
|
475 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
476 |
+
.ui-datepicker-cover {
|
477 |
+
display: none; /*sorry for IE5*/
|
478 |
+
display/**/: block; /*sorry for IE5*/
|
479 |
+
position: absolute; /*must have*/
|
480 |
+
z-index: -1; /*must have*/
|
481 |
+
filter: mask(); /*must have*/
|
482 |
+
top: -4px; /*must have*/
|
483 |
+
left: -4px; /*must have*/
|
484 |
+
width: 200px; /*must have*/
|
485 |
+
height: 200px; /*must have*/
|
486 |
+
}/* Progressbar
|
487 |
+
----------------------------------*/
|
488 |
+
.ui-progressbar { height:2em; text-align: left; }
|
489 |
+
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
admin/css/jquery.dataTables.css
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/*
|
3 |
+
* Table
|
4 |
+
*/
|
5 |
+
table.dataTable {
|
6 |
+
margin: 0 auto;
|
7 |
+
clear: both;
|
8 |
+
width: 100%;
|
9 |
+
}
|
10 |
+
|
11 |
+
table.dataTable thead th {
|
12 |
+
padding: 3px 18px 3px 10px;
|
13 |
+
border-bottom: 1px solid black;
|
14 |
+
font-weight: bold;
|
15 |
+
cursor: pointer;
|
16 |
+
*cursor: hand;
|
17 |
+
}
|
18 |
+
|
19 |
+
table.dataTable tfoot th {
|
20 |
+
padding: 3px 18px 3px 10px;
|
21 |
+
border-top: 1px solid black;
|
22 |
+
font-weight: bold;
|
23 |
+
}
|
24 |
+
|
25 |
+
table.dataTable td {
|
26 |
+
padding: 3px 10px;
|
27 |
+
}
|
28 |
+
|
29 |
+
table.dataTable td.center,
|
30 |
+
table.dataTable td.dataTables_empty {
|
31 |
+
text-align: center;
|
32 |
+
}
|
33 |
+
|
34 |
+
table.dataTable tr.odd { background-color: #E2E4FF; }
|
35 |
+
table.dataTable tr.even { background-color: white; }
|
36 |
+
|
37 |
+
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
|
38 |
+
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
|
39 |
+
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
|
40 |
+
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
|
41 |
+
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
|
42 |
+
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
43 |
+
|
44 |
+
|
45 |
+
/*
|
46 |
+
* Table wrapper
|
47 |
+
*/
|
48 |
+
.dataTables_wrapper {
|
49 |
+
position: relative;
|
50 |
+
clear: both;
|
51 |
+
*zoom: 1;
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
/*
|
56 |
+
* Page length menu
|
57 |
+
*/
|
58 |
+
.dataTables_length {
|
59 |
+
float: left;
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/*
|
64 |
+
* Filter
|
65 |
+
*/
|
66 |
+
.dataTables_filter {
|
67 |
+
float: right;
|
68 |
+
text-align: right;
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
/*
|
73 |
+
* Table information
|
74 |
+
*/
|
75 |
+
.dataTables_info {
|
76 |
+
clear: both;
|
77 |
+
float: left;
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
/*
|
82 |
+
* Pagination
|
83 |
+
*/
|
84 |
+
.dataTables_paginate {
|
85 |
+
float: right;
|
86 |
+
text-align: right;
|
87 |
+
}
|
88 |
+
|
89 |
+
/* Two button pagination - previous / next */
|
90 |
+
.paginate_disabled_previous,
|
91 |
+
.paginate_enabled_previous,
|
92 |
+
.paginate_disabled_next,
|
93 |
+
.paginate_enabled_next {
|
94 |
+
height: 19px;
|
95 |
+
float: left;
|
96 |
+
cursor: pointer;
|
97 |
+
*cursor: hand;
|
98 |
+
color: #111 !important;
|
99 |
+
}
|
100 |
+
.paginate_disabled_previous:hover,
|
101 |
+
.paginate_enabled_previous:hover,
|
102 |
+
.paginate_disabled_next:hover,
|
103 |
+
.paginate_enabled_next:hover {
|
104 |
+
text-decoration: none !important;
|
105 |
+
}
|
106 |
+
.paginate_disabled_previous:active,
|
107 |
+
.paginate_enabled_previous:active,
|
108 |
+
.paginate_disabled_next:active,
|
109 |
+
.paginate_enabled_next:active {
|
110 |
+
outline: none;
|
111 |
+
}
|
112 |
+
|
113 |
+
.paginate_disabled_previous,
|
114 |
+
.paginate_disabled_next {
|
115 |
+
color: #666 !important;
|
116 |
+
}
|
117 |
+
.paginate_disabled_previous,
|
118 |
+
.paginate_enabled_previous {
|
119 |
+
padding-left: 23px;
|
120 |
+
}
|
121 |
+
.paginate_disabled_next,
|
122 |
+
.paginate_enabled_next {
|
123 |
+
padding-right: 23px;
|
124 |
+
margin-left: 10px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
|
128 |
+
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
|
129 |
+
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
|
130 |
+
|
131 |
+
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
|
132 |
+
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
|
133 |
+
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
|
134 |
+
|
135 |
+
/* Full number pagination */
|
136 |
+
.paging_full_numbers {
|
137 |
+
height: 22px;
|
138 |
+
line-height: 22px;
|
139 |
+
}
|
140 |
+
.paging_full_numbers a:active {
|
141 |
+
outline: none
|
142 |
+
}
|
143 |
+
.paging_full_numbers a:hover {
|
144 |
+
text-decoration: none;
|
145 |
+
}
|
146 |
+
|
147 |
+
.paging_full_numbers a.paginate_button,
|
148 |
+
.paging_full_numbers a.paginate_active {
|
149 |
+
border: 1px solid #aaa;
|
150 |
+
-webkit-border-radius: 5px;
|
151 |
+
-moz-border-radius: 5px;
|
152 |
+
border-radius: 5px;
|
153 |
+
padding: 2px 5px;
|
154 |
+
margin: 0 3px;
|
155 |
+
cursor: pointer;
|
156 |
+
*cursor: hand;
|
157 |
+
color: #333 !important;
|
158 |
+
}
|
159 |
+
|
160 |
+
.paging_full_numbers a.paginate_button {
|
161 |
+
background-color: #ddd;
|
162 |
+
}
|
163 |
+
|
164 |
+
.paging_full_numbers a.paginate_button:hover {
|
165 |
+
background-color: #ccc;
|
166 |
+
text-decoration: none !important;
|
167 |
+
}
|
168 |
+
|
169 |
+
.paging_full_numbers a.paginate_active {
|
170 |
+
background-color: #99B3FF;
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/*
|
175 |
+
* Processing indicator
|
176 |
+
*/
|
177 |
+
.dataTables_processing {
|
178 |
+
position: absolute;
|
179 |
+
top: 50%;
|
180 |
+
left: 50%;
|
181 |
+
width: 250px;
|
182 |
+
height: 30px;
|
183 |
+
margin-left: -125px;
|
184 |
+
margin-top: -15px;
|
185 |
+
padding: 14px 0 2px 0;
|
186 |
+
border: 1px solid #ddd;
|
187 |
+
text-align: center;
|
188 |
+
color: #999;
|
189 |
+
font-size: 14px;
|
190 |
+
background-color: white;
|
191 |
+
}
|
192 |
+
|
193 |
+
|
194 |
+
/*
|
195 |
+
* Sorting
|
196 |
+
*/
|
197 |
+
.sorting { background: url('../images/sort_both.png') no-repeat center right; }
|
198 |
+
.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
|
199 |
+
.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
|
200 |
+
|
201 |
+
.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
|
202 |
+
.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
|
203 |
+
|
204 |
+
table.dataTable thead th:active,
|
205 |
+
table.dataTable thead td:active {
|
206 |
+
outline: none;
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
/*
|
211 |
+
* Scrolling
|
212 |
+
*/
|
213 |
+
.dataTables_scroll {
|
214 |
+
clear: both;
|
215 |
+
}
|
216 |
+
|
217 |
+
.dataTables_scrollBody {
|
218 |
+
*margin-top: -1px;
|
219 |
+
-webkit-overflow-scrolling: touch;
|
220 |
+
}
|
admin/css/style.css
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.page-visit-summery table.dataTable{width:100%}
|
2 |
+
.page-visit-summery table#example thead tr th {background-color: #FFF;color:#000;padding:10px;border-bottom: 1px solid #e1e1e1;}
|
3 |
+
.page-visit-summery table#example tfoot tr th {background-color: #FFF;color:#000;padding:10px;border-top: 1px solid #e1e1e1;}
|
4 |
+
.page-visit-summery table#example tbody tr.even {background-color: #FFF;color: #000;}
|
5 |
+
.page-visit-summery table#example tbody tr.even td {background-color: #FFF;color: #000;}
|
6 |
+
.page-visit-summery table#example tbody tr.odd {background-color: #f9f9f9 ;color: #000;}
|
7 |
+
.page-visit-summery table#example tbody tr.odd td{background-color: #f9f9f9 ;color: #000;}
|
8 |
+
.page-visit-summery table.dataTable tr.odd td.sorting_1{background-color:#f9f9f9 !important;color:#0073aa !important; }
|
9 |
+
.page-visit-summery table.dataTable tr.even td.sorting_1 {background-color:#FFF !important;color:#0073aa !important; }
|
10 |
+
.page-visit-summery table#example tr td {text-align: center;padding:10px;color:#0073aa !important;border-bottom: none !important}
|
11 |
+
div.page-visit-summery div#example_paginate {margin-top: 10px;}
|
12 |
+
div.page-visit-summery div#example_info {margin-top: 5px;}
|
13 |
+
div.page-visit-summery a#example_first {border-radius: 5px;padding: 5px 10px;background-color: #FFF;color: #000 !important;}
|
14 |
+
div.page-visit-summery a#example_last {border-radius: 5px;padding: 5px 10px;background-color: #FFF;color: #000 !important;}
|
15 |
+
div.page-visit-summery a#example_previous {border-radius: 5px;padding: 5px 10px;background-color: #FFF;color: #000 !important;}
|
16 |
+
div.page-visit-summery a#example_next{border-radius: 5px;padding: 5px 10px;background-color: #FFF;color: #000 !important;}
|
17 |
+
.page-title h1 {width: 100%;color: #000;}
|
18 |
+
.page-input-text form table tr td input#page-search-text {width: 200px;padding-left: 10px;}
|
19 |
+
.page-input-text form table tr td input#MyDate {width: 200px;padding-left: 10px;}
|
20 |
+
.page-visit-summery table#example tbody tr.odd td a {text-decoration: none;font-weight: bold;color: #0073aa;font-size: 16px;text-transform: uppercase;}
|
21 |
+
.page-visit-summery table#example tbody tr.even td a {text-decoration: none;font-weight: bold;color: #0073aa;font-size: 16px;text-transform: uppercase;}
|
22 |
+
.page-visit-summery table#example tbody tr td a:hover {color:#0073AA;font-weight: bold;}
|
23 |
+
.main-page-visit-settings .page-title-settings h1{width: 100%;color: #000;margin-top: 32px;}
|
24 |
+
.page-settings-summery form table tr td select#page-setting-options {width: 200px;color: #000;}
|
25 |
+
.page-settings-summery form table tr td input#pagecountduration {width: 200px;color: #000;}
|
26 |
+
.page-settings-summery form table tr td input.pagecountsubmit:hover {color: #000 !important;}
|
27 |
+
.page-settings-summery form table tr td {font-size: 15px;color: #23282D;text-transform: capitalize;font-weight: bold;}
|
28 |
+
.page-input-text {float: left;width: 100%;padding: 0;margin: 5px 0;}
|
29 |
+
.page-visit-summery {float: left;width: 100%;padding: 0;margin: 0;}
|
30 |
+
#example_wrapper {float: left;width: 100%;padding: 0;margin: 0;}
|
31 |
+
.paging_full_numbers a.paginate_active {background-color: #99B3FF;}
|
32 |
+
.paging_full_numbers a.paginate_button {background-color: #FFF !important;}
|
33 |
+
.main-page-visit .page-input-text input {width: 200px;height: 30px;line-height: 30px;padding-left: 10px;text-transform: capitalize;}
|
34 |
+
.main-page-visit .page-input-text a#search-submit {margin-left: 10px;margin-top: 2px;text-transform: uppercase;}
|
admin/images/icon.png
ADDED
Binary file
|
admin/images/sort_asc.png
ADDED
Binary file
|
admin/images/sort_both.png
ADDED
Binary file
|
admin/images/sort_desc.png
ADDED
Binary file
|
admin/js/custom.js
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( $ ) {
|
2 |
+
|
3 |
+
$( document ).ready(function() {
|
4 |
+
|
5 |
+
$('#MyDate').datepicker({dateFormat : 'yy-mm-dd'});
|
6 |
+
$('#example').DataTable({"iDisplayLength" : 10,"sPaginationType": "full_numbers","oLanguage": {"sEmptyTable": "No Page Found."}});
|
7 |
+
$('#example_filter').css("display","none");
|
8 |
+
$('#example_length').css("display","none");
|
9 |
+
|
10 |
+
|
11 |
+
$('body').on('click',"#search-submit",function() {
|
12 |
+
|
13 |
+
var pagename = $("#page-search-text").val();
|
14 |
+
var pagedate = $(".pagedateselect").val();
|
15 |
+
$.ajax({
|
16 |
+
type: "POST",
|
17 |
+
url: pagevisit.ajaxurl,
|
18 |
+
async:false,
|
19 |
+
data: ({
|
20 |
+
action: 'select_input_page_value',
|
21 |
+
page_name:pagename,
|
22 |
+
page_date:pagedate
|
23 |
+
}),
|
24 |
+
success: function(data) {
|
25 |
+
$(".page-visit-summery").empty();
|
26 |
+
$(".page-visit-summery").append(data);
|
27 |
+
$('#example').DataTable({"iDisplayLength" : 10,"sPaginationType": "full_numbers","oLanguage": {"sEmptyTable": "No Page Found."} });
|
28 |
+
$('#example_filter').css("display","none");
|
29 |
+
$('#example_length').css("display","none");
|
30 |
+
}
|
31 |
+
});
|
32 |
+
|
33 |
+
});
|
34 |
+
|
35 |
+
$("#ui-datepicker-div").css("display","none");
|
36 |
+
|
37 |
+
|
38 |
+
$('body').on('change',"#page-setting-options",function() {
|
39 |
+
$('td.countduration').css('display', 'block');
|
40 |
+
$('#pagecountduration').css('display', 'block');
|
41 |
+
$('.pagecountsubmit').css('display', 'block');
|
42 |
+
});
|
43 |
+
|
44 |
+
|
45 |
+
$('body').on('click',"#pagevisibleset",function() {
|
46 |
+
var checkeoption= $("input[name='visiblesetting']:checked").val();
|
47 |
+
if( checkeoption == 'disable' ){
|
48 |
+
$('#pagecountduration').attr('readonly', 'true');
|
49 |
+
$('#page-setting-options').prop('disabled', 'disabled');
|
50 |
+
|
51 |
+
}else if( checkeoption == 'enable' ) {
|
52 |
+
$('#pagecountduration').removeAttr("readonly");
|
53 |
+
$('#page-setting-options').removeAttr("disabled");
|
54 |
+
}
|
55 |
+
});
|
56 |
+
|
57 |
+
|
58 |
+
$('body').on('click',".pagecountsubmit",function() {
|
59 |
+
var selectoption= $("#page-setting-options").val();
|
60 |
+
var countduration = $("#pagecountduration").val();
|
61 |
+
var checkeoption= $("input[name='visiblesetting']:checked").val();
|
62 |
+
if( checkeoption == 'disable' ){
|
63 |
+
return false;
|
64 |
+
}else{
|
65 |
+
$.ajax({
|
66 |
+
type: "POST",
|
67 |
+
url: pagevisit.ajaxurl,
|
68 |
+
async:false,
|
69 |
+
data: ({
|
70 |
+
action:'add_page_count_option',
|
71 |
+
select_option:selectoption,
|
72 |
+
count_duration:countduration
|
73 |
+
}),
|
74 |
+
success: function(data) {
|
75 |
+
$("td.record-mesage").empty();
|
76 |
+
$("td.record-mesage").html("<h4 style='color:#075F0E;'>Settings saved Sucessfully.</h4>");
|
77 |
+
}
|
78 |
+
});
|
79 |
+
}
|
80 |
+
});
|
81 |
+
|
82 |
+
// check textbox value only numeric
|
83 |
+
$("#pagecountduration").keypress(function (e) {
|
84 |
+
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
|
85 |
+
$("#errmsg").html("Digits Only").show().fadeOut("slow");
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
});
|
89 |
+
|
90 |
+
|
91 |
+
});
|
92 |
+
|
93 |
+
})( jQuery );
|
admin/js/jquery.dataTables.min.js
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* File: jquery.dataTables.min.js
|
3 |
+
* Version: 1.9.4
|
4 |
+
* Author: Allan Jardine (www.sprymedia.co.uk)
|
5 |
+
* Info: www.datatables.net
|
6 |
+
*
|
7 |
+
* Copyright 2008-2012 Allan Jardine, all rights reserved.
|
8 |
+
*
|
9 |
+
* This source file is free software, under either the GPL v2 license or a
|
10 |
+
* BSD style license, available at:
|
11 |
+
* http://datatables.net/license_gpl2
|
12 |
+
* http://datatables.net/license_bsd
|
13 |
+
*
|
14 |
+
* This source file is distributed in the hope that it will be useful, but
|
15 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
+
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
17 |
+
*/
|
18 |
+
(function(X,l,n){var L=function(h){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d],
|
19 |
+
c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;m(a,d,null)}function m(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),h.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var i=d.mRender?Q(d.mRender):null,f=Q(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?i(c,b,a):c};d.fnSetData=
|
20 |
+
L(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1==
|
21 |
+
h.inArray("asc",d.asSorting)&&-1!=h.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;da(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){var c=r(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function R(a,b){var c=r(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function t(a){return r(a,"bVisible").length}
|
22 |
+
function r(a,b){var c=[];h.map(a.aoColumns,function(a,i){a[b]&&c.push(i)});return c}function B(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var i=b[d](a);if(null!==i)return i}return"string"}function u(a,b){for(var c=b.split(","),d=[],i=0,f=a.aoColumns.length;i<f;i++)for(var g=0;g<f;g++)if(a.aoColumns[i].sName==c[g]){d.push(g);break}return d}function M(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function ta(a,b,c,d){var i,f,
|
23 |
+
g,e,w;if(b)for(i=b.length-1;0<=i;i--){var j=b[i].aTargets;h.isArray(j)||D(a,1,"aTargets must be an array of targets, not a "+typeof j);f=0;for(g=j.length;f<g;f++)if("number"===typeof j[f]&&0<=j[f]){for(;a.aoColumns.length<=j[f];)o(a);d(j[f],b[i])}else if("number"===typeof j[f]&&0>j[f])d(a.aoColumns.length+j[f],b[i]);else if("string"===typeof j[f]){e=0;for(w=a.aoColumns.length;e<w;e++)("_all"==j[f]||h(a.aoColumns[e].nTh).hasClass(j[f]))&&d(e,b[i])}}if(c){i=0;for(a=c.length;i<a;i++)d(i,c[i])}}function H(a,
|
24 |
+
b){var c;c=h.isArray(b)?b.slice():h.extend(!0,{},b);var d=a.aoData.length,i=h.extend(!0,{},j.models.oRow);i._aData=c;a.aoData.push(i);for(var f,i=0,g=a.aoColumns.length;i<g;i++)c=a.aoColumns[i],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mData?F(a,d,i,S(a,d,i)):F(a,d,i,v(a,d,i)),c._bAutoType&&"string"!=c.sType&&(f=v(a,d,i,"type"),null!==f&&""!==f&&(f=B(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ea(a,
|
25 |
+
d);return d}function ua(a){var b,c,d,i,f,g,e;if(a.bDeferLoading||null===a.sAjaxSource)for(b=a.nTBody.firstChild;b;){if("TR"==b.nodeName.toUpperCase()){c=a.aoData.length;b._DT_RowIndex=c;a.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:b}));a.aiDisplayMaster.push(c);f=b.firstChild;for(d=0;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)F(a,c,d,h.trim(f.innerHTML)),d++;f=f.nextSibling}}b=b.nextSibling}i=T(a);d=[];b=0;for(c=i.length;b<c;b++)for(f=i[b].firstChild;f;)g=f.nodeName.toUpperCase(),("TD"==
|
26 |
+
g||"TH"==g)&&d.push(f),f=f.nextSibling;c=0;for(i=a.aoColumns.length;c<i;c++){e=a.aoColumns[c];null===e.sTitle&&(e.sTitle=e.nTh.innerHTML);var w=e._bAutoType,o="function"===typeof e.fnRender,k=null!==e.sClass,n=e.bVisible,m,p;if(w||o||k||!n){g=0;for(b=a.aoData.length;g<b;g++)f=a.aoData[g],m=d[g*i+c],w&&"string"!=e.sType&&(p=v(a,g,c,"type"),""!==p&&(p=B(p),null===e.sType?e.sType=p:e.sType!=p&&"html"!=e.sType&&(e.sType="string"))),e.mRender?m.innerHTML=v(a,g,c,"display"):e.mData!==c&&(m.innerHTML=v(a,
|
27 |
+
g,c,"display")),o&&(p=S(a,g,c),m.innerHTML=p,e.bUseRendered&&F(a,g,c,p)),k&&(m.className+=" "+e.sClass),n?f._anHidden[c]=null:(f._anHidden[c]=m,m.parentNode.removeChild(m)),e.fnCreatedCell&&e.fnCreatedCell.call(a.oInstance,m,v(a,g,c,"display"),f._aData,g,c)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)f=a.aoData[b],A(a,"aoRowCreatedCallback",null,[f.nTr,f._aData,b])}}function I(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function fa(a,b,c){for(var b=J(a,b),d=0,a=
|
28 |
+
a.aoColumns.length;d<a;d++)if(b[d]===c)return d;return-1}function Y(a,b,c,d){for(var i=[],f=0,g=d.length;f<g;f++)i.push(v(a,b,d[f],c));return i}function v(a,b,c,d){var i=a.aoColumns[c];if((c=i.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===i.sDefaultContent&&(D(a,0,"Requested unknown parameter "+("function"==typeof i.mData?"{mData function}":"'"+i.mData+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),i.sDefaultContent;if(null===c&&null!==i.sDefaultContent)c=
|
29 |
+
i.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function F(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Q(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d,i){return a(b,d,i)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var f=i.split("."),g;if(""!==i){var e=0;for(g=f.length;e<g;e++){if(i=f[e].match(U)){f[e]=f[e].replace(U,"");""!==f[e]&&(a=a[f[e]]);
|
30 |
+
g=[];f.splice(0,e+1);for(var f=f.join("."),e=0,h=a.length;e<h;e++)g.push(b(a[e],d,f));a=i[0].substring(1,i[0].length-1);a=""===a?g:g.join(a);break}if(null===a||a[f[e]]===n)return n;a=a[f[e]]}}return a};return function(c,d){return b(c,d,a)}}return function(b){return b[a]}}function L(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var i=i.split("."),f,g,e=0;for(g=
|
31 |
+
i.length-1;e<g;e++){if(f=i[e].match(U)){i[e]=i[e].replace(U,"");a[i[e]]=[];f=i.slice();f.splice(0,e+1);g=f.join(".");for(var h=0,j=d.length;h<j;h++)f={},b(f,d[h],g),a[i[e]].push(f);return}if(null===a[i[e]]||a[i[e]]===n)a[i[e]]={};a=a[i[e]]}a[i[i.length-1].replace(U,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Z(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ga(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,
|
32 |
+
a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);y(a)}function ha(a,b){for(var c=-1,d=0,i=a.length;d<i;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function S(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},v(a,b,c,"display"))}function ea(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&
|
33 |
+
(c.nTr.className=c._aData.DT_RowClass);for(var i=0,f=a.aoColumns.length;i<f;i++){var g=a.aoColumns[i];d=l.createElement(g.sCellType);d.innerHTML="function"===typeof g.fnRender&&(!g.bUseRendered||null===g.mData)?S(a,b,i):v(a,b,i,"display");null!==g.sClass&&(d.className=g.sClass);g.bVisible?(c.nTr.appendChild(d),c._anHidden[i]=null):c._anHidden[i]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,v(a,b,i,"display"),c._aData,b,i)}A(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,
|
34 |
+
c,d;if(0!==h("th, td",a.nTHead).length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var i=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,
|
35 |
+
c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),i.appendChild(c);h(a.nTHead).html("")[0].appendChild(i);V(a.aoHeader,a.nTHead)}h(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;i=l.createElement("div");i.className=a.oClasses.sSortJUIWrapper;h(c).contents().appendTo(i);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;i.appendChild(f);c.appendChild(i)}}if(a.oFeatures.bSort)for(b=
|
36 |
+
0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ia(a,a.aoColumns[b].nTh,b):h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=N(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&h(c[b]).addClass(a.aoColumns[b].sClass))}}function W(a,b,c){var d,i,f,g=[],e=[],h=a.aoColumns.length,j;c===n&&(c=!1);d=0;for(i=
|
37 |
+
b.length;d<i;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=h-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);e.push([])}d=0;for(i=g.length;d<i;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(j=h=1,e[d][f]===n){a.appendChild(g[d][f].cell);for(e[d][f]=1;g[d+h]!==n&&g[d][f].cell==g[d+h][f].cell;)e[d+h][f]=1,h++;for(;g[d][f+j]!==n&&g[d][f].cell==g[d][f+j].cell;){for(c=0;c<h;c++)e[d+c][f+j]=1;j++}g[d][f].cell.rowSpan=h;g[d][f].cell.colSpan=j}}}function x(a){var b=
|
38 |
+
A(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))E(a,!1);else{var c,d,b=[],i=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,y(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=
|
39 |
+
a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g<d;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&ea(a,a.aiDisplay[g]);var j=e.nTr;if(0!==f){var o=a.asStripeClasses[i%f];e._sRowStripe!=o&&(h(j).removeClass(e._sRowStripe).addClass(o),e._sRowStripe=o)}A(a,"aoRowCallback",null,[j,a.aoData[a.aiDisplay[g]]._aData,i,g]);b.push(j);i++;if(0!==c)for(e=0;e<c;e++)if(j==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&
|
40 |
+
(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide?f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=t(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ja(a,f),b[i].appendChild(c);A(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);A(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],
|
41 |
+
Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);i=l.createDocumentFragment();c=l.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)i.appendChild(b[c]);a.nTBody.appendChild(i);null!==f&&f.appendChild(a.nTBody)}A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(E(a,!1),
|
42 |
+
a._bInitComplete||$(a))}}function aa(a){a.oFeatures.bSort?O(a,a.oPreviousSearch):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(y(a),x(a))}function xa(a){var b=h("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),i,f,g,e,w,o,k,m=0;m<d.length;m++){f=0;g=d[m];if("<"==g){e=h("<div></div>")[0];w=d[m+
|
43 |
+
1];if("'"==w||'"'==w){o="";for(k=2;d[m+k]!=w;)o+=d[m+k],k++;"H"==o?o=a.oClasses.sJUIHeader:"F"==o&&(o=a.oClasses.sJUIFooter);-1!=o.indexOf(".")?(w=o.split("."),e.id=w[0].substr(1,w[0].length-1),e.className=w[1]):"#"==o.charAt(0)?e.id=o.substr(1,o.length-1):e.className=o;m+=k}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)i=ya(a),f=1;else if("f"==g&&a.oFeatures.bFilter)i=za(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)i=Aa(a),f=
|
44 |
+
1;else if("t"==g)i=Ba(a),f=1;else if("i"==g&&a.oFeatures.bInfo)i=Ca(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)i=Da(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;k=0;for(w=e.length;k<w;k++)if(g==e[k].cFeature){(i=e[k].fnInit(a))&&(f=1);break}}1==f&&null!==i&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(i),c.appendChild(i))}b.parentNode.replaceChild(a.nTableWrapper,b)}function V(a,b){var c=h(b).children("tr"),d,i,f,g,e,j,o,k,m,p;a.splice(0,a.length);
|
45 |
+
f=0;for(j=c.length;f<j;f++)a.push([]);f=0;for(j=c.length;f<j;f++){d=c[f];for(i=d.firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase()){k=1*i.getAttribute("colspan");m=1*i.getAttribute("rowspan");k=!k||0===k||1===k?1:k;m=!m||0===m||1===m?1:m;g=0;for(e=a[f];e[g];)g++;o=g;p=1===k?!0:!1;for(e=0;e<k;e++)for(g=0;g<m;g++)a[f+g][o+e]={cell:i,unique:p},a[f+g].nTr=d}i=i.nextSibling}}}function N(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],V(c,b)));for(var b=0,i=c.length;b<i;b++)for(var f=
|
46 |
+
0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++;E(a,!0);var b=Ea(a);ka(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,i,f,g;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:M(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",
|
47 |
+
value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mData,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==
|
48 |
+
a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){i=a.aoColumns[d[f][0]].aDataSort;for(g=0;g<i.length;g++)c.push({name:"iSortCol_"+e,value:i[g]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ka(a,b){A(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==n){if(1*b.sEcho<
|
49 |
+
a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ga(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=M(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=u(a,b.sColumns));for(var i=Q(a.sAjaxDataProp)(b),f=0,g=i.length;f<g;f++)if(c){for(var e=[],h=0,j=a.aoColumns.length;h<j;h++)e.push(i[f][d[h]]);H(a,e)}else H(a,i[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;x(a);a.bAjaxDataGet=
|
50 |
+
!0;E(a,!1)}function za(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"""));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,
|
51 |
+
g=0,e=c.length;g<e;g++)c[g]!=h(this).parents("div.dataTables_filter")[0]&&h(c[g]._DT_Input).val(d);d!=b.sSearch&&K(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function K(a,b,c){var d=a.oPreviousSearch,i=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);
|
52 |
+
else{Ga(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,i[b].sSearch,b,i[b].bRegex,i[b].bSmart,i[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;h(a.oInstance).trigger("filter",a);a._iDisplayStart=0;y(a);x(a);la(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=r(a,"bSearchable"),d=0,i=b.length;d<i;d++)for(var f=0,g=0,e=a.aiDisplay.length;g<e;g++){var h=a.aiDisplay[g-f];b[d](a,Y(a,h,"filter",c),h)||(a.aiDisplay.splice(g-f,1),f++)}}function Ha(a,b,c,
|
53 |
+
d,i,f){if(""!==b)for(var g=0,b=ma(b,d,i,f),d=a.aiDisplay.length-1;0<=d;d--)i=Ja(v(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(i)||(a.aiDisplay.splice(d,1),g++)}function Ga(a,b,c,d,i,f){d=ma(b,d,i,f);i=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||i.sSearch.length>b.length||1==c||0!==b.indexOf(i.sSearch)){a.aiDisplay.splice(0,
|
54 |
+
a.aiDisplay.length);la(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function la(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch=[];for(var c=r(a,"bSearchable"),d=1===b?a.aiDisplayMaster:a.aiDisplay,i=0,f=d.length;i<f;i++)a.asDataSearch[i]=na(a,Y(a,d[i],"filter",c))}}function na(a,b){var c=b.join(" ");-1!==c.indexOf("&")&&(c=h("<div>").html(c).text());
|
55 |
+
return c.replace(/[\n\r]/g," ")}function ma(a,b,c,d){if(c)return a=b?a.split(" "):oa(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:oa(a);return RegExp(a,d?"i":"")}function Ja(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function oa(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),
|
56 |
+
"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:Ka,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ka(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),i=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f?b.sInfoEmpty:b.sInfo;f!=i&&(g+=" "+b.sInfoFiltered);g+=b.sInfoPostFix;g=ja(a,g);
|
57 |
+
null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,i,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)h(a[b]).html(g)}}function ja(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),i=a.fnRecordsDisplay(),i=a.fnFormatNumber(i),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace(/_START_/g,c).replace(/_END_/g,d).replace(/_TOTAL_/g,i).replace(/_MAX_/g,f)}function ba(a){var b,c,d=a.iInitDisplayStart;
|
58 |
+
if(!1===a.bInitialised)setTimeout(function(){ba(a)},200);else{xa(a);va(a);W(a,a.aoHeader);a.nTFoot&&W(a,a.aoFooter);E(a,!0);a.oFeatures.bAutoWidth&&da(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?O(a):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),y(a),x(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ka(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,
|
59 |
+
c,function(c){var f=a.sAjaxDataProp!==""?Q(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)H(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();y(a);x(a)}E(a,false);$(a,c)},a)):a.oFeatures.bServerSide||(E(a,!1),$(a))}}function $(a,b){a._bInitComplete=!0;A(a,"aoInitComplete","init",[a,b])}function pa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&&p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&
|
60 |
+
(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,i=a.aLengthMenu;if(2==i.length&&"object"===typeof i[0]&&"object"===typeof i[1]){c=0;for(d=i[0].length;c<d;c++)b+='<option value="'+i[0][c]+'">'+i[1][c]+"</option>"}else{c=0;for(d=i.length;c<d;c++)b+='<option value="'+i[c]+'">'+i[c]+"</option>"}b+="</select>";i=l.createElement("div");a.aanFeatures.l||
|
61 |
+
(i.id=a.sTableId+"_length");i.className=a.oClasses.sLength;i.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";h('select option[value="'+a._iDisplayLength+'"]',i).attr("selected",!0);h("select",i).bind("change.DT",function(){var b=h(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;c<d;c++)i[c]!=this.parentNode&&h("select",i[c]).val(b);a._iDisplayLength=parseInt(b,10);y(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<
|
62 |
+
0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;x(a)});h("select",i).attr("aria-controls",a.sTableId);return i}function y(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,
|
63 |
+
b,function(a){y(a);x(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){y(a);x(a)})},sName:"pagination"});return b}function qa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=
|
64 |
+
0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else D(a,0,"Unknown paging action: "+b);h(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b=l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+
|
65 |
+
"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function E(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,i=c.length;d<i;d++)c[d].style.visibility=b?"visible":"hidden";h(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=l.createElement("div"),i=l.createElement("div"),f=l.createElement("div"),
|
66 |
+
g=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),o=a.nTable.getElementsByTagName("thead")[0],k=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],m=a.oClasses;c.appendChild(d);f.appendChild(g);i.appendChild(a.nTable);b.appendChild(c);b.appendChild(i);d.appendChild(e);e.appendChild(o);null!==k&&(b.appendChild(f),g.appendChild(j),j.appendChild(k));b.className=m.sScrollWrapper;c.className=m.sScrollHead;d.className=m.sScrollHeadInner;
|
67 |
+
i.className=m.sScrollBody;f.className=m.sScrollFoot;g.className=m.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",i.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==k&&(j.removeAttribute("id"),j.style.marginLeft="0");d=h(a.nTable).children("caption");0<
|
68 |
+
d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&k&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),i.style.width=q(a.oScroll.sX),null!==k&&(f.style.width=q(a.oScroll.sX)),h(i).scroll(function(){c.scrollLeft=this.scrollLeft;if(k!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(i.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:La,sName:"scrolling"});a.oScroll.bInfinite&&h(i).scroll(function(){if(!a.bDrawing&&h(this).scrollTop()!==
|
69 |
+
0&&h(this).scrollTop()+h(this).height()>h(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){qa(a,"next");y(a);x(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function La(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,i,f,g,e,j,o,k,m,p=[],n=[],l=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,R=null!==a.nTFoot?l.getElementsByTagName("table")[0]:null,r=a.oBrowser.bScrollOversize,s=function(a){k=
|
70 |
+
a.style;k.paddingTop="0";k.paddingBottom="0";k.borderTopWidth="0";k.borderBottomWidth="0";k.height=0};h(a.nTable).children("thead, tfoot").remove();i=h(a.nTHead).clone()[0];a.nTable.insertBefore(i,a.nTable.childNodes[0]);g=a.nTHead.getElementsByTagName("tr");e=i.getElementsByTagName("tr");null!==a.nTFoot&&(j=h(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]),o=a.nTFoot.getElementsByTagName("tr"),j=j.getElementsByTagName("tr"));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width=
|
71 |
+
"100%");var t=N(a,i);i=0;for(f=t.length;i<f;i++)m=G(a,i),t[i].style.width=a.aoColumns[m].sWidth;null!==a.nTFoot&&C(function(a){a.style.width=""},j);a.oScroll.bCollapse&&""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");i=h(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",r&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=
|
72 |
+
q(a.oScroll.sXInner):i==h(d).width()&&h(d).height()<h(a.nTable).height()?(a.nTable.style.width=q(i-a.oScroll.iBarWidth),h(a.nTable).outerWidth()>i-a.oScroll.iBarWidth&&(a.nTable.style.width=q(i))):a.nTable.style.width=q(i);i=h(a.nTable).outerWidth();C(s,e);C(function(a){p.push(q(h(a).width()))},e);C(function(a,b){a.style.width=p[b]},g);h(e).height(0);null!==a.nTFoot&&(C(s,j),C(function(a){n.push(q(h(a).width()))},j),C(function(a,b){a.style.width=n[b]},o),h(j).height(0));C(function(a,b){a.innerHTML=
|
73 |
+
"";a.style.width=p[b]},e);null!==a.nTFoot&&C(function(a,b){a.innerHTML="";a.style.width=n[b]},j);if(h(a.nTable).outerWidth()<i){g=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?i+a.oScroll.iBarWidth:i;if(r&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(g-a.oScroll.iBarWidth);d.style.width=q(g);a.nScrollHead.style.width=q(g);null!==a.nTFoot&&(a.nScrollFoot.style.width=q(g));""===a.oScroll.sX?D(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):
|
74 |
+
""!==a.oScroll.sXInner&&D(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),a.nScrollHead.style.width=q("100%"),null!==a.nTFoot&&(a.nScrollFoot.style.width=q("100%"));""===a.oScroll.sY&&r&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),r=""!==a.oScroll.sX&&a.nTable.offsetWidth>
|
75 |
+
d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+r)));r=h(a.nTable).outerWidth();c.style.width=q(r);b.style.width=q(r);c=h(a.nTable).height()>d.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";null!==a.nTFoot&&(R.style.width=q(r),l.style.width=q(r),l.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function C(a,b,c){for(var d=
|
76 |
+
0,i=0,f=b.length,g,e;i<f;){g=b[i].firstChild;for(e=c?c[i].firstChild:null;g;)1===g.nodeType&&(c?a(g,e,d):a(g,d),d++),g=g.nextSibling,e=c?e.nextSibling:null;i++}}function Ma(a,b){if(!a||null===a||""===a)return 0;b||(b=l.body);var c,d=l.createElement("div");d.style.width=q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function da(a){var b=0,c,d=0,i=a.aoColumns.length,f,e,j=h("th",a.nTHead),o=a.nTable.getAttribute("width");e=a.nTable.parentNode;for(f=0;f<i;f++)a.aoColumns[f].bVisible&&
|
77 |
+
(d++,null!==a.aoColumns[f].sWidth&&(c=Ma(a.aoColumns[f].sWidthOrig,e),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(i==j.length&&0===b&&d==i&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=h(j[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b=a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),C(function(a){a.style.width=
|
78 |
+
""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=h("thead th",b);0===d.length&&(d=h("tbody tr:eq(0)>td",b));j=N(a,f);for(f=d=0;f<i;f++){var k=a.aoColumns[f];k.bVisible&&null!==k.sWidthOrig&&""!==k.sWidthOrig?j[f-d].style.width=q(k.sWidthOrig):k.bVisible?j[f-d].style.width="":d++}for(f=0;f<i;f++)a.aoColumns[f].bVisible&&(d=Na(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));e.appendChild(b);
|
79 |
+
""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",h(b).width()<e.offsetWidth&&(b.style.width=q(e.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(e.offsetWidth):o&&(b.style.width=q(o));b.style.visibility="hidden";Oa(a,b);i=h("tbody tr:eq(0)",b).children();0===i.length&&(i=N(a,h("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=e=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=null===a.aoColumns[f].sWidthOrig?e+h(i[d]).outerWidth():
|
80 |
+
e+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(h(i[d]).outerWidth()-h(i[d]).width())),d++);b.style.width=q(e);a.nTable.style.width=q(e)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=h(i[d]).width(),null!==e&&0<e&&(a.aoColumns[f].sWidth=q(e)),d++);i=h(b).css("width");a.nTable.style.width=-1!==i.indexOf("%")?i:q(h(b).outerWidth());b.parentNode.removeChild(b)}o&&(a.nTable.style.width=q(o))}function Oa(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(h(b).width(),b.style.width=q(h(b).outerWidth()-
|
81 |
+
a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(h(b).outerWidth()))}function Na(a,b){var c=Pa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=v(a,c,b,"");return d}return J(a,c)[b]}function Pa(a,b){for(var c=-1,d=-1,i=0;i<a.aoData.length;i++){var e=v(a,i,b,"display")+"",e=e.replace(/<.*?>/g,"");e.length>c&&(c=e.length,d=i)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);
|
82 |
+
return 48>b||57<b?a:a+"px"}function Qa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function O(a,b){var c,d,i,e,g,k,o=[],m=[],p=
|
83 |
+
j.ext.oSort,l=a.aoData,q=a.aoColumns,G=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],i=R(a,d),e=a.aoColumns[d].sSortDataType,j.ext.afnSortData[e])if(g=j.ext.afnSortData[e].call(a.oInstance,a,d,i),g.length===l.length){i=0;for(e=l.length;i<e;i++)F(a,i,d,g[i])}else D(a,0,"Returned data sort array (col "+d+") is the wrong length");c=
|
84 |
+
0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var r=o.length,s;c=0;for(d=l.length;c<d;c++)for(i=0;i<r;i++){s=q[o[i][0]].aDataSort;g=0;for(k=s.length;g<k;g++)e=q[s[g]].sType,e=p[(e?e:"string")+"-pre"],l[c]._aSortData[s[g]]=e?e(v(a,c,s[g],"sort")):v(a,c,s[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,e,i,f;for(c=0;c<r;c++){f=q[o[c][0]].aDataSort;d=0;for(e=f.length;d<e;d++)if(i=q[f[d]].sType,i=p[(i?i:"string")+"-"+o[c][1]](l[a]._aSortData[f[d]],l[b]._aSortData[f[d]]),0!==
|
85 |
+
i)return i}return p["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&P(a);c=0;for(d=a.aoColumns.length;c<d;c++)e=q[c].sTitle.replace(/<.*?>/g,""),i=q[c].nTh,i.removeAttribute("aria-sort"),i.removeAttribute("aria-label"),q[c].bSortable?0<o.length&&o[0][0]==c?(i.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),i.setAttribute("aria-label",e+("asc"==(q[c].asSorting[o[0][2]+1]?q[c].asSorting[o[0][2]+1]:q[c].asSorting[0])?G.sSortAscending:G.sSortDescending))):i.setAttribute("aria-label",
|
86 |
+
e+("asc"==q[c].asSorting[0]?G.sSortAscending:G.sSortDescending)):i.setAttribute("aria-label",e);a.bSorted=!0;h(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?K(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,y(a),x(a))}function ia(a,b,c,d){Ra(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var e=function(){var d,e;if(b.shiftKey){for(var f=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){f=!0;d=a.aaSorting[h][0];e=a.aaSorting[h][2]+1;a.aoColumns[d].asSorting[e]?
|
87 |
+
(a.aaSorting[h][1]=a.aoColumns[d].asSorting[e],a.aaSorting[h][2]=e):a.aaSorting.splice(h,1);break}!1===f&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],e=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[e]||(e=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[e],a.aaSorting[0][2]=e):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));O(a)};a.oFeatures.bProcessing?(E(a,!0),setTimeout(function(){e();
|
88 |
+
a.oFeatures.bServerSide||E(a,!1)},0)):e();"function"==typeof d&&d(a)}})}function P(a){var b,c,d,e,f,g=a.aoColumns.length,j=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&h(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);c=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;e=-1;for(d=0;d<c.length;d++)if(c[d][0]==b){f="asc"==c[d][1]?
|
89 |
+
j.sSortAsc:j.sSortDesc;e=d;break}h(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(f=h("span."+j.sSortIcon,a.aoColumns[b].nTh),f.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),f.addClass(-1==e?a.aoColumns[b].sSortingClassJUI:"asc"==c[e][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){a=J(a);e=[];for(b=0;b<g;b++)e.push("");b=0;
|
90 |
+
for(d=1;b<c.length;b++)j=parseInt(c[b][0],10),e[j]=f+d,3>d&&d++;f=RegExp(f+"[123]");var o;b=0;for(c=a.length;b<c;b++)j=b%g,d=a[b].className,o=e[j],j=d.replace(f,o),j!=d?a[b].className=h.trim(j):0<o.length&&-1==d.indexOf(o)&&(a[b].className=d+" "+o)}}function ra(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:h.extend(!0,[],a.aaSorting),
|
91 |
+
oSearch:h.extend(!0,{},a.oPreviousSearch),aoSearchCols:h.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);A(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Sa(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=A(a,"aoStateLoadParams","stateLoadParams",[a,c]);if(-1===h.inArray(!1,d)){a.oLoadedState=h.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=
|
92 |
+
c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();h.extend(a.oPreviousSearch,c.oSearch);h.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];A(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function s(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function T(a){for(var b=
|
93 |
+
[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function J(a,b){var c=[],d,e,f,g,h,j;e=0;var o=a.aoData.length;b!==n&&(e=b,o=b+1);for(f=e;f<o;f++)if(j=a.aoData[f],null!==j.nTr){e=[];for(d=j.nTr.firstChild;d;)g=d.nodeName.toLowerCase(),("td"==g||"th"==g)&&e.push(d),d=d.nextSibling;g=d=0;for(h=a.aoColumns.length;g<h;g++)a.aoColumns[g].bVisible?c.push(e[g-d]):(c.push(j._anHidden[g]),d++)}return c}function D(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+
|
94 |
+
a.sTableId+"'): "+c;if(0===b)if("alert"==j.ext.sErrMode)alert(a);else throw Error(a);else X.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Ta(a,b){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=b[d],"object"===typeof e[d]&&null!==c&&!1===h.isArray(c)?h.extend(!0,a[d],c):a[d]=c);return a}function Ra(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}
|
95 |
+
function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function A(a,b,c,d){for(var b=a[b],e=[],f=b.length-1;0<=f;f--)e.push(b[f].fn.apply(a.oInstance,d));null!==c&&h(a.oInstance).trigger(c,d);return e}function Ua(a){var b=h('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize=
|
96 |
+
100===h("#DT_BrowserTest",b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Va(a){return function(){var b=[s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var U=/\[.*?\]$/,Wa=X.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,e=[],f=h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Wa(d)),e.push((f?"":'"'+c+'":')+d);return(f?
|
97 |
+
"[":"{")+e+(f?"]":"}")};this.$=function(a,b){var c,d,e=[],f;d=s(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(f=g[k[c]].nTr)&&e.push(f)}else if("current"==b.order&&"applied"==b.filter){c=0;for(d=o.length;c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("original"==
|
98 |
+
b.order&&"none"==b.filter){c=0;for(d=g.length;c<d;c++)(f=g[c].nTr)&&e.push(f)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=g.length;c<d;c++)f=g[c].nTr,-1!==h.inArray(c,o)&&f&&e.push(f)}else D(d,1,"Unknown selection options");e=h(e);c=e.filter(a);e=e.find(a);return h([].concat(h.makeArray(c),h.makeArray(e)))};this._=function(a,b){var c=[],d,e,f=this.$(a,b);d=0;for(e=f.length;d<e;d++)c.push(this.fnGetData(f[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],
|
99 |
+
d,e=s(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var f=0;f<a.length;f++){d=H(e,a[f]);if(-1==d)return c;c.push(d)}else{d=H(e,a);if(-1==d)return c;c.push(d)}e.aiDisplay=e.aiDisplayMaster.slice();(b===n||b)&&aa(e);return c};this.fnAdjustColumnSizing=function(a){var b=s(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=s(this[j.ext.iApiIndex]);ga(b);(a===n||a)&&x(b)};this.fnClose=
|
100 |
+
function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,a="object"===typeof a?I(d,a):a,g=d.aoData.splice(a,1);e=0;for(f=d.aoData.length;e<f;e++)null!==d.aoData[e].nTr&&(d.aoData[e].nTr._DT_RowIndex=e);e=h.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ha(d.aiDisplayMaster,
|
101 |
+
a);ha(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,g);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)y(d),x(d);return g};this.fnDestroy=function(a){var b=s(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,i,f,a=a===n?!1:a;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);if(!a){i=0;for(f=b.aoColumns.length;i<f;i++)!1===b.aoColumns[i].bVisible&&this.fnSetColumnVis(i,!0)}h(b.nTableWrapper).find("*").andSelf().unbind(".DT");
|
102 |
+
h("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];P(b);h(T(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,
|
103 |
+
b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);i=0;for(f=b.aoData.length;i<f;i++)null!==b.aoData[i].nTr&&d.appendChild(b.aoData[i].nTr);!0===b.oFeatures.bAutoWidth&&
|
104 |
+
(b.nTable.style.width=q(b.sDestroyWidth));if(f=b.asDestroyStripes.length){a=h(d).children("tr");for(i=0;i<f;i++)a.filter(":nth-child("+f+"n + "+i+")").addClass(b.asDestroyStripes[i])}i=0;for(f=j.settings.length;i<f;i++)j.settings[i]==b&&j.settings.splice(i,1);e=b=null};this.fnDraw=function(a){var b=s(this[j.ext.iApiIndex]);!1===a?(y(b),x(b)):aa(b)};this.fnFilter=function(a,b,c,d,e,f){var g=s(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===n||null===c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===
|
105 |
+
e)e=!0;if(f===n||null===f)f=!0;if(b===n||null===b){if(K(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)try{b[c]._DT_Input!=l.activeElement&&h(b[c]._DT_Input).val(a)}catch(o){h(b[c]._DT_Input).val(a)}}}else h.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),K(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=s(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();
|
106 |
+
"tr"===e?d=I(c,a):"td"===e&&(d=I(c,a.parentNode),b=fa(c,d,a))}return b!==n?v(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Z(c)};this.fnGetNodes=function(a){var b=s(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:T(b)};this.fnGetPosition=function(a){var b=s(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?I(b,a):"TD"==c||"TH"==c?(c=I(b,a.parentNode),a=fa(b,c,a),[c,R(b,a),a]):null};this.fnIsOpen=function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<
|
107 |
+
b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e=T(d);if(-1!==h.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=t(d);"string"===typeof b?f.innerHTML=b:h(f).html(b);b=h("tr",d.nTBody);-1!=h.inArray(a,b)&&h(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=s(this[j.ext.iApiIndex]);qa(c,a);
|
108 |
+
y(c);(b===n||b)&&x(c)};this.fnSetColumnVis=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,g=d.aoColumns,h=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)g[e].bVisible&&f++;m=f>=t(d);if(!m)for(e=a;e<g.length;e++)if(g[e].bVisible){o=e;break}e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(m?h[e].nTr.appendChild(h[e]._anHidden[a]):h[e].nTr.insertBefore(h[e]._anHidden[a],J(d,e)[o]))}else{e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(o=J(d,e)[a],h[e]._anHidden[a]=o,o.parentNode.removeChild(o))}g[a].bVisible=
|
109 |
+
b;W(d,d.aoHeader);d.nTFoot&&W(d,d.aoFooter);e=0;for(f=d.aoOpenRows.length;e<f;e++)d.aoOpenRows[e].nTr.colSpan=t(d);if(c===n||c)k(d),x(d);ra(d)}};this.fnSettings=function(){return s(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=s(this[j.ext.iApiIndex]);b.aaSorting=a;O(b)};this.fnSortListener=function(a,b,c){ia(s(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=s(this[j.ext.iApiIndex]),b="object"===typeof b?I(f,b):b;if(h.isArray(a)&&c===n){f.aoData[b]._aData=a.slice();
|
110 |
+
for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else if(h.isPlainObject(a)&&c===n){f.aoData[b]._aData=h.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else{F(f,b,c,a);var a=v(f,b,c,"display"),g=f.aoColumns[c];null!==g.fnRender&&(a=S(f,b,c),g.bUseRendered&&F(f,b,c,a));null!==f.aoData[b].nTr&&(J(f,b)[c].innerHTML=a)}c=h.inArray(b,f.aiDisplay);f.asDataSearch[c]=na(f,Y(f,b,"filter",r(f,"bSearchable")));(e===n||e)&&k(f);(d===n||d)&&aa(f);return 0};
|
111 |
+
this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Va,_fnInitialise:ba,_fnInitComplete:$,_fnLanguageCompat:pa,_fnAddColumn:o,_fnColumnOptions:m,_fnAddData:H,_fnCreateTr:ea,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:W,_fnDraw:x,_fnReDraw:aa,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ka,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:La,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:K,_fnFilterCustom:Ia,_fnFilterColumn:Ha,
|
112 |
+
_fnFilter:Ga,_fnBuildSearchArray:la,_fnBuildSearchRow:na,_fnFilterCreateSearch:ma,_fnDataToSearch:Ja,_fnSort:O,_fnSortAttachListener:ia,_fnSortingClasses:P,_fnFeatureHtmlPaginate:Da,_fnPageChange:qa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ka,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:E,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:R,_fnNodeToDataIndex:I,_fnVisbleColumns:t,_fnCalculateEnd:y,_fnConvertToWidth:Ma,_fnCalculateColumnWidths:da,_fnScrollingWidthAdjust:Oa,_fnGetWidestNode:Na,
|
113 |
+
_fnGetMaxLenString:Pa,_fnStringToCss:q,_fnDetectType:B,_fnSettingsFromNode:s,_fnGetDataMaster:Z,_fnGetTrNodes:T,_fnGetTdNodes:J,_fnEscapeRegex:oa,_fnDeleteIndex:ha,_fnReOrderIndex:u,_fnColumnOrdering:M,_fnLog:D,_fnClearTable:ga,_fnSaveState:ra,_fnLoadState:Sa,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=X.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),
|
114 |
+
b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/";a=l.cookie.split(";");e=b.split(";")[0].length;f=[];if(4096<e+l.cookie.length+10){for(var j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{(g=eval("("+decodeURIComponent(k[1])+")"))&&g.iCreate&&f.push({name:k[0],time:g.iCreate})}catch(m){}}for(f.sort(function(a,b){return b.time-a.time});4096<e+l.cookie.length+10;){if(0===f.length)return;d=f.pop();l.cookie=
|
115 |
+
d.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}}l.cookie=b},_fnReadCookie:function(a){for(var b=X.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null},_fnDetectHeader:V,_fnGetUniqueThs:N,_fnScrollBarWidth:Qa,_fnApplyToChildren:C,_fnMap:p,_fnGetRowData:Y,
|
116 |
+
_fnGetCellData:v,_fnSetCellData:F,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:L,_fnApplyColumnDefs:ta,_fnBindAction:Ra,_fnExtend:Ta,_fnCallbackReg:z,_fnCallbackFire:A,_fnJsonString:Wa,_fnRender:S,_fnNodeToColumnIndex:fa,_fnInfoMacros:ja,_fnBrowserDetect:Ua,_fnGetColumns:r};h.extend(j.ext.oApi,this.oApi);for(var sa in j.ext.oApi)sa&&(this[sa]=Va(sa));var ca=this;this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var i=!1,f=!1;if("table"!=this.nodeName.toLowerCase())D(null,0,"Attempted to initialise DataTables on a node which is not a table: "+
|
117 |
+
this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{D(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;
|
118 |
+
var g=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ca.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===ca.length?ca:h(this).dataTable();e||(e={});e.oLanguage&&pa(e.oLanguage);e=Ta(h.extend(!0,{},j.defaults),e);p(g.oFeatures,e,"bPaginate");p(g.oFeatures,e,"bLengthChange");p(g.oFeatures,e,"bFilter");p(g.oFeatures,e,"bSort");p(g.oFeatures,e,"bInfo");p(g.oFeatures,e,"bProcessing");p(g.oFeatures,e,"bAutoWidth");p(g.oFeatures,e,"bSortClasses");
|
119 |
+
p(g.oFeatures,e,"bServerSide");p(g.oFeatures,e,"bDeferRender");p(g.oScroll,e,"sScrollX","sX");p(g.oScroll,e,"sScrollXInner","sXInner");p(g.oScroll,e,"sScrollY","sY");p(g.oScroll,e,"bScrollCollapse","bCollapse");p(g.oScroll,e,"bScrollInfinite","bInfinite");p(g.oScroll,e,"iScrollLoadGap","iLoadGap");p(g.oScroll,e,"bScrollAutoCss","bAutoCss");p(g,e,"asStripeClasses");p(g,e,"asStripClasses","asStripeClasses");p(g,e,"fnServerData");p(g,e,"fnFormatNumber");p(g,e,"sServerMethod");p(g,e,"aaSorting");p(g,
|
120 |
+
e,"aaSortingFixed");p(g,e,"aLengthMenu");p(g,e,"sPaginationType");p(g,e,"sAjaxSource");p(g,e,"sAjaxDataProp");p(g,e,"iCookieDuration");p(g,e,"sCookiePrefix");p(g,e,"sDom");p(g,e,"bSortCellsTop");p(g,e,"iTabIndex");p(g,e,"oSearch","oPreviousSearch");p(g,e,"aoSearchCols","aoPreSearchCols");p(g,e,"iDisplayLength","_iDisplayLength");p(g,e,"bJQueryUI","bJUI");p(g,e,"fnCookieCallback");p(g,e,"fnStateLoad");p(g,e,"fnStateSave");p(g.oLanguage,e,"fnInfoCallback");z(g,"aoDrawCallback",e.fnDrawCallback,"user");
|
121 |
+
z(g,"aoServerParams",e.fnServerParams,"user");z(g,"aoStateSaveParams",e.fnStateSaveParams,"user");z(g,"aoStateLoadParams",e.fnStateLoadParams,"user");z(g,"aoStateLoaded",e.fnStateLoaded,"user");z(g,"aoRowCallback",e.fnRowCallback,"user");z(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(g,"aoHeaderCallback",e.fnHeaderCallback,"user");z(g,"aoFooterCallback",e.fnFooterCallback,"user");z(g,"aoInitComplete",e.fnInitComplete,"user");z(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&
|
122 |
+
g.oFeatures.bSort&&g.oFeatures.bSortClasses?z(g,"aoDrawCallback",P,"server_side_sort_classes"):g.oFeatures.bDeferRender&&z(g,"aoDrawCallback",P,"defer_sort_classes");e.bJQueryUI?(h.extend(g.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(g.sDom='<"H"lfr>t<"F"ip>')):h.extend(g.oClasses,j.ext.oStdClasses);h(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Qa();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart,
|
123 |
+
g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Sa(g,e),z(g,"aoDrawCallback",ra,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=h.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(g.oLanguage.sUrl,null,function(a){pa(a);h.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),i=!0):h.extend(!0,
|
124 |
+
g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);b=g.asStripeClasses.length;g.asDestroyStripes=[];if(b){c=!1;d=h(this).children("tbody").children("tr:lt("+b+")");for(a=0;a<b;a++)d.hasClass(g.asStripeClasses[a])&&(c=!0,g.asDestroyStripes.push(g.asStripeClasses[a]));c&&d.removeClass(g.asStripeClasses.join(" "))}c=[];a=this.getElementsByTagName("thead");0!==a.length&&(V(g.aoHeader,a[0]),c=N(g));if(null===e.aoColumns){d=[];a=0;for(b=
|
125 |
+
c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b=d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(g,c?c[a]:null);ta(g,e.aoColumnDefs,d,function(a,b){m(g,a,b)});a=0;for(b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]=
|
126 |
+
k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(g.aaSorting[a][1]==k.asSorting[c]){g.aaSorting[a][2]=c;break}}P(g);Ua(g);a=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});b=h(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));g.nTHead=b[0];b=h(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));g.nTBody=b[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live",
|
127 |
+
"polite");g.nTBody.setAttribute("aria-relevant","all");b=h(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==g.oScroll.sX||""!==g.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(g.nTFoot=b[0],V(g.aoFooter,g.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)H(g,e.aaData[a]);else ua(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===i&&ba(g)}});ca=null;return this};j.fnVersionCheck=function(e){for(var h=function(e,h){for(;e.length<h;)e+="0";return e},m=j.ext.sVersion.split("."),
|
128 |
+
e=e.split("."),k="",n="",l=0,t=e.length;l<t;l++)k+=h(m[l],3),n+=h(e[l],3);return parseInt(k,10)>=parseInt(n,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;m<h.length;m++)if(h[m].nTable===e||h[m].nScrollHead===e||h[m].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&h(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.4";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],
|
129 |
+
aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,
|
130 |
+
fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,
|
131 |
+
bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k<h;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[h-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,
|
132 |
+
fnRowCallback:null,fnServerData:function(e,j,m,k){k.jqXHR=h.ajax({url:e,data:j,success:function(e){e.sError&&k.oApi._fnLog(k,0,e.sError);h(k.oInstance).trigger("xhr",[k,e]);m(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,h){"parsererror"==h&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j=
|
133 |
+
"function"===typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,h){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(h),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
|
134 |
+
oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",
|
135 |
+
sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,
|
136 |
+
bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,
|
137 |
+
asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],
|
138 |
+
oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},
|
139 |
+
fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=h.extend(!0,{},j.models.ext);h.extend(j.ext.oStdClasses,
|
140 |
+
{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",
|
141 |
+
sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
|
142 |
+
sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""});h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",
|
143 |
+
sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
|
144 |
+
sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",
|
145 |
+
sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});h.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)},k=!e.bJUI?'<a class="'+
|
146 |
+
e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';h(j).append(k);var l=h("a",j),
|
147 |
+
k=l[0],l=l[1];e.oApi._fnBindAction(k,{action:"previous"},n);e.oApi._fnBindAction(l,{action:"next"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",l.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),l.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k,l=0,n=j.length;l<n;l++)if(k=j[l].firstChild)k.className=0===e._iDisplayStart?h.sPagePrevDisabled:h.sPagePrevEnabled,k=k.nextSibling,
|
148 |
+
k.className=e.fnDisplayEnd()==e.fnRecordsDisplay()?h.sPageNextDisabled:h.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,l=e.oClasses,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)};h(j).append('<a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+
|
149 |
+
l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var t=h("a",j),k=t[0],l=t[1],r=t[2],t=t[3];e.oApi._fnBindAction(k,{action:"first"},n);e.oApi._fnBindAction(l,{action:"previous"},n);e.oApi._fnBindAction(r,{action:"next"},n);e.oApi._fnBindAction(t,{action:"last"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",r.id=e.sTableId+"_next",t.id=e.sTableId+"_last")},
|
150 |
+
fnUpdate:function(e,o){if(e.aanFeatures.p){var m=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(m/2),l=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),n=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,t="",r,B=e.oClasses,u,M=e.aanFeatures.p,L=function(h){e.oApi._fnBindAction(this,{page:h+r-1},function(h){e.oApi._fnPageChange(e,h.data.page);o(e);h.preventDefault()})};-1===e._iDisplayLength?n=k=r=1:l<m?(r=1,k=l):n<=k?(r=1,k=m):n>=l-k?(r=l-m+1,k=l):(r=n-Math.ceil(m/2)+1,k=r+m-1);for(m=r;m<=k;m++)t+=
|
151 |
+
n!==m?'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButton+'">'+e.fnFormatNumber(m)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButtonActive+'">'+e.fnFormatNumber(m)+"</a>";m=0;for(k=M.length;m<k;m++)u=M[m],u.hasChildNodes()&&(h("span:eq(0)",u).html(t).children("a").each(L),u=u.getElementsByTagName("a"),u=[u[0],u[1],u[u.length-2],u[u.length-1]],h(u).removeClass(B.sPageButton+" "+B.sPageButtonActive+" "+B.sPageButtonStaticDisabled),h([u[0],u[1]]).addClass(1==n?B.sPageButtonStaticDisabled:
|
152 |
+
B.sPageButton),h([u[2],u[3]]).addClass(0===l||n===l||-1===e._iDisplayLength?B.sPageButtonStaticDisabled:B.sPageButton))}}}});h.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,h){return e<h?-1:e>h?1:0},"string-desc":function(e,h){return e<h?1:e>h?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return e<h?-1:e>h?1:0},"html-desc":function(e,h){return e<
|
153 |
+
h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e,h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null;
|
154 |
+
for(var k=1;k<e.length;k++){h=e.charAt(k);if(-1=="0123456789.".indexOf(h))return null;if("."==h){if(j)return null;j=!0}}return"numeric"},function(e){var h=Date.parse(e);return null!==h&&!isNaN(h)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext};"function"===typeof define&&define.amd?define(["jquery"],L):jQuery&&!jQuery.fn.dataTable&&
|
155 |
+
L(jQuery)})(window,document);
|
includes/class-page-visit-counter-activator.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fired during plugin activation
|
4 |
+
*
|
5 |
+
* @link http://www.multidots.com/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package page-visit-counter
|
9 |
+
* @subpackage page-visit-counter/includes
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Fired during plugin activation.
|
14 |
+
*
|
15 |
+
* This class defines all code necessary to run during the plugin's activation.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
* @package page-visit-counter
|
19 |
+
* @subpackage page-visit-counter/includes
|
20 |
+
* @author Multidots <wordpress@multidots.com>
|
21 |
+
*/
|
22 |
+
/**
|
23 |
+
* create wp_page_visit table in database at plugin activate.
|
24 |
+
*
|
25 |
+
*/
|
26 |
+
class class_Page_Visit_Activator {
|
27 |
+
|
28 |
+
public static function activate() {
|
29 |
+
|
30 |
+
global $wpdb;
|
31 |
+
$table_name = $wpdb->prefix . "page_visit";
|
32 |
+
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
|
33 |
+
$sql = "CREATE TABLE $table_name (
|
34 |
+
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
35 |
+
page_id int(5) NOT NULL,
|
36 |
+
page_visit int(5) NOT NULL,
|
37 |
+
date date NOT NULL,
|
38 |
+
lastdate date NOT NULL,
|
39 |
+
ipaddress varchar(255) NOT NULL,
|
40 |
+
PRIMARY KEY (id)
|
41 |
+
);";
|
42 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
43 |
+
dbDelta( $sql );
|
44 |
+
add_option( 'contact_db_version', $contact_db_version );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
includes/class-page-visit-counter-deactivator.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fired during plugin deactivation
|
4 |
+
*
|
5 |
+
* @link http://www.multidots.com/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package page-visit-counter
|
9 |
+
* @subpackage page-visit-counter/includes
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Fired during plugin deactivation.
|
14 |
+
*
|
15 |
+
* This class defines all code necessary to run during the plugin's deactivation.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
* @package page-visit-counter
|
19 |
+
* @subpackage page-visit-counter/includes
|
20 |
+
* @author Multidots <wordpress@multidots.com>
|
21 |
+
*/
|
22 |
+
/**
|
23 |
+
* Drop wp_page_visit table in database at plugin deactivate.
|
24 |
+
*
|
25 |
+
*/
|
26 |
+
class class_Page_visit_Deactivator {
|
27 |
+
|
28 |
+
public static function deactivate() {
|
29 |
+
global $wpdb;
|
30 |
+
delete_option('page_count_settings');
|
31 |
+
$table_name = $wpdb->prefix . "page_visit";
|
32 |
+
$sql = "DROP TABLE $table_name;";
|
33 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
34 |
+
$wpdb->query( $sql );
|
35 |
+
}
|
36 |
+
|
37 |
+
}
|
includes/class-page-visit-counter-loder.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Register all actions and filters for the plugin
|
4 |
+
*
|
5 |
+
* @link http://www.multidots.com/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package page-visit-counter
|
9 |
+
* @subpackage page-visit-counter/includes
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Register all actions and filters for the plugin.
|
14 |
+
*
|
15 |
+
* Maintain a list of all hooks that are registered throughout
|
16 |
+
* the plugin, and register them with the WordPress API. Call the
|
17 |
+
* run function to execute the list of actions and filters.
|
18 |
+
*
|
19 |
+
* @package page-visit-counter
|
20 |
+
* @subpackage page-visit-counter/includes
|
21 |
+
* @author Multidots <wordpress@multidots.com>
|
22 |
+
*/
|
23 |
+
class page_visit_counter_Loader {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The array of actions registered with WordPress.
|
27 |
+
*
|
28 |
+
* @since 1.0.0
|
29 |
+
* @access protected
|
30 |
+
* @var array $actions The actions registered with WordPress to fire when the plugin loads.
|
31 |
+
*/
|
32 |
+
protected $actions;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The array of filters registered with WordPress.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
* @access protected
|
39 |
+
* @var array $filters The filters registered with WordPress to fire when the plugin loads.
|
40 |
+
*/
|
41 |
+
protected $filters;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Initialize the collections used to maintain the actions and filters.
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
*/
|
48 |
+
|
49 |
+
public function __construct() {
|
50 |
+
|
51 |
+
$this->actions = array();
|
52 |
+
$this->filters = array();
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Add a new action to the collection to be registered with WordPress.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
* @param string $hook The name of the WordPress action that is being registered.
|
61 |
+
* @param object $component A reference to the instance of the object on which the action is defined.
|
62 |
+
* @param string $callback The name of the function definition on the $component.
|
63 |
+
* @param int Optional $priority The priority at which the function should be fired.
|
64 |
+
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
65 |
+
*/
|
66 |
+
public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
67 |
+
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Add a new filter to the collection to be registered with WordPress.
|
72 |
+
*
|
73 |
+
* @since 1.0.0
|
74 |
+
* @param string $hook The name of the WordPress filter that is being registered.
|
75 |
+
* @param object $component A reference to the instance of the object on which the filter is defined.
|
76 |
+
* @param string $callback The name of the function definition on the $component.
|
77 |
+
* @param int Optional $priority The priority at which the function should be fired.
|
78 |
+
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
79 |
+
*/
|
80 |
+
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
81 |
+
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* A utility function that is used to register the actions and hooks into a single
|
86 |
+
* collection.
|
87 |
+
*
|
88 |
+
* @since 1.0.0
|
89 |
+
* @access private
|
90 |
+
* @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
|
91 |
+
* @param string $hook The name of the WordPress filter that is being registered.
|
92 |
+
* @param object $component A reference to the instance of the object on which the filter is defined.
|
93 |
+
* @param string $callback The name of the function definition on the $component.
|
94 |
+
* @param int Optional $priority The priority at which the function should be fired.
|
95 |
+
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
96 |
+
* @return type The collection of actions and filters registered with WordPress.
|
97 |
+
*/
|
98 |
+
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
|
99 |
+
|
100 |
+
$hooks[] = array(
|
101 |
+
'hook' => $hook,
|
102 |
+
'component' => $component,
|
103 |
+
'callback' => $callback,
|
104 |
+
'priority' => $priority,
|
105 |
+
'accepted_args' => $accepted_args
|
106 |
+
);
|
107 |
+
|
108 |
+
return $hooks;
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Register the filters and actions with WordPress.
|
114 |
+
*
|
115 |
+
* @since 1.0.0
|
116 |
+
*/
|
117 |
+
public function run() {
|
118 |
+
|
119 |
+
foreach ( $this->filters as $hook ) {
|
120 |
+
add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
121 |
+
}
|
122 |
+
|
123 |
+
foreach ( $this->actions as $hook ) {
|
124 |
+
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
includes/class-page-visit-counter.php
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The file that defines the core plugin class
|
4 |
+
*
|
5 |
+
* A class definition that includes attributes and functions used across both the
|
6 |
+
* public-facing side of the site and the admin area.
|
7 |
+
*
|
8 |
+
* @link http://www.multidots.com/
|
9 |
+
* @since 1.0.0
|
10 |
+
*
|
11 |
+
* @package page-visit-counter
|
12 |
+
* @subpackage page-visit-counter/includes
|
13 |
+
*/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The core plugin class.
|
17 |
+
*
|
18 |
+
* This is used to define internationalization, admin-specific hooks, and
|
19 |
+
* public-facing site hooks.
|
20 |
+
*
|
21 |
+
* Also maintains the unique identifier of this plugin as well as the current
|
22 |
+
* version of the plugin.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
* @package page-visit-counter
|
26 |
+
* @subpackage page-visit-counter/includes
|
27 |
+
* @author Multidots <wordpress@multidots.com>
|
28 |
+
*/
|
29 |
+
class page_visit_counter {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The loader that's responsible for maintaining and registering all hooks that power
|
33 |
+
* the plugin.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
* @access protected
|
37 |
+
* @var Woo_Extra_Flat_Rate_Loader $loader Maintains and registers all hooks for the plugin.
|
38 |
+
*/
|
39 |
+
protected $loader;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* The unique identifier of this plugin.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
* @access protected
|
46 |
+
* @var string $plugin_name The string used to uniquely identify this plugin.
|
47 |
+
*/
|
48 |
+
protected $plugin_name;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* The current version of the plugin.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
* @access protected
|
55 |
+
* @var string $version The current version of the plugin.
|
56 |
+
*/
|
57 |
+
protected $version;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Define the core functionality of the plugin.
|
61 |
+
*
|
62 |
+
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
63 |
+
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
64 |
+
* the public-facing side of the site.
|
65 |
+
*
|
66 |
+
* @since 1.0.0
|
67 |
+
*/
|
68 |
+
|
69 |
+
public function __construct() {
|
70 |
+
|
71 |
+
$this->plugin_name = 'Page Visit Counter';
|
72 |
+
$this->version = '1.0.0';
|
73 |
+
$this->load_dependencies();
|
74 |
+
$this->define_admin_hooks();
|
75 |
+
$this->define_public_hooks();
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
private function load_dependencies() {
|
80 |
+
|
81 |
+
/**
|
82 |
+
* The class responsible for orchestrating the actions and filters of the
|
83 |
+
* core plugin.
|
84 |
+
*/
|
85 |
+
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-page-visit-counter-loder.php';
|
86 |
+
/**
|
87 |
+
* The class responsible for defining all actions that occur in the admin area.
|
88 |
+
*/
|
89 |
+
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-page-visit-counter-admin.php';
|
90 |
+
/**
|
91 |
+
* The class responsible for defining all actions that occur in the admin area.
|
92 |
+
*/
|
93 |
+
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-page-visit-counter-public.php';
|
94 |
+
|
95 |
+
$this->loader = new page_visit_counter_Loader();
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Register all of the hooks related to the admin area functionality
|
101 |
+
* of the plugin.
|
102 |
+
*
|
103 |
+
* @since 1.0.0
|
104 |
+
* @access private
|
105 |
+
*/
|
106 |
+
private function define_admin_hooks() {
|
107 |
+
|
108 |
+
$plugin_admin = new page_visit_counter_Admin( $this->get_plugin_name(), $this->get_version() );
|
109 |
+
|
110 |
+
$this->loader->add_action( 'admin_enqueue_scripts',$plugin_admin, 'enqueue_styles' );
|
111 |
+
$this->loader->add_action( 'admin_enqueue_scripts',$plugin_admin, 'enqueue_scripts' );
|
112 |
+
$this->loader->add_action( 'admin_menu',$plugin_admin, 'page_visit_counter_menu' );
|
113 |
+
$this->loader->add_action( 'wp_dashboard_setup',$plugin_admin, 'my_custom_dashboard_widgets' );
|
114 |
+
|
115 |
+
$this->loader->add_action( 'wp_ajax_add_page_count_option', $plugin_admin, 'add_page_count_option' );
|
116 |
+
$this->loader->add_action( 'wp_ajax_nopriv_add_page_count_option', $plugin_admin, 'add_page_count_option' );
|
117 |
+
|
118 |
+
$this->loader->add_action( 'wp_ajax_select_input_page_value', $plugin_admin, 'select_input_page_value' );
|
119 |
+
$this->loader->add_action( 'wp_ajax_nopriv_select_input_page_value', $plugin_admin, 'select_input_page_value' );
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Register all of the hooks related to the public-facing functionality
|
125 |
+
* of the plugin.
|
126 |
+
*
|
127 |
+
* @since 1.0.0
|
128 |
+
* @access private
|
129 |
+
*/
|
130 |
+
private function define_public_hooks() {
|
131 |
+
|
132 |
+
$plugin_public = new page_visit_counter_Public( $this->get_plugin_name(), $this->get_version() );
|
133 |
+
|
134 |
+
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
|
135 |
+
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
|
136 |
+
|
137 |
+
$this->loader->add_action( 'wp_ajax_insert_page_visit_counter', $plugin_public, 'insert_page_visit_counter' );
|
138 |
+
$this->loader->add_action( 'wp_ajax_nopriv_insert_page_visit_counter', $plugin_public, 'insert_page_visit_counter' );
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Run the loader to execute all of the hooks with WordPress.
|
144 |
+
*
|
145 |
+
* @since 1.0.0
|
146 |
+
*/
|
147 |
+
public function run() {
|
148 |
+
$this->loader->run();
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* The name of the plugin used to uniquely identify it within the context of
|
153 |
+
* WordPress and to define internationalization functionality.
|
154 |
+
*
|
155 |
+
* @since 1.0.0
|
156 |
+
* @return string The name of the plugin.
|
157 |
+
*/
|
158 |
+
public function get_plugin_name() {
|
159 |
+
return $this->plugin_name;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* The reference to the class that orchestrates the hooks with the plugin.
|
164 |
+
*
|
165 |
+
* @since 1.0.0
|
166 |
+
* @return page_visit_counter_Loader Orchestrates the hooks of the plugin.
|
167 |
+
*/
|
168 |
+
public function get_loader() {
|
169 |
+
return $this->loader;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Retrieve the version number of the plugin.
|
174 |
+
*
|
175 |
+
* @since 1.0.0
|
176 |
+
* @return string The version number of the plugin.
|
177 |
+
*/
|
178 |
+
public function get_version() {
|
179 |
+
return $this->version;
|
180 |
+
}
|
181 |
+
}
|
page_visit_counter.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* @link http://www.multidots.com/
|
4 |
+
* @since 1.0.0
|
5 |
+
* @package page-visit-counter
|
6 |
+
* Plugin Name: Page Visit Counter
|
7 |
+
* Plugin URI: http://www.multidots.com/
|
8 |
+
* Description: Plugin for show visited page
|
9 |
+
* Author: Multidots
|
10 |
+
* Version: 1.0.0
|
11 |
+
* Author URI: http://www.multidots.com/
|
12 |
+
*/
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
/**
|
18 |
+
* The code that runs during plugin activation.
|
19 |
+
* This action is documented in includes/class-page-visit-counter-activator.php
|
20 |
+
*/
|
21 |
+
function activate_page_visit_counter() {
|
22 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-page-visit-counter-activator.php';
|
23 |
+
class_Page_Visit_Activator::activate();
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The code that runs during plugin deactivation.
|
28 |
+
* This action is documented in includes/class-page-visit-counter-deactivator.php
|
29 |
+
*/
|
30 |
+
function deactivate_page_visit_counter() {
|
31 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-page-visit-counter-deactivator.php';
|
32 |
+
class_Page_visit_Deactivator::deactivate();
|
33 |
+
}
|
34 |
+
/**
|
35 |
+
* register hook for plugins activate and deactivate.
|
36 |
+
*/
|
37 |
+
register_activation_hook( __FILE__, 'activate_page_visit_counter' );
|
38 |
+
register_deactivation_hook( __FILE__, 'deactivate_page_visit_counter' );
|
39 |
+
|
40 |
+
/**
|
41 |
+
* The core plugin class that is used to define internationalization,
|
42 |
+
* admin-specific hooks, and public-facing site hooks.
|
43 |
+
*/
|
44 |
+
require plugin_dir_path( __FILE__ ) . 'includes/class-page-visit-counter.php';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Begins execution of the plugin.
|
48 |
+
*
|
49 |
+
* Since everything within the plugin is registered via hooks,
|
50 |
+
* then kicking off the plugin from this point in the file does
|
51 |
+
* not affect the page life cycle.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
function run_page_visit_counter() {
|
56 |
+
|
57 |
+
$plugin = new page_visit_counter();
|
58 |
+
$plugin->run();
|
59 |
+
|
60 |
+
}
|
61 |
+
run_page_visit_counter();
|
public/class-page-visit-counter-public.php
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin-specific functionality of the plugin.
|
4 |
+
*
|
5 |
+
* @link http://www.multidots.com/
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package page-visit-counter
|
9 |
+
* @subpackage page-visit-counter/public
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The admin-specific functionality of the plugin.
|
14 |
+
*
|
15 |
+
* Defines the plugin name, version, and two examples hooks for how to
|
16 |
+
* enqueue the admin-specific stylesheet and JavaScript.
|
17 |
+
*
|
18 |
+
* @package page-visit-counter
|
19 |
+
* @subpackage page-visit-counter/public
|
20 |
+
* @author Multidots <wordpress@multidots.com>
|
21 |
+
*/
|
22 |
+
class page_visit_counter_Public {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The ID of this plugin.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @access private
|
29 |
+
* @var string $plugin_name The ID of this plugin.
|
30 |
+
*/
|
31 |
+
private $plugin_name;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The version of this plugin.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
* @access private
|
38 |
+
* @var string $version The current version of this plugin.
|
39 |
+
*/
|
40 |
+
private $version;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Initialize the class and set its properties.
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
* @param string $plugin_name The name of this plugin.
|
47 |
+
* @param string $version The version of this plugin.
|
48 |
+
*/
|
49 |
+
public function __construct( $plugin_name, $version ) {
|
50 |
+
|
51 |
+
$this->plugin_name = $plugin_name;
|
52 |
+
$this->version = $version;
|
53 |
+
|
54 |
+
}
|
55 |
+
/**
|
56 |
+
* Register the stylesheets for the admin area.
|
57 |
+
*
|
58 |
+
* @since 1.0.0
|
59 |
+
*/
|
60 |
+
public function enqueue_styles() {
|
61 |
+
|
62 |
+
}
|
63 |
+
/**
|
64 |
+
* Register the JavaScript for the admin area.
|
65 |
+
*
|
66 |
+
* @since 1.0.0
|
67 |
+
*/
|
68 |
+
public function enqueue_scripts() {
|
69 |
+
global $wp;
|
70 |
+
wp_enqueue_script('one', plugin_dir_url( __FILE__ ) . 'js/custom.js', array( 'jquery' ), $this->version, false );
|
71 |
+
$current_url = home_url( $wp->request );
|
72 |
+
wp_localize_script( 'one', 'pagevisit', array(
|
73 |
+
'ajaxurl' => admin_url( 'admin-ajax.php', $this->protocol ),
|
74 |
+
'pageurl' => $current_url,
|
75 |
+
) );
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* action use in call header
|
81 |
+
* Insert_page_visit_counter function use insert the page data
|
82 |
+
* pageid,Currentdate,Ipaddress,pagecount add in database.
|
83 |
+
*/
|
84 |
+
|
85 |
+
public function insert_page_visit_counter() {
|
86 |
+
global $wpdb, $wp, $post;
|
87 |
+
$pageurl = $_POST['pageurl'];
|
88 |
+
$page = url_to_postid( $pageurl );
|
89 |
+
$table_name = $wpdb->prefix."page_visit";
|
90 |
+
$last_date = '';
|
91 |
+
$page_contet = get_post( $page );
|
92 |
+
$get_option_value = json_decode(get_option( 'page_count_settings' ));
|
93 |
+
$option_value = $get_option_value[0];
|
94 |
+
$count_value = $get_option_value[1];
|
95 |
+
/**
|
96 |
+
* check condition for
|
97 |
+
* day,week,month,year
|
98 |
+
* check lastdate for page
|
99 |
+
*/
|
100 |
+
//check option value is day
|
101 |
+
if( $option_value == 'day' ) {
|
102 |
+
$day = $count_value;
|
103 |
+
$get_last_date = date('Y-m-d', strtotime("+".$day." days"));
|
104 |
+
if( $page_contet->post_type == 'page' ){
|
105 |
+
$last_date = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' ORDER BY date DESC LIMIT 1");
|
106 |
+
$last_date = $last_date[0]->lastdate;
|
107 |
+
$currentdate= date("Y-m-d");
|
108 |
+
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
109 |
+
if( $last_date != $currentdate ){
|
110 |
+
if ( !current_user_can('administrator') ) {
|
111 |
+
$select_Query = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' AND ipaddress='$ipaddress' AND date between '".$currentdate."' AND '".$last_date."'");
|
112 |
+
$size_data = sizeof($select_Query);
|
113 |
+
if( $size_data == 1 ){
|
114 |
+
$update_Query = $wpdb->query("UPDATE $table_name SET lastdate = '".$get_last_date."' WHERE page_id='".$page."' AND ipaddress='$ipaddress'");
|
115 |
+
}
|
116 |
+
if( $size_data == 0 ){
|
117 |
+
if( $page != 0 ) {
|
118 |
+
$insert_Query = $wpdb->query("INSERT into $table_name (`page_id`,`page_visit`,`date`,`lastdate`,`ipaddress`) VALUES($page,1,'$currentdate','$get_last_date','$ipaddress')");
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
//check option value is week
|
125 |
+
} else if( $option_value == 'week' ){
|
126 |
+
$day = $count_value;
|
127 |
+
$get_last_date = date('Y-m-d', strtotime("+".$day." week"));
|
128 |
+
if( $page_contet->post_type == 'page' ){
|
129 |
+
$last_date = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' ORDER BY date DESC LIMIT 1");
|
130 |
+
$last_date = $last_date[0]->lastdate;
|
131 |
+
$currentdate= date("Y-m-d");
|
132 |
+
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
133 |
+
if( $last_date != $currentdate ){
|
134 |
+
if ( !current_user_can('administrator') ) {
|
135 |
+
$select_Query = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' AND ipaddress='$ipaddress' AND date between '".$currentdate."' AND '".$last_date."'");
|
136 |
+
$size_data = sizeof($select_Query);
|
137 |
+
if( $size_data == 1 ){
|
138 |
+
$update_Query = $wpdb->query("UPDATE $table_name SET lastdate = '".$get_last_date."' WHERE page_id='".$page."' AND ipaddress='$ipaddress'");
|
139 |
+
}
|
140 |
+
if( $size_data == 0 ){
|
141 |
+
if( $page != 0 ) {
|
142 |
+
$insert_Query = $wpdb->query("INSERT into $table_name (`page_id`,`page_visit`,`date`,`lastdate`,`ipaddress`) VALUES($page,1,'$currentdate','$get_last_date','$ipaddress')");
|
143 |
+
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
//check option value is month
|
150 |
+
} else if( $option_value == 'month' ){
|
151 |
+
$day = $count_value;
|
152 |
+
$get_last_date = date('Y-m-d', strtotime("+".$day." month"));
|
153 |
+
if( $page_contet->post_type == 'page' ){
|
154 |
+
$last_date = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' ORDER BY date DESC LIMIT 1");
|
155 |
+
$last_date = $last_date[0]->lastdate;
|
156 |
+
$currentdate= date("Y-m-d");
|
157 |
+
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
158 |
+
if( $last_date != $currentdate ){
|
159 |
+
if ( !current_user_can('administrator') ) {
|
160 |
+
$select_Query = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' AND ipaddress='$ipaddress' AND date between '".$currentdate."' AND '".$last_date."'");
|
161 |
+
$size_data = sizeof($select_Query);
|
162 |
+
if( $size_data == 1 ){
|
163 |
+
$update_Query = $wpdb->query("UPDATE $table_name SET lastdate = '".$get_last_date."' WHERE page_id='".$page."' AND ipaddress='$ipaddress'");
|
164 |
+
}
|
165 |
+
if( $size_data == 0 ){
|
166 |
+
if( $page != 0 ) {
|
167 |
+
$insert_Query = $wpdb->query("INSERT into $table_name (`page_id`,`page_visit`,`date`,`lastdate`,`ipaddress`) VALUES($page,1,'$currentdate','$get_last_date','$ipaddress')");
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}
|
172 |
+
}
|
173 |
+
//check option value is year
|
174 |
+
} else if( $option_value == 'year' ){
|
175 |
+
$day = $count_value;
|
176 |
+
$get_last_date = date('Y-m-d', strtotime("+".$day." year"));
|
177 |
+
if( $page_contet->post_type == 'page' ){
|
178 |
+
$last_date = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' ORDER BY date DESC LIMIT 1");
|
179 |
+
$last_date = $last_date[0]->lastdate;
|
180 |
+
$currentdate= date("Y-m-d");
|
181 |
+
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
182 |
+
if( $last_date != $currentdate ){
|
183 |
+
if ( !current_user_can('administrator') ) {
|
184 |
+
$select_Query = $wpdb->get_results("SELECT * from $table_name where page_id='".$page."' AND ipaddress='$ipaddress' AND date between '".$currentdate."' AND '".$last_date."'");
|
185 |
+
$size_data = sizeof($select_Query);
|
186 |
+
if( $size_data == 1 ){
|
187 |
+
$update_Query = $wpdb->query("UPDATE $table_name SET lastdate = '".$get_last_date."' WHERE page_id='".$page."' AND ipaddress='$ipaddress'");
|
188 |
+
}
|
189 |
+
if( $size_data == 0 ){
|
190 |
+
if( $page != 0 ) {
|
191 |
+
$insert_Query = $wpdb->query("INSERT into $table_name (`page_id`,`page_visit`,`date`,`lastdate`,`ipaddress`) VALUES($page,1,'$currentdate','$get_last_date','$ipaddress')");
|
192 |
+
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
public/js/custom.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( $ ) {
|
2 |
+
|
3 |
+
$(window).bind("load", function() {
|
4 |
+
//var pageurl = '2';
|
5 |
+
$.ajax({
|
6 |
+
type: 'POST',
|
7 |
+
url: pagevisit.ajaxurl,
|
8 |
+
data: {
|
9 |
+
action : 'insert_page_visit_counter',
|
10 |
+
pageurl : pagevisit.pageurl
|
11 |
+
},
|
12 |
+
success: function( data ) {
|
13 |
+
|
14 |
+
}
|
15 |
+
});
|
16 |
+
});
|
17 |
+
|
18 |
+
})( jQuery );
|