Version Description
Download this release
Release Info
Developer | mmaunder |
Plugin | ![]() |
Version | 1.1 |
Comparing to | |
See all releases |
Version 1.1
- css/colorbox.css +64 -0
- css/diff.css +118 -0
- css/dt_table.css +54 -0
- css/iptraf.css +49 -0
- css/main.css +208 -0
- css/phpinfo.css +30 -0
- images/back_disabled.jpg +0 -0
- images/back_enabled.jpg +0 -0
- images/button-grad-grey.png +0 -0
- images/forward_disabled.jpg +0 -0
- images/forward_enabled.jpg +0 -0
- images/icons/ajax24.gif +0 -0
- images/icons/ajax3.gif +0 -0
- images/icons/ajaxWhite32x32.gif +0 -0
- images/icons/arrow_refresh.png +0 -0
- images/icons/bullet_yellow.png +0 -0
- images/icons/email_go.png +0 -0
- images/icons/error128.png +0 -0
- images/icons/tick128.png +0 -0
- images/icons/warning128.png +0 -0
- images/lightbox-controls.png +0 -0
- images/loading.gif +0 -0
- images/loading_background.png +0 -0
- images/sort_asc.gif +0 -0
- images/sort_asc_disabled.gif +0 -0
- images/sort_both.gif +0 -0
- images/sort_desc.gif +0 -0
- images/sort_desc_disabled.gif +0 -0
- images/wordfence-logo-16x16.png +0 -0
- images/wordfence-logo-32x32.png +0 -0
- images/wordfence-logo-64x64.png +0 -0
- js/admin.js +682 -0
- js/jquery.colorbox-min.js +4 -0
- js/jquery.dataTables.min.js +151 -0
- js/jquery.tmpl.min.js +10 -0
- js/jquery.tools.min.js +15 -0
- lib/.htaccess +2 -0
- lib/Diff.php +176 -0
- lib/Diff/Renderer/Abstract.php +82 -0
- lib/Diff/Renderer/Html/Array.php +224 -0
- lib/Diff/Renderer/Html/SideBySide.php +163 -0
- lib/Diff/SequenceMatcher.php +742 -0
- lib/IPTraf.php +40 -0
- lib/diffResult.php +38 -0
- lib/email_genericAlert.php +15 -0
- lib/email_newIssues.php +21 -0
- lib/geshi.php +4755 -0
- lib/geshi/apache.php +483 -0
- lib/geshi/bash.php +440 -0
- lib/geshi/css.php +223 -0
- lib/geshi/html4strict.php +190 -0
- lib/geshi/html5.php +212 -0
- lib/geshi/java.php +983 -0
- lib/geshi/javascript.php +152 -0
- lib/geshi/perl.php +213 -0
- lib/geshi/php-brief.php +222 -0
- lib/geshi/php.php +1114 -0
- lib/geshi/python.php +244 -0
- lib/geshi/ruby.php +231 -0
- lib/geshi/text.php +84 -0
- lib/menu_activity.php +164 -0
- lib/menu_blockedIPs.php +153 -0
- lib/menu_config.php +26 -0
- lib/menu_options.php +170 -0
- lib/menu_scan.php +470 -0
- lib/sysinfo.php +21 -0
- lib/wf503.php +9 -0
- lib/wfAPI.php +130 -0
- lib/wfAction.php +4 -0
- lib/wfBrowscap.php +58 -0
- lib/wfBrowscapCache.php +5 -0
- lib/wfConfig.php +439 -0
- lib/wfCrawl.php +1273 -0
- lib/wfDB.php +117 -0
- lib/wfDict.php +90 -0
- lib/wfIssues.php +251 -0
- lib/wfLockedOut.php +21 -0
- lib/wfLog.php +589 -0
- lib/wfModTracker.php +115 -0
- lib/wfRate.php +18 -0
- lib/wfScanEngine.php +663 -0
- lib/wfSchema.php +167 -0
- lib/wfUtils.php +142 -0
- lib/wfViewResult.php +26 -0
- lib/wordfenceClass.php +1022 -0
- lib/wordfenceConstants.php +9 -0
- lib/wordfenceHash.php +98 -0
- lib/wordfenceScanner.php +209 -0
- lib/wordfenceURLHoover.php +197 -0
- readme.txt +92 -0
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- visitor.php +20 -0
- wfscan.php +55 -0
- wordfence.php +16 -0
css/colorbox.css
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
ColorBox Core Style:
|
3 |
+
The following CSS is consistent between example themes and should not be altered.
|
4 |
+
*/
|
5 |
+
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
|
6 |
+
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
7 |
+
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
8 |
+
#cboxContent{position:relative;}
|
9 |
+
#cboxLoadedContent{overflow:auto;}
|
10 |
+
#cboxTitle{margin:0;}
|
11 |
+
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
|
12 |
+
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
13 |
+
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
|
14 |
+
.cboxIframe{width:100%; height:100%; display:block; border:0;}
|
15 |
+
|
16 |
+
/*
|
17 |
+
User Style:
|
18 |
+
Change the following styles to modify the appearance of ColorBox. They are
|
19 |
+
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
20 |
+
*/
|
21 |
+
#cboxOverlay{
|
22 |
+
background: #777;
|
23 |
+
background: -webkit-radial-gradient(rgba(120, 120, 120, 0.8), rgba(100, 100, 100, 0.8) 50%, rgba(70, 70, 70, 1));
|
24 |
+
background: -moz-radial-gradient(rgba(120, 120, 120, 0.6), rgba(100, 100, 100, 0.8) 20%, rgba(70, 70, 70, 1));
|
25 |
+
}
|
26 |
+
#colorbox { }
|
27 |
+
#cboxContent { background:#fff; overflow:hidden; padding: 0 0 8px; margin: 20px;
|
28 |
+
-webkit-border-radius: 3px 3px 2px 2px; -moz-border-radius: 3px 3px 2px 2px; border-radius: 3px 3px 2px 2px; /* border radius */
|
29 |
+
-webkit-box-shadow: 0 2px 4px rgba(0,0,0,.4); -moz-box-shadow: 0 2px 4px rgba(0,0,0,.4); box-shadow: 0 2px 4px rgba(0,0,0,.4); /* box shadow */
|
30 |
+
-webkit-background-clip: padding-box; /* smoother borders with webkit */ }
|
31 |
+
#cboxError{padding:50px; border:1px solid #ccc;}
|
32 |
+
#cboxLoadedContent {
|
33 |
+
/* margin-bottom:28px; */
|
34 |
+
/* MDM added: */ margin: 10px 20px 28px 20px; font-family: Arial; color: #333;
|
35 |
+
-webkit-border-radius: 2px 2px 0 0; -moz-border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0; /* border radius */
|
36 |
+
}
|
37 |
+
#cboxTitle{position:absolute; bottom:8px; left:5px; text-align:center; width:100%; color:#949494;}
|
38 |
+
#cboxCurrent{position:absolute; bottom:8px; left:63px; color:#949494; text-indent: -9999px;}
|
39 |
+
#cboxSlideshow{position:absolute; bottom:8px; right:35px; color:#0092ef;}
|
40 |
+
#cboxPrevious{position:absolute; bottom:5px; left:5px; background:url(../images/lightbox-controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
|
41 |
+
#cboxPrevious.hover{background-position:-75px -25px;}
|
42 |
+
#cboxNext{position:absolute; bottom:5px; left:32px; background:url(../images/lightbox-controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
|
43 |
+
#cboxNext.hover{background-position:-50px -25px;}
|
44 |
+
#cboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center;}
|
45 |
+
#cboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center;}
|
46 |
+
#cboxClose{position:absolute; bottom:5px; right:5px; background:url(../images/lightbox-controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
|
47 |
+
#cboxClose.hover{background-position:-25px -25px;}
|
48 |
+
|
49 |
+
/*
|
50 |
+
The following fixes a problem where IE7+ replaces a PNG's alpha transparency with a black fill
|
51 |
+
when an alpha filter (opacity change) is set on the element or ancestor element.
|
52 |
+
*/
|
53 |
+
.cboxIE #cboxTopLeft,
|
54 |
+
.cboxIE #cboxTopCenter,
|
55 |
+
.cboxIE #cboxTopRight,
|
56 |
+
.cboxIE #cboxBottomLeft,
|
57 |
+
.cboxIE #cboxBottomCenter,
|
58 |
+
.cboxIE #cboxBottomRight,
|
59 |
+
.cboxIE #cboxMiddleLeft,
|
60 |
+
.cboxIE #cboxMiddleRight {
|
61 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
62 |
+
}
|
63 |
+
|
64 |
+
|
css/diff.css
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
background: #fff;
|
3 |
+
font-family: Arial;
|
4 |
+
font-size: 12px;
|
5 |
+
}
|
6 |
+
.Differences {
|
7 |
+
width: 100%;
|
8 |
+
border-collapse: collapse;
|
9 |
+
border-spacing: 0;
|
10 |
+
empty-cells: show;
|
11 |
+
}
|
12 |
+
|
13 |
+
.Differences thead th {
|
14 |
+
text-align: left;
|
15 |
+
border-bottom: 1px solid #000;
|
16 |
+
background: #aaa;
|
17 |
+
color: #000;
|
18 |
+
padding: 4px;
|
19 |
+
}
|
20 |
+
.Differences tbody th {
|
21 |
+
text-align: right;
|
22 |
+
background: #ccc;
|
23 |
+
width: 4em;
|
24 |
+
padding: 1px 2px;
|
25 |
+
border-right: 1px solid #000;
|
26 |
+
vertical-align: top;
|
27 |
+
font-size: 13px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.Differences td {
|
31 |
+
padding: 1px 2px;
|
32 |
+
font-family: Consolas, monospace;
|
33 |
+
font-size: 13px;
|
34 |
+
}
|
35 |
+
|
36 |
+
.DifferencesSideBySide .ChangeInsert td.Left {
|
37 |
+
background: #dfd;
|
38 |
+
}
|
39 |
+
|
40 |
+
.DifferencesSideBySide .ChangeInsert td.Right {
|
41 |
+
background: #cfc;
|
42 |
+
}
|
43 |
+
|
44 |
+
.DifferencesSideBySide .ChangeDelete td.Left {
|
45 |
+
background: #f88;
|
46 |
+
}
|
47 |
+
|
48 |
+
.DifferencesSideBySide .ChangeDelete td.Right {
|
49 |
+
background: #faa;
|
50 |
+
}
|
51 |
+
|
52 |
+
.DifferencesSideBySide .ChangeReplace .Left {
|
53 |
+
background: #fe9;
|
54 |
+
}
|
55 |
+
|
56 |
+
.DifferencesSideBySide .ChangeReplace .Right {
|
57 |
+
background: #fd8;
|
58 |
+
}
|
59 |
+
|
60 |
+
.Differences ins, .Differences del {
|
61 |
+
text-decoration: none;
|
62 |
+
}
|
63 |
+
|
64 |
+
.DifferencesSideBySide .ChangeReplace ins, .DifferencesSideBySide .ChangeReplace del {
|
65 |
+
background: #fc0;
|
66 |
+
}
|
67 |
+
|
68 |
+
.Differences .Skipped {
|
69 |
+
background: #f7f7f7;
|
70 |
+
}
|
71 |
+
|
72 |
+
.DifferencesInline .ChangeReplace .Left,
|
73 |
+
.DifferencesInline .ChangeDelete .Left {
|
74 |
+
background: #fdd;
|
75 |
+
}
|
76 |
+
|
77 |
+
.DifferencesInline .ChangeReplace .Right,
|
78 |
+
.DifferencesInline .ChangeInsert .Right {
|
79 |
+
background: #dfd;
|
80 |
+
}
|
81 |
+
|
82 |
+
.DifferencesInline .ChangeReplace ins {
|
83 |
+
background: #9e9;
|
84 |
+
}
|
85 |
+
|
86 |
+
.DifferencesInline .ChangeReplace del {
|
87 |
+
background: #e99;
|
88 |
+
}
|
89 |
+
|
90 |
+
pre {
|
91 |
+
width: 100%;
|
92 |
+
overflow: auto;
|
93 |
+
}
|
94 |
+
h1 {
|
95 |
+
background: url(../images/wordfence-logo-64x64.png);
|
96 |
+
background-position: 0 0;
|
97 |
+
background-repeat: no-repeat;
|
98 |
+
height: 64px;
|
99 |
+
vertical-align: middle;
|
100 |
+
padding: 10px 0 0 70px;
|
101 |
+
margin: 20px 0 10px 0;
|
102 |
+
font-size: 34px;
|
103 |
+
color: #777;
|
104 |
+
}
|
105 |
+
table.summary {
|
106 |
+
font-weight: bold;
|
107 |
+
}
|
108 |
+
.diffFooter {
|
109 |
+
text-align: center;
|
110 |
+
font-size: 16px;
|
111 |
+
color: #999;
|
112 |
+
font-family: Verdana;
|
113 |
+
margin: 50px auto 50px auto;
|
114 |
+
}
|
115 |
+
.diffFooter a {
|
116 |
+
color: #999;
|
117 |
+
}
|
118 |
+
|
css/dt_table.css
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.paging_two_button .ui-button{float:left;cursor:hand}
|
2 |
+
.paging_full_numbers .ui-button{cursor:hand;margin:0;padding:2px 6px}
|
3 |
+
.dataTables_paginate .ui-button{margin-right:-.1em!important}
|
4 |
+
.dataTables_wrapper .ui-toolbar{padding:5px}
|
5 |
+
.dataTables_paginate{width:auto;float:right;text-align:right}
|
6 |
+
.dataTables_info{float:left}
|
7 |
+
table.display thead th{cursor:pointer;text-align:left;font-size:11px;border:1px solid #ccc;padding-right:4px;text-transform:uppercase}
|
8 |
+
table.display thead th .th_wrapp{padding:8px 4px 5px 9px}
|
9 |
+
table.display thead th.sorting_disabled{cursor:default}
|
10 |
+
div.dataTables_wrapper .ui-widget-header{font-weight:400}
|
11 |
+
table.display thead th div.DataTables_sort_wrapper{position:relative;padding-right:20px}
|
12 |
+
table.display thead th div.DataTables_sort_wrapper span{position:absolute;top:50%;margin-top:-8px;right:0}
|
13 |
+
.dataTables_wrapper{position:relative;_height:302px;clear:both;overflow:hidden}
|
14 |
+
.dataTables_processing{position:absolute;top:0;left:50%;width:250px;margin-left:-125px;border:1px solid #ddd;text-align:center;color:#999;padding:2px 0}
|
15 |
+
.dataTables_length{width:40%;float:left}
|
16 |
+
.dataTables_filter{width:50%;float:right;text-align:right}
|
17 |
+
.dataTables_filter input {border:1px;border-color:#b8b8b8 #e2e2e2 #e2e2e2 #b8b8b8;border-style:solid;padding:2px}
|
18 |
+
.paginate_disabled_previous,.paginate_enabled_previous,.paginate_disabled_next,.paginate_enabled_next{height:19px;width:19px;margin-left:3px;float:left}
|
19 |
+
.paginate_enabled_previous,.paginate_enabled_next{cursor:pointer}
|
20 |
+
.paginate_disabled_previous{background-image:url(../images/back_disabled.jpg)}
|
21 |
+
.paginate_enabled_previous{background-image:url(../images/back_enabled.jpg)}
|
22 |
+
.paginate_disabled_next{background-image:url(../images/forward_disabled.jpg)}
|
23 |
+
.paginate_enabled_next{background-image:url(../images/forward_enabled.jpg)}
|
24 |
+
table.display{width:800px;clear:both;border-collapse:collapse;margin:0 0 24px;background:#fff;position:relative;top:12px}
|
25 |
+
table.display tfoot th{font-weight:400;padding:3px 8px 3px 8px}
|
26 |
+
table.display tr.heading2 td{border-bottom:1px solid #aaa}
|
27 |
+
table.display td{padding:5px 8px;border:1px solid #ccc}
|
28 |
+
.sorting_asc div.th_wrapp{background:url(../images/sort_asc.gif) no-repeat right center}
|
29 |
+
.sorting_desc div.th_wrapp{background:url(../images/sort_desc.gif) no-repeat right center}
|
30 |
+
.sorting_asc_disabled div.th_wrapp{background: url('../images/sort_asc_disabled.gif') no-repeat center right}
|
31 |
+
.sorting_desc_disabled div.th_wrapp{background: url('../images/sort_desc_disabled.gif') no-repeat center right}
|
32 |
+
.sorting div.th_wrapp{background:url(../images/sort_both.gif) no-repeat right center}
|
33 |
+
tr.odd{background-color:#f5f5f5}
|
34 |
+
tr.even{background-color:#fff}
|
35 |
+
.top,.bottom{background-color:#F5F5F5;border:1px solid #CCC;padding:15px}
|
36 |
+
.top .dataTables_info{float:none}
|
37 |
+
tfoot input{width:100%;color:#444;margin:.5em 0}
|
38 |
+
tfoot input.search_init{color:#999}
|
39 |
+
td.group{background-color:#d1cfd0;border-bottom:2px solid #A19B9E;border-top:2px solid #A19B9E}
|
40 |
+
td.details{background-color:#d1cfd0;border:2px solid #A19B9E}
|
41 |
+
.example_alt_pagination div.dataTables_info{width:40%}
|
42 |
+
.paging_full_numbers span.paginate_button,.paging_full_numbers span.paginate_active{border:1px solid #ccc;cursor:pointer;margin:0 0 0 5px;padding:2px 5px}
|
43 |
+
.paging_full_numbers span.paginate_button:hover{background-color:#e5e5e5}
|
44 |
+
.paging_full_numbers span.paginate_active{background-color:#e5e5e5}
|
45 |
+
.paging_full_numbers span.paginate_button_disabled {color:#ccc;cursor:default}
|
46 |
+
.paging_full_numbers span.paginate_button_disabled:hover {background:#fff}
|
47 |
+
table.display tr.even.row_selected td{background-color:#B0BED9}
|
48 |
+
table.display tr.odd.row_selected td{background-color:#9FAFD1}
|
49 |
+
.sorting_1 {background:#f5f5f5}
|
50 |
+
table.display td.center,.dataTables_empty{text-align:center}
|
51 |
+
.dataTables_empty{background:#fff}
|
52 |
+
.paging_full_numbers span.paginate_button{background-color:#fff}
|
53 |
+
.dataTables_scroll,.clear{clear:both}
|
54 |
+
.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_processing,.paging_full_numbers span.paginate_button,.paging_full_numbers span.paginate_active {font-size:11px}
|
css/iptraf.css
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
background: #fff;
|
3 |
+
font-family: Arial;
|
4 |
+
font-size: 12px;
|
5 |
+
}
|
6 |
+
|
7 |
+
|
8 |
+
pre {
|
9 |
+
width: 100%;
|
10 |
+
overflow: auto;
|
11 |
+
}
|
12 |
+
h1 {
|
13 |
+
background: url(../images/wordfence-logo-64x64.png);
|
14 |
+
background-position: 0 0;
|
15 |
+
background-repeat: no-repeat;
|
16 |
+
height: 64px;
|
17 |
+
vertical-align: middle;
|
18 |
+
padding: 10px 0 0 70px;
|
19 |
+
margin: 20px 0 10px 0;
|
20 |
+
font-size: 34px;
|
21 |
+
color: #777;
|
22 |
+
}
|
23 |
+
|
24 |
+
.footer {
|
25 |
+
text-align: center;
|
26 |
+
font-size: 16px;
|
27 |
+
color: #999;
|
28 |
+
font-family: Verdana;
|
29 |
+
margin: 50px auto 50px auto;
|
30 |
+
}
|
31 |
+
.footer a {
|
32 |
+
color: #999;
|
33 |
+
}
|
34 |
+
td, th {
|
35 |
+
vertical-align: top;
|
36 |
+
}
|
37 |
+
th, td {
|
38 |
+
text-align: left;
|
39 |
+
padding-bottom: 5px;
|
40 |
+
}
|
41 |
+
th {
|
42 |
+
white-space:nowrap;
|
43 |
+
}
|
44 |
+
th.HTTP, td.HTTP {
|
45 |
+
padding: 0;
|
46 |
+
font-weight: normal;
|
47 |
+
font-size: 10px;
|
48 |
+
}
|
49 |
+
th.HTTP { padding-right: 5px; }
|
css/main.css
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wordfenceWrap {
|
2 |
+
margin: 0 0 0 20px;
|
3 |
+
}
|
4 |
+
div.wordfenceLive {
|
5 |
+
height: 29px;
|
6 |
+
white-space: nowrap;
|
7 |
+
overflow: hidden;
|
8 |
+
border-width: 1px 0 1px 0;
|
9 |
+
background-color: #FFFCEF;
|
10 |
+
border-color: #666;
|
11 |
+
border-style: solid;
|
12 |
+
margin: 20px 0 10px 0;
|
13 |
+
padding: 3px 3px 3px 10px;
|
14 |
+
font-family: Arial;
|
15 |
+
font-size: 14px;
|
16 |
+
-webkit-font-smoothing: antialiased;
|
17 |
+
}
|
18 |
+
div.wordfenceLive h2 {
|
19 |
+
font-weight: bold;
|
20 |
+
color: #888;
|
21 |
+
margin: 0 10px 0 0;
|
22 |
+
padding: 0;
|
23 |
+
display: inline;
|
24 |
+
font-size: 14px;
|
25 |
+
font-family: Georgia, serif;
|
26 |
+
font-style: italic;
|
27 |
+
-webkit-font-smoothing: antialiased;
|
28 |
+
}
|
29 |
+
div.wordfenceLive p {
|
30 |
+
color: #000;
|
31 |
+
font-weight: normal;
|
32 |
+
display: inline;
|
33 |
+
}
|
34 |
+
.wordfence-icon32 {
|
35 |
+
width: 32px;
|
36 |
+
height: 32px;
|
37 |
+
background-position: 0 0;
|
38 |
+
background-repeat: no-repeat;
|
39 |
+
padding: 0;
|
40 |
+
margin: 7px 5px 0 0;
|
41 |
+
float: left;
|
42 |
+
}
|
43 |
+
.wordfence-lock-icon {
|
44 |
+
background-image: url(../images/wordfence-logo-32x32.png);
|
45 |
+
}
|
46 |
+
|
47 |
+
.wordfence .resulticon {
|
48 |
+
display: block;
|
49 |
+
float: left;
|
50 |
+
width: 16px;
|
51 |
+
height: 16px;
|
52 |
+
background-position: 0 0;
|
53 |
+
background-repeat: no-repeat;
|
54 |
+
border-width: 0;
|
55 |
+
padding: 0;
|
56 |
+
margin: 0 3px 0 0;
|
57 |
+
background-image: url(../images/icons/bullet_yellow.png);
|
58 |
+
}
|
59 |
+
|
60 |
+
.wordfence .wordfenceScanButton { margin: 20px 0 20px 0; }
|
61 |
+
|
62 |
+
.wordfenceBoldTD {
|
63 |
+
font-weight: bold;
|
64 |
+
}
|
65 |
+
|
66 |
+
.wfAjax24 {
|
67 |
+
display: none;
|
68 |
+
width: 24px;
|
69 |
+
height: 24px;
|
70 |
+
background-image: url(../images/icons/ajax24.gif);
|
71 |
+
margin: 0;
|
72 |
+
padding: 0;
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
div.wfLoadingWhite32 {
|
77 |
+
width: 32px;
|
78 |
+
height: 32px;
|
79 |
+
background-image: url(../images/icons/ajaxWhite32x32.gif);
|
80 |
+
margin: 0;
|
81 |
+
padding: 0;
|
82 |
+
}
|
83 |
+
|
84 |
+
div.wordfenceScanButton input.button-wf-grey {
|
85 |
+
background: #EFEFEF url(../images/button-grad-grey.png) repeat-x scroll left top;
|
86 |
+
border-color: #EFEFEF;
|
87 |
+
}
|
88 |
+
|
89 |
+
.wfTabsContainer {
|
90 |
+
overflow: hidden;
|
91 |
+
border: 1px solid #CCC;
|
92 |
+
max-width: 970px;
|
93 |
+
padding: 15px;
|
94 |
+
min-height: 200px;
|
95 |
+
-webkit-font-smoothing: antialiased;
|
96 |
+
}
|
97 |
+
#wfTabs::after {
|
98 |
+
content: ".";
|
99 |
+
display: block;
|
100 |
+
height: 0;
|
101 |
+
width: 0;
|
102 |
+
line-height: 0;
|
103 |
+
clear: both;
|
104 |
+
visibility: hidden;
|
105 |
+
}
|
106 |
+
#wfTabs a {
|
107 |
+
float: left;
|
108 |
+
z-index: 10;
|
109 |
+
height: 18px;
|
110 |
+
margin: 0 5px -1px 0;
|
111 |
+
padding: 5px 8px;
|
112 |
+
border: 1px solid #CCC;
|
113 |
+
text-decoration: none;
|
114 |
+
background-color: #EFEFEF;
|
115 |
+
color: #21759B;
|
116 |
+
-moz-border-radius-topright: 3px;
|
117 |
+
-moz-border-radius-topleft: 3px;
|
118 |
+
border-top-right-radius: 3px;
|
119 |
+
border-top-left-radius: 3px;
|
120 |
+
}
|
121 |
+
#wfTabs a.selected {
|
122 |
+
border-bottom: 1px solid #FFF;
|
123 |
+
background-color: #FFF;
|
124 |
+
color: #777;
|
125 |
+
}
|
126 |
+
table.wfSummaryParent { font-family: sans-serif; font-size: 14px; color: #000; z-index: 9;}
|
127 |
+
table.wfSummaryParent td { vertical-align: top; padding: 0; margin: 0; }
|
128 |
+
table.wfSummaryParent table.wfSummaryChild th { font-weight: bold; text-align: right; font-family: Georgia, serif; color: #000; padding: 5px 10px 5px 0; border-top: 1px solid #CCC; }
|
129 |
+
table.wfSummaryParent table.wfSummaryChild td { font-weight: normal; text-align: left; padding: 5px 0 5px 0; border-top: 1px solid #CCC; }
|
130 |
+
table.wfSummaryParent table.wfSC1 td { width: 300px; padding: 0px 25px 10px 0; }
|
131 |
+
table.wfSummaryParent table.wfSC2 th { width: 80px; }
|
132 |
+
table.wfSummaryParent table.wfSC2 td { width: 100px; }
|
133 |
+
table.wfSummaryParent table.wfSC3 th { width: 80px; }
|
134 |
+
table.wfSummaryParent table.wfSC3 td { width: 250px; }
|
135 |
+
table.wfSummaryParent th.wfHead { font-size: 22px; font-family: Georgia, serif; font-style: italic; color: #555; font-weight: bold; text-align: left; padding: 20px 0 20px 0px; -webkit-font-smoothing: antialiased; }
|
136 |
+
|
137 |
+
div.wfIssue table.wfIssue td { padding: 2px; margin: 0; border-width: 0px; text-align: left; }
|
138 |
+
div.wfIssue table.wfIssue th { padding: 2px; margin: 0; font-weight: bold; text-align: left; color: #777; }
|
139 |
+
div.wfIssue h2 { margin: 0px 0 5px 0; padding: 0; }
|
140 |
+
div.wfIssue table.wfIssueLinks td { border-width: 0px; text-align: left; padding-right: 10px; }
|
141 |
+
.wfIssueOptions {
|
142 |
+
border-top: 1px solid #CCC;
|
143 |
+
padding: 10px;
|
144 |
+
}
|
145 |
+
.wfIssueOptions a {
|
146 |
+
margin-left: 10px;
|
147 |
+
}
|
148 |
+
.wfIssueOptions strong {
|
149 |
+
float: left;
|
150 |
+
display: block;
|
151 |
+
width: 60px;
|
152 |
+
}
|
153 |
+
.wfProbSev1, .wfProbSev2, .wfAjaxLight128, .wfResolved {
|
154 |
+
width: 128px;
|
155 |
+
height: 128px;
|
156 |
+
border: 0;
|
157 |
+
margin: 0 auto;
|
158 |
+
background-repeat: no-repeat; background-position: 0 0;
|
159 |
+
text-decoration: none;
|
160 |
+
display: block;
|
161 |
+
}
|
162 |
+
.wfProbSev1 { background-image: url(../images/icons/error128.png); }
|
163 |
+
.wfProbSev2 { background-image: url(../images/icons/warning128.png); }
|
164 |
+
.wfResolved { background-image: url(../images/icons/tick128.png); }
|
165 |
+
.wfAjaxLight128 { background-image: url(../images/icons/ajax3.gif); }
|
166 |
+
.wfStrong { font-weight: bold; }
|
167 |
+
.wordfenceModeElem { display: none; }
|
168 |
+
.wfIssuesContainer { width: 800px; display: none; }
|
169 |
+
.wfIssuesContainer p { width: 550px; }
|
170 |
+
.wfWarn { color: #F00; }
|
171 |
+
img.wfFlag { vertical-align: middle; margin: -3px 4px 0 0; }
|
172 |
+
.wfHitTime { font-style: italic; }
|
173 |
+
.wfAvatar img { vertical-align: middle; }
|
174 |
+
.wfActEvent { border-bottom: 1px solid #CCC; margin: 0 0 10px 0; padding: 0 0 10px 0; }
|
175 |
+
.wfTimeAgo { font-family: Georgia, times; color: #999; font-weight: bold; font-style: italic; }
|
176 |
+
table.wfConfigForm th {
|
177 |
+
font-weight: normal;
|
178 |
+
text-align: left;
|
179 |
+
padding: 2px 3px 1px 0;
|
180 |
+
vertical-align: middle;
|
181 |
+
}
|
182 |
+
table.wfConfigForm td {
|
183 |
+
vertical-align: middle;
|
184 |
+
}
|
185 |
+
table th.wfConfigEnable { font-weight: bold; }
|
186 |
+
.wfSavedMsg { display: none; color: #A00; }
|
187 |
+
table th.wfSubheading { font-weight: bold; padding-top: 10px; }
|
188 |
+
.wfALogTime { color: #999; }
|
189 |
+
.wfALogEntry { }
|
190 |
+
.wfALogMailLink, .wfALogReloadLink {
|
191 |
+
display: block;
|
192 |
+
position: absolute;
|
193 |
+
width: 16px;
|
194 |
+
height: 16px;
|
195 |
+
padding: 0;
|
196 |
+
margin: 0;
|
197 |
+
}
|
198 |
+
.wfALogMailLink {
|
199 |
+
right: 20px;
|
200 |
+
top: 2px;
|
201 |
+
background-image: url(../images/icons/email_go.png);
|
202 |
+
}
|
203 |
+
.wfALogReloadLink {
|
204 |
+
right: 42px;
|
205 |
+
top: 2px;
|
206 |
+
background-image: url(../images/icons/arrow_refresh.png);
|
207 |
+
}
|
208 |
+
#wfActivity { position: relative; }
|
css/phpinfo.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
h1.p {
|
4 |
+
background: url(../images/wordfence-logo-64x64.png);
|
5 |
+
background-position: 0 0;
|
6 |
+
background-repeat: no-repeat;
|
7 |
+
height: 64px;
|
8 |
+
vertical-align: middle;
|
9 |
+
padding: 10px 0 0 70px;
|
10 |
+
margin: 20px 0 10px 0;
|
11 |
+
font-family: Arial;
|
12 |
+
font-weight: normal;
|
13 |
+
font-size: 26px;
|
14 |
+
}
|
15 |
+
h1.p:before {
|
16 |
+
content: "Wordfence System Info for ";
|
17 |
+
}
|
18 |
+
td img { display: none; }
|
19 |
+
|
20 |
+
.diffFooter {
|
21 |
+
text-align: center;
|
22 |
+
font-size: 16px;
|
23 |
+
color: #999;
|
24 |
+
font-family: Verdana;
|
25 |
+
margin: 50px auto 50px auto;
|
26 |
+
}
|
27 |
+
.diffFooter a {
|
28 |
+
color: #999;
|
29 |
+
}
|
30 |
+
|
images/back_disabled.jpg
ADDED
Binary file
|
images/back_enabled.jpg
ADDED
Binary file
|
images/button-grad-grey.png
ADDED
Binary file
|
images/forward_disabled.jpg
ADDED
Binary file
|
images/forward_enabled.jpg
ADDED
Binary file
|
images/icons/ajax24.gif
ADDED
Binary file
|
images/icons/ajax3.gif
ADDED
Binary file
|
images/icons/ajaxWhite32x32.gif
ADDED
Binary file
|
images/icons/arrow_refresh.png
ADDED
Binary file
|
images/icons/bullet_yellow.png
ADDED
Binary file
|
images/icons/email_go.png
ADDED
Binary file
|
images/icons/error128.png
ADDED
Binary file
|
images/icons/tick128.png
ADDED
Binary file
|
images/icons/warning128.png
ADDED
Binary file
|
images/lightbox-controls.png
ADDED
Binary file
|
images/loading.gif
ADDED
Binary file
|
images/loading_background.png
ADDED
Binary file
|
images/sort_asc.gif
ADDED
Binary file
|
images/sort_asc_disabled.gif
ADDED
Binary file
|
images/sort_both.gif
ADDED
Binary file
|
images/sort_desc.gif
ADDED
Binary file
|
images/sort_desc_disabled.gif
ADDED
Binary file
|
images/wordfence-logo-16x16.png
ADDED
Binary file
|
images/wordfence-logo-32x32.png
ADDED
Binary file
|
images/wordfence-logo-64x64.png
ADDED
Binary file
|
js/admin.js
ADDED
@@ -0,0 +1,682 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(! window['wordfenceAdmin']){
|
2 |
+
window['wordfenceAdmin'] = {
|
3 |
+
loading16: '<div class="wfLoading16"></div>',
|
4 |
+
dbCheckTables: [],
|
5 |
+
dbCheckCount_ok: 0,
|
6 |
+
dbCheckCount_skipped: 0,
|
7 |
+
dbCheckCount_errors: 0,
|
8 |
+
issues: [],
|
9 |
+
ignoreData: false,
|
10 |
+
iconErrorMsgs: [],
|
11 |
+
scanIDLoaded: 0,
|
12 |
+
colorboxQueue: [],
|
13 |
+
colorboxOpen: false,
|
14 |
+
scanPending: false,
|
15 |
+
mode: '',
|
16 |
+
visibleIssuesPanel: 'new',
|
17 |
+
preFirstScanMsgsLoaded: false,
|
18 |
+
newestActivityTime: 0, //must be 0 to force loading of all initially
|
19 |
+
elementGeneratorIter: 1,
|
20 |
+
reloadConfigPage: false,
|
21 |
+
nonce: false,
|
22 |
+
init: function(){
|
23 |
+
this.nonce = WordfenceAdminVars.firstNonce;
|
24 |
+
if(jQuery('#wordfenceMode_scan').length > 0){
|
25 |
+
this.mode = 'scan';
|
26 |
+
this.noScanHTML = jQuery('#wfNoScanYetTmpl').tmpl().html();
|
27 |
+
} else if(jQuery('#wordfenceMode_activity').length > 0){
|
28 |
+
this.mode = 'activity';
|
29 |
+
this.activityMode = 'hit';
|
30 |
+
this.updateTicker();
|
31 |
+
} else if(jQuery('#wordfenceMode_options').length > 0){
|
32 |
+
this.mode = 'options';
|
33 |
+
jQuery('.wfConfigElem').change(function(){ jQuery('#securityLevel').val('CUSTOM'); });
|
34 |
+
this.updateTicker();
|
35 |
+
} else if(jQuery('#wordfenceMode_blockedIPs').length > 0){
|
36 |
+
this.mode = 'blocked';
|
37 |
+
this.staticTabChanged();
|
38 |
+
this.updateTicker();
|
39 |
+
} else {
|
40 |
+
this.mode = false;
|
41 |
+
}
|
42 |
+
if(this.mode){ //We are in a Wordfence page
|
43 |
+
var self = this;
|
44 |
+
this.liveInt = setInterval(function(){ self.updateTicker(); }, 1000);
|
45 |
+
jQuery(document).bind('cbox_closed', function(){ self.colorboxIsOpen = false; self.colorboxServiceQueue(); });
|
46 |
+
}
|
47 |
+
|
48 |
+
},
|
49 |
+
updateTicker: function(){
|
50 |
+
var self = this;
|
51 |
+
var alsoGet = '';
|
52 |
+
var otherParams = '';
|
53 |
+
if(this.mode == 'activity' && /^(?:404|hit|human|ruser|gCrawler|crawler|loginLogout)#x2F;.test(this.activityMode)){
|
54 |
+
alsoGet = 'logList_' + this.activityMode;
|
55 |
+
otherParams = this.newestActivityTime;
|
56 |
+
}
|
57 |
+
this.ajax('wordfence_ticker', {
|
58 |
+
alsoGet: alsoGet,
|
59 |
+
otherParams: otherParams
|
60 |
+
}, function(res){
|
61 |
+
self.handleTickerReturn(res);
|
62 |
+
});
|
63 |
+
},
|
64 |
+
handleTickerReturn: function(res){
|
65 |
+
var statusMsgChanged = false;
|
66 |
+
var newMsg = "";
|
67 |
+
var oldMsg = jQuery('#wfLiveStatus').html();
|
68 |
+
if( res.msg ){
|
69 |
+
newMsg = res.msg;
|
70 |
+
} else {
|
71 |
+
newMsg = "Idle";
|
72 |
+
}
|
73 |
+
if(newMsg && oldMsg && newMsg != oldMsg){
|
74 |
+
statusMsgChanged = true;
|
75 |
+
}
|
76 |
+
if(newMsg && newMsg != oldMsg){
|
77 |
+
jQuery('#wfLiveStatus').hide().html(newMsg).fadeIn(200);
|
78 |
+
}
|
79 |
+
|
80 |
+
if(this.mode == 'scan'){
|
81 |
+
if(res.running){
|
82 |
+
jQuery('.wfStartScanButton').addClass('button-wf-grey').val("A scan is in progress...").unbind('click').click(function(){ wordfenceAdmin.scanRunningMsg(); }).show();
|
83 |
+
} else {
|
84 |
+
if(! this.scanPending){
|
85 |
+
jQuery('.wfStartScanButton').removeClass('button-wf-grey').val("Start a Wordfence Scan").unbind('click').click(function(){ wordfenceAdmin.startScan(); }).show();
|
86 |
+
}
|
87 |
+
}
|
88 |
+
if(res.currentScanID && res.currentScanID != this.scanIDLoaded){
|
89 |
+
this.scanIDLoaded = res.currentScanID;
|
90 |
+
this.loadIssues();
|
91 |
+
} else if( (! res.currentScanID) && (! this.scanIDLoaded)){
|
92 |
+
//We haven't done our first scan yet.
|
93 |
+
if(! this.preFirstScanMsgsLoaded){
|
94 |
+
this.preFirstScanMsgsLoaded = true;
|
95 |
+
jQuery('#wfSummaryTables').html(this.noScanHTML);
|
96 |
+
this.switchIssuesTab(jQuery('#wfNewIssuesTab'), 'new');
|
97 |
+
jQuery('#wfActivity').html('<p>No events to report yet. Please complete your first scan.</p>');
|
98 |
+
}
|
99 |
+
}
|
100 |
+
} else if(this.mode == 'activity'){
|
101 |
+
if(res.alsoGet != 'logList_' + this.activityMode){ return; } //user switched panels since ajax request started
|
102 |
+
if(/^(?:topScanners|topLeechers)#x2F;.test(this.activityMode)){
|
103 |
+
if(statusMsgChanged){ this.updateTicker(); } return;
|
104 |
+
}
|
105 |
+
if(res.events.length > 0){
|
106 |
+
this.newestActivityTime = res.events[0]['ctime'];
|
107 |
+
}
|
108 |
+
var haveEvents = false;
|
109 |
+
if(jQuery('#wfActivity_' + this.activityMode + ' .wfActEvent').length > 0){
|
110 |
+
haveEvents = true;
|
111 |
+
}
|
112 |
+
if(res.events.length > 0){
|
113 |
+
if(! haveEvents){
|
114 |
+
jQuery('#wfActivity_' + this.activityMode).empty();
|
115 |
+
}
|
116 |
+
for(i = res.events.length - 1; i >= 0; i--){
|
117 |
+
var elemID = '#wfActEvent_' + res.events[i].id;
|
118 |
+
if(jQuery(elemID).length < 1){
|
119 |
+
res.events[i]['activityMode'] = this.activityMode;
|
120 |
+
var newElem;
|
121 |
+
if(this.activityMode == 'loginLogout'){
|
122 |
+
newElem = jQuery('#wfLoginLogoutEventTmpl').tmpl(res.events[i]);
|
123 |
+
} else {
|
124 |
+
newElem = jQuery('#wfHitsEventTmpl').tmpl(res.events[i]);
|
125 |
+
}
|
126 |
+
jQuery(newElem).find('.wfTimeAgo').data('wfctime', res.events[i].ctime);
|
127 |
+
newElem.prependTo('#wfActivity_' + this.activityMode).fadeIn();
|
128 |
+
}
|
129 |
+
}
|
130 |
+
this.reverseLookupIPs();
|
131 |
+
} else {
|
132 |
+
if(! haveEvents){
|
133 |
+
jQuery('#wfActivity_' + this.activityMode).html('<div>No events to report yet.</div>');
|
134 |
+
}
|
135 |
+
}
|
136 |
+
var self = this;
|
137 |
+
jQuery('.wfTimeAgo').each(function(idx, elem){
|
138 |
+
jQuery(elem).html(self.makeTimeAgo(res.serverTime - jQuery(elem).data('wfctime')) + ' ago');
|
139 |
+
});
|
140 |
+
}
|
141 |
+
if(statusMsgChanged){ this.updateTicker(); } return;
|
142 |
+
},
|
143 |
+
reverseLookupIPs: function(){
|
144 |
+
var ips = [];
|
145 |
+
jQuery('.wfReverseLookup').each(function(idx, elem){
|
146 |
+
var txt = jQuery(elem).text();
|
147 |
+
if(/^\d+\.\d+\.\d+\.\d+#x2F;.test(txt) && (! jQuery(elem).data('wfReverseDone'))){
|
148 |
+
jQuery(elem).data('wfReverseDone', true);
|
149 |
+
ips.push(jQuery(elem).text());
|
150 |
+
}
|
151 |
+
});
|
152 |
+
if(ips.length < 1){ return; }
|
153 |
+
var uni = {};
|
154 |
+
var uniqueIPs = [];
|
155 |
+
for(var i = 0; i < ips.length; i++){
|
156 |
+
if(! uni[ips[i]]){
|
157 |
+
uni[ips[i]] = true;
|
158 |
+
uniqueIPs.push(ips[i]);
|
159 |
+
}
|
160 |
+
}
|
161 |
+
this.ajax('wordfence_reverseLookup', {
|
162 |
+
ips: uniqueIPs.join(',')
|
163 |
+
},
|
164 |
+
function(res){
|
165 |
+
if(res.ok){
|
166 |
+
jQuery('.wfReverseLookup').each(function(idx, elem){
|
167 |
+
var txt = jQuery(elem).text();
|
168 |
+
for(ip in res.ips){
|
169 |
+
if(txt == ip){
|
170 |
+
if(res.ips[ip]){
|
171 |
+
jQuery(elem).html('<strong>Hostname:</strong> ' + res.ips[ip]);
|
172 |
+
} else {
|
173 |
+
jQuery(elem).html('');
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
});
|
178 |
+
}
|
179 |
+
}
|
180 |
+
);
|
181 |
+
},
|
182 |
+
activateWF: function(key){
|
183 |
+
jQuery('.wfAjax24').show();
|
184 |
+
this.ajax('wordfence_activate', {
|
185 |
+
key: key
|
186 |
+
},
|
187 |
+
function(res){
|
188 |
+
jQuery('.wfAjax24').hide();
|
189 |
+
if(res.ok){
|
190 |
+
window.location = "admin.php?page=Wordfence&wfAct=" + Math.floor(Math.random()*999999999);
|
191 |
+
return;
|
192 |
+
} else if(res.errorAlert){
|
193 |
+
jQuery.colorbox({ width: '400px', html:
|
194 |
+
"<h3>An error occured:</h3><p>" + res.errorAlert + "</p>"
|
195 |
+
});
|
196 |
+
}
|
197 |
+
|
198 |
+
});
|
199 |
+
},
|
200 |
+
startScan: function(){
|
201 |
+
var self = this;
|
202 |
+
jQuery('.wfStartScanButton').addClass('button-wf-grey').val("A scan is in progress...").unbind('click').click(function(){ wordfenceAdmin.scanRunningMsg(); }).show();
|
203 |
+
//scanPending prevents the button from switching to grey when clicked and then quickly to blue and grey again as the ticker us updated.
|
204 |
+
this.scanPending = true;
|
205 |
+
var self = this;
|
206 |
+
setTimeout(function(){ self.scanPending = false; }, 10000);
|
207 |
+
this.ajax('wordfence_scan', {}, function(res){ } );
|
208 |
+
},
|
209 |
+
loadIssues: function(callback){
|
210 |
+
if(this.mode != 'scan'){
|
211 |
+
return;
|
212 |
+
}
|
213 |
+
var self = this;
|
214 |
+
this.ajax('wordfence_loadIssues', { }, function(res){
|
215 |
+
self.displayIssues(res, callback);
|
216 |
+
});
|
217 |
+
},
|
218 |
+
sev2num: function(str){
|
219 |
+
if(/wfProbSev1/.test(str)){
|
220 |
+
return 1;
|
221 |
+
} else if(/wfProbSev2/.test(str)){
|
222 |
+
return 2;
|
223 |
+
} else {
|
224 |
+
return 0;
|
225 |
+
}
|
226 |
+
},
|
227 |
+
displayIssues: function(res, callback){
|
228 |
+
var self = this;
|
229 |
+
res.summary['lastScanCompleted'] = res['lastScanCompleted'];
|
230 |
+
jQuery('#wfSummaryTables').html( jQuery('#wfScanSummaryTmpl').tmpl(res.summary).html() );
|
231 |
+
jQuery('.wfIssuesContainer').hide();
|
232 |
+
for(issueStatus in res.issuesLists){
|
233 |
+
var containerID = 'wfIssues_dataTable_' + issueStatus;
|
234 |
+
var tableID = 'wfIssuesTable_' + issueStatus;
|
235 |
+
if(jQuery('#' + containerID).length < 1){
|
236 |
+
//Invalid issue status
|
237 |
+
continue;
|
238 |
+
}
|
239 |
+
if(res.issuesLists[issueStatus].length < 1){
|
240 |
+
if(issueStatus == 'new'){
|
241 |
+
if(res.lastScanCompleted == 'ok'){
|
242 |
+
jQuery('#' + containerID).html('<p style="font-size: 20px; color: #0A0;">Congratulations! You have no security issues on your site.</p>');
|
243 |
+
} else if(res['lastScanCompleted']){
|
244 |
+
//jQuery('#' + containerID).html('<p style="font-size: 12px; color: #A00;">The latest scan failed: ' + res.lastScanCompleted + '</p>');
|
245 |
+
} else {
|
246 |
+
jQuery('#' + containerID).html();
|
247 |
+
}
|
248 |
+
|
249 |
+
} else {
|
250 |
+
jQuery('#' + containerID).html('<p>There are currently <strong>no issues</strong> being ignored on this site.</p>');
|
251 |
+
}
|
252 |
+
continue;
|
253 |
+
}
|
254 |
+
jQuery('#' + containerID).html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="' + tableID + '"></table>');
|
255 |
+
|
256 |
+
jQuery.fn.dataTableExt.oSort['severity-asc'] = function(y,x){ x = WFAD.sev2num(x); y = WFAD.sev2num(y); if(x < y){ return 1; } if(x > y){ return -1; } return 0; };
|
257 |
+
jQuery.fn.dataTableExt.oSort['severity-desc'] = function(y,x){ x = WFAD.sev2num(x); y = WFAD.sev2num(y); if(x > y){ return 1; } if(x < y){ return -1; } return 0; };
|
258 |
+
|
259 |
+
jQuery('#' + tableID).dataTable({
|
260 |
+
"bFilter": false,
|
261 |
+
"bInfo": false,
|
262 |
+
"bPaginate": false,
|
263 |
+
"bLengthChange": false,
|
264 |
+
"bAutoWidth": false,
|
265 |
+
"aaData": res.issuesLists[issueStatus],
|
266 |
+
"aoColumns": [
|
267 |
+
{
|
268 |
+
"sTitle": '<div class="th_wrapp">Severity</div>',
|
269 |
+
"sWidth": '128px',
|
270 |
+
"sClass": "center",
|
271 |
+
"sType": 'severity',
|
272 |
+
"fnRender": function(obj) {
|
273 |
+
var cls = "";
|
274 |
+
cls = 'wfProbSev' + obj.aData.severity;
|
275 |
+
return '<span class="' + cls + '"></span>';
|
276 |
+
}
|
277 |
+
},
|
278 |
+
{
|
279 |
+
"sTitle": '<div class="th_wrapp">Issue</div>',
|
280 |
+
"bSortable": false,
|
281 |
+
"sWidth": '400px',
|
282 |
+
"sType": 'html',
|
283 |
+
fnRender: function(obj){
|
284 |
+
var tmplName = 'issueTmpl_' + obj.aData.type;
|
285 |
+
return jQuery('#' + tmplName).tmpl(obj.aData).html();
|
286 |
+
}
|
287 |
+
}
|
288 |
+
]
|
289 |
+
});
|
290 |
+
}
|
291 |
+
if(callback){
|
292 |
+
jQuery('#wfIssues_' + this.visibleIssuesPanel).fadeIn(500, function(){ callback(); });
|
293 |
+
} else {
|
294 |
+
jQuery('#wfIssues_' + this.visibleIssuesPanel).fadeIn(500);
|
295 |
+
}
|
296 |
+
return true;
|
297 |
+
},
|
298 |
+
ajax: function(action, data, cb, cbErr){
|
299 |
+
if(typeof(data) == 'string'){
|
300 |
+
if(data.length > 0){
|
301 |
+
data += '&';
|
302 |
+
}
|
303 |
+
data += 'action=' + action + '&nonce=' + this.nonce;
|
304 |
+
} else if(typeof(data) == 'object'){
|
305 |
+
data['action'] = action;
|
306 |
+
data['nonce'] = this.nonce;
|
307 |
+
}
|
308 |
+
if(! cbErr){
|
309 |
+
cbErr = function(){};
|
310 |
+
}
|
311 |
+
var self = this;
|
312 |
+
jQuery.ajax({
|
313 |
+
type: 'POST',
|
314 |
+
url: WordfenceAdminVars.ajaxURL,
|
315 |
+
dataType: "json",
|
316 |
+
data: data,
|
317 |
+
success: function(json){
|
318 |
+
if(json && json.nonce){
|
319 |
+
self.nonce = json.nonce;
|
320 |
+
}
|
321 |
+
if(json && json.errorMsg){
|
322 |
+
self.colorbox('400px', 'An error occured', json.errorMsg);
|
323 |
+
}
|
324 |
+
cb(json);
|
325 |
+
},
|
326 |
+
error: cbErr
|
327 |
+
});
|
328 |
+
},
|
329 |
+
colorbox: function(width, heading, body){
|
330 |
+
this.colorboxQueue.push([width, heading, body]);
|
331 |
+
this.colorboxServiceQueue();
|
332 |
+
},
|
333 |
+
colorboxServiceQueue: function(){
|
334 |
+
if(this.colorboxIsOpen){ return; }
|
335 |
+
if(this.colorboxQueue.length < 1){ return; }
|
336 |
+
var elem = this.colorboxQueue.shift();
|
337 |
+
this.colorboxOpen(elem[0], elem[1], elem[2]);
|
338 |
+
},
|
339 |
+
colorboxOpen: function(width, heading, body){
|
340 |
+
this.colorboxIsOpen = true;
|
341 |
+
jQuery.colorbox({ width: width, html: "<h3>" + heading + "</h3><p>" + body + "</p>"});
|
342 |
+
},
|
343 |
+
scanRunningMsg: function(){ this.colorbox('400px', "A scan is running", "A scan is currently in progress. Please wait until it finishes before starting another scan."); },
|
344 |
+
errorMsg: function(msg){ this.colorbox('400px', "An error occured:", msg); },
|
345 |
+
deleteFile: function(issueID){
|
346 |
+
var self = this;
|
347 |
+
this.ajax('wordfence_deleteFile', {
|
348 |
+
issueID: issueID
|
349 |
+
}, function(res){ self.doneDeleteFile(res); });
|
350 |
+
},
|
351 |
+
doneDeleteFile: function(res){
|
352 |
+
if(res.ok){
|
353 |
+
var self = this;
|
354 |
+
this.loadIssues(function(){ self.colorbox('400px', "Success deleting file", "The file " + res.file + " containing " + res.filesize + " bytes was successfully deleted."); });
|
355 |
+
} else if(res.errorMsg){
|
356 |
+
this.loadIssues();
|
357 |
+
}
|
358 |
+
},
|
359 |
+
restoreFile: function(issueID){
|
360 |
+
var self = this;
|
361 |
+
this.ajax('wordfence_restoreFile', {
|
362 |
+
issueID: issueID
|
363 |
+
}, function(res){ self.doneRestoreFile(res); });
|
364 |
+
},
|
365 |
+
doneRestoreFile: function(res){
|
366 |
+
this.loadIssues();
|
367 |
+
if(res.ok){
|
368 |
+
this.colorbox("400px", "File restored OK", "The file " + res.file + " was restored succesfully.");
|
369 |
+
}
|
370 |
+
},
|
371 |
+
deleteIssue: function(id){
|
372 |
+
var self = this;
|
373 |
+
this.ajax('wordfence_deleteIssue', { id: id }, function(res){
|
374 |
+
self.loadIssues();
|
375 |
+
if(res.errMsg){
|
376 |
+
self.colorbox('400px', "An error occured", res.errMsg);
|
377 |
+
}
|
378 |
+
});
|
379 |
+
},
|
380 |
+
updateIssueStatus: function(id, st){
|
381 |
+
var self = this;
|
382 |
+
this.ajax('wordfence_updateIssueStatus', { id: id, 'status': st }, function(res){
|
383 |
+
self.loadIssues();
|
384 |
+
if(res.errMsg){
|
385 |
+
self.colorbox('400px', "An error occured", res.errMsg);
|
386 |
+
}
|
387 |
+
});
|
388 |
+
},
|
389 |
+
updateAllIssues: function(op){ // deleteIgnored, deleteNew, ignoreAllNew
|
390 |
+
var head = "Please confirm";
|
391 |
+
if(op == 'deleteIgnored'){
|
392 |
+
body = "You have chosen to remove all ignored issues. Once these issues are removed they will be re-scanned by Wordfence and if they have not been fixed, they will appear in the 'new issues' list. Are you sure you want to do this?";
|
393 |
+
} else if(op == 'deleteNew'){
|
394 |
+
body = "You have chosen to mark all new issues as fixed. If you have not really fixed these issues, they will reappear in the new issues list on the next scan. If you have not fixed them and want them excluded from scans you should choose to 'ignore' them instead. Are you sure you want to mark all new issues as fixed?";
|
395 |
+
} else if(op == 'ignoreAllNew'){
|
396 |
+
body = "You have chosen to ignore all new issues. That means they will be excluded from future scans. You should only do this if you're sure all new issues are not a problem. Are you sure you want to ignore all new issues?";
|
397 |
+
} else {
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
this.colorbox('450px', head, body + '<br /><br /><center><input type="button" name="but1" value="Cancel" onclick="jQuery.colorbox.close();" /> <input type="button" name="but2" value="Yes I\'m sure" onclick="jQuery.colorbox.close(); WFAD.confirmUpdateAllIssues(\'' + op + '\');" /><br />');
|
401 |
+
},
|
402 |
+
confirmUpdateAllIssues: function(op){
|
403 |
+
var self = this;
|
404 |
+
this.ajax('wordfence_updateAllIssues', { op: op }, function(res){ self.loadIssues(); });
|
405 |
+
},
|
406 |
+
es: function(val){
|
407 |
+
if(val){
|
408 |
+
return val;
|
409 |
+
} else {
|
410 |
+
return "";
|
411 |
+
}
|
412 |
+
},
|
413 |
+
noQuotes: function(str){
|
414 |
+
return str.replace(/"/g,'"').replace(/\'/g, '‘');
|
415 |
+
},
|
416 |
+
commify: function(num){
|
417 |
+
return ("" + num).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
418 |
+
},
|
419 |
+
switchToLiveTab: function(elem){
|
420 |
+
jQuery('.wfTab1').removeClass('selected');
|
421 |
+
jQuery(elem).addClass('selected');
|
422 |
+
jQuery('.wfDataPanel').hide();
|
423 |
+
var self = this;
|
424 |
+
jQuery('#wfActivity').fadeIn(function(){ self.completeLiveTabSwitch(); });
|
425 |
+
},
|
426 |
+
completeLiveTabSwitch: function(){
|
427 |
+
this.ajax('wordfence_loadActivityLog', {}, function(res){
|
428 |
+
var html = '<a href="#" class="wfALogMailLink" onclick="WFAD.emailActivityLog(); return false;"></a><a href="#" class="wfALogReloadLink" onclick="WFAD.reloadActivityData(); return false;"></a>';
|
429 |
+
if(res.events && res.events.length > 0){
|
430 |
+
jQuery('#wfActivity').empty();
|
431 |
+
for(var i = 0; i < res.events.length; i++){
|
432 |
+
var timeTaken = '0.0000';
|
433 |
+
if(res.events[i + 1]){
|
434 |
+
timeTaken = (res.events[i].ctime - res.events[i + 1].ctime).toFixed(4);
|
435 |
+
}
|
436 |
+
var red = "";
|
437 |
+
if(res.events[i].type == 'error'){
|
438 |
+
red = ' class="wfWarn" ';
|
439 |
+
}
|
440 |
+
html += '<div ' + red + 'class="wfALogEntry"><span ' + red + 'class="wfALogTime">[' + res.events[i].type + ' : ' + timeTaken + ' : ' + res.events[i].timeAgo + ' ago]</span> ' + res.events[i].msg + "</div>";
|
441 |
+
}
|
442 |
+
jQuery('#wfActivity').html(html);
|
443 |
+
} else {
|
444 |
+
jQuery('#wfActivity').html("<p> No activity to report yet. Please complete your first scan.</p>");
|
445 |
+
}
|
446 |
+
});
|
447 |
+
},
|
448 |
+
emailActivityLog: function(){
|
449 |
+
this.colorbox('400px', 'Email Wordfence Activity Log', "Enter the email address you would like to send the Wordfence activity log to. Note that the activity log may contain thousands of lines of data. This log is usually only sent to a member of the Wordfence support team.<br /><br /><input type='text' size='20' id='wfALogRecip' /><input type='button' value='Send' onclick=\"WFAD.completeEmailActivityLog();\" /><input type='button' value='Cancel' onclick='jQuery.colorbox.close();' /><br /><br />");
|
450 |
+
},
|
451 |
+
completeEmailActivityLog: function(){
|
452 |
+
jQuery.colorbox.close();
|
453 |
+
var email = jQuery('#wfALogRecip').val();
|
454 |
+
if(! /^[^@]+@[^@]+#x2F;.test(email)){
|
455 |
+
alert("Please enter a valid email address.");
|
456 |
+
return;
|
457 |
+
}
|
458 |
+
var self = this;
|
459 |
+
this.ajax('wordfence_sendActivityLog', { email: jQuery('#wfALogRecip').val() }, function(res){
|
460 |
+
if(res.ok){
|
461 |
+
self.colorbox('400px', 'Activity Log Sent', "Your Wordfence activity log was sent to " + email + "<br /><br /><input type='button' value='Close' onclick='jQuery.colorbox.close();' /><br /><br />");
|
462 |
+
}
|
463 |
+
});
|
464 |
+
},
|
465 |
+
reloadActivityData: function(){
|
466 |
+
jQuery('#wfActivity').html('<div class="wfLoadingWhite32"></div>'); // <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br />
|
467 |
+
this.completeLiveTabSwitch();
|
468 |
+
},
|
469 |
+
switchToSummaryTab: function(elem){
|
470 |
+
jQuery('.wfTab1').removeClass('selected');
|
471 |
+
jQuery(elem).addClass('selected');
|
472 |
+
jQuery('.wfDataPanel').hide();
|
473 |
+
jQuery('#wfSummaryTables').fadeIn();
|
474 |
+
},
|
475 |
+
switchIssuesTab: function(elem, type){
|
476 |
+
jQuery('.wfTab2').removeClass('selected');
|
477 |
+
jQuery('.wfIssuesContainer').hide();
|
478 |
+
jQuery(elem).addClass('selected');
|
479 |
+
this.visibleIssuesPanel = type;
|
480 |
+
jQuery('#wfIssues_' + type).fadeIn();
|
481 |
+
},
|
482 |
+
switchTab: function(tabElement, tabClass, contentClass, selectedContentID, callback){
|
483 |
+
jQuery('.' + tabClass).removeClass('selected');
|
484 |
+
jQuery(tabElement).addClass('selected');
|
485 |
+
jQuery('.' + contentClass).hide().html('<div class="wfLoadingWhite32"></div>');
|
486 |
+
var func = function(){};
|
487 |
+
if(callback){
|
488 |
+
func = function(){ callback(); };
|
489 |
+
}
|
490 |
+
jQuery('#' + selectedContentID).fadeIn(func);
|
491 |
+
},
|
492 |
+
activityTabChanged: function(){
|
493 |
+
var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_','');
|
494 |
+
if(! mode){ return; }
|
495 |
+
this.activityMode = mode;
|
496 |
+
this.reloadActivities();
|
497 |
+
},
|
498 |
+
reloadActivities: function(){
|
499 |
+
jQuery('#wfActivity_' + this.activityMode).html('<div class="wfLoadingWhite32"></div>');
|
500 |
+
this.newestActivityTime = 0;
|
501 |
+
this.updateTicker();
|
502 |
+
},
|
503 |
+
staticTabChanged: function(){
|
504 |
+
var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_','');
|
505 |
+
if(! mode){ return; }
|
506 |
+
this.activityMode = mode;
|
507 |
+
|
508 |
+
var self = this;
|
509 |
+
this.ajax('wordfence_loadStaticPanel', {
|
510 |
+
mode: this.activityMode
|
511 |
+
}, function(res){
|
512 |
+
self.completeLoadStaticPanel(res);
|
513 |
+
});
|
514 |
+
},
|
515 |
+
completeLoadStaticPanel: function(res){
|
516 |
+
var contentElem = '#wfActivity_' + this.activityMode;
|
517 |
+
jQuery(contentElem).empty();
|
518 |
+
if(res.results && res.results.length > 0){
|
519 |
+
var tmpl;
|
520 |
+
if(this.activityMode == 'topScanners' || this.activityMode == 'topLeechers'){
|
521 |
+
tmpl = '#wfLeechersTmpl';
|
522 |
+
} else if(this.activityMode == 'blockedIPs'){
|
523 |
+
tmpl = '#wfBlockedIPsTmpl';
|
524 |
+
} else if(this.activityMode == 'lockedOutIPs'){
|
525 |
+
tmpl = '#wfLockedOutIPsTmpl';
|
526 |
+
} else if(this.activityMode == 'throttledIPs'){
|
527 |
+
tmpl = '#wfThrottledIPsTmpl';
|
528 |
+
} else { return; }
|
529 |
+
jQuery(tmpl).tmpl(res).prependTo(contentElem);
|
530 |
+
this.reverseLookupIPs();
|
531 |
+
} else {
|
532 |
+
if(this.activityMode == 'topScanners' || this.activityMode == 'topLeechers'){
|
533 |
+
jQuery(contentElem).html("No site hits have been logged yet. Check back soon.");
|
534 |
+
} else if(this.activityMode == 'blockedIPs'){
|
535 |
+
jQuery(contentElem).html("No IP addresses have been blocked yet. If you manually block an IP address or if Wordfence automatically blocks one, it will appear here.");
|
536 |
+
} else if(this.activityMode == 'lockedOutIPs'){
|
537 |
+
jQuery(contentElem).html("No IP addresses have been locked out from signing in or using the password recovery system.");
|
538 |
+
} else if(this.activityMode == 'throttledIPs'){
|
539 |
+
jQuery(contentElem).html("No IP addresses have been throttled yet. If an IP address accesses the site too quickly and breaks one of the Wordfence rules, it will appear here.");
|
540 |
+
} else { return; }
|
541 |
+
}
|
542 |
+
},
|
543 |
+
ucfirst: function(str){
|
544 |
+
str = "" + str;
|
545 |
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
546 |
+
},
|
547 |
+
makeIPTrafLink: function(IP){
|
548 |
+
return '/?_wfsf=IPTraf&nonce=' + this.nonce + '&IP=' + encodeURIComponent(IP);
|
549 |
+
},
|
550 |
+
makeDiffLink: function(dat){
|
551 |
+
return '/?_wfsf=diff&nonce=' + this.nonce +
|
552 |
+
'&file=' + encodeURIComponent(this.es(dat['file'])) +
|
553 |
+
'&cType=' + encodeURIComponent(this.es(dat['cType'])) +
|
554 |
+
'&cKey=' + encodeURIComponent(this.es(dat['cKey'])) +
|
555 |
+
'&cName=' + encodeURIComponent(this.es(dat['cName'])) +
|
556 |
+
'&cVersion=' + encodeURIComponent(this.es(dat['cVersion']));
|
557 |
+
},
|
558 |
+
makeTimeAgo: function(t){
|
559 |
+
var months = Math.floor(t / (86400 * 30));
|
560 |
+
var days = Math.floor(t / 86400);
|
561 |
+
var hours = Math.floor(t / 3600);
|
562 |
+
var minutes = Math.floor(t / 60);
|
563 |
+
if(months > 0){
|
564 |
+
days -= months * 30;
|
565 |
+
return this.pluralize(months, 'month', days, 'day');
|
566 |
+
} else if(days > 0){
|
567 |
+
hours -= days * 24;
|
568 |
+
return this.pluralize(days, 'day', hours, 'hour');
|
569 |
+
} else if(hours > 0) {
|
570 |
+
minutes -= hours * 60;
|
571 |
+
return this.pluralize(hours, 'hour', minutes, 'min');
|
572 |
+
} else if(minutes > 0) {
|
573 |
+
//t -= minutes * 60;
|
574 |
+
return this.pluralize(minutes, 'minute');
|
575 |
+
} else {
|
576 |
+
return Math.round(t) + " seconds";
|
577 |
+
}
|
578 |
+
},
|
579 |
+
pluralize: function(m1, t1, m2, t2){
|
580 |
+
if(m1 != 1) {
|
581 |
+
t1 = t1 + 's';
|
582 |
+
}
|
583 |
+
if(m2 != 1) {
|
584 |
+
t2 = t2 + 's';
|
585 |
+
}
|
586 |
+
if(m1 && m2){
|
587 |
+
return m1 + ' ' + t1 + ' ' + m2 + ' ' + t2;
|
588 |
+
} else {
|
589 |
+
return m1 + ' ' + t1;
|
590 |
+
}
|
591 |
+
},
|
592 |
+
blockIP: function(IP, reason){
|
593 |
+
var self = this;
|
594 |
+
this.ajax('wordfence_blockIP', {
|
595 |
+
IP: IP,
|
596 |
+
reason: reason
|
597 |
+
}, function(res){
|
598 |
+
if(res.errorMsg){
|
599 |
+
return;
|
600 |
+
} else {
|
601 |
+
self.reloadActivities();
|
602 |
+
}
|
603 |
+
});
|
604 |
+
},
|
605 |
+
unlockOutIP: function(IP){
|
606 |
+
var self = this;
|
607 |
+
this.ajax('wordfence_unlockOutIP', {
|
608 |
+
IP: IP
|
609 |
+
}, function(res){ self.staticTabChanged(); });
|
610 |
+
},
|
611 |
+
unblockIP: function(IP){
|
612 |
+
var self = this;
|
613 |
+
this.ajax('wordfence_unblockIP', {
|
614 |
+
IP: IP
|
615 |
+
}, function(res){ self.staticTabChanged(); });
|
616 |
+
},
|
617 |
+
makeElemID: function(){
|
618 |
+
return 'wfElemGen' + this.elementGeneratorIter++;
|
619 |
+
},
|
620 |
+
pulse: function(sel){
|
621 |
+
jQuery(sel).fadeIn(function(){
|
622 |
+
setTimeout(function(){ jQuery(sel).fadeOut(); }, 2000);
|
623 |
+
});
|
624 |
+
},
|
625 |
+
saveConfig: function(){
|
626 |
+
var qstr = jQuery('#wfConfigForm').serialize();
|
627 |
+
var self = this;
|
628 |
+
jQuery('.wfSavedMsg').hide();
|
629 |
+
jQuery('.wfAjax24').show();
|
630 |
+
this.ajax('wordfence_saveConfig', qstr, function(res){
|
631 |
+
jQuery('.wfAjax24').hide();
|
632 |
+
if(res.ok){
|
633 |
+
if(WFAD.reloadConfigPage){
|
634 |
+
self.colorbox('400px', "Please reload this page", "You selected a config option that changes the Wordfence menu on the left. Click the button below to reload this page to update the menu.<br /><br /><center><input type='button' name='wfReload' value='Reload page' onclick='window.location.reload();' /></center>");
|
635 |
+
return;
|
636 |
+
} else {
|
637 |
+
self.pulse('.wfSavedMsg');
|
638 |
+
}
|
639 |
+
} else if(res.errorMsg){
|
640 |
+
return;
|
641 |
+
} else {
|
642 |
+
self.colorbox('400px', 'An error occured', 'We encountered an error trying to save your changes.');
|
643 |
+
}
|
644 |
+
});
|
645 |
+
},
|
646 |
+
changeSecurityLevel: function(){
|
647 |
+
var level = jQuery('#securityLevel').val();
|
648 |
+
for(var k in WFSLevels[level].checkboxes){
|
649 |
+
if(k != 'liveTraf_ignorePublishers'){
|
650 |
+
jQuery('#' + k).prop("checked", WFSLevels[level].checkboxes[k]);
|
651 |
+
}
|
652 |
+
}
|
653 |
+
for(var k in WFSLevels[level].otherParams){
|
654 |
+
if(! /^(?:apiKey|securityLevel|alertEmails|liveTraf_ignoreUsers|liveTraf_ignoreIPs|liveTraf_ignoreUA|liveTraf_hitsMaxSize)#x2F;.test(k)){
|
655 |
+
jQuery('#' + k).val(WFSLevels[level].otherParams[k]);
|
656 |
+
}
|
657 |
+
}
|
658 |
+
},
|
659 |
+
clearAllBlocked: function(op){
|
660 |
+
if(op == 'blocked'){
|
661 |
+
body = "Are you sure you want to clear all blocked IP addresses and allow visitors from those addresses to access the site again?";
|
662 |
+
} else if(op == 'locked'){
|
663 |
+
body = "Are you sure you want to clear all locked IP addresses and allow visitors from those addresses to sign in again?";
|
664 |
+
} else {
|
665 |
+
return;
|
666 |
+
}
|
667 |
+
this.colorbox('450px', "Please confirm", body +
|
668 |
+
'<br /><br /><center><input type="button" name="but1" value="Cancel" onclick="jQuery.colorbox.close();" /> ' +
|
669 |
+
'<input type="button" name="but2" value="Yes I\'m sure" onclick="jQuery.colorbox.close(); WFAD.confirmClearAllBlocked(\'' + op + '\');"><br />');
|
670 |
+
},
|
671 |
+
confirmClearAllBlocked: function(op){
|
672 |
+
var self = this;
|
673 |
+
this.ajax('wordfence_clearAllBlocked', { op: op }, function(res){
|
674 |
+
self.staticTabChanged();
|
675 |
+
});
|
676 |
+
}
|
677 |
+
};
|
678 |
+
window['WFAD'] = window['wordfenceAdmin'];
|
679 |
+
}
|
680 |
+
jQuery(function(){
|
681 |
+
wordfenceAdmin.init();
|
682 |
+
});
|
js/jquery.colorbox-min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
// ColorBox v1.3.19 - jQuery lightbox plugin
|
2 |
+
// (c) 2011 Jack Moore - jacklmoore.com
|
3 |
+
// License: http://www.opensource.org/licenses/mit-license.php
|
4 |
+
(function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?#x2F;i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bc(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[$(-1),$(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),ba(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),bc(m),bc(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ba(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this);
|
js/jquery.dataTables.min.js
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* File: jquery.dataTables.min.js
|
3 |
+
* Version: 1.8.2
|
4 |
+
* Author: Allan Jardine (www.sprymedia.co.uk)
|
5 |
+
* Info: www.datatables.net
|
6 |
+
*
|
7 |
+
* Copyright 2008-2011 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, as supplied with this software.
|
11 |
+
*
|
12 |
+
* This source file is distributed in the hope that it will be useful, but
|
13 |
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
14 |
+
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
15 |
+
*/
|
16 |
+
(function(i,za,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var n=i.fn.dataTableExt;n.sVersion="1.8.2";n.sErrMode="alert";n.iApiIndex=0;n.oApi={};n.afnFiltering=[];n.aoFeatures=[];n.ofnSearch={};n.afnSortData=[];n.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",
|
17 |
+
sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",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",
|
18 |
+
sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};n.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",
|
19 |
+
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",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",
|
20 |
+
sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",
|
21 |
+
sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",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",sScrollWrapper:"dataTables_scroll",
|
22 |
+
sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,l,s){var t,w,y;if(g.bJUI){t=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;
|
23 |
+
t.appendChild(y)}else{t=p.createElement("div");w=p.createElement("div")}t.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;t.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(t);l.appendChild(w);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(t).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false});
|
24 |
+
if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,s=0,t=l.length;s<t;s++)if(l[s].childNodes.length!==0){l[s].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[s].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
|
25 |
+
g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,s){var t=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),F=p.createElement("span"),x=p.createElement("span");t.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;F.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;t.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;F.className=
|
26 |
+
v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(t);l.appendChild(w);l.appendChild(y);l.appendChild(F);l.appendChild(x);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(F).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&s(g)});i("span",l).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",
|
27 |
+
function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");F.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var s=n.oPagination.iFullNumbersShowPages,t=Math.floor(s/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,F=
|
28 |
+
"",x,v=g.oClasses;if(w<s){t=1;x=w}else if(y<=t){t=1;x=s}else if(y>=w-t){t=w-s+1;x=w}else{t=y-Math.ceil(s/2)+1;x=t+s-1}for(s=t;s<=x;s++)F+=y!=s?'<span class="'+v.sPageButton+'">'+s+"</span>":'<span class="'+v.sPageButtonActive+'">'+s+"</span>";x=g.aanFeatures.p;var z,$=function(M){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);M.preventDefault()},X=function(){return false};s=0;for(t=x.length;s<t;s++)if(x[s].childNodes.length!==0){z=i("span:eq(2)",x[s]);z.html(F);i("span",z).bind("click.DT",
|
29 |
+
$).bind("mousedown.DT",X).bind("selectstart.DT",X);z=x[s].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
|
30 |
+
v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};n.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<
|
31 |
+
l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<l?1:g>l?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l-
|
32 |
+
g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};n.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,s=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var t=1;t<g.length;t++){l=g.charAt(t);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(s)return null;s=true}}return"numeric"},function(g){var l=Date.parse(g);
|
33 |
+
if(l!==null&&!isNaN(l)||typeof g=="string"&&g.length===0)return"date";return null},function(g){if(typeof g=="string"&&g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];n.fnVersionCheck=function(g){var l=function(x,v){for(;x.length<v;)x+="0";return x},s=n.sVersion.split(".");g=g.split(".");for(var t="",w="",y=0,F=g.length;y<F;y++){t+=l(s[y],3);w+=l(g[y],3)}return parseInt(t,10)>=parseInt(w,10)};n._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal=
|
34 |
+
function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance=
|
35 |
+
this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",
|
36 |
+
sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",
|
37 |
+
bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripeClasses=[];this.asDestroyStripes=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType=
|
38 |
+
"two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:function(f){i(d.oInstance).trigger("xhr",d);c(f)},dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})};
|
39 |
+
this.aoServerParams=[];this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=this.oLanguage.sInfoThousands+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=n.oStdClasses;this.bSortCellsTop=this.bSorted=this.bFiltered=false;
|
40 |
+
this.oInit=null;this.aoDestroyCallback=[]}function s(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.oApi[a].apply(this,b)}}function t(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===false)setTimeout(function(){t(a)},200);else{Aa(a);X(a);M(a,a.aoHeader);a.nTFoot&&M(a,a.aoFooter);K(a,true);a.oFeatures.bAutoWidth&&ga(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth);
|
41 |
+
if(a.oFeatures.bSort)R(a);else if(a.oFeatures.bFilter)N(a,a.oPreviousSearch);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide){c=[];ha(a,c);a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(f){var e=f;if(a.sAjaxDataProp!=="")e=aa(a.sAjaxDataProp)(f);for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)R(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,f)},a)}else if(!a.oFeatures.bServerSide){K(a,
|
42 |
+
false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!="undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){a.oLanguage=i.extend(true,a.oLanguage,b);typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sEmptyTable");typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sLoadingRecords");c&&t(a)}function F(a,
|
43 |
+
b){var c=a.aoColumns.length;b={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null};a.aoColumns.push(b);if(typeof a.aoPreSearchCols[c]==
|
44 |
+
"undefined"||a.aoPreSearchCols[c]===null)a.aoPreSearchCols[c]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[c].bRegex=="undefined")a.aoPreSearchCols[c].bRegex=true;if(typeof a.aoPreSearchCols[c].bSmart=="undefined")a.aoPreSearchCols[c].bSmart=true}x(a,c,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}o(b,c,"bVisible");o(b,c,"bSearchable");o(b,c,"bSortable");o(b,c,"sTitle");o(b,
|
45 |
+
c,"sName");o(b,c,"sWidth");o(b,c,"sWidth","sWidthOrig");o(b,c,"sClass");o(b,c,"fnRender");o(b,c,"bUseRendered");o(b,c,"iDataSort");o(b,c,"mDataProp");o(b,c,"asSorting");o(b,c,"sSortDataType");o(b,c,"sDefaultContent");o(b,c,"sContentPadding")}b.fnGetData=aa(b.mDataProp);b.fnSetData=Ba(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(b.bSortable||
|
46 |
+
i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortable;b.sSortingClassJUI=a.oClasses.sSortJUI}else if(i.inArray("asc",b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function v(a,b){var c;
|
47 |
+
c=i.isArray(b)?b.slice():i.extend(true,{},b);b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var f,e=0,h=a.aoColumns.length;e<h;e++){c=a.aoColumns[e];typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&O(a,b,e,c.fnRender({iDataRow:b,iDataColumn:e,aData:d._aData,oSettings:a}));if(c._bAutoType&&c.sType!="string"){f=G(a,b,e,"type");if(f!==null&&f!==""){f=ia(f);if(c.sType===null)c.sType=f;else if(c.sType!=f&&c.sType!="html")c.sType=
|
48 |
+
"string"}}}a.aiDisplayMaster.push(b);a.oFeatures.bDeferRender||z(a,b);return b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr");typeof c._aData.DT_RowId!="undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId);typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,e=a.aoColumns.length;f<e;f++){var h=a.aoColumns[f];d=p.createElement("td");d.innerHTML=typeof h.fnRender=="function"&&(!h.bUseRendered||h.mDataProp===null)?h.fnRender({iDataRow:b,
|
49 |
+
iDataColumn:f,aData:c._aData,oSettings:a}):G(a,b,f,"display");if(h.sClass!==null)d.className=h.sClass;if(h.bVisible){c.nTr.appendChild(d);c._anHidden[f]=null}else c._anHidden[f]=d}}}function $(a){var b,c,d,f,e,h,j,k,m;if(a.bDeferLoading||a.sAjaxSource===null){j=a.nTBody.childNodes;b=0;for(c=j.length;b<c;b++)if(j[b].nodeName.toUpperCase()=="TR"){k=a.aoData.length;a.aoData.push({nTr:j[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(k);h=j[b].childNodes;d=e=0;for(f=
|
50 |
+
h.length;d<f;d++){m=h[d].nodeName.toUpperCase();if(m=="TD"||m=="TH"){O(a,k,e,i.trim(h[d].innerHTML));e++}}}}j=ba(a);h=[];b=0;for(c=j.length;b<c;b++){d=0;for(f=j[b].childNodes.length;d<f;d++){e=j[b].childNodes[d];m=e.nodeName.toUpperCase();if(m=="TD"||m=="TH")h.push(e)}}h.length!=j.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+j.length*a.aoColumns.length+" and got "+h.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");
|
51 |
+
d=0;for(f=a.aoColumns.length;d<f;d++){if(a.aoColumns[d].sTitle===null)a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML;j=a.aoColumns[d]._bAutoType;m=typeof a.aoColumns[d].fnRender=="function";e=a.aoColumns[d].sClass!==null;k=a.aoColumns[d].bVisible;var u,r;if(j||m||e||!k){b=0;for(c=a.aoData.length;b<c;b++){u=h[b*f+d];if(j&&a.aoColumns[d].sType!="string"){r=G(a,b,d,"type");if(r!==""){r=ia(r);if(a.aoColumns[d].sType===null)a.aoColumns[d].sType=r;else if(a.aoColumns[d].sType!=r&&a.aoColumns[d].sType!=
|
52 |
+
"html")a.aoColumns[d].sType="string"}}if(m){r=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a});u.innerHTML=r;a.aoColumns[d].bUseRendered&&O(a,b,d,r)}if(e)u.className+=" "+a.aoColumns[d].sClass;if(k)a.aoData[b]._anHidden[d]=null;else{a.aoData[b]._anHidden[d]=u;u.parentNode.removeChild(u)}}}}}function X(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;
|
53 |
+
a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}}else{var f=p.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);f.appendChild(c)}i(a.nTHead).html("")[0].appendChild(f);Y(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");
|
54 |
+
f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var e=p.createElement("span");e.className=a.oClasses.sSortIcon;f.appendChild(e);c.appendChild(f)}}d=function(){this.onselectstart=function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ja(a,a.aoColumns[b].nTh,b);i(a.aoColumns[b].nTh).bind("mousedown.DT",d)}else i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);
|
55 |
+
if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)if(typeof c[b]!="undefined")a.aoColumns[b].nTf=c[b]}}function M(a,b,c){var d,f,e,h=[],j=[],k=a.aoColumns.length;if(typeof c=="undefined")c=false;d=0;for(f=b.length;d<f;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(e=k-1;e>=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d<f;d++){if(h[d].nTr){a=0;for(e=h[d].nTr.childNodes.length;a<e;a++)h[d].nTr.removeChild(h[d].nTr.childNodes[0])}e=0;
|
56 |
+
for(b=h[d].length;e<b;e++){k=c=1;if(typeof j[d][e]=="undefined"){h[d].nTr.appendChild(h[d][e].cell);for(j[d][e]=1;typeof h[d+c]!="undefined"&&h[d][e].cell==h[d+c][e].cell;){j[d+c][e]=1;c++}for(;typeof h[d][e+k]!="undefined"&&h[d][e].cell==h[d][e+k].cell;){for(a=0;a<c;a++)j[d+a][e+k]=1;k++}h[d][e].cell.rowSpan=c;h[d][e].cell.colSpan=k}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripeClasses.length;c=a.aoOpenRows.length;if(!(a.fnPreDrawCallback!==null&&a.fnPreDrawCallback.call(a.oInstance,a)===
|
57 |
+
false)){a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!Ca(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=
|
58 |
+
h;h<j;h++){var k=a.aoData[a.aiDisplay[h]];k.nTr===null&&z(a,a.aiDisplay[h]);var m=k.nTr;if(b!==0){var u=a.asStripeClasses[f%b];if(k._sRowStripe!=u){i(m).removeClass(k._sRowStripe).addClass(u);k._sRowStripe=u}}if(typeof a.fnRowCallback=="function"){m=a.fnRowCallback.call(a.oInstance,m,a.aoData[a.aiDisplay[h]]._aData,f,h);if(!m&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(m);f++;if(c!==0)for(k=0;k<c;k++)m==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");
|
59 |
+
if(typeof a.asStripeClasses[0]!="undefined")d[0].className=a.asStripeClasses[0];e=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));if(a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide)e=a.oLanguage.sLoadingRecords;else if(typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0)e=a.oLanguage.sEmptyTable;b=p.createElement("td");b.setAttribute("valign","top");b.colSpan=Z(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=e;d[f].appendChild(b)}typeof a.fnHeaderCallback==
|
60 |
+
"function"&&a.fnHeaderCallback.call(a.oInstance,i(a.nTHead).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,i(a.nTFoot).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=
|
61 |
+
c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-1;b>=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);i(a.oInstance).trigger("draw",a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function da(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)N(a,
|
62 |
+
a.oPreviousSearch);else{E(a);C(a)}}function Ca(a){if(a.bAjaxDataGet){a.iDraw++;K(a,true);var b=Da(a);ha(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(c){Ea(a,c)},a);return false}else return true}function Da(a){var b=a.aoColumns.length,c=[],d,f;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ka(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:
|
63 |
+
-1});for(f=0;f<b;f++){d=a.aoColumns[f].mDataProp;c.push({name:"mDataProp_"+f,value:typeof d=="function"?"function":d})}if(a.oFeatures.bFilter!==false){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(a.oFeatures.bSort!==false){d=
|
64 |
+
a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var e=a.aaSorting.length;c.push({name:"iSortingCols",value:d+e});for(f=0;f<d;f++){c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]});c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]})}for(f=0;f<e;f++){c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]});c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]})}for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ha(a,b){for(var c=0,d=a.aoServerParams.length;c<
|
65 |
+
d;c++)a.aoServerParams[c].fn.call(a.oInstance,b)}function Ea(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))la(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ka(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=Fa(a,b.sColumns);b=aa(a.sAjaxDataProp)(b);for(var f=0,e=b.length;f<e;f++)if(c){for(var h=[],j=0,k=a.aoColumns.length;j<k;j++)h.push(b[f][d[j]]);
|
66 |
+
v(a,h)}else v(a,b[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function Aa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,h,j,k,m,u,r=0;r<d.length;r++){e=0;h=d[r];if(h==
|
67 |
+
"<"){j=p.createElement("div");k=d[r+1];if(k=="'"||k=='"'){m="";for(u=2;d[r+u]!=k;){m+=d[r+u];u++}if(m=="H")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(m=="F")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(m.indexOf(".")!=-1){k=m.split(".");j.setAttribute("id",k[0].substr(1,k[0].length-1));j.className=k[1]}else if(m.charAt(0)=="#")j.setAttribute("id",m.substr(1,m.length-1));else j.className=m;r+=u}c.appendChild(j);
|
68 |
+
c=j}else if(h==">")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ga(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Ha(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ia(a);e=1}else if(h=="t"){f=Ja(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ka(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=La(a);e=1}else if(n.aoFeatures.length!==0){j=n.aoFeatures;u=0;for(k=j.length;u<k;u++)if(h==j[u].cFeature){if(f=j[u].fnInit(a))e=1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[h]!=
|
69 |
+
"object")a.aanFeatures[h]=[];a.aanFeatures[h].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function Ja(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(false),k=a.nTable.cloneNode(false),m=a.nTable.getElementsByTagName("thead")[0],u=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],
|
70 |
+
r=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?n.oJUIClasses:n.oStdClasses;c.appendChild(d);e.appendChild(h);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(j);j.appendChild(m);if(u!==null){b.appendChild(e);h.appendChild(k);k.appendChild(u)}b.className=r.sScrollWrapper;c.className=r.sScrollHead;d.className=r.sScrollHeadInner;f.className=r.sScrollBody;e.className=r.sScrollFoot;h.className=r.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow="hidden";c.style.position="relative";
|
71 |
+
e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";j.removeAttribute("id");j.style.marginLeft="0";a.nTable.style.marginLeft="0";if(u!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=i(a.nTable).children("caption");h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);if(a.oScroll.sX!==""){c.style.width=q(a.oScroll.sX);f.style.width=q(a.oScroll.sX);if(u!==null)e.style.width=q(a.oScroll.sX);i(f).scroll(function(){c.scrollLeft=
|
72 |
+
this.scrollLeft;if(u!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=q(a.oScroll.sY);a.aoDrawCallback.push({fn:Ma,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){if(!a.bDrawing)if(i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ma(a,"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ma(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],
|
73 |
+
d=a.nTable.parentNode,f,e,h,j,k,m,u,r,H=[],L=a.nTFoot!==null?a.nScrollFoot.getElementsByTagName("div")[0]:null,T=a.nTFoot!==null?L.getElementsByTagName("table")[0]:null,B=i.browser.msie&&i.browser.version<=7;h=a.nTable.getElementsByTagName("thead");h.length>0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);
|
74 |
+
a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var U=S(a,h);f=0;for(e=U.length;f<e;f++){u=Na(a,f);U[f].style.width=a.aoColumns[u].sWidth}a.nTFoot!==null&&P(function(I){I.style.width=""},k.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(B&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!==
|
75 |
+
"")a.nTable.style.width=q(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){a.nTable.style.width=q(f-a.oScroll.iBarWidth);if(i(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=q(f)}else a.nTable.style.width=q(f);f=i(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width=
|
76 |
+
q(r);H.push(r)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width=q(r);H.push(r)},j,k);i(j).height(0)}P(function(I){I.innerHTML="";I.style.width=q(H.shift())},h);a.nTFoot!==null&&P(function(I){I.innerHTML="";I.style.width=q(H.shift())},j);if(i(a.nTable).outerWidth()<f){j=d.scrollHeight>d.offsetHeight||
|
77 |
+
i(d).css("overflow-y")=="scroll"?f+a.oScroll.iBarWidth:f;if(B&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(j-a.oScroll.iBarWidth);d.style.width=q(j);b.parentNode.style.width=q(j);if(a.nTFoot!==null)L.parentNode.style.width=q(j);if(a.oScroll.sX==="")J(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.");else a.oScroll.sXInner!==""&&J(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=
|
78 |
+
q("100%");b.parentNode.style.width=q("100%");if(a.nTFoot!==null)L.parentNode.style.width=q("100%")}if(a.oScroll.sY==="")if(B)d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=q(a.oScroll.sY);B=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=q(i(a.nTable).height()+B)}B=i(a.nTable).outerWidth();c.style.width=q(B);b.style.width=q(B+a.oScroll.iBarWidth);
|
79 |
+
if(a.nTFoot!==null){L.style.width=q(a.nTable.offsetWidth+a.oScroll.iBarWidth);T.style.width=q(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function ea(a){if(a.oFeatures.bAutoWidth===false)return false;ga(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Ha(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';var c=p.createElement("div");
|
80 |
+
c.className=a.oClasses.sFilter;c.innerHTML="<label>"+b+"</label>";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f<e;f++)d[f]!=i(this).parents("div.dataTables_filter")[0]&&i("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&N(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});
|
81 |
+
b.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return c}function N(a,b,c){Oa(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)Pa(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);n.afnFiltering.length!==0&&Qa(a);a.bFiltered=true;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;E(a);C(a);oa(a,0)}function Qa(a){for(var b=n.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,h=a.aiDisplay.length;e<h;e++){var j=a.aiDisplay[e-
|
82 |
+
f];if(!b[c](a,fa(a,j,"filter"),j)){a.aiDisplay.splice(e-f,1);f++}}}function Pa(a,b,c,d,f){if(b!==""){var e=0;b=pa(b,d,f);for(d=a.aiDisplay.length-1;d>=0;d--){f=qa(G(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Oa(a,b,c,d,f){var e=pa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(n.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||
|
83 |
+
a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);oa(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var h=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-h,1);h++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function oa(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,
|
84 |
+
a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=ra(a,fa(a,b[c],"filter"))}}function ra(a,b){var c="";if(typeof a.__nTmpFilter=="undefined")a.__nTmpFilter=p.createElement("div");for(var d=a.__nTmpFilter,f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=qa(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,
|
85 |
+
"")}return c}function pa(a,b,c){if(c){a=b?a.split(" "):sa(a).split(" ");a="^(?=.*?"+a.join(")(?=.*?")+").*quot;;return new RegExp(a,"i")}else{a=b?a:sa(a);return new RegExp(a,"i")}}function qa(a,b){if(typeof n.ofnSearch[b]=="function")return n.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=n.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&
|
86 |
+
(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<h.length;c++){var u=h[c][0];f=ta(a,u);e=a.aoColumns[u].sSortDataType;if(typeof n.afnSortData[e]!="undefined"){var r=n.afnSortData[e](a,u,f);f=0;for(e=d.length;f<e;f++)O(a,f,u,r[f])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)j[a.aiDisplayMaster[c]]=c;var H=h.length;a.aiDisplayMaster.sort(function(L,T){var B,U;for(c=0;c<H;c++){B=m[h[c][0]].iDataSort;U=m[B].sType;
|
87 |
+
B=k[(U?U:"string")+"-"+h[c][1]](G(a,L,B,"sort"),G(a,T,B,"sort"));if(B!==0)return B}return k["numeric-asc"](j[L],j[T])})}if((typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender)V(a);a.bSorted=true;i(a.oInstance).trigger("sort",a);if(a.oFeatures.bFilter)N(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;E(a);C(a)}}function ja(a,b,c,d){i(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var h,j;if(f.shiftKey){for(var k=false,m=0;m<
|
88 |
+
a.aaSorting.length;m++)if(a.aaSorting[m][0]==c){k=true;h=a.aaSorting[m][0];j=a.aaSorting[m][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")a.aaSorting.splice(m,1);else{a.aaSorting[m][1]=a.aoColumns[h].asSorting[j];a.aaSorting[m][2]=j}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){h=a.aaSorting[0][0];j=a.aaSorting[0][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")j=0;a.aaSorting[0][1]=a.aoColumns[h].asSorting[j];
|
89 |
+
a.aaSorting[0][2]=j}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}R(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function V(a){var b,c,d,f,e,h=a.aoColumns.length,j=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):
|
90 |
+
a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=i("span",a.aoColumns[b].nTh);c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?j.sSortJUIAsc:j.sSortJUIDesc)}}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);
|
91 |
+
e=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(e+"1 "+e+"2 "+e+"3");else if(d.length>=h)for(b=0;b<h;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/
|
92 |
+
h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+e+"3",""))}j=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+k].className+=" "+e+j;j<3&&j++}}}function La(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;n.oPagination[a.sPaginationType].fnInit(a,b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){n.oPagination[c.sPaginationType].fnUpdate(c,
|
93 |
+
function(d){E(d);C(d)})},sName:"pagination"});return b}function ma(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay())a._iDisplayStart+=a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(a._iDisplayLength>=0){b=parseInt((a.fnRecordsDisplay()-
|
94 |
+
1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Ka(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ra,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Ra(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+
|
95 |
+
1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j=a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",
|
96 |
+
e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(e)}}function Ga(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+
|
97 |
+
a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");
|
98 |
+
f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=
|
99 |
+
0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function Ia(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r=="undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Na(a,b){for(var c=-1,d=0;d<
|
100 |
+
a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function ta(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function W(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function Z(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===
|
101 |
+
true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Sa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=q(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ga(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",
|
102 |
+
a.nTHead);for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Sa(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==null)a.aoColumns[e].sWidth=q(c);b++}}if(f==h.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=i(h[e]).width();if(c!==null)a.aoColumns[e].sWidth=q(c)}else{b=a.nTable.cloneNode(false);e=a.nTHead.cloneNode(true);d=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(e);if(a.nTFoot!==
|
103 |
+
null){b.appendChild(a.nTFoot.cloneNode(true));P(function(k){k.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(d);d.appendChild(c);d=i("thead th",b);if(d.length===0)d=i("tbody tr:eq(0)>td",b);h=S(a,e);for(e=d=0;e<f;e++){var j=a.aoColumns[e];if(j.bVisible&&j.sWidthOrig!==null&&j.sWidthOrig!=="")h[e-d].style.width=q(j.sWidthOrig);else if(j.bVisible)h[e-d].style.width="";else d++}for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Ta(a,e);if(d!==null){d=d.cloneNode(true);if(a.aoColumns[e].sContentPadding!==
|
104 |
+
"")d.innerHTML+=a.aoColumns[e].sContentPadding;c.appendChild(d)}}f=a.nTable.parentNode;f.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!=="")b.style.width=q(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(i(b).width()<f.offsetWidth)b.style.width=q(f.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=q(f.offsetWidth);b.style.visibility="hidden";Ua(a,b);f=i("tbody tr:eq(0)",b).children();if(f.length===0)f=S(a,i("thead",b)[0]);if(a.oScroll.sX!==""){for(e=d=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c+=
|
105 |
+
a.aoColumns[e].sWidthOrig===null?i(f[d]).outerWidth():parseInt(a.aoColumns[e].sWidth.replace("px",""),10)+(i(f[d]).outerWidth()-i(f[d]).width());d++}b.style.width=q(c);a.nTable.style.width=q(c)}for(e=d=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c=i(f[d]).width();if(c!==null&&c>0)a.aoColumns[e].sWidth=q(c);d++}a.nTable.style.width=q(i(b).outerWidth());b.parentNode.removeChild(b)}}function Ua(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!==
|
106 |
+
"")b.style.width=q(i(b).outerWidth())}function Ta(a,b){var c=Va(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=G(a,c,b,"");return d}return Q(a,c)[b]}function Va(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var e=G(a,f,b,"display")+"";e=e.replace(/<.*?>/g,"");if(e.length>c){c=e.length;d=f}}return d}function q(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+
|
107 |
+
"px"}function Za(a,b){if(a.length!=b.length)return 1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function ia(a){for(var b=n.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function ca(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ba(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);
|
108 |
+
return b}function Q(a,b){var c=[],d,f,e,h,j;f=0;var k=a.aoData.length;if(typeof b!="undefined"){f=b;k=b+1}for(f=f;f<k;f++){j=a.aoData[f];if(j.nTr!==null){b=[];e=0;for(h=j.nTr.childNodes.length;e<h;e++){d=j.nTr.childNodes[e].nodeName.toLowerCase();if(d=="td"||d=="th")b.push(j.nTr.childNodes[e])}e=d=0;for(h=a.aoColumns.length;e<h;e++)if(a.aoColumns[e].bVisible)c.push(b[e-d]);else{c.push(j._anHidden[e]);d++}}}return c}function sa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)",
|
109 |
+
"g"),"\\$1")}function ua(a,b){for(var c=-1,d=0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Fa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ka(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+
|
110 |
+
a.sTableId+"'): "+c;if(b===0)if(n.sErrMode=="alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function la(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function va(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",";
|
111 |
+
f+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:a._iDisplayEnd)+",";f+='"iLength":'+a._iDisplayLength+",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+
|
112 |
+
"],";f=f.substring(0,f.length-1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+=a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";Wa(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Xa(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=wa(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,
|
113 |
+
'"')):eval("("+d+")")}catch(e){return}d=0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<
|
114 |
+
c.aaSearchCols.length;d++)a.aoPreSearchCols[d]={sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Wa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=za.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;if(f!==null){h=typeof i.parseJSON=="function"?i.parseJSON(b):
|
115 |
+
eval("("+b+")");b=f(a,h,e.toGMTString(),c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/";f="";e=9999999999999;if((wa(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(u){continue}if(typeof h.iCreate!="undefined"&&h.iCreate<e){f=m[0];e=h.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
|
116 |
+
c.join("/")+"/"}p.cookie=b}function wa(a){var b=za.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function Y(a,b){b=i(b).children("tr");var c,d,f,e,h,j,k,m,u=function(L,T,B){for(;typeof L[T][B]!="undefined";)B++;return B};a.splice(0,a.length);d=0;for(j=b.length;d<
|
117 |
+
j;d++)a.push([]);d=0;for(j=b.length;d<j;d++){f=0;for(k=b[d].childNodes.length;f<k;f++){c=b[d].childNodes[f];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var r=c.getAttribute("colspan")*1,H=c.getAttribute("rowspan")*1;r=!r||r===0||r===1?1:r;H=!H||H===0||H===1?1:H;m=u(a,d,0);for(h=0;h<r;h++)for(e=0;e<H;e++){a[d+e][m+h]={cell:c,unique:r==1?true:false};a[d+e].nTr=b[d]}}}}}function S(a,b,c){var d=[];if(typeof c=="undefined"){c=a.aoHeader;if(typeof b!="undefined"){c=[];Y(c,b)}}b=0;
|
118 |
+
for(var f=c.length;b<f;b++)for(var e=0,h=c[b].length;e<h;e++)if(c[b][e].unique&&(typeof d[e]=="undefined"||!a.bSortCellsTop))d[e]=c[b][e].cell;return d}function Ya(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=p.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);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";
|
119 |
+
a=a.offsetWidth;if(b==a)a=c.clientWidth;p.body.removeChild(c);return b-a}function P(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,h=b[d].childNodes.length;e<h;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function o(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}function fa(a,b,c){for(var d=[],f=0,e=a.aoColumns.length;f<e;f++)d.push(G(a,b,f,c));return d}function G(a,b,c,d){var f=a.aoColumns[c];
|
120 |
+
if((c=f.fnGetData(a.aoData[b]._aData))===undefined){if(a.iDrawError!=a.iDraw&&f.sDefaultContent===null){J(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b);a.iDrawError=a.iDraw}return f.sDefaultContent}if(c===null&&f.sDefaultContent!==null)c=f.sDefaultContent;else if(typeof c=="function")return c();if(d=="display"&&c===null)return"";return c}function O(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function aa(a){if(a===null)return function(){return null};
|
121 |
+
else if(typeof a=="function")return function(c){return a(c)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c){return c[b[0]][b[1]]}:b.length==3?function(c){return c[b[0]][b[1]][b[2]]}:function(c){for(var d=0,f=b.length;d<f;d++)c=c[b[d]];return c}}else return function(c){return c[a]}}function Ba(a){if(a===null)return function(){};else if(typeof a=="function")return function(c,d){return a(c,d)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");
|
122 |
+
return b.length==2?function(c,d){c[b[0]][b[1]]=d}:b.length==3?function(c,d){c[b[0]][b[1]][b[2]]=d}:function(c,d){for(var f=0,e=b.length-1;f<e;f++)c=c[b[f]];c[b[b.length-1]]=d}}else return function(c,d){c[a]=d}}this.oApi={};this.fnDraw=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else da(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[n.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=
|
123 |
+
true;if(typeof b=="undefined"||b===null){N(e,{sSearch:a,bRegex:c,bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;N(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[n.iApiIndex])};this.fnVersionCheck=n.fnVersionCheck;this.fnSort=function(a){var b=A(this[n.iApiIndex]);b.aaSorting=a;R(b)};this.fnSortListener=function(a,
|
124 |
+
b,c){ja(A(this[n.iApiIndex]),a,b,c)};this.fnAddData=function(a,b){if(a.length===0)return[];var c=[],d,f=A(this[n.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=v(f,a[e]);if(d==-1)return c;c.push(d)}else{d=v(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)da(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[n.iApiIndex]);a=typeof a=="object"?W(d,a):a;var f=d.aoData.splice(a,1),e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,
|
125 |
+
1);ua(d.aiDisplayMaster,a);ua(d.aiDisplay,a);typeof b=="function"&&b.call(this,d,f);if(d._iDisplayStart>=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[n.iApiIndex]);la(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[n.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;
|
126 |
+
e.colSpan=Z(d);if(typeof b.jquery!="undefined"||typeof b=="object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[n.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a,b){var c=A(this[n.iApiIndex]);if(typeof a!=
|
127 |
+
"undefined"){a=typeof a=="object"?W(c,a):a;if(typeof b!="undefined")return G(c,a,b,"");return typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null}return ca(c)};this.fnGetNodes=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined")return typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null;return ba(b)};this.fnGetPosition=function(a){var b=A(this[n.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return W(b,a);else if(c=="TD"||c=="TH"){c=W(b,a.parentNode);for(var d=Q(b,c),f=0;f<b.aoColumns.length;f++)if(d[f]==
|
128 |
+
a)return[c,ta(b,f),f]}return null};this.fnUpdate=function(a,b,c,d,f){var e=A(this[n.iApiIndex]);b=typeof b=="object"?W(e,b):b;if(i.isArray(a)&&typeof a=="object"){e.aoData[b]._aData=a.slice();for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(G(e,b,c),b,c,false,false)}else if(a!==null&&typeof a=="object"){e.aoData[b]._aData=i.extend(true,{},a);for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(G(e,b,c),b,c,false,false)}else{a=a;O(e,b,c,a);if(e.aoColumns[c].fnRender!==null){a=e.aoColumns[c].fnRender({iDataRow:b,
|
129 |
+
iDataColumn:c,aData:e.aoData[b]._aData,oSettings:e});e.aoColumns[c].bUseRendered&&O(e,b,c,a)}if(e.aoData[b].nTr!==null)Q(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=ra(e,fa(e,b,"filter"));if(typeof f=="undefined"||f)ea(e);if(typeof d=="undefined"||d)da(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[n.iApiIndex]),f,e;e=d.aoColumns.length;var h,j;if(d.aoColumns[a].bVisible!=b){if(b){for(f=j=0;f<a;f++)d.aoColumns[f].bVisible&&j++;j=j>=Z(d);if(!j)for(f=a;f<e;f++)if(d.aoColumns[f].bVisible){h=
|
130 |
+
f;break}f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null)j?d.aoData[f].nTr.appendChild(d.aoData[f]._anHidden[a]):d.aoData[f].nTr.insertBefore(d.aoData[f]._anHidden[a],Q(d,f)[h])}else{f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null){h=Q(d,f)[a];d.aoData[f]._anHidden[a]=h;h.parentNode.removeChild(h)}}d.aoColumns[a].bVisible=b;M(d,d.aoHeader);d.nTFoot&&M(d,d.aoFooter);f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=Z(d);if(typeof c=="undefined"||c){ea(d);C(d)}va(d)}};
|
131 |
+
this.fnPageChange=function(a,b){var c=A(this[n.iApiIndex]);ma(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy=function(){var a=A(this[n.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;d=0;for(f=a.aoDestroyCallback.length;d<f;d++)a.aoDestroyCallback[d].fn();d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);i(a.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();
|
132 |
+
if(a.nTable!=a.nTHead.parentNode){i(a.nTable).children("thead").remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&&a.nTable!=a.nTFoot.parentNode){i(a.nTable).children("tfoot").remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];V(a);i(ba(a)).removeClass(a.asStripeClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oJUIClasses.sSortableAsc,n.oJUIClasses.sSortableDesc,n.oJUIClasses.sSortableNone].join(" "));
|
133 |
+
i("th span."+n.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e=i("div."+n.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oStdClasses.sSortableAsc,n.oStdClasses.sSortableDesc,n.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;d<f;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);
|
134 |
+
if(a.oFeatures.bAutoWidth===true)a.nTable.style.width=q(a.sDestroyWidth);i(c).children("tr:even").addClass(a.asDestroyStripes[0]);i(c).children("tr:odd").addClass(a.asDestroyStripes[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1);a=null};this.fnAdjustColumnSizing=function(a){var b=A(this[n.iApiIndex]);ea(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var xa in n.oApi)if(xa)this[xa]=s(xa);this.oApi._fnExternApiFunc=
|
135 |
+
s;this.oApi._fnInitialise=t;this.oApi._fnInitComplete=w;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=F;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=v;this.oApi._fnCreateTr=z;this.oApi._fnGatherData=$;this.oApi._fnBuildHead=X;this.oApi._fnDrawHead=M;this.oApi._fnDraw=C;this.oApi._fnReDraw=da;this.oApi._fnAjaxUpdate=Ca;this.oApi._fnAjaxParameters=Da;this.oApi._fnAjaxUpdateDraw=Ea;this.oApi._fnServerParams=ha;this.oApi._fnAddOptionsHtml=Aa;this.oApi._fnFeatureHtmlTable=Ja;this.oApi._fnScrollDraw=
|
136 |
+
Ma;this.oApi._fnAdjustColumnSizing=ea;this.oApi._fnFeatureHtmlFilter=Ha;this.oApi._fnFilterComplete=N;this.oApi._fnFilterCustom=Qa;this.oApi._fnFilterColumn=Pa;this.oApi._fnFilter=Oa;this.oApi._fnBuildSearchArray=oa;this.oApi._fnBuildSearchRow=ra;this.oApi._fnFilterCreateSearch=pa;this.oApi._fnDataToSearch=qa;this.oApi._fnSort=R;this.oApi._fnSortAttachListener=ja;this.oApi._fnSortingClasses=V;this.oApi._fnFeatureHtmlPaginate=La;this.oApi._fnPageChange=ma;this.oApi._fnFeatureHtmlInfo=Ka;this.oApi._fnUpdateInfo=
|
137 |
+
Ra;this.oApi._fnFeatureHtmlLength=Ga;this.oApi._fnFeatureHtmlProcessing=Ia;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=Na;this.oApi._fnColumnIndexToVisible=ta;this.oApi._fnNodeToDataIndex=W;this.oApi._fnVisbleColumns=Z;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Sa;this.oApi._fnCalculateColumnWidths=ga;this.oApi._fnScrollingWidthAdjust=Ua;this.oApi._fnGetWidestNode=Ta;this.oApi._fnGetMaxLenString=Va;this.oApi._fnStringToCss=q;this.oApi._fnArrayCmp=Za;this.oApi._fnDetectType=
|
138 |
+
ia;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=ca;this.oApi._fnGetTrNodes=ba;this.oApi._fnGetTdNodes=Q;this.oApi._fnEscapeRegex=sa;this.oApi._fnDeleteIndex=ua;this.oApi._fnReOrderIndex=Fa;this.oApi._fnColumnOrdering=ka;this.oApi._fnLog=J;this.oApi._fnClearTable=la;this.oApi._fnSaveState=va;this.oApi._fnLoadState=Xa;this.oApi._fnCreateCookie=Wa;this.oApi._fnReadCookie=wa;this.oApi._fnDetectHeader=Y;this.oApi._fnGetUniqueThs=S;this.oApi._fnScrollBarWidth=Ya;this.oApi._fnApplyToChildren=
|
139 |
+
P;this.oApi._fnMap=o;this.oApi._fnGetRowData=fa;this.oApi._fnGetCellData=G;this.oApi._fnSetCellData=O;this.oApi._fnGetObjectDataFn=aa;this.oApi._fnSetObjectDataFn=Ba;var ya=this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");
|
140 |
+
return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new l;D.push(e);var h=false,j=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=n._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=ya.length==1?ya:i(this).dataTable();e.oApi=ya.oApi;e.sDestroyWidth=i(this).width();if(typeof g!=
|
141 |
+
"undefined"&&g!==null){e.oInit=g;o(e.oFeatures,g,"bPaginate");o(e.oFeatures,g,"bLengthChange");o(e.oFeatures,g,"bFilter");o(e.oFeatures,g,"bSort");o(e.oFeatures,g,"bInfo");o(e.oFeatures,g,"bProcessing");o(e.oFeatures,g,"bAutoWidth");o(e.oFeatures,g,"bSortClasses");o(e.oFeatures,g,"bServerSide");o(e.oFeatures,g,"bDeferRender");o(e.oScroll,g,"sScrollX","sX");o(e.oScroll,g,"sScrollXInner","sXInner");o(e.oScroll,g,"sScrollY","sY");o(e.oScroll,g,"bScrollCollapse","bCollapse");o(e.oScroll,g,"bScrollInfinite",
|
142 |
+
"bInfinite");o(e.oScroll,g,"iScrollLoadGap","iLoadGap");o(e.oScroll,g,"bScrollAutoCss","bAutoCss");o(e,g,"asStripClasses","asStripeClasses");o(e,g,"asStripeClasses");o(e,g,"fnPreDrawCallback");o(e,g,"fnRowCallback");o(e,g,"fnHeaderCallback");o(e,g,"fnFooterCallback");o(e,g,"fnCookieCallback");o(e,g,"fnInitComplete");o(e,g,"fnServerData");o(e,g,"fnFormatNumber");o(e,g,"aaSorting");o(e,g,"aaSortingFixed");o(e,g,"aLengthMenu");o(e,g,"sPaginationType");o(e,g,"sAjaxSource");o(e,g,"sAjaxDataProp");o(e,
|
143 |
+
g,"iCookieDuration");o(e,g,"sCookiePrefix");o(e,g,"sDom");o(e,g,"bSortCellsTop");o(e,g,"oSearch","oPreviousSearch");o(e,g,"aoSearchCols","aoPreSearchCols");o(e,g,"iDisplayLength","_iDisplayLength");o(e,g,"bJQueryUI","bJUI");o(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnServerParams=="function"&&e.aoServerParams.push({fn:g.fnServerParams,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,
|
144 |
+
sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});if(e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses)e.aoDrawCallback.push({fn:V,sName:"server_side_sort_classes"});else e.oFeatures.bDeferRender&&e.aoDrawCallback.push({fn:V,sName:"defer_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=n.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!==
|
145 |
+
"")e.oScroll.iBarWidth=Ya();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Xa(e,g);e.aoDrawCallback.push({fn:va,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&
|
146 |
+
typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(u){y(e,u,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"&&typeof g.asStripeClasses=="undefined"){e.asStripeClasses.push(e.oClasses.sStripeOdd);e.asStripeClasses.push(e.oClasses.sStripeEven)}c=false;d=i(this).children("tbody").children("tr");
|
147 |
+
a=0;for(b=e.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripeClasses[a])){c=true;break}if(c){e.asDestroyStripes=["",""];if(i(d[0]).hasClass(e.oClasses.sStripeOdd))e.asDestroyStripes[0]+=e.oClasses.sStripeOdd+" ";if(i(d[0]).hasClass(e.oClasses.sStripeEven))e.asDestroyStripes[0]+=e.oClasses.sStripeEven;if(i(d[1]).hasClass(e.oClasses.sStripeOdd))e.asDestroyStripes[1]+=e.oClasses.sStripeOdd+" ";if(i(d[1]).hasClass(e.oClasses.sStripeEven))e.asDestroyStripes[1]+=e.oClasses.sStripeEven;
|
148 |
+
d.removeClass(e.asStripeClasses.join(" "))}c=[];var k;a=this.getElementsByTagName("thead");if(a.length!==0){Y(e.aoHeader,a[0]);c=S(e)}if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}F(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){var m=
|
149 |
+
g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c<d;c++)if(typeof m[c]=="number"&&m[c]>=0){for(;e.aoColumns.length<=m[c];)F(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]=="number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b<f;b++)if(m[c]=="_all"||i(e.aoColumns[b].nTh).hasClass(m[c]))x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<
|
150 |
+
b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}V(e);a=i(this).children("thead");if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=
|
151 |
+
a[0];a=i(this).children("tbody");if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(this).children("tfoot");if(a.length>0){e.nTFoot=a[0];Y(e.aoFooter,e.nTFoot)}if(j)for(a=0;a<g.aaData.length;a++)v(e,g.aaData[a]);else $(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;h===false&&t(e)}})}})(jQuery,window,document);
|
js/jquery.tmpl.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Templates Plugin 1.0.0pre
|
3 |
+
* http://github.com/jquery/jquery-tmpl
|
4 |
+
* Requires jQuery 1.4.2
|
5 |
+
*
|
6 |
+
* Copyright Software Freedom Conservancy, Inc.
|
7 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
8 |
+
* http://jquery.org/license
|
9 |
+
*/
|
10 |
+
(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*#x2F;,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w#x2F;.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery);
|
js/jquery.tools.min.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Tools v1.2.6 - The missing UI library for the Web
|
3 |
+
*
|
4 |
+
* tooltip/tooltip.js
|
5 |
+
* tooltip/tooltip.dynamic.js
|
6 |
+
* tooltip/tooltip.slide.js
|
7 |
+
*
|
8 |
+
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
|
9 |
+
*
|
10 |
+
* http://flowplayer.org/tools/
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);
|
14 |
+
(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery);
|
15 |
+
(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery);
|
lib/.htaccess
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
deny from all
|
2 |
+
|
lib/Diff.php
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Diff
|
4 |
+
*
|
5 |
+
* A comprehensive library for generating differences between two strings
|
6 |
+
* in multiple formats (unified, side by side HTML etc)
|
7 |
+
*
|
8 |
+
* PHP version 5
|
9 |
+
*
|
10 |
+
* Copyright (c) 2009 Chris Boulton <chris.boulton@interspire.com>
|
11 |
+
*
|
12 |
+
* All rights reserved.
|
13 |
+
*
|
14 |
+
* Redistribution and use in source and binary forms, with or without
|
15 |
+
* modification, are permitted provided that the following conditions are met:
|
16 |
+
*
|
17 |
+
* - Redistributions of source code must retain the above copyright notice,
|
18 |
+
* this list of conditions and the following disclaimer.
|
19 |
+
* - Redistributions in binary form must reproduce the above copyright notice,
|
20 |
+
* this list of conditions and the following disclaimer in the documentation
|
21 |
+
* and/or other materials provided with the distribution.
|
22 |
+
* - Neither the name of the Chris Boulton nor the names of its contributors
|
23 |
+
* may be used to endorse or promote products derived from this software
|
24 |
+
* without specific prior written permission.
|
25 |
+
*
|
26 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
27 |
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
28 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
29 |
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
30 |
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
31 |
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
32 |
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
33 |
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
34 |
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
35 |
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
36 |
+
* POSSIBILITY OF SUCH DAMAGE.
|
37 |
+
*
|
38 |
+
* @package Diff
|
39 |
+
* @author Chris Boulton <chris.boulton@interspire.com>
|
40 |
+
* @copyright (c) 2009 Chris Boulton
|
41 |
+
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
|
42 |
+
* @version 1.1
|
43 |
+
* @link http://github.com/chrisboulton/php-diff
|
44 |
+
*/
|
45 |
+
|
46 |
+
class Diff
|
47 |
+
{
|
48 |
+
/**
|
49 |
+
* @var array The "old" sequence to use as the basis for the comparison.
|
50 |
+
*/
|
51 |
+
private $a = null;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @var array The "new" sequence to generate the changes for.
|
55 |
+
*/
|
56 |
+
private $b = null;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @var array Array containing the generated opcodes for the differences between the two items.
|
60 |
+
*/
|
61 |
+
private $groupedCodes = null;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @var array Associative array of the default options available for the diff class and their default value.
|
65 |
+
*/
|
66 |
+
private $defaultOptions = array(
|
67 |
+
'context' => 3,
|
68 |
+
'ignoreNewLines' => false,
|
69 |
+
'ignoreWhitespace' => false,
|
70 |
+
'ignoreCase' => false
|
71 |
+
);
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @var array Array of the options that have been applied for generating the diff.
|
75 |
+
*/
|
76 |
+
private $options = array();
|
77 |
+
|
78 |
+
/**
|
79 |
+
* The constructor.
|
80 |
+
*
|
81 |
+
* @param array $a Array containing the lines of the first string to compare.
|
82 |
+
* @param array $b Array containing the lines for the second string to compare.
|
83 |
+
*/
|
84 |
+
public function __construct($a, $b, $options=array())
|
85 |
+
{
|
86 |
+
$this->a = $a;
|
87 |
+
$this->b = $b;
|
88 |
+
|
89 |
+
$this->options = array_merge($this->defaultOptions, $options);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Render a diff using the supplied rendering class and return it.
|
94 |
+
*
|
95 |
+
* @param object $renderer An instance of the rendering object to use for generating the diff.
|
96 |
+
* @return mixed The generated diff. Exact return value depends on the rendered.
|
97 |
+
*/
|
98 |
+
public function render(Diff_Renderer_Abstract $renderer)
|
99 |
+
{
|
100 |
+
$renderer->diff = $this;
|
101 |
+
return $renderer->render();
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Get a range of lines from $start to $end from the first comparison string
|
106 |
+
* and return them as an array. If no values are supplied, the entire string
|
107 |
+
* is returned. It's also possible to specify just one line to return only
|
108 |
+
* that line.
|
109 |
+
*
|
110 |
+
* @param int $start The starting number.
|
111 |
+
* @param int $end The ending number. If not supplied, only the item in $start will be returned.
|
112 |
+
* @return array Array of all of the lines between the specified range.
|
113 |
+
*/
|
114 |
+
public function getA($start=0, $end=null)
|
115 |
+
{
|
116 |
+
if($start == 0 && $end === null) {
|
117 |
+
return $this->a;
|
118 |
+
}
|
119 |
+
|
120 |
+
if($end === null) {
|
121 |
+
$length = 1;
|
122 |
+
}
|
123 |
+
else {
|
124 |
+
$length = $end - $start;
|
125 |
+
}
|
126 |
+
|
127 |
+
return array_slice($this->a, $start, $length);
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get a range of lines from $start to $end from the second comparison string
|
133 |
+
* and return them as an array. If no values are supplied, the entire string
|
134 |
+
* is returned. It's also possible to specify just one line to return only
|
135 |
+
* that line.
|
136 |
+
*
|
137 |
+
* @param int $start The starting number.
|
138 |
+
* @param int $end The ending number. If not supplied, only the item in $start will be returned.
|
139 |
+
* @return array Array of all of the lines between the specified range.
|
140 |
+
*/
|
141 |
+
public function getB($start=0, $end=null)
|
142 |
+
{
|
143 |
+
if($start == 0 && $end === null) {
|
144 |
+
return $this->b;
|
145 |
+
}
|
146 |
+
|
147 |
+
if($end === null) {
|
148 |
+
$length = 1;
|
149 |
+
}
|
150 |
+
else {
|
151 |
+
$length = $end - $start;
|
152 |
+
}
|
153 |
+
|
154 |
+
return array_slice($this->b, $start, $length);
|
155 |
+
}
|
156 |
|