From ec8b611c936c9fdcfbe81a48de2d56ebd6dcca4b Mon Sep 17 00:00:00 2001 From: aschwarz Date: Thu, 23 Mar 2023 14:30:30 +0100 Subject: [PATCH] Dashboard weiter ausgebaut --- config/datenbankanbindung.php | 1 + controller/admin_edit.php | 26 + controller/admin_erfassen.php | 4 +- controller/admin_parameter.php | 37 ++ dashboard/401.html | 52 -- dashboard/401.html# | 52 -- dashboard/404.html | 51 -- dashboard/404.html# | 51 -- dashboard/500.html | 51 -- dashboard/500.html# | 51 -- dashboard/assets#/demo/chart-area-demo.js | 54 -- dashboard/assets#/demo/chart-bar-demo.js | 46 -- dashboard/assets#/demo/chart-pie-demo.js | 16 - dashboard/assets#/demo/datatables-demo.js | 4 - .../assets#/img/error-404-monochrome.svg | 1 - dashboard/assets/demo/chart-area-demo.js | 54 -- dashboard/assets/demo/chart-bar-demo.js | 46 -- dashboard/assets/demo/chart-pie-demo.js | 16 - dashboard/assets/demo/datatables-demo.js | 4 - dashboard/assets/img/error-404-monochrome.svg | 1 - dashboard/{ => old}/Chart.min.js | 0 dashboard/{ => old}/charts.html | 0 dashboard/{ => old}/index.html | 0 dashboard/{ => old}/index.html_bak | 0 dashboard/{ => old}/layout-sidenav-light.html | 0 dashboard/{ => old}/layout-static.html | 0 dashboard/{ => old}/login.html | 0 dashboard/{ => old}/password.html | 0 dashboard/{ => old}/register.html | 0 dashboard/{ => old}/simple-datatables.min.js | 0 dashboard/{ => old}/tables.html | 0 dashboard/parameter.php | 82 +++ dashboard/result_latest.php | 157 ++++++ dashboard/survey_edit.php | 226 ++++++++ dashboard/survey_erfassen.php | 56 +- js/components/admin_edit.js | 20 + js/components/admin_parameter.js | 17 + templates/modern/abmeldung.html | 243 --------- templates/modern/dashboard/index.html | 7 +- templates/modern/dashboard/nav.html | 12 +- templates/modern/dashboard/parameter.html | 61 +++ templates/modern/dashboard/result_latest.html | 116 +++++ templates/modern/dashboard/startseite.html | 4 +- templates/modern/dashboard/survey_edit.html | 116 +++++ .../modern/dashboard/survey_erfassen.html | 20 +- ...27c3ff810b1d3ec06fd_0.file.navtop.html.php | 54 ++ ...401c286ca72b20b_0.file.startseite.html.php | 88 ++++ ...d7bf157223e300660449_0.file.index.html.php | 10 +- ...6be5541d4940ee_0.file.survey_edit.html.php | 172 ++++++ ...cdfcb9f2ad878a473b1db6_0.file.nav.html.php | 106 ++++ ...8c2bf3e350_0.file.survey_erfassen.html.php | 490 ++++++++++++++++++ ...c30536bdf206de07b30e_0.file.index.html.php | 147 ++++++ ...9c35d6c10d15670e655_0.file.footer.html.php | 33 ++ ...a2015207b5d9beac_0.file.parameter.html.php | 108 ++++ 54 files changed, 2132 insertions(+), 831 deletions(-) create mode 100644 controller/admin_edit.php create mode 100644 controller/admin_parameter.php delete mode 100644 dashboard/401.html delete mode 100644 dashboard/401.html# delete mode 100644 dashboard/404.html delete mode 100644 dashboard/404.html# delete mode 100644 dashboard/500.html delete mode 100644 dashboard/500.html# delete mode 100644 dashboard/assets#/demo/chart-area-demo.js delete mode 100644 dashboard/assets#/demo/chart-bar-demo.js delete mode 100644 dashboard/assets#/demo/chart-pie-demo.js delete mode 100644 dashboard/assets#/demo/datatables-demo.js delete mode 100644 dashboard/assets#/img/error-404-monochrome.svg delete mode 100644 dashboard/assets/demo/chart-area-demo.js delete mode 100644 dashboard/assets/demo/chart-bar-demo.js delete mode 100644 dashboard/assets/demo/chart-pie-demo.js delete mode 100644 dashboard/assets/demo/datatables-demo.js delete mode 100644 dashboard/assets/img/error-404-monochrome.svg rename dashboard/{ => old}/Chart.min.js (100%) rename dashboard/{ => old}/charts.html (100%) rename dashboard/{ => old}/index.html (100%) rename dashboard/{ => old}/index.html_bak (100%) rename dashboard/{ => old}/layout-sidenav-light.html (100%) rename dashboard/{ => old}/layout-static.html (100%) rename dashboard/{ => old}/login.html (100%) rename dashboard/{ => old}/password.html (100%) rename dashboard/{ => old}/register.html (100%) rename dashboard/{ => old}/simple-datatables.min.js (100%) rename dashboard/{ => old}/tables.html (100%) create mode 100644 dashboard/parameter.php create mode 100644 dashboard/result_latest.php create mode 100644 dashboard/survey_edit.php create mode 100644 js/components/admin_edit.js create mode 100644 js/components/admin_parameter.js delete mode 100644 templates/modern/abmeldung.html create mode 100644 templates/modern/dashboard/parameter.html create mode 100644 templates/modern/dashboard/result_latest.html create mode 100644 templates/modern/dashboard/survey_edit.html create mode 100644 templates_c/15b779282fc1667ebc65227c3ff810b1d3ec06fd_0.file.navtop.html.php create mode 100644 templates_c/1d7d9664b76f0bd4587451aa9401c286ca72b20b_0.file.startseite.html.php create mode 100644 templates_c/45042613f06e24e667146e342f6be5541d4940ee_0.file.survey_edit.html.php create mode 100644 templates_c/8054340f19cd19b00acdfcb9f2ad878a473b1db6_0.file.nav.html.php create mode 100644 templates_c/85403c192b4eecdf6efb10ab95d6ca8c2bf3e350_0.file.survey_erfassen.html.php create mode 100644 templates_c/bf479f21e7ad507ad2c2c30536bdf206de07b30e_0.file.index.html.php create mode 100644 templates_c/ee47be34cb7d96d9533569c35d6c10d15670e655_0.file.footer.html.php create mode 100644 templates_c/f48616efe837d676bc69b2f5a2015207b5d9beac_0.file.parameter.html.php diff --git a/config/datenbankanbindung.php b/config/datenbankanbindung.php index e618b28..4c2d11c 100644 --- a/config/datenbankanbindung.php +++ b/config/datenbankanbindung.php @@ -5,6 +5,7 @@ { $db = @new mysqli( 'localhost', 'root', '', 'survey' ); + $db->query("set sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); $db->set_charset('utf8mb4'); $db->query("SET NAMES 'utf8mb4'"); return $db; diff --git a/controller/admin_edit.php b/controller/admin_edit.php new file mode 100644 index 0000000..397f6a5 --- /dev/null +++ b/controller/admin_edit.php @@ -0,0 +1,26 @@ +query("DELETE FROM jumi_umfragen_erg_freitext WHERE umid = $umid"); + $stmt2 = $db->query("DELETE FROM jumi_umfragen_ende WHERE umid = $umid"); + $stmt4 = $db->query("DELETE FROM jumi_umfragen_ergebnisse WHERE ufid IN (SELECT ufid FROM jumi_umfragen_fragen WHERE umid = $umid)"); + $stmt4 = $db->query("DELETE FROM jumi_umfragen_antworten WHERE ufid IN (SELECT ufid FROM jumi_umfragen_fragen WHERE umid = $umid)"); + $stmt5 = $db->query("DELETE FROM jumi_umfragen_fragen WHERE umid = $umid"); + $stmt6 = $db->query("DELETE FROM jumi_umfragen WHERE umid = $umid"); + + + if ($stmt1 and $stmt2 and $stmt3 and $stmt4 and $stmt5 and $stmt6) { + echo "Success"; + } else { + echo "Nicht geklappt"; + } +} + + +?> \ No newline at end of file diff --git a/controller/admin_erfassen.php b/controller/admin_erfassen.php index c696ae7..38da457 100644 --- a/controller/admin_erfassen.php +++ b/controller/admin_erfassen.php @@ -130,9 +130,9 @@ if ($function == 'deleteQuestion') { if ($stmt1 and $stmt2) { - echo "DELETE FROM jumi_umfragen_antworten WHERE ufid = $id2 | DELETE FROM jumi_umfragen_fragen WHERE ufid = $id2"; + echo "Success"; } else { - echo "Nicht geklappt"; + echo "Error"; } } diff --git a/controller/admin_parameter.php b/controller/admin_parameter.php new file mode 100644 index 0000000..25aa7e9 --- /dev/null +++ b/controller/admin_parameter.php @@ -0,0 +1,37 @@ +query( $query2) + or die ("Cannot execute query2"); + + while ($row2 = $result2->fetch_array()){ + $pid = $row2['pid']; + $pid_value = $_POST[$pid]; + + + $sql1 = $db->query( "UPDATE jumi_parameter + SET wert = '$pid_value' + WHERE pid = $pid + " ); + } + + if(!$sql1){ + echo "Success"; + }else{ + echo "Error: PDATE jumi_parameter + SET wert = '$pid_value' + WHERE pid = $pid"; + } + + + +} + + +?> \ No newline at end of file diff --git a/dashboard/401.html b/dashboard/401.html deleted file mode 100644 index d733474..0000000 --- a/dashboard/401.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
-

401

-

Unauthorized

-

Access to this resource is denied.

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/401.html# b/dashboard/401.html# deleted file mode 100644 index d733474..0000000 --- a/dashboard/401.html# +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
-

401

-

Unauthorized

-

Access to this resource is denied.

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/404.html b/dashboard/404.html deleted file mode 100644 index c4d98ba..0000000 --- a/dashboard/404.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
- -

This requested URL was not found on this server.

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/404.html# b/dashboard/404.html# deleted file mode 100644 index c4d98ba..0000000 --- a/dashboard/404.html# +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
- -

This requested URL was not found on this server.

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/500.html b/dashboard/500.html deleted file mode 100644 index 6e4dea9..0000000 --- a/dashboard/500.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
-

500

-

Internal Server Error

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/500.html# b/dashboard/500.html# deleted file mode 100644 index 6e4dea9..0000000 --- a/dashboard/500.html# +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - 404 Error - SB Admin - - - - -
-
-
-
-
-
-
-

500

-

Internal Server Error

- - - Return to Dashboard - -
-
-
-
-
-
- -
- - - - diff --git a/dashboard/assets#/demo/chart-area-demo.js b/dashboard/assets#/demo/chart-area-demo.js deleted file mode 100644 index f63ff91..0000000 --- a/dashboard/assets#/demo/chart-area-demo.js +++ /dev/null @@ -1,54 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Area Chart Example -var ctx = document.getElementById("myAreaChart"); -var myLineChart = new Chart(ctx, { - type: 'line', - data: { - labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"], - datasets: [{ - label: "Sessions", - lineTension: 0.3, - backgroundColor: "rgba(2,117,216,0.2)", - borderColor: "rgba(2,117,216,1)", - pointRadius: 5, - pointBackgroundColor: "rgba(2,117,216,1)", - pointBorderColor: "rgba(255,255,255,0.8)", - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(2,117,216,1)", - pointHitRadius: 50, - pointBorderWidth: 2, - data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451], - }], - }, - options: { - scales: { - xAxes: [{ - time: { - unit: 'date' - }, - gridLines: { - display: false - }, - ticks: { - maxTicksLimit: 7 - } - }], - yAxes: [{ - ticks: { - min: 0, - max: 40000, - maxTicksLimit: 5 - }, - gridLines: { - color: "rgba(0, 0, 0, .125)", - } - }], - }, - legend: { - display: false - } - } -}); diff --git a/dashboard/assets#/demo/chart-bar-demo.js b/dashboard/assets#/demo/chart-bar-demo.js deleted file mode 100644 index 049ad20..0000000 --- a/dashboard/assets#/demo/chart-bar-demo.js +++ /dev/null @@ -1,46 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Bar Chart Example -var ctx = document.getElementById("myBarChart"); -var myLineChart = new Chart(ctx, { - type: 'bar', - data: { - labels: ["January", "February", "March", "April", "May", "June"], - datasets: [{ - label: "Revenue", - backgroundColor: "rgba(2,117,216,1)", - borderColor: "rgba(2,117,216,1)", - data: [4215, 5312, 6251, 7841, 9821, 14984], - }], - }, - options: { - scales: { - xAxes: [{ - time: { - unit: 'month' - }, - gridLines: { - display: false - }, - ticks: { - maxTicksLimit: 6 - } - }], - yAxes: [{ - ticks: { - min: 0, - max: 15000, - maxTicksLimit: 5 - }, - gridLines: { - display: true - } - }], - }, - legend: { - display: false - } - } -}); diff --git a/dashboard/assets#/demo/chart-pie-demo.js b/dashboard/assets#/demo/chart-pie-demo.js deleted file mode 100644 index 4e16c41..0000000 --- a/dashboard/assets#/demo/chart-pie-demo.js +++ /dev/null @@ -1,16 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Pie Chart Example -var ctx = document.getElementById("myPieChart"); -var myPieChart = new Chart(ctx, { - type: 'pie', - data: { - labels: ["Blue", "Red", "Yellow", "Green"], - datasets: [{ - data: [12.21, 15.58, 11.25, 8.32], - backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'], - }], - }, -}); diff --git a/dashboard/assets#/demo/datatables-demo.js b/dashboard/assets#/demo/datatables-demo.js deleted file mode 100644 index f2eecbf..0000000 --- a/dashboard/assets#/demo/datatables-demo.js +++ /dev/null @@ -1,4 +0,0 @@ -// Call the dataTables jQuery plugin -$(document).ready(function() { - $('#dataTable').DataTable(); -}); diff --git a/dashboard/assets#/img/error-404-monochrome.svg b/dashboard/assets#/img/error-404-monochrome.svg deleted file mode 100644 index f0d345f..0000000 --- a/dashboard/assets#/img/error-404-monochrome.svg +++ /dev/null @@ -1 +0,0 @@ -error-404-monochrome \ No newline at end of file diff --git a/dashboard/assets/demo/chart-area-demo.js b/dashboard/assets/demo/chart-area-demo.js deleted file mode 100644 index f63ff91..0000000 --- a/dashboard/assets/demo/chart-area-demo.js +++ /dev/null @@ -1,54 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Area Chart Example -var ctx = document.getElementById("myAreaChart"); -var myLineChart = new Chart(ctx, { - type: 'line', - data: { - labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"], - datasets: [{ - label: "Sessions", - lineTension: 0.3, - backgroundColor: "rgba(2,117,216,0.2)", - borderColor: "rgba(2,117,216,1)", - pointRadius: 5, - pointBackgroundColor: "rgba(2,117,216,1)", - pointBorderColor: "rgba(255,255,255,0.8)", - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(2,117,216,1)", - pointHitRadius: 50, - pointBorderWidth: 2, - data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451], - }], - }, - options: { - scales: { - xAxes: [{ - time: { - unit: 'date' - }, - gridLines: { - display: false - }, - ticks: { - maxTicksLimit: 7 - } - }], - yAxes: [{ - ticks: { - min: 0, - max: 40000, - maxTicksLimit: 5 - }, - gridLines: { - color: "rgba(0, 0, 0, .125)", - } - }], - }, - legend: { - display: false - } - } -}); diff --git a/dashboard/assets/demo/chart-bar-demo.js b/dashboard/assets/demo/chart-bar-demo.js deleted file mode 100644 index 049ad20..0000000 --- a/dashboard/assets/demo/chart-bar-demo.js +++ /dev/null @@ -1,46 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Bar Chart Example -var ctx = document.getElementById("myBarChart"); -var myLineChart = new Chart(ctx, { - type: 'bar', - data: { - labels: ["January", "February", "March", "April", "May", "June"], - datasets: [{ - label: "Revenue", - backgroundColor: "rgba(2,117,216,1)", - borderColor: "rgba(2,117,216,1)", - data: [4215, 5312, 6251, 7841, 9821, 14984], - }], - }, - options: { - scales: { - xAxes: [{ - time: { - unit: 'month' - }, - gridLines: { - display: false - }, - ticks: { - maxTicksLimit: 6 - } - }], - yAxes: [{ - ticks: { - min: 0, - max: 15000, - maxTicksLimit: 5 - }, - gridLines: { - display: true - } - }], - }, - legend: { - display: false - } - } -}); diff --git a/dashboard/assets/demo/chart-pie-demo.js b/dashboard/assets/demo/chart-pie-demo.js deleted file mode 100644 index 4e16c41..0000000 --- a/dashboard/assets/demo/chart-pie-demo.js +++ /dev/null @@ -1,16 +0,0 @@ -// Set new default font family and font color to mimic Bootstrap's default styling -Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; -Chart.defaults.global.defaultFontColor = '#292b2c'; - -// Pie Chart Example -var ctx = document.getElementById("myPieChart"); -var myPieChart = new Chart(ctx, { - type: 'pie', - data: { - labels: ["Blue", "Red", "Yellow", "Green"], - datasets: [{ - data: [12.21, 15.58, 11.25, 8.32], - backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'], - }], - }, -}); diff --git a/dashboard/assets/demo/datatables-demo.js b/dashboard/assets/demo/datatables-demo.js deleted file mode 100644 index f2eecbf..0000000 --- a/dashboard/assets/demo/datatables-demo.js +++ /dev/null @@ -1,4 +0,0 @@ -// Call the dataTables jQuery plugin -$(document).ready(function() { - $('#dataTable').DataTable(); -}); diff --git a/dashboard/assets/img/error-404-monochrome.svg b/dashboard/assets/img/error-404-monochrome.svg deleted file mode 100644 index f0d345f..0000000 --- a/dashboard/assets/img/error-404-monochrome.svg +++ /dev/null @@ -1 +0,0 @@ -error-404-monochrome \ No newline at end of file diff --git a/dashboard/Chart.min.js b/dashboard/old/Chart.min.js similarity index 100% rename from dashboard/Chart.min.js rename to dashboard/old/Chart.min.js diff --git a/dashboard/charts.html b/dashboard/old/charts.html similarity index 100% rename from dashboard/charts.html rename to dashboard/old/charts.html diff --git a/dashboard/index.html b/dashboard/old/index.html similarity index 100% rename from dashboard/index.html rename to dashboard/old/index.html diff --git a/dashboard/index.html_bak b/dashboard/old/index.html_bak similarity index 100% rename from dashboard/index.html_bak rename to dashboard/old/index.html_bak diff --git a/dashboard/layout-sidenav-light.html b/dashboard/old/layout-sidenav-light.html similarity index 100% rename from dashboard/layout-sidenav-light.html rename to dashboard/old/layout-sidenav-light.html diff --git a/dashboard/layout-static.html b/dashboard/old/layout-static.html similarity index 100% rename from dashboard/layout-static.html rename to dashboard/old/layout-static.html diff --git a/dashboard/login.html b/dashboard/old/login.html similarity index 100% rename from dashboard/login.html rename to dashboard/old/login.html diff --git a/dashboard/password.html b/dashboard/old/password.html similarity index 100% rename from dashboard/password.html rename to dashboard/old/password.html diff --git a/dashboard/register.html b/dashboard/old/register.html similarity index 100% rename from dashboard/register.html rename to dashboard/old/register.html diff --git a/dashboard/simple-datatables.min.js b/dashboard/old/simple-datatables.min.js similarity index 100% rename from dashboard/simple-datatables.min.js rename to dashboard/old/simple-datatables.min.js diff --git a/dashboard/tables.html b/dashboard/old/tables.html similarity index 100% rename from dashboard/tables.html rename to dashboard/old/tables.html diff --git a/dashboard/parameter.php b/dashboard/parameter.php new file mode 100644 index 0000000..7f87434 --- /dev/null +++ b/dashboard/parameter.php @@ -0,0 +1,82 @@ +query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + # Passwort für die Praxisstellen wird verschlüsselt gespeichert + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + $row1['zaehler'] = $zaehler; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} + +if($action == 'save'){ + + + $query2 = "SELECT pid + FROM jumi_parameter + ORDER BY pid ASC"; + $result2 = $db->query( $query2) + or die ("Cannot execute query2"); + + while ($row2 = $result2->fetch_array()){ + $pid = $row2['pid']; + $pid_value = $_POST[$pid]; + + + $sql1 = $db->query( "UPDATE jumi_parameter + SET wert = '$pid_value' + WHERE pid = $pid + " ); + + } + + if(!$sql1){ + $error = TRUE; + $error_reason .= "Fehler beim Update [jumi_parameter]
"; + }else{ + $error = FALSE; + $smarty->assign('parameter_inserterr', "2"); + echo ""; + } + + if($error){ + $smarty->assign('parameter_inserterr', "1"); + $smarty->assign('parameter_reason', "$error_reason"); // Kein Mailversand + } // Ende IF : Insert hat geklappt + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/dashboard/$templatename"); + +?> \ No newline at end of file diff --git a/dashboard/result_latest.php b/dashboard/result_latest.php new file mode 100644 index 0000000..84113c7 --- /dev/null +++ b/dashboard/result_latest.php @@ -0,0 +1,157 @@ +query("SELECT max(umid) umid + FROM jumi_umfragen + WHERE datum_von < now() + "); + $row_umid = $query_umid->fetch_array(); + $umid = $row_umid['umid']; + } + + $query_umid_detail = $db->query("SELECT headline, date_format(datum_von, '%d.%m.%Y - %H:%i') datum_von, date_format(datum_bis, '%d.%m.%Y - %H:%i') datum_bis, freitext + FROM jumi_umfragen + WHERE umid=$umid + "); + $row_umid_detail = $query_umid_detail->fetch_array(); + $smarty->assign('result_headline', "$row_umid_detail[headline]"); + $smarty->assign('result_datum_von', "$row_umid_detail[datum_von]"); + $smarty->assign('result_datum_bis', "$row_umid_detail[datum_bis]"); + + # Anzahl abgeschlossene Umfragen + $query_fertige = $db->query("SELECT count(*) Anz_abgeschlossen + FROM jumi_umfragen_ende + WHERE umid =$umid + "); + $row_fertige = $query_fertige->fetch_array(); + $smarty->assign('result_anz_fertige', "$row_fertige[Anz_abgeschlossen]"); + + # Anzahl angefangener Teilnehmer + $query_angefangen = $db->query("SELECT count(distinct concat(ip,session))-$row_fertige[Anz_abgeschlossen] Anz_angefangen + FROM jumi_umfragen_ergebnisse + WHERE ufid in (select ufid from jumi_umfragen_fragen where umid =$umid) + "); + $row_angefangen = $query_angefangen->fetch_array(); + $smarty->assign('result_anz_angefangen', "$row_angefangen[Anz_angefangen]"); + + + + + + $query = "SELECT ufid, frage, multiple + FROM jumi_umfragen_fragen + WHERE umid = $umid"; + $result = $db->query($query); + + + // Ergebnisse lesen und an den Client ausgeben + while ($row = $result->fetch_array()) { + $value2 = ''; + unset($inner1); + + # Wie viele User haben Frage 1 beantwortet + $result_anz_userfrage = $db->query("SELECT count(distinct concat(ip,session)) Anz + FROM jumi_umfragen_ergebnisse + WHERE ufid = $row[ufid] + "); + $row_anz_userfrage = $result_anz_userfrage->fetch_array(); + + # Wie viele Antworten gibt es zur Frage: Das sind 100% + $result_anz_antworten = $db->query("SELECT count(ufid) Anz + FROM jumi_umfragen_ergebnisse + WHERE ufid = $row[ufid] + "); + $row_anz_antworten = $result_anz_antworten->fetch_array(); + + + $query2 = "SELECT uaid, antwort + FROM jumi_umfragen_antworten + WHERE ufid=$row[ufid] + ORDER BY userorder ASC, uaid ASC + "; + + + $result2 = $db->query($query2) or die("Cannot execute query2"); + $ln2 = 0; + + while ($row2 = $result2->fetch_array()) { + + # Wie viele haben Antwort auf aktuelle Frage gegeben + $result_cur_antw = $db->query("SELECT count(*) Anz + FROM jumi_umfragen_ergebnisse + WHERE uaid = $row2[uaid]"); + $row_cur_antw = $result_cur_antw->fetch_array(); + + if($row_anz_antworten['Anz'] != '0'){ + $prozent = round(100/$row_anz_antworten['Anz']*$row_cur_antw['Anz'],0); + }else{ + $prozent = 0; + } + + $inner1[$ln2]['prozent'] = $prozent; + $inner1[$ln2]['uaid'] = $row2['uaid']; + $inner1[$ln2]['antwort'] = $row2['antwort']; + $value2 = $inner1; + $ln2++; + } + if($row_anz_userfrage['Anz'] != 0){ + $anz_userfrage = $row_anz_userfrage['Anz']; + }else{ + $anz_userfrage = 0; + } + $row['inner'] = $value2; + $row['anz_userfrage'] = $anz_userfrage; + $row['anz_antworten_frage'] = $row_anz_antworten['Anz']; + $table_data[] = $row; + } + $smarty->assign('table_data', $table_data); + +# echo"
";
+#    print_r($table_data);
+#    echo"
"; + + + $query3 = "SELECT freitext + FROM jumi_umfragen_erg_freitext + WHERE umid = $umid + ORDER BY uefid desc"; + $result3 = $db->query($query3); + + + // Ergebnisse lesen und an den Client ausgeben + while ($row3 = $result3->fetch_array()) { + $table_data3[] = $row3; + } + $smarty->assign('table_data3', $table_data3); + + +} + + +$smarty->assign('action', "$action"); +$smarty->display("modern/admin/$templatename"); +?> diff --git a/dashboard/survey_edit.php b/dashboard/survey_edit.php new file mode 100644 index 0000000..133dbfe --- /dev/null +++ b/dashboard/survey_edit.php @@ -0,0 +1,226 @@ +query($query1) or die("Cannot execute query1a"); + + while ($row1 = $result1->fetch_array()) { + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + + +if ($action == 'fragen') { + + $umid = $_SESSION["umfrageerf_umid"]; + + # Focus/Session setzen + $result = $db->query("SELECT count(*) Anz FROM jumi_umfragen_fragen WHERE umid='$umid'"); + $row = $result->fetch_array(); + # Wenn man bei mehreren Fragen eine Frage löscht ist Anz nicht 0 und der Focus sitzt bei Antwort + if ($umid == '' or $_GET['tabufid'] == "neuefrage" or $row['Anz'] == '0') { + $smarty->assign('umfrageerf_focus', "frage"); + unset($_SESSION["umfrageerf_ufid"]); + unset($_SESSION["umfrageerf_uaid"]); + } else { + $smarty->assign('umfrageerf_focus', "antwort"); + } + + + if (isset($_POST['datumvon']) and $_POST['datumvon'] != '') { + $datumvon = $_POST['datumvon']; + $_SESSION["umfrageerf_value_datumvon"] = $datumvon; + } else { + if ($_SESSION["umfrageerf_value_datumvon"] == '') { + echo ""; + } + $datumvon = $_SESSION["umfrageerf_value_datumvon"]; + } + + if (isset($_POST['zeitvon']) and $_POST['zeitvon'] != '') { + $zeitvon = $_POST['zeitvon']; + $_SESSION["umfrageerf_value_zeitvon"] = $zeitvon; + } else { + if ($_SESSION["umfrageerf_value_zeitvon"] == '') { + echo ""; + } + $zeitvon = $_SESSION["umfrageerf_value_zeitvon"]; + } + + if (isset($_POST['datumbis']) and $_POST['datumbis'] != '') { + $datumbis = $_POST['datumbis']; + $_SESSION["umfrageerf_value_datumbis"] = $datumbis; + } else { + if ($_SESSION["umfrageerf_value_datumbis"] == '') { + echo ""; + } + $datumbis = $_SESSION["umfrageerf_value_datumbis"]; + } + + if (isset($_POST['zeitbis']) and $_POST['zeitbis'] != '') { + $zeitbis = $_POST['zeitbis']; + $_SESSION["umfrageerf_value_zeitbis"] = $zeitbis; + } else { + if ($_SESSION["umfrageerf_value_zeitbis"] == '') { + echo ""; + } + $zeitbis = $_SESSION["umfrageerf_value_zeitbis"]; + } + + if (isset($_POST['headline']) and trim($_POST['headline']) != '') { + $headline = trim($_POST['headline']); + $_SESSION["umfrageerf_value_headline"] = $headline; + } else { + if ($_SESSION["umfrageerf_value_headline"] == '') { + echo ""; + } + $headline = $_SESSION["umfrageerf_value_headline"]; + } + + if(!isset($_GET['erfassen'])){ + if (isset($_POST['freitext']) and trim($_POST['freitext']) != '') { + $freitext = '1'; + $_SESSION["umfrageerf_value_freitext"] = $freitext; + }else{ + $freitext = '0'; + $_SESSION["umfrageerf_value_freitext"] = $freitext; + } + }else{ + $freitext = $_SESSION["umfrageerf_value_freitext"]; + } + + + $datumvon_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumvon); + $datumbis_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $datumbis); + $datum_von = $datumvon_form . " " . $zeitvon . ":00"; + $datum_bis = $datumbis_form . " " . $zeitbis . ":00"; + + function validateDate($date, $format = 'Y-m-d') + { + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + + if (!validateDate($datumvon_form)) { + echo ""; + exit; + } + + if (!validateDate($datumbis_form)) { + echo ""; + exit; + } + + + if(!isset($_GET['erfassen'])){ + if ($umid == '') { + $datum = date("Y-m-d H:i:s"); + + $sql1 = $db->query("INSERT INTO jumi_umfragen ( datum_von + , datum_bis + , headline + , uid + , datum_erfasst + , freitext + ) + VALUES + ( '$datum_von' + , '$datum_bis' + , '$headline' + , '$uid' + , '$datum' + , '$freitext' + ) + "); + $umid = $db->insert_id; + $_SESSION["umfrageerf_umid"] = $umid; + }else{ + $update = $db->query("UPDATE jumi_umfragen + SET datum_von ='$datum_von' + ,datum_bis ='$datum_bis' + ,headline = '$headline' + ,freitext = '$freitext' + WHERE umid = $umid + "); + + } + } + + if (isset($_GET['tabufid']) and $_GET['tabufid'] != '') { + if ($_GET['tabufid'] == "neuefrage") { + $_SESSION["umfrageerf_ufid"] = ""; + } else { + $_SESSION["umfrageerf_ufid"] = $_GET['tabufid']; + } + } + $ufid = $_SESSION["umfrageerf_ufid"]; + if ($ufid != '') { + $result_frage = $db->query("SELECT frage, multiple + FROM jumi_umfragen_fragen + WHERE ufid = $ufid"); + $row_frage = $result_frage->fetch_array(); + $smarty->assign('umfrageerf_value_frage', htmlspecialchars($row_frage['frage'])); + $smarty->assign('umfrageerf_value_multiple', $row_frage['multiple']); + $smarty->assign('umfrageerf_value_ufid', $ufid); + } + + # Gespeicherte Werte + if ($umid != '') { + $query1 = "SELECT ufid, frage + FROM jumi_umfragen_fragen + WHERE umid=$umid + ORDER BY ufid ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1a"); + + while ($row1 = $result1->fetch_array()) { + $table_data1[] = $row1; + } + } + + $smarty->assign('table_data1', $table_data1); + if ($ufid != '') { + $smarty->assign('umfrageerf_gesp_werte_value_ufid2', "$ufid"); + $query2 = "SELECT uaid, antwort + FROM jumi_umfragen_antworten + WHERE ufid=$ufid + ORDER BY userorder ASC, uaid ASC"; + + $result2 = $db->query($query2) or die("Cannot execute query2"); + $anzahl = $result2->num_rows; + $smarty->assign('table_data2_anz', $anzahl); + while ($row2 = $result2->fetch_array()) { + $table_data2[] = $row2; + } + $smarty->assign('table_data2', $table_data2); + } +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/dashboard/$templatename"); + +?> diff --git a/dashboard/survey_erfassen.php b/dashboard/survey_erfassen.php index 4fda770..7bf0df8 100644 --- a/dashboard/survey_erfassen.php +++ b/dashboard/survey_erfassen.php @@ -27,6 +27,7 @@ if ($action == '') { # } # # # -- Fehlermeldungen -- # + if($_GET['new'] == 1){ unset($_SESSION["umfrageerf_value_datumvon"]); unset($_SESSION["umfrageerf_value_zeitvon"]); @@ -41,6 +42,31 @@ if ($action == '') { # $_SESSION["umfrageerf_new"] = 1; }else{ + if($_GET['edit'] == 1){ + $umid = $_GET['umid']; + $_SESSION["umfrageerf_umid"] = $umid; + $result_edit = $db->query("SELECT date_format(datum_von, '%d.%m.%Y') datum_von + , date_format(datum_von, '%H:%i') zeit_von + , date_format(datum_bis, '%d.%m.%Y') datum_bis + , date_format(datum_bis, '%H:%i') zeit_bis + , headline + , freitext + FROM jumi_umfragen + WHERE umid = $umid"); + $row_edit = $result_edit->fetch_array(); + $_SESSION["umfrageerf_value_datumvon"] = $row_edit['datum_von']; + $_SESSION["umfrageerf_value_zeitvon"] = $row_edit['zeit_von']; + $_SESSION["umfrageerf_value_datumbis"] = $row_edit['datum_bis']; + $_SESSION["umfrageerf_value_zeitbis"] = $row_edit['zeit_bis']; + $_SESSION["umfrageerf_value_headline"] = $row_edit['headline']; + $_SESSION["umfrageerf_value_freitext"] = $row_edit['freitext']; + # Erste Frage selektieren, damit der Reiter für die Frage gleich aktiv ist + $result_q1 = $db->query("SELECT min(ufid) ufid + FROM jumi_umfragen_fragen + WHERE umid = $umid"); + $row_q1 = $result_q1->fetch_array(); + $_SESSION["umfrageerf_ufid"] = $row_q1['ufid']; + } $smarty->assign('umfrageerf_value_datumvon', $_SESSION["umfrageerf_value_datumvon"]); $smarty->assign('umfrageerf_value_zeitvon', $_SESSION["umfrageerf_value_zeitvon"]); $smarty->assign('umfrageerf_value_datumbis', $_SESSION["umfrageerf_value_datumbis"]); @@ -106,18 +132,18 @@ if ($action == '') { if ($action == 'fragen') { $umid = $_SESSION["umfrageerf_umid"]; - + # Focus/Session setzen $result = $db->query("SELECT count(*) Anz FROM jumi_umfragen_fragen WHERE umid='$umid'"); $row = $result->fetch_array(); # Wenn man bei mehreren Fragen eine Frage löscht ist Anz nicht 0 und der Focus sitzt bei Antwort - if ($umid == '' or $_GET['tabufid'] == "neuefrage" or $row['Anz'] == '0') { - $smarty->assign('umfrageerf_focus', "frage"); - unset($_SESSION["umfrageerf_ufid"]); - unset($_SESSION["umfrageerf_uaid"]); - } else { - $smarty->assign('umfrageerf_focus', "antwort"); - } +# if ($umid == '' or $_GET['tabufid'] == "neuefrage" or $row['Anz'] == '0') { +# $smarty->assign('umfrageerf_focus', "frage"); +# unset($_SESSION["umfrageerf_ufid"]); +# unset($_SESSION["umfrageerf_uaid"]); +# } else { +# $smarty->assign('umfrageerf_focus', "antwort"); +# } if (isset($_POST['datumvon']) and $_POST['datumvon'] != '') { @@ -239,14 +265,18 @@ if ($action == 'fragen') { } } + if (isset($_GET['tabufid']) and $_GET['tabufid'] != '') { + if ($_GET['tabufid'] == "neuefrage") { $_SESSION["umfrageerf_ufid"] = ""; } else { $_SESSION["umfrageerf_ufid"] = $_GET['tabufid']; + } } $ufid = $_SESSION["umfrageerf_ufid"]; + if ($ufid != '') { $result_frage = $db->query("SELECT frage, multiple FROM jumi_umfragen_fragen @@ -259,11 +289,12 @@ if ($action == 'fragen') { # Gespeicherte Werte if ($umid != '') { + $query1 = "SELECT ufid, frage FROM jumi_umfragen_fragen WHERE umid=$umid ORDER BY ufid ASC"; - + $result1 = $db->query($query1) or die("Cannot execute query1a"); while ($row1 = $result1->fetch_array()) { @@ -275,10 +306,9 @@ if ($action == 'fragen') { if ($ufid != '') { $smarty->assign('umfrageerf_gesp_werte_value_ufid2', "$ufid"); $query2 = "SELECT uaid, antwort - FROM jumi_umfragen_antworten - WHERE ufid=$ufid - ORDER BY userorder ASC, uaid ASC"; - + FROM jumi_umfragen_antworten + WHERE ufid=$ufid + ORDER BY userorder ASC, uaid ASC"; $result2 = $db->query($query2) or die("Cannot execute query2"); $anzahl = $result2->num_rows; $smarty->assign('table_data2_anz', $anzahl); diff --git a/js/components/admin_edit.js b/js/components/admin_edit.js new file mode 100644 index 0000000..a4f341a --- /dev/null +++ b/js/components/admin_edit.js @@ -0,0 +1,20 @@ +function onClickDeleteSurvey(id) { + r = confirm('Gesamte Umfrage löschen?'); + if (r) { + $.ajax({ + type: 'POST', + url: '../controller/admin_edit.php', + data: { + 'function': 'deleteSurvey', + 'id': id + }, + success: function(result) { + // document.getElementById("del").innerHTML = "entfernt"; + //Text einblenden geht nicht, da ein Refresh gemacht wird. Dann sieht man den Text nicht + $(document).ajaxStop(function(){ + window.location = "?"; + }); + } + }); + } +} \ No newline at end of file diff --git a/js/components/admin_parameter.js b/js/components/admin_parameter.js new file mode 100644 index 0000000..1b74ed9 --- /dev/null +++ b/js/components/admin_parameter.js @@ -0,0 +1,17 @@ +function onClickSaveParameter() { + $.ajax({ + type: 'POST', + url: '../controller/admin_parameter.php', + data: { + 'function': 'saveParameter' + }, + success: function(result) { + alert(result); + // document.getElementById("del").innerHTML = "entfernt"; + //Text einblenden geht nicht, da ein Refresh gemacht wird. Dann sieht man den Text nicht + $(document).ajaxStop(function(){ + window.location = "?"; + }); + } + }); +} \ No newline at end of file diff --git a/templates/modern/abmeldung.html b/templates/modern/abmeldung.html deleted file mode 100644 index bb18531..0000000 --- a/templates/modern/abmeldung.html +++ /dev/null @@ -1,243 +0,0 @@ - -{if $action == ''} - - - - - - - Registrierung und Terminbuchung für Gottesdienste in Weinstadt-Beutelsbach - - - - - - - - - - - - - - - - - - -
-   - -
-
- {if $abmelde_error == 1} -
Fehler bei der Abmeldung
- {/if} - {if $abmelde_error == 0} -
Abmeldung vom Gottesdienst am {$abmelde_termin} Uhr
- {/if} -
-
-
-

- {if $index_error == '1'} - - - - - -
- - Achtung!
- {$index_error_text} -
-
- {/if} - - - - -
- - - {if $abmelde_error == 1} - - - - -
- - - - - - - - - - - - - - - - -
  - Es ist ein Fehler aufgetreten. Die Buchung konnte nicht gelöscht werden oder ist bereits gelöscht.
-
- Im Zweifel kontaktieren Sie den Administrator. -
 
   
  - -  
- {/if} - {if $abmelde_error == 0} -
- - - - - - - - - - - - - - - - -
  -

- Sie möchten {$abmelde_vorname} {$abmelde_nachname} vom Gottesdienst am {$abmelde_termin} Uhr abmelden? -
-
-
- Sind Sie sich sicher? -
-
- - -   - - - -

-
 
   
  - -  
- {/if} -
-
-

-
-   -
- - - -{/if} -{if $action == 'del'} - - - - - - - Abmeldung beendet - - - - - - - - - - -
-   - -
-
-
Abmeldung beendet
-
-
-
-

- {if $save_error == '1'} - - - - - -
- - Achtung!
- {$save_error_text} -
-
- {else} -
-
- - - - -
- - - - - -
-

- {$abmelde_ausgabe} -

-
-
-
-
-
- {/if} -

-
-   -
- - - -{/if} \ No newline at end of file diff --git a/templates/modern/dashboard/index.html b/templates/modern/dashboard/index.html index 01a0ab5..b75a694 100644 --- a/templates/modern/dashboard/index.html +++ b/templates/modern/dashboard/index.html @@ -1,13 +1,13 @@ {if $action == ''} - + - Login - SB Admin + JU & MI Administration @@ -41,12 +41,13 @@ {$index_error_text} {/if} +
-

JU & MI Login

+

Login

diff --git a/templates/modern/dashboard/nav.html b/templates/modern/dashboard/nav.html index 64fba37..2859a79 100644 --- a/templates/modern/dashboard/nav.html +++ b/templates/modern/dashboard/nav.html @@ -4,14 +4,18 @@
- +
@@ -188,7 +190,7 @@ - + @@ -315,8 +317,8 @@

- Zurück - + Zurück +

@@ -344,8 +346,8 @@ Sortierung - Antwort - Löschen + Antwort + Löschen @@ -353,7 +355,7 @@ {$smarty.section.table_data2.rownum} {$table_data2[table_data2].antwort} - + {/section} diff --git a/templates_c/15b779282fc1667ebc65227c3ff810b1d3ec06fd_0.file.navtop.html.php b/templates_c/15b779282fc1667ebc65227c3ff810b1d3ec06fd_0.file.navtop.html.php new file mode 100644 index 0000000..0920361 --- /dev/null +++ b/templates_c/15b779282fc1667ebc65227c3ff810b1d3ec06fd_0.file.navtop.html.php @@ -0,0 +1,54 @@ +_decodeProperties($_smarty_tpl, array ( + 'version' => '3.1.39', + 'unifunc' => 'content_641bed923ff229_64042105', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '15b779282fc1667ebc65227c3ff810b1d3ec06fd' => + array ( + 0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\navtop.html', + 1 => 1679507927, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_641bed923ff229_64042105 (Smarty_Internal_Template $_smarty_tpl) { +?> +_decodeProperties($_smarty_tpl, array ( + 'version' => '3.1.39', + 'unifunc' => 'content_641c46ece59a94_89854142', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '1d7d9664b76f0bd4587451aa9401c286ca72b20b' => + array ( + 0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\startseite.html', + 1 => 1679574760, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_641c46ece59a94_89854142 (Smarty_Internal_Template $_smarty_tpl) { +?> + + + JU & MI Startseite + + + + + + + + + + + src="all.js" crossorigin="anonymous"> +> + + src="../jquery/jquery-3.4.1.min.js"> +> + + + + + +> + $(function(){ + // im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht + $("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');}); + $("#navleft").load("nav.php"); + $("#footer").load("footer.php"); + }); + +> + +
+ + +
+
+
+
+
+
+ + Herzlich willkommen tpl_vars['startseite_name']->value;?> + +
+
+

Herzlich willkommen zur Administration von Jugendchor & Miteinander.

+ Bitte Treffen Sie im Menü eine Auswahl! +

+
+
+
+
+ + +
+
+ + src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"> +> + +_decodeProperties($_smarty_tpl, array ( 'version' => '3.1.39', - 'unifunc' => 'content_64199ca19a0628_70063958', + 'unifunc' => 'content_641c3a64aed3c1_00839520', 'has_nocache_code' => false, 'file_dependency' => array ( '2b06f8f36ebdb45c10ebd7bf157223e300660449' => array ( 0 => 'F:\\git\\survey\\templates\\modern\\survey\\index.html', - 1 => 1679400092, + 1 => 1679507927, 2 => 'file', ), ), @@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array ( array ( ), ),false)) { -function content_64199ca19a0628_70063958 (Smarty_Internal_Template $_smarty_tpl) { +function content_641c3a64aed3c1_00839520 (Smarty_Internal_Template $_smarty_tpl) { if ($_smarty_tpl->tpl_vars['action']->value == '') {?> @@ -44,7 +44,7 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?> } - src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.9.1/lottie.min.js"> + src="../js/lottie_bodymovin/lottie.min.js"> > + +> + $( function() { + $( ".spinner" ).spinner({ + change: function (event, ui) { + + }, + spin: function (event, ui) { + + }, + start: function (event, ui) { + + }, + stop: function (event, ui) { + + }, + step: 1, + numberFormat: "i", + min:0, + decimals:0 + }); + Globalize.culture( "de-DE" ); + } ); + + function trackKeys(evnt,regEx) { + var keyCode = evnt.keyCode ? evnt.keyCode : evnt.which; + return !!String.fromCharCode(keyCode).match(regEx); + } + //--> + +> + + type="text/javascript"> + $(function() { + $(".datepicker").datepicker({ + prevText: '< zurück', prevStatus: '', + prevJumpText: '<<', prevJumpStatus: '', + changeMonth: true, + changeYear: true, + nextText: 'Vor >', nextStatus: '', + nextJumpText: '>>', nextJumpStatus: '', + currentText: 'Heute', currentStatus: '', + todayText: 'Heute', todayStatus: '', + clearText: '-', clearStatus: '', + closeText: 'schließen', closeStatus: '', + monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'], + monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'], + dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], + dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], + weekHeader: 'Wo', + weekStatus: 'Woche des Monats', + showMonthAfterYear: false, + showOn: 'focus', + firstDay: 1, + numberOfMonths : 1, + yearRange: "c-5:+5", + showButtonPanel : true, + altField : "#datepicker_input", + dateFormat : "dd.mm.yy", + showWeek: true + }); + $.datepicker._gotoToday = function(id) { + $(id).datepicker('setDate', new Date()).datepicker('hide').blur(); + } + + }); + +> + + type="text/javascript"> + $(document).ready(function(){ + $('input.timepicker').timepicker({ + timeFormat: 'HH:mm', + interval: 30, + minTime: '00:00', + maxTime: '23:00', + startTime: '0', + dynamic: false, + dropdown: true, + scrollbar: true + }); + }); + +> + + + + + +> + $(function(){ + // im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht + $("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');}); + $("#navleft").load("nav.php"); + $("#footer").load("footer.php"); + }); + +> + +
+ + +
+
+
+ tpl_vars['umfrageerf_error']->value == '1') {?> + + +
+
+
+ + Zeitraum der Umfrage und Bezeichnung +
+
+
Link verfügbar ab Datum:
+
+
+
+
Link verfügbar ab Uhrzeit:
+
+
+
+
Link verfügbar bis Datum:
+
+
+
+
Link verfügbar bis Uhrzeit:
+
+
+
+
Headline der Umfrage:
+
+
+
+
Bemerkungsfeld am Ende der Umfrage:
+
+
+ tpl_vars['umfrageerf_value_freitext']->value == 1) {?> checked > +
+
+
+
+
+
+ +
+
+
+ + +
+
+ + +tpl_vars['action']->value == 'fragen') {?> + + + + + + + + + + + src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"> +> + + + + + src="all.js" crossorigin="anonymous"> +> + + + src="../jquery/jquery-3.4.1.min.js"> +> + + + src="../jquery/jquery-ui.js"> +> + + + type="text/javascript"> + + + + function keysave(ele) { + if(event.key === 'Enter') { + erfassensave(); + } + } + + $(document).ready(function() { + + //Helper function to keep table row from collapsing when being sorted + var fixHelperModified = function(e, tr) { + var $originals = tr.children(); + var $helper = tr.clone(); + $helper.children().each(function(index) + { + $(this).width($originals.eq(index).width()) + }); + return $helper; + }; + + //Make diagnosis table sortable + $("#sortable tbody").sortable({ + helper: fixHelperModified, + stop: function(event,ui) { + renumber_table('#sortable') + var order = $('#sortable tbody').sortable('toArray', { attribute: 'data-sort-id'}); + console.log(order.join(',')); + sortOrder = order.join(','); + $.post( + '../controller/reihenfolge.ajax.php', + {'action':'updateSortedRows','sortOrder':sortOrder}, + function(data){ + var a = data.split('|***|'); + if(a[1]=="update"){ + $('#msg').show().delay(1000).fadeOut(500); + $('#msg').html(a[0]); + } + } + ); + + } + }).disableSelection(); + + + }); + + //Renumber table rows + function renumber_table(tableID) { + $(tableID + " tr").each(function() { + count = $(this).parent().children().index($(this)) + 1; + $(this).find('.priority').html(count); + }); + } + + + +> + + + + + + + +> + $(function(){ + // im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht + $("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');}); + $("#navleft").load("nav.php"); + $("#footer").load("footer.php"); + }); + +> + +
+ + +
+
+ + + src="../js/components/admin_erfassen.js"> +> +
+
+
+ + Frage & Antworten erfassen +
+
+
Frage:
+
+
+
+
Antwort:
+
+
+
+
Mehrfachantworten erlauben:
+
tpl_vars['umfrageerf_value_multiple']->value == 1) {?> checked >
+
+
+

+

+ Zurück + +
+

+
+
+ + Vorschau der Fragen +
+
+
+
+
+ +
+
+
+
tpl_vars['umfrageerf_value_frage']->value;?> +
+
+ tpl_vars['table_data2_anz']->value > 0) {?> + + + + + + + + + + tpl_vars['table_data2']->value) ? count($_loop) : max(0, (int) $_loop)); +$__section_table_data2_1_total = $__section_table_data2_1_loop; +$_smarty_tpl->tpl_vars['__smarty_section_table_data2'] = new Smarty_Variable(array()); +if ($__section_table_data2_1_total !== 0) { +for ($__section_table_data2_1_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['index'] = 0; $__section_table_data2_1_iteration <= $__section_table_data2_1_total; $__section_table_data2_1_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['index']++){ +$_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['rownum'] = $__section_table_data2_1_iteration; +?> + + + + + + +
SortierungAntwortLöschen
tpl_vars['__smarty_section_table_data2']->value['rownum']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['rownum'] : null);?> +tpl_vars['table_data2']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data2']->value['index'] : null)]['antwort'];?> +
+
+ +

+
+
+
+
+
+
+
+ + +
+
+ + src="../bootstrap/node_modules/move-js/move.js"> +> + + + src="../bootstrap/dist/scrollable-tabs.min.js"> +> + + +_decodeProperties($_smarty_tpl, array ( + 'version' => '3.1.39', + 'unifunc' => 'content_641c4cb1cb5c45_23187818', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'bf479f21e7ad507ad2c2c30536bdf206de07b30e' => + array ( + 0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\index.html', + 1 => 1679569752, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_641c4cb1cb5c45_23187818 (Smarty_Internal_Template $_smarty_tpl) { +if ($_smarty_tpl->tpl_vars['action']->value == '') {?> + + + + + + + + + JU & MI Administration + + + src="all.js" crossorigin="anonymous"> +> + + src="../jquery/jquery-3.4.1.min.js"> +> + + src="../js/lottie_bodymovin/lottie.min.js"> +> + + + + + + +> + $(function(){ + $("#footer").load("footer.php"); + }); + +> + +
+
+
+ tpl_vars['index_error']->value == '1') {?> + + +
+
+
+
+
+
+

Login

+
+
+
+
+ + +
+
+ + +
+ +
+ +   + +
+
+
+ +
+
+
+
+
+ + type="text/javascript"> + var item = bodymovin.loadAnimation({ + wrapper: document.getElementById('lottie-container'), + animType: 'svg', + loop: true, + autoplay: true, + path: '../media/data.json' + }); + +> +
+
+ +
+ + src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"> +> + + src="js/scripts.js"> +> + + +tpl_vars['action']->value == 'anmeld') {?> + tpl_vars['index_login']->value == '1') {?> + + _decodeProperties($_smarty_tpl, array ( + 'version' => '3.1.39', + 'unifunc' => 'content_641bed8605dd17_00986714', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'ee47be34cb7d96d9533569c35d6c10d15670e655' => + array ( + 0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\footer.html', + 1 => 1679507927, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_641bed8605dd17_00986714 (Smarty_Internal_Template $_smarty_tpl) { +?>
+
+
+
Copyright © JU & MI 2023
+
+
+
+ +_decodeProperties($_smarty_tpl, array ( + 'version' => '3.1.39', + 'unifunc' => 'content_641c5051469090_99101993', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + 'f48616efe837d676bc69b2f5a2015207b5d9beac' => + array ( + 0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\parameter.html', + 1 => 1679577006, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_641c5051469090_99101993 (Smarty_Internal_Template $_smarty_tpl) { +if ($_smarty_tpl->tpl_vars['action']->value == '') {?> + + + + JU & MI Systemparameter + + + + src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"> +> + + + + + src="all.js" crossorigin="anonymous"> +> + + src="../jquery/jquery-3.4.1.min.js"> +> + + + + + + + +> + $(function(){ + // im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht + $("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');}); + $("#navleft").load("nav.php"); + $("#footer").load("footer.php"); + }); + +> + +
+ + +
+
+ + + src="../js/components/admin_parameter.js"> +> +
+
+
+ + Systemparameter +
+
+ tpl_vars['table_data1']->value) ? count($_loop) : max(0, (int) $_loop)); +$__section_table_data1_0_total = $__section_table_data1_0_loop; +$_smarty_tpl->tpl_vars['__smarty_section_table_data1'] = new Smarty_Variable(array()); +if ($__section_table_data1_0_total !== 0) { +for ($__section_table_data1_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] = 0; $__section_table_data1_0_iteration <= $__section_table_data1_0_total; $__section_table_data1_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']++){ +?> +
+
tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['beschreibung'];?> +
+
+
+ +
+
+
+
+ +
+ + +
+
+ + +