diff --git a/controller/admin_changepwd.php b/controller/admin_changepwd.php new file mode 100644 index 0000000..1b54fa0 --- /dev/null +++ b/controller/admin_changepwd.php @@ -0,0 +1,40 @@ +query("SELECT count(*) Anz FROM jumi_admin WHERE uid=$uid AND passwort = '$password'"); + $row = $result->fetch_array(); + + #Fehlercheck + if ($row['Anz'] == "0") { + echo '
Das alte Passwort ist nicht korrekt!
|***|error'; + exit; + }elseif ($password_new1 != $password_new2) { + echo '
Das neue Passwort stimmt nicht mit der Wiederholung überein!
|***|error'; + exit; + }elseif (strlen($password_new1) < 8) { + echo '
Das neue Passwort muss mindestens 8 Zeichen haben!
|***|error'; + exit; + }else{ + $password_md5 = md5($password_new1); + $update = $db->query("UPDATE jumi_admin + SET passwort ='$password_md5' + WHERE uid=$uid + "); + if (!$update) { + echo '
Es liegt ein Fehler in der Datenbank vor!
|***|error'; + exit; + }else{ + echo '
Das Passwort wurde geändert!
|***|success'; + exit; + } + + } +} + +?> \ No newline at end of file diff --git a/controller/admin_create_user.php b/controller/admin_create_user.php new file mode 100644 index 0000000..6994ac4 --- /dev/null +++ b/controller/admin_create_user.php @@ -0,0 +1,161 @@ +query("SELECT count(*) Anz FROM jumi_admin WHERE mail = '$mail'"); + $row = $result->fetch_array(); + + if ($row['Anz'] == "0") { + echo '
User ist im System nicht vorhanden!
'; + } else { + echo '
User ist im System bereits vorhanden!
'; + } + #}else{ + # echo "" + } +} + +#echo "Funktion: $function"; +if ($function == 'usersave') { + require_once("func_genPwd.php"); + $vorname = trim($_POST['vorname']); + $nachname = trim($_POST['nachname']); + $mail = trim($_POST['mail']); + $rollen = $_POST['rollen']; + + $result = $db->query("SELECT count(*) Anz FROM jumi_admin WHERE mail = '$mail'"); + $row = $result->fetch_array(); + + #Fehlercheck + if ($row['Anz'] != "0") { + echo '
User ist im System bereits vorhanden!
|***|error'; + } + if ($rollen == '' or $vorname == '' or $nachname == '' or $mail == '') { + echo '
Es müssen alle Felder ausgefüllt werden!
|***|error'; + exit; + } + if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) { + echo '
Geben Sie eine gültige Mailadresse ein!
|***|error'; + exit; + } + + $error = 0; + $password = generateStrongPassword(); + $password_md5 = md5($password); + + $sql1 = $db->query("INSERT INTO jumi_admin ( vorname + , nachname + , mail + , passwort + ) + VALUES + ( '$vorname' + , '$nachname' + , '$mail' + , '$password_md5' + ) + "); + $uid = $db->insert_id; + if (!$sql1) { + echo '
Es gab ein Fehler in der Datenbank: Insert User
|***|error'; + exit; + $error++; + } + for ($i = 0; $i < sizeof($rollen); $i++) { + $sql2 = $db->query("INSERT INTO jumi_admin_rollen_user_zuord ( rid + , uid + ) + VALUES + ( '$rollen[$i]' + , '$uid' + ) + "); + } + if (!$sql2) { + echo '
Es gab ein Fehler in der Datenbank: Insert Rollenzuordnung
|***|error'; + exit; + $error++; + } + + if ($error == 0) { + $empfaenger = "$mail"; + $betreff = "Anmeldung JU & MI Portal"; + $text = " + + + Anmeldung JU & MI Portal + + + + Guten Tag $vorname $nachname!

+ Sie wurden im JU & MI Portal registriert!
+ Nachfolgend finden Sie Ihre Zugangsdaten: +
+
+ + + + + + + + + +
+ + Benutzerkennung: + + + + $mail + +
+ + Passwort: + + + + $password + +
+
+ Bitte beachten Sie, dass das Passwort zwischen Groß- und
+ Kleinschreibung unterscheidet. +

+ Ändern Sie bitte zu Ihrer eigenen Sicherheit das
+ Passwort nach dem ersten Login unter dem Benutzericon in der Kopfleiste. +

+ Vielen Dank + + "; + $result_absender = $db->query("SELECT wert FROM jumi_parameter WHERE pid = 1"); + $row_absender = $result_absender->fetch_array(); + if ($row_absender['wert'] == '') { + $absender = 'info@ju-and-mi.de'; + } else { + $absender = $row_absender['wert']; + } + $headers = "MIME-Version: 1.0\n"; + $headers .= "Content-type: text/html; charset=utf-8\n"; + $headers .= "From: Info JU & MI <$absender>\n"; + + $return = @mail($empfaenger, $betreff, $text, $headers); + + if ($return) { // Abfrage ob Mailversand funktioniert hat + echo '

BenutzerIn wurde angelegt. Es konnte allerdings keine Mail verschickt werden!
|***|success'; + exit; + } else { + echo '
BenutzerIn wurde angelegt. Eine Mail mit den Zugangsdaten wurde zugestellt.
|***|success'; + exit; + } + + } +} + + +?> \ No newline at end of file diff --git a/controller/func_genPwd.php b/controller/func_genPwd.php new file mode 100644 index 0000000..fac27b4 --- /dev/null +++ b/controller/func_genPwd.php @@ -0,0 +1,51 @@ + $dash_len) + { + $dash_str .= substr($password, 0, $dash_len) . '-'; + $password = substr($password, $dash_len); + } + $dash_str .= $password; + return $dash_str; +} diff --git a/dashboard/changepwd.php b/dashboard/changepwd.php new file mode 100644 index 0000000..6ba591d --- /dev/null +++ b/dashboard/changepwd.php @@ -0,0 +1,41 @@ +"; +*/ + + +include_once '../classes/TestProjektSmarty.class_subdir.php'; +require_once("../config.inc.php"); +$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html"; +$smarty = new SmartyAdmin(); +require_once "../language/german.inc.php"; + + +session_start(); + +#require_once "func_genUser.php"; + +// Rechteüberprüfung +#$db = dbconnect(); +#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite +#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;} +#// Rechteüberprüfung ende + +if(isset($_GET['action'])){ + $action = $_GET['action']; +}else{ + $action = ''; +} + +if($action == ''){ + +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/dashboard/$templatename"); +?> diff --git a/dashboard/create_user.php b/dashboard/create_user.php new file mode 100644 index 0000000..82b3b3f --- /dev/null +++ b/dashboard/create_user.php @@ -0,0 +1,75 @@ +"; +*/ + + +include_once '../classes/TestProjektSmarty.class_subdir.php'; +require_once("../config.inc.php"); +$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html"; +$smarty = new SmartyAdmin(); +require_once "../language/german.inc.php"; + + +session_start(); + +#require_once "func_genUser.php"; + +# Wenn Seite neu aufgerufen wird, dann alle Sessions, die mit "bearbeiten_" beginnen löschen +if(isset($_GET['new']) AND $_GET['new'] == 1){; + $search_prefix = 'anlegen_'; + $search_len = strlen($search_prefix); + foreach( $_SESSION as $key => $value){ + if ( substr( $key, 0, $search_len) == $search_prefix) { + unset( $_SESSION[$key]); + } + } +} + + +// Rechteüberprüfung +#$db = dbconnect(); +#if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite +#if(!rore($user_admin,'a_admanleg','RE')){require("lib/rechte.php");exit;} +#// Rechteüberprüfung ende + +if(isset($_GET['action'])){ + $action = $_GET['action']; +}else{ + $action = ''; +} + +if($action == ''){ +/* + # Daten aufbereiten für Zurückbutton + if(isset($_SESSION["anlegen_vorname"])){ + $smarty->assign('user_anlegen_vorname', $_SESSION["anlegen_vorname"]); + } + + if(isset($_SESSION["anlegen_nachname"])){ + $smarty->assign('user_anlegen_nachname', $_SESSION["anlegen_nachname"]); + } + + if(isset($_SESSION["anlegen_mail"])){ + $smarty->assign('user_anlegen_mail', $_SESSION["anlegen_mail"]); + } + # Daten aufbereiten für Zurückbutton ENDE + $query = "SELECT rid, bezeichnung FROM jumi_admin_rolle ORDER BY bezeichnung ASC"; + $result = $db->query( $query) + or die ("Cannot execute query1"); + + while ($row = $result->fetch_array()){ + $value[] = $row; + } + $smarty->assign('table_data', $value); +*/ +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/dashboard/$templatename"); +?> diff --git a/js/components/admin_changepwd.js b/js/components/admin_changepwd.js new file mode 100644 index 0000000..83a4755 --- /dev/null +++ b/js/components/admin_changepwd.js @@ -0,0 +1,32 @@ +function changepwd(){ + var password = document.getElementById("password").value; + var password_new1 = document.getElementById("password_new1").value; + var password_new2 = document.getElementById("password_new2").value; + + $.ajax({ + type: 'POST', + url: '../controller/admin_changepwd.php', + data: { + 'function': 'changepwd', + 'password': password, + 'password_new1': password_new1, + 'password_new2': password_new2 + }, + success: function(result) { //we got the response + if(result!=''){ + var a = result.split('|***|'); + if(a[1]=="success"){ + document.getElementById("password").value =""; + document.getElementById("password_new1").value =""; + document.getElementById("password_new2").value =""; + + } + $('#msg').show().delay(10000).fadeOut(500); + $('#msg').html(a[0]); + } + }, + error: function(xhr, status, exception) { + console.log(xhr); + } + }); +} \ No newline at end of file diff --git a/js/components/admin_create_user.js b/js/components/admin_create_user.js new file mode 100644 index 0000000..552e6da --- /dev/null +++ b/js/components/admin_create_user.js @@ -0,0 +1,62 @@ +function checkUser(){ + var mail = document.getElementById("mail").value; + $.ajax({ + type: 'POST', + url: '../controller/admin_create_user.php', + data: { + 'function': 'checkuser', + 'mail': mail + }, + success: function(result) { //we got the response + if(result!=''){ + $('#msg').show().delay(5000).fadeOut(500); + $('#msg').html(result); + } + }, + error: function(xhr, status, exception) { + console.log(xhr); + } + }); + +} + + +function usersave(){ + var vorname = document.getElementById("vorname").value; + var nachname = document.getElementById("nachname").value; + var mail = document.getElementById("mail").value; + //var my_data = $("form").serialize(); + + //komma getrennte Werte bei Mehrfachauswahl + var rollen = $("#rollen").val(); + $.ajax({ + type: 'POST', + url: '../controller/admin_create_user.php', + data: { + 'function': 'usersave', + 'vorname': vorname, + 'nachname': nachname, + 'mail': mail, + 'rollen': rollen + }, + success: function(result) { //we got the response + if(result!=''){ + var a = result.split('|***|'); + if(a[1]=="success"){ + document.getElementById("vorname").value =""; + document.getElementById("nachname").value =""; + document.getElementById("mail").value =""; + var elements = document.getElementById("rollen").options; + for(var i = 0; i < elements.length; i++){ + elements[i].selected = false; + } + } + $('#msg1').show().delay(10000).fadeOut(500); + $('#msg1').html(a[0]); + } + }, + error: function(xhr, status, exception) { + console.log(xhr); + } + }); +} \ No newline at end of file diff --git a/js/show-password-toggle.js b/js/show-password-toggle.js new file mode 100644 index 0000000..1ffc55b --- /dev/null +++ b/js/show-password-toggle.js @@ -0,0 +1,23 @@ +var ShowPasswordToggle = document.querySelector("[type='password']"); +ShowPasswordToggle.onclick = function () { + document.querySelector("[type='password']").classList.add("input-password"); + document.getElementById("toggle-password").classList.remove("d-none"); + + const passwordInput = document.querySelector("[type='password']"); + const togglePasswordButton = document.getElementById("toggle-password"); + + togglePasswordButton.addEventListener("click", togglePassword); + function togglePassword() { + if (passwordInput.type === "password") { + passwordInput.type = "text"; + togglePasswordButton.setAttribute("aria-label", "Hide password."); + } else { + passwordInput.type = "password"; + togglePasswordButton.setAttribute( + "aria-label", + "Show password as plain text. " + + "Warning: this will display your password on the screen." + ); + } + } +}; diff --git a/sql/2023-03-24_survey.sql b/sql/2023-03-24_survey.sql new file mode 100644 index 0000000..6efb92d --- /dev/null +++ b/sql/2023-03-24_survey.sql @@ -0,0 +1,422 @@ +-- phpMyAdmin SQL Dump +-- version 5.1.1 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 24. Mrz 2023 um 13:25 +-- Server-Version: 10.4.20-MariaDB +-- PHP-Version: 8.0.9 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `survey` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_admin` +-- + +CREATE TABLE `jumi_admin` ( + `uid` int(11) NOT NULL, + `vorname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `nachname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `passwort` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Benutzer'; + +-- +-- Daten für Tabelle `jumi_admin` +-- + +INSERT INTO `jumi_admin` (`uid`, `vorname`, `nachname`, `mail`, `passwort`) VALUES +(1, 'Alexander', 'Schwarz', 'ali@ju-and-mi.de', 'f5df16d9bd60b0894064b5777139de79'), +(2, 'Anica', 'Müller', 'anica@ju-and-mi.de', 'e92adb8d4d6f37703623244fd5bb2e85'), +(3, 'Jeannette', 'Schwarz', 'jeannette@ju-and-mi.de', '20167204606d3dbca85fb13be7e4d23f'), +(4, 'Björn', 'Idler', 'bjoern@ju-and-mi.de', '91ce5643a63a77894b9ab8b280bf9462'), +(5, 'Nadine', 'Schubert', 'nadine@ju-and-mi.de', 'a4f933c99bd0659a43136ed13d7dcbf4'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_adminlog` +-- + +CREATE TABLE `jumi_adminlog` ( + `lid` int(11) NOT NULL, + `Datum` datetime NOT NULL, + `IP` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_agent` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `uid` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Logins der Anwender'; + +-- +-- Daten für Tabelle `jumi_adminlog` +-- + +INSERT INTO `jumi_adminlog` (`lid`, `Datum`, `IP`, `user_agent`, `uid`) VALUES +(1, '2023-03-22 16:16:35', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 0), +(2, '2023-03-22 16:18:23', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1), +(3, '2023-03-22 16:23:28', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1), +(4, '2023-03-22 16:23:38', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1), +(5, '2023-03-22 16:41:27', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1), +(6, '2023-03-22 16:45:14', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0', 1), +(7, '2023-03-22 16:45:56', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0', 2), +(8, '2023-03-22 16:59:27', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0', 1), +(9, '2023-03-23 07:11:29', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0', 1), +(10, '2023-03-23 10:17:39', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36', 1), +(11, '2023-03-23 13:57:28', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0', 1), +(12, '2023-03-24 07:23:23', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0', 1), +(13, '2023-03-24 07:39:58', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36', 1), +(14, '2023-03-24 09:13:45', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1), +(15, '2023-03-24 11:15:38', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 1); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_admin_rolle` +-- + +CREATE TABLE `jumi_admin_rolle` ( + `rid` int(11) NOT NULL, + `bezeichnung` varchar(200) COLLATE utf8mb4_bin NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- +-- Daten für Tabelle `jumi_admin_rolle` +-- + +INSERT INTO `jumi_admin_rolle` (`rid`, `bezeichnung`) VALUES +(1, 'Administrator'), +(2, 'Standardanwender'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_admin_rollen_user_zuord` +-- + +CREATE TABLE `jumi_admin_rollen_user_zuord` ( + `rozuid` int(11) NOT NULL, + `rid` int(11) NOT NULL, + `uid` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- +-- Daten für Tabelle `jumi_admin_rollen_user_zuord` +-- + +INSERT INTO `jumi_admin_rollen_user_zuord` (`rozuid`, `rid`, `uid`) VALUES +(8, 2, 14), +(9, 2, 15); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_parameter` +-- + +CREATE TABLE `jumi_parameter` ( + `pid` int(11) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `wert` varchar(250) NOT NULL, + `sort` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_parameter` +-- + +INSERT INTO `jumi_parameter` (`pid`, `beschreibung`, `wert`, `sort`) VALUES +(1, 'Mailadressen Ansprechpartner', 'info@ju-and-mi.de', 1); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen` +-- + +CREATE TABLE `jumi_umfragen` ( + `umid` int(11) NOT NULL, + `datum_von` datetime NOT NULL, + `datum_bis` datetime NOT NULL, + `headline` varchar(255) NOT NULL, + `freitext` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0=Kein Frextextfeld;1=Freitextfeld', + `uid` int(11) NOT NULL, + `datum_erfasst` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_umfragen` +-- + +INSERT INTO `jumi_umfragen` (`umid`, `datum_von`, `datum_bis`, `headline`, `freitext`, `uid`, `datum_erfasst`) VALUES +(5, '2023-03-23 00:00:00', '2023-04-07 00:00:00', 'Fragen zum Konzert', '1', 1, '2023-03-23 13:25:29'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen_antworten` +-- + +CREATE TABLE `jumi_umfragen_antworten` ( + `uaid` int(11) NOT NULL, + `ufid` int(11) NOT NULL, + `antwort` varchar(250) NOT NULL, + `userorder` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_umfragen_antworten` +-- + +INSERT INTO `jumi_umfragen_antworten` (`uaid`, `ufid`, `antwort`, `userorder`) VALUES +(22, 7, 'jeder selbst', 0), +(23, 7, 'Gemeinsam mit der Bahn', 1), +(24, 7, 'Brauche Abholer', 2), +(25, 8, 'Sonntag', 0), +(26, 8, 'Freitag', 0), +(27, 8, 'Samstag', 0); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen_ende` +-- + +CREATE TABLE `jumi_umfragen_ende` ( + `uenid` int(11) NOT NULL, + `umid` int(11) NOT NULL, + `ip` varchar(20) NOT NULL, + `session` varchar(50) NOT NULL, + `ende` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_umfragen_ende` +-- + +INSERT INTO `jumi_umfragen_ende` (`uenid`, `umid`, `ip`, `session`, `ende`) VALUES +(3, 5, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', '1'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen_ergebnisse` +-- + +CREATE TABLE `jumi_umfragen_ergebnisse` ( + `ueid` int(11) NOT NULL, + `ip` varchar(20) NOT NULL, + `session` varchar(50) NOT NULL, + `ufid` int(11) NOT NULL, + `uaid` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_umfragen_ergebnisse` +-- + +INSERT INTO `jumi_umfragen_ergebnisse` (`ueid`, `ip`, `session`, `ufid`, `uaid`) VALUES +(4, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', 7, 22), +(5, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', 8, 25), +(6, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', 8, 26), +(7, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', 8, 27); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen_erg_freitext` +-- + +CREATE TABLE `jumi_umfragen_erg_freitext` ( + `uefid` int(11) NOT NULL, + `umid` int(11) NOT NULL, + `ip` varchar(20) CHARACTER SET utf8mb4 NOT NULL, + `session` varchar(50) CHARACTER SET utf8mb4 NOT NULL, + `freitext` text COLLATE utf8mb4_bin NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- +-- Daten für Tabelle `jumi_umfragen_erg_freitext` +-- + +INSERT INTO `jumi_umfragen_erg_freitext` (`uefid`, `umid`, `ip`, `session`, `freitext`) VALUES +(3, 5, '127.0.0.1', 'mhvvfj57p9kk4vsj7fh9hm8hej', 'Danke'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `jumi_umfragen_fragen` +-- + +CREATE TABLE `jumi_umfragen_fragen` ( + `ufid` int(11) NOT NULL, + `umid` int(11) NOT NULL, + `frage` varchar(255) NOT NULL, + `multiple` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0=Einfachantwort,1=Mehrfachantworten ' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `jumi_umfragen_fragen` +-- + +INSERT INTO `jumi_umfragen_fragen` (`ufid`, `umid`, `frage`, `multiple`) VALUES +(7, 5, 'Wie kommen wir nach Stuttgart-Ost', '0'), +(8, 5, 'Welcher Probentag passt bei euch?', '1'); + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `jumi_admin` +-- +ALTER TABLE `jumi_admin` + ADD PRIMARY KEY (`uid`); + +-- +-- Indizes für die Tabelle `jumi_adminlog` +-- +ALTER TABLE `jumi_adminlog` + ADD PRIMARY KEY (`lid`), + ADD KEY `gd_adminlog_ibfk_1` (`uid`); + +-- +-- Indizes für die Tabelle `jumi_admin_rolle` +-- +ALTER TABLE `jumi_admin_rolle` + ADD PRIMARY KEY (`rid`); + +-- +-- Indizes für die Tabelle `jumi_admin_rollen_user_zuord` +-- +ALTER TABLE `jumi_admin_rollen_user_zuord` + ADD PRIMARY KEY (`rozuid`); + +-- +-- Indizes für die Tabelle `jumi_parameter` +-- +ALTER TABLE `jumi_parameter` + ADD PRIMARY KEY (`pid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen` +-- +ALTER TABLE `jumi_umfragen` + ADD PRIMARY KEY (`umid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen_antworten` +-- +ALTER TABLE `jumi_umfragen_antworten` + ADD PRIMARY KEY (`uaid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen_ende` +-- +ALTER TABLE `jumi_umfragen_ende` + ADD PRIMARY KEY (`uenid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen_ergebnisse` +-- +ALTER TABLE `jumi_umfragen_ergebnisse` + ADD PRIMARY KEY (`ueid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen_erg_freitext` +-- +ALTER TABLE `jumi_umfragen_erg_freitext` + ADD PRIMARY KEY (`uefid`); + +-- +-- Indizes für die Tabelle `jumi_umfragen_fragen` +-- +ALTER TABLE `jumi_umfragen_fragen` + ADD PRIMARY KEY (`ufid`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `jumi_admin` +-- +ALTER TABLE `jumi_admin` + MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_adminlog` +-- +ALTER TABLE `jumi_adminlog` + MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_admin_rolle` +-- +ALTER TABLE `jumi_admin_rolle` + MODIFY `rid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_admin_rollen_user_zuord` +-- +ALTER TABLE `jumi_admin_rollen_user_zuord` + MODIFY `rozuid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_parameter` +-- +ALTER TABLE `jumi_parameter` + MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen` +-- +ALTER TABLE `jumi_umfragen` + MODIFY `umid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen_antworten` +-- +ALTER TABLE `jumi_umfragen_antworten` + MODIFY `uaid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen_ende` +-- +ALTER TABLE `jumi_umfragen_ende` + MODIFY `uenid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen_ergebnisse` +-- +ALTER TABLE `jumi_umfragen_ergebnisse` + MODIFY `ueid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen_erg_freitext` +-- +ALTER TABLE `jumi_umfragen_erg_freitext` + MODIFY `uefid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `jumi_umfragen_fragen` +-- +ALTER TABLE `jumi_umfragen_fragen` + MODIFY `ufid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/templates/modern/dashboard/changepwd.html b/templates/modern/dashboard/changepwd.html new file mode 100644 index 0000000..9f3ff48 --- /dev/null +++ b/templates/modern/dashboard/changepwd.html @@ -0,0 +1,139 @@ +{if $action == ''} + + + + JU & MI Benutzer erstellen + + + + + + + + + + + + + + + + {literal} + + {/literal} +
+ + +
+
+ + + +
+
+
+ + Passwortwechsel +
+
+
+
+
Altes Passwort:
+
+
+ + +
+
+
+ +
+
Neues Passwort:
+
+
+ + +
+
+
+
+
Passwortwiederholung:
+
+
+ + +
+ +
+
+
+

+ +

+
+
+
+
+ +
+ + +
+
+ + +{/if} diff --git a/templates/modern/dashboard/create_user.html b/templates/modern/dashboard/create_user.html new file mode 100644 index 0000000..e1f37cd --- /dev/null +++ b/templates/modern/dashboard/create_user.html @@ -0,0 +1,208 @@ +{if $action == ''} + + + + JU & MI Benutzer erstellen + + + + + + + + + + + + + + + + {literal} + + {/literal} +
+ + +
+
+ + + +
+
+
+ + Benutzer erstellen +
+
+
+
+
Vorname:
+
+
+
+
Nachname:
+
+
+
+
Mailadresse:
+
+
+
+
Rolle:
+
+ +
+
+

+ +

+
+
+
+
+
+
+ + +
+
+ + +{/if} diff --git a/templates/modern/dashboard/nav.html b/templates/modern/dashboard/nav.html index 2859a79..3ebbca1 100644 --- a/templates/modern/dashboard/nav.html +++ b/templates/modern/dashboard/nav.html @@ -9,7 +9,7 @@
Umfrage
- + Erstellen @@ -65,6 +65,20 @@ Systemparameter + +
+ +
+ + +