diff --git a/vilesci/statistik/statistik.php b/vilesci/statistik/statistik.php index 49ed209c9..dc3da0ded 100644 --- a/vilesci/statistik/statistik.php +++ b/vilesci/statistik/statistik.php @@ -1,5 +1,5 @@ - * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > - * Karl Burkhart < burkhart@technikum-wien.at > + * Authors: Christian Paminger + * Andreas Oesterreicher + * Karl Burkhart + * Robert Hofer */ /** - * Seite zur Wartung der Statistiken + * Statistik Uebersichtsseite + * - zeigt die Beschreibung einer Statistik ein + * - Link zum Starten der Statistik + * - Eventuelle Parametereingabe für die Statistik */ require_once('../../config/vilesci.config.inc.php'); require_once('../../include/statistik.class.php'); -require_once('../../include/benutzerberechtigung.class.php'); -require_once('../../include/berechtigung.class.php'); +require_once('../../include/filter.class.php'); +require_once('../../include/functions.inc.php'); -if(!$db = new basis_db()) +$statistik_kurzbz = filter_input(INPUT_GET, 'statistik_kurzbz'); + +$statistik = new statistik(); + +if(!$statistik->load($statistik_kurzbz)) { - die('Es konnte keine Verbindung zum Server aufgebaut werden.'); + die($statistik->errormsg); } - -$user = get_uid(); - -$rechte = new benutzerberechtigung(); -$rechte->getBerechtigungen($user); - -if(!$rechte->isBerechtigt('basis/statistik')) - die('Sie haben keine Berechtigung fuer diese Seite'); -?> +?> + + Statistik - Statistik - Details - - + + + + + + +

Report - bezeichnung ?>

load($statistik_kurzbz); - } - else - { - $statistik_kurzbz = filter_input(INPUT_POST, 'statistik_kurzbz'); - $exists = false; - } - - if(isset($_POST['save'])) - { - $statistik_kurzbz_orig = (isset($_POST['statistik_kurzbz_orig']) ? $_POST['statistik_kurzbz_orig'] : die('Statistik_kurzbz_orig fehlt')); - $bezeichnung = (isset($_POST['bezeichnung']) ? $_POST['bezeichnung'] : die('Bezeichnung fehlt')); - $url = (isset($_POST['url']) ? $_POST['url'] : die('URL fehlt')); - $sql = (isset($_POST['sql']) ? $_POST['sql'] : die('SQL fehlt')); - $gruppe = (isset($_POST['gruppe']) ? $_POST['gruppe'] : die('Gruppe fehlt')); - $content_id = (isset($_POST['content_id']) ? $_POST['content_id'] : die('ContentID fehlt')); - $publish = (isset($_POST['publish']) ? true : false); - $berechtigung_kurzbz = (isset($_POST['berechtigung_kurzbz']) ? $_POST['berechtigung_kurzbz'] : die('Berechtigungkurzbz fehlt')); - $preferences = (isset($_POST['preferences']) ? $_POST['preferences'] : die('preferences fehlt')); - - if(!$exists) - { - $statistik->insertamum = date('Y-m-d H:i:s'); - $statistik->insertvon = $user; - $statistik->new = true; - } - - $statistik->statistik_kurzbz = $statistik_kurzbz; - $statistik->statistik_kurzbz_orig = $statistik_kurzbz_orig; - $statistik->bezeichnung = $bezeichnung; - $statistik->url = $url; - $statistik->sql = $sql; - $statistik->gruppe = $gruppe; - $statistik->content_id = $content_id; - $statistik->publish = $publish; - $statistik->updateamum = date('Y-m-d H:i:s'); - $statistik->updatevon = $user; - $statistik->berechtigung_kurzbz = $berechtigung_kurzbz; - $statistik->preferences = $preferences; - - $success = $statistik->save(); - - if($success): - ?> - Daten erfolgreich gespeichert - - - errormsg ?> - preferences); - - if(empty($preferences)) - { - $statistik->preferences = <<content_id): ?> + + Beschreibung anzeigen +

+ url) { - rows: [], - cols: [], - rendererName: "Table", - aggregatorName: "Count", - vals: [] + $action = $statistik->url; + $variablenstring = $statistik->url; +} +elseif($statistik->sql!='') +{ + $action = 'statistik_sql.php?statistik_kurzbz='.$statistik_kurzbz; + $variablenstring = $statistik->sql; } -EOT; - } - ?> -
-
- new === false): ?> - Bearbeiten - - - Neu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KurzbzGruppe
BezeichnungContentID
URLBerechtigung - getBerechtigungen(); - ?> - -
SQL
Publishpublish ? 'checked="checked"' : '' ?>>
Preferences
-
+$vars = $statistik->parseVars($variablenstring); ?> + + + + + loadAll(); ?> + + + isFilter($var)): ?> + + + + + + + + + +
getHtmlWidget($var) ?>
+