12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- $.extend(true, $.fn.dataTable.defaults, {
- bLengthChange: false,
- pageLength: 15,
- "language": {
- "sEmptyTable": "Keine Daten in der Tabelle vorhanden",
- "sInfo": "_START_ bis _END_ von _TOTAL_ Einträgen",
- "sInfoEmpty": "0 bis 0 von 0 Einträgen",
- "sInfoFiltered": "(gefiltert von _MAX_ Einträgen)",
- "sInfoPostFix": "",
- "sInfoThousands": ".",
- "sLengthMenu": "_MENU_ Einträge anzeigen",
- "sLoadingRecords": "Wird geladen...",
- "sProcessing": "Bitte warten...",
- "sSearch": "Suchen: ",
- "sZeroRecords": "Keine Einträge vorhanden.",
- "oPaginate": {
- "sFirst": "Erste",
- "sPrevious": "Zurück",
- "sNext": "Nächste",
- "sLast": "Letzte"
- },
- "oAria": {
- "sSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
- "sSortDescending": ": aktivieren, um Spalte absteigend zu sortieren"
- }
- },
- responsive: true
- });
-
- function convertTimestamp(UNIX_TS) {
- var date = new Date(UNIX_TS * 1000);
- var year = date.getFullYear();
- var month = date.getMonth()+1;
- var day = date.getDate();
- var hour = date.getHours() < 10 ? '0'+date.getHours() : date.getHours();
- var min = date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes();
- var sec = date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds();
- var fulltime = day + '.' + month + '.' + year + ' - ' + hour + ':' + min + ':' + sec;
- return fulltime;
- }
-
- function anonIP(ipdata) {
- var split = ipdata.split(".", 2);
- return split[0]+'.'+split[1]+'.xxx.xxx';
- }
-
- function refLink(referrer) {
- if(referrer != 'direct') {
- return '<a href="'+referrer+'" target="_blank">Link zum Referer</a><p class="note">'+referrer+'</p>';
- } else {
- return 'Browsereingabe oder Anonymisierter aufruf';
- }
- }
-
- $(document).ready(function() {
- $('#dlLists').DataTable({
- "ajax": "ajax/downloadOverview.php?ssp=1",
-
- columns: [
- {"data": "guid"},
- {"data": function(data) {
- return anonIP(data.ip_adress);
- }
- },
- {"data": "user_agent"},
- {"data": function(data) {
- return convertTimestamp(data.timestamp);
- }
- },
- {"data": "dl_version"}
- ]
- });
-
- $('#visitorLists').DataTable({
- "ajax": "ajax/visitorOverview.php?ssp=1",
-
- columns: [
- {"data": "guid"},
- {"data": function(data) {
- return anonIP(data.ip_adress);
- }
- },
- {"data": "user_agent"},
- {"data": function(data) {
- return refLink(data.referrer);
- }
- },
- {"data": function(data) {
- return convertTimestamp(data.timestamp);
- }
- }
- ]
- });
- });
|