From ddfe0843ded0923e96036aabdf0550d6ffc7da0a Mon Sep 17 00:00:00 2001 From: Manfred Date: Thu, 8 Feb 2024 16:36:45 +0100 Subject: [PATCH] Defaultwert "aggregators "aus Statistik entfernt, weil Fehler wenn leer --- vilesci/stammdaten/statistik_details.php | 559 +++++++++++------------ 1 file changed, 279 insertions(+), 280 deletions(-) diff --git a/vilesci/stammdaten/statistik_details.php b/vilesci/stammdaten/statistik_details.php index 415a9d607..867766fa3 100644 --- a/vilesci/stammdaten/statistik_details.php +++ b/vilesci/stammdaten/statistik_details.php @@ -1,280 +1,279 @@ - - * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > - * Karl Burkhart < burkhart@technikum-wien.at > - */ -/** - * Seite zur Wartung der Statistiken - */ -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/functions.inc.php'); - -if(!$db = new basis_db()) -{ - die('Es konnte keine Verbindung zum Server aufgebaut werden.'); -} - -$user = get_uid(); - -$rechte = new benutzerberechtigung(); -$rechte->getBerechtigungen($user); - -if(!$rechte->isBerechtigt('basis/statistik', null, 'suid')) - die('Sie haben keine Berechtigung fuer diese Seite'); -?> - - - - Statistik - Details - - - - - - - - load($statistik_kurzbz); - } - else - { - $statistik_kurzbz = filter_input(INPUT_POST, 'statistik_kurzbz'); - $exists = false; - $statistik->berechtigung_kurzbz='addon/reports'; - } - - 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; - - // Check if the SQL string contains functions to decrypt data and if there are - // variables to replace the value of the password (no clear password wanted!) - if (isSQLDecryptionValid($statistik->sql)) - { - $success = $statistik->save(); - - if($success): - ?> - Daten erfolgreich gespeichert - - - errormsg ?> - - - preferences); - - if(empty($preferences)) - { - $statistik->preferences = << -
-
- new === false): ?> - Bearbeiten - - - Neu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KurzbzGruppe
BezeichnungContentID - content_id)): ?> - -  ContentID content_id?> bearbeiten - - - -
URLBerechtigung - getBerechtigungen(); - ?> - -
SQL
Publishpublish ? 'checked="checked"' : '' ?>>
Preferences
-
-
- -
-
- - + + * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > + * Karl Burkhart < burkhart@technikum-wien.at > + */ +/** + * Seite zur Wartung der Statistiken + */ +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/functions.inc.php'); + +if(!$db = new basis_db()) +{ + die('Es konnte keine Verbindung zum Server aufgebaut werden.'); +} + +$user = get_uid(); + +$rechte = new benutzerberechtigung(); +$rechte->getBerechtigungen($user); + +if(!$rechte->isBerechtigt('basis/statistik', null, 'suid')) + die('Sie haben keine Berechtigung fuer diese Seite'); +?> + + + + Statistik - Details + + + + + + + + load($statistik_kurzbz); + } + else + { + $statistik_kurzbz = filter_input(INPUT_POST, 'statistik_kurzbz'); + $exists = false; + $statistik->berechtigung_kurzbz='addon/reports'; + } + + 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; + + // Check if the SQL string contains functions to decrypt data and if there are + // variables to replace the value of the password (no clear password wanted!) + if (isSQLDecryptionValid($statistik->sql)) + { + $success = $statistik->save(); + + if($success): + ?> + Daten erfolgreich gespeichert + + + errormsg ?> + + + preferences); + + if(empty($preferences)) + { + $statistik->preferences = << +
+
+ new === false): ?> + Bearbeiten - + + Neu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KurzbzGruppe
BezeichnungContentID + content_id)): ?> + +  ContentID content_id?> bearbeiten + + + +
URLBerechtigung + getBerechtigungen(); + ?> + +
SQL
Publishpublish ? 'checked="checked"' : '' ?>>
Preferences
+
+
+ +
+
+ +