1 | |
---|
2 | {include file='include/datepicker.inc.tpl'} |
---|
3 | |
---|
4 | {footer_script}{literal} |
---|
5 | pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date"); |
---|
6 | pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null); |
---|
7 | {/literal}{/footer_script} |
---|
8 | |
---|
9 | <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2> |
---|
10 | |
---|
11 | <form class="filter" method="post" name="filter" action="{$F_ACTION}"> |
---|
12 | <fieldset> |
---|
13 | <legend>{'Filter'|@translate}</legend> |
---|
14 | <ul> |
---|
15 | <li><label>{'Date'|@translate}</label></li> |
---|
16 | <li> |
---|
17 | <select id="start_day" name="start_day"> |
---|
18 | <option value="0">--</option> |
---|
19 | {section name=day start=1 loop=32} |
---|
20 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> |
---|
21 | {/section} |
---|
22 | </select> |
---|
23 | <select id="start_month" name="start_month"> |
---|
24 | {html_options options=$month_list selected=$START_MONTH_SELECTED} |
---|
25 | </select> |
---|
26 | <input id="start_year" name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" > |
---|
27 | <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled"> |
---|
28 | </li> |
---|
29 | </ul> |
---|
30 | <ul> |
---|
31 | <li><label>{'End-Date'|@translate}</label></li> |
---|
32 | <li> |
---|
33 | <select id="end_day" name="end_day"> |
---|
34 | <option value="0">--</option> |
---|
35 | {section name=day start=1 loop=32} |
---|
36 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> |
---|
37 | {/section} |
---|
38 | </select> |
---|
39 | <select id="end_month" name="end_month"> |
---|
40 | {html_options options=$month_list selected=$END_MONTH_SELECTED} |
---|
41 | </select> |
---|
42 | <input id="end_year" name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" > |
---|
43 | <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled"> |
---|
44 | </li> |
---|
45 | </ul> |
---|
46 | |
---|
47 | <label> |
---|
48 | {'Element type'|@translate} |
---|
49 | <select name="types[]" multiple="multiple" size="4"> |
---|
50 | {html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected} |
---|
51 | </select> |
---|
52 | </label> |
---|
53 | |
---|
54 | <label> |
---|
55 | {'User'|@translate} |
---|
56 | <select name="user"> |
---|
57 | <option value="-1">------------</option> |
---|
58 | {html_options options=$user_options selected=$user_options_selected} |
---|
59 | </select> |
---|
60 | </label> |
---|
61 | |
---|
62 | <label> |
---|
63 | {'Image id'|@translate} |
---|
64 | <input name="image_id" value="{$IMAGE_ID}" type="text" size="5"> |
---|
65 | </label> |
---|
66 | |
---|
67 | <label> |
---|
68 | {'File name'|@translate} |
---|
69 | <input name="filename" value="{$FILENAME}" type="text" size="12"> |
---|
70 | </label> |
---|
71 | |
---|
72 | <label> |
---|
73 | {'IP'|@translate} |
---|
74 | <input name="ip" value="{$IP}" type="text" size="12"> |
---|
75 | </label> |
---|
76 | |
---|
77 | <label> |
---|
78 | {'Thumbnails'|@translate} |
---|
79 | <select name="display_thumbnail"> |
---|
80 | {html_options options=$display_thumbnails selected=$display_thumbnail_selected} |
---|
81 | </select> |
---|
82 | </label> |
---|
83 | |
---|
84 | <input type="submit" name="submit" value="{'Submit'|@translate}"> |
---|
85 | </fieldset> |
---|
86 | </form> |
---|
87 | |
---|
88 | {if isset($search_summary)} |
---|
89 | <fieldset> |
---|
90 | <legend>{'Summary'|@translate}</legend> |
---|
91 | |
---|
92 | <ul> |
---|
93 | <li>{$search_summary.NB_LINES}, {$search_summary.FILESIZE}</li> |
---|
94 | <li> |
---|
95 | {$search_summary.USERS} |
---|
96 | <ul> |
---|
97 | <li>{$search_summary.MEMBERS}</li> |
---|
98 | <li>{$search_summary.GUESTS}</li> |
---|
99 | </ul> |
---|
100 | </li> |
---|
101 | </ul> |
---|
102 | </fieldset> |
---|
103 | {/if} |
---|
104 | |
---|
105 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
106 | |
---|
107 | <table class="table2" id="detailedStats"> |
---|
108 | <thead> |
---|
109 | <tr class="throw"> |
---|
110 | <th>{'Date'|@translate}</th> |
---|
111 | <th>{'Time'|@translate}</th> |
---|
112 | <th>{'User'|@translate}</th> |
---|
113 | <th>{'IP'|@translate}</th> |
---|
114 | <th>{'Element'|@translate}</th> |
---|
115 | <th>{'Element type'|@translate}</th> |
---|
116 | <th>{'Section'|@translate}</th> |
---|
117 | <th>{'Album'|@translate} / {'Tags'|@translate}</th> |
---|
118 | </tr> |
---|
119 | </thead> |
---|
120 | {if !empty($search_results)} |
---|
121 | {foreach from=$search_results item=detail name=res_loop} |
---|
122 | <tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}"> |
---|
123 | <td class="hour">{$detail.DATE}</td> |
---|
124 | <td class="hour">{$detail.TIME}</td> |
---|
125 | <td>{$detail.USER}</td> |
---|
126 | <td class="IP">{$detail.IP}</td> |
---|
127 | <td>{$detail.IMAGE}</td> |
---|
128 | <td>{$detail.TYPE}</td> |
---|
129 | <td>{$detail.SECTION}</td> |
---|
130 | <td>{$detail.CATEGORY}{$detail.TAGS}</td> |
---|
131 | </tr> |
---|
132 | {/foreach} |
---|
133 | {/if} |
---|
134 | </table> |
---|
135 | |
---|
136 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
137 | |
---|
138 | {combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'} |
---|
139 | |
---|
140 | {footer_script}{literal} |
---|
141 | jQuery(document).ready( function() { |
---|
142 | jQuery(".IP").one( "mouseenter", function(){ |
---|
143 | var that = $(this); |
---|
144 | that |
---|
145 | .data("isOver", true) |
---|
146 | .one("mouseleave", function() { |
---|
147 | that.removeData("isOver"); |
---|
148 | }); |
---|
149 | GeoIp.get( that.text(), function(data) { |
---|
150 | if (!data.fullName) return; |
---|
151 | |
---|
152 | var content = data.fullName; |
---|
153 | if (data.latitude && data.region_name) { |
---|
154 | content += '<br><a class="ipGeoOpen" data-lat="'+data.latitude+'" data-lon="'+data.longitude+'"'; |
---|
155 | content += ' href="#">show on a Google Map</a>'; |
---|
156 | } |
---|
157 | |
---|
158 | that.tipTip( { |
---|
159 | content: content, |
---|
160 | keepAlive: true, |
---|
161 | defaultPosition: "right", |
---|
162 | maxWidth: 320, |
---|
163 | } ); |
---|
164 | if (that.data("isOver")) |
---|
165 | that.trigger("mouseenter"); |
---|
166 | }); |
---|
167 | } ); |
---|
168 | |
---|
169 | jQuery(document).on('click', '.ipGeoOpen', function() { |
---|
170 | var lat = jQuery(this).data("lat"); |
---|
171 | var lon = jQuery(this).data("lon"); |
---|
172 | var parent = jQuery(this).parent(); |
---|
173 | jQuery(this).remove(); |
---|
174 | |
---|
175 | var append = '<br><img width=300 height=220 src="http://maps.googleapis.com/maps/api/staticmap'; |
---|
176 | append += '?sensor=false&size=300x220&zoom=6&markers=size:tiny%7C' + lat + ',' + lon + '">'; |
---|
177 | |
---|
178 | jQuery(parent).append(append); |
---|
179 | return false; |
---|
180 | }); |
---|
181 | }); |
---|
182 | {/literal}{/footer_script} |
---|