, * Andreas Oesterreicher and * Karl Burkhart . */ require_once('../../config/vilesci.config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/statistik.class.php'); require_once('../../include/benutzerberechtigung.class.php'); $statistik_kurzbz = filter_input(INPUT_GET, 'statistik_kurzbz'); $outputformat = filter_input(INPUT_GET, 'outputformat'); $statistik = new statistik(); if(!$statistik->load($statistik_kurzbz)) { die($statistik->errormsg); } if (!isset($outputformat)) { $outputformat='html'; } if($statistik->berechtigung_kurzbz != '') { $uid = get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($uid); if(!$rechte->isBerechtigt($statistik->berechtigung_kurzbz)) { die('Sie haben keine Berechtigung für diese Seite'); } } if ($statistik->loadData()) { $csv = $statistik->getCSV(); $json = $statistik->getJSON(); } else { echo $statistik->error_msg; return; } switch ($outputformat) { case 'csv': header("Content-type: text/csv"); header("Content-Disposition: attachment; filename=data.csv"); header("Pragma: no-cache"); header("Expires: 0"); echo $csv; return; case 'json': header("Content-type: application/json"); header("Content-Disposition: attachment; filename=data.json"); header("Pragma: no-cache"); header("Expires: 0"); //$array= array_map("str_getcsv",explode("\n", $csv)); echo $json; return; } $param=''; foreach($_REQUEST as $name=>$value) { if (is_array($value)) { foreach($value as $row) $param .= '&'.$name.'[]='.urlencode($row); } else $param .= '&'.$name.'='.urlencode($value); } ?> Statistik

Statistik - bezeichnung ?> - CSV Download

getHtmlTable('myTable', 'tablesorter'); ?>