18if (array_key_exists(
'rule', $_REQUEST)) {
21if (array_key_exists(
'rule2', $_REQUEST)) {
24if (array_key_exists(
'time', $_REQUEST)) {
27if (array_key_exists(
'res', $_REQUEST)) {
30if (array_key_exists(
'd', $_REQUEST)) {
46$t->data[
'pageid'] =
'statistics';
47$t->data[
'header'] =
'stat';
48$t->data[
'available.rules'] =
$ruleset->availableRulesNames();
55 $dataset->aggregateSummary();
56 $dataset->calculateMax();
58 if (array_key_exists(
'output', $_REQUEST) && $_REQUEST[
'output'] ===
'csv') {
59 header(
'Content-type: text/csv');
60 header(
'Content-Disposition: attachment; filename="simplesamlphp-data.csv"');
61 $data = $dataset->getDebugData();
62 foreach (
$data as $de) {
64 echo
'"'.$de[0].
'",'.$de[1].
"\n";
69}
catch (Exception $e) {
70 $t->data[
'error'] =
"No data available";
98 $dataset2->aggregateSummary();
99 $dataset2->calculateMax();
101 $datasets[] = $dataset2->getPercentValues();
102 $maxes[] = $dataset2->getMax();
103 }
catch (Exception $e) {
104 $t->data[
'error'] =
"No data available to compare";
116 $t->data[
'pieimgurl'] =
$grapher->showPie($dataset->getDelimiterPresentationPie(),
$piedata);
127$t->data[
'debugdata'] = $dataset->getDebugData();
128$t->data[
'results'] = $dataset->getResults();
129$t->data[
'summaryDataset'] = $dataset->getSummary();
130$t->data[
'topdelimiters'] = $dataset->getTopDelimiters();
131$t->data[
'availdelimiters'] = $dataset->availDelimiters();
133$t->data[
'delimiterPresentation'] = $dataset->getDelimiterPresentation();
140$t->data[
'get_times_prev'] =
getBaseURL(
$t,
'get',
'time',
$t->data[
'available.times.prev']);
141$t->data[
'get_times_next'] =
getBaseURL(
$t,
'get',
'time',
$t->data[
'available.times.next']);
148 'rule' =>
$t->data[
'selected.rule'],
149 'time' =>
$t->data[
'selected.time'],
150 'res' =>
$t->data[
'selected.timeres'],
152 if (isset(
$t->data[
'selected.delimiter'])) {
153 $vars[
'd'] =
$t->data[
'selected.delimiter'];
155 if (!empty(
$t->data[
'selected.rule2']) &&
$t->data[
'selected.rule2'] !==
'_') {
156 $vars[
'rule2'] =
$t->data[
'selected.rule2'];
160 if (isset($vars[
$key])) {
164 $vars[
$key] = $value;
168 if (
$type ===
'get') {
172 foreach ($vars as $k => $v) {
173 $text .=
'<input type="hidden" name="'.$k.
'" value="'.htmlspecialchars($v).
'" />'.
"\n";
An exception for terminatinating execution or to throw for unit testing.
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static getConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
static getSessionFromRequest()
Retrieves the current session.
static checkAccess(SimpleSAML_Configuration $statconfig)
Check that the user has access to the statistics.
if(array_key_exists( 'rule', $_REQUEST)) if(array_key_exists('rule2', $_REQUEST)) if(array_key_exists( 'time', $_REQUEST)) if(array_key_exists('res', $_REQUEST)) if(array_key_exists( 'd', $_REQUEST)) if($preferRule2==='_') $ruleset
if(isset($preferRule2)) $dimx
getBaseURL($t, $type='get', $key=null, $value=null)