Login auf jquery geändert

This commit is contained in:
aschwarz 2023-03-24 16:56:24 +01:00
parent 9083662df8
commit df4a7e1a04
16 changed files with 654 additions and 136 deletions

View File

@ -42,7 +42,7 @@ $uid = $_SESSION["global_uid"];
$login_dateiname = basename($_SERVER['PHP_SELF']);
if($uid == "" AND $login_dateiname !='index.php'){
echo"<script type='text/javascript'>window.top.location.href = \"index.php?error=4\";</script>";
echo"<script type='text/javascript'>window.top.location.href = \"index.php\";</script>";
exit;
}

View File

@ -101,24 +101,36 @@ if ($function == 'usersave') {
<tr>
<td valign='top'>
<font face='Arial' size='2'>
Benutzerkennung:
<b>Benutzerkennung:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
<b>$mail</b>
$mail
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
Passwort:
<b>Passwort:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
<b>$password</b>
$password
</font>
</td>
</tr>
<tr>
<td valign='top'>
<font face='Arial' size='2'>
<b>Login:</b>
</font>
</td>
<td valign='top'>
<font face='Arial' size='2'>
<a href='http://admin.ju-and-mi.de'>http://admin.ju-and-mi.de</a>
</font>
</td>
</tr>
@ -146,7 +158,7 @@ if ($function == 'usersave') {
$return = @mail($empfaenger, $betreff, $text, $headers);
if ($return) { // Abfrage ob Mailversand funktioniert hat
if (!$return) { // Abfrage ob Mailversand funktioniert hat
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> BenutzerIn wurde angelegt. Es konnte allerdings <b>keine Mail</b> verschickt werden!</div>|***|success';
exit;
} else {

View File

@ -0,0 +1,47 @@
<?php
require_once("../config/datenbankanbindung.php");
$function = $_POST['function'];
if(!isset($_SESSION)) { session_start(); }
if ($function == 'login') {
$mail=strtoupper($_POST["mail"]); //remove case sensitivity on the mail
$password=$_POST["password"];
if($_POST["mail"] != ""){
$_SESSION["global_mail"]=$mail;
}
if($mail == "" OR $password == ""){
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Bitte f&uuml;llen Sie alle Felder aus!</div>|***|error';
exit;
}else{
$db = dbconnect();
$result = $db->query("SELECT uid, mail, passwort FROM jumi_admin WHERE UPPER(mail)='$mail'");
$row = $result->fetch_array();
if (md5($password) != $row['passwort'] or $row['mail'] == ''){ //verschlüsseltes Passwort überprüfen
# Cookies werden bereits gesetzt, falls sich jemand ein passwort zusenden lässt.
# $_SESSION["global_uid"] = $row['uid'];
# $_SESSION["global_mail"] = $row['mail'];
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Bitte prüfen Sie Ihre Zugangsdaten</div>|***|error';
exit;
}else{
$db = dbconnect();
$datum=date("Y-m-d H:i:s");
$ip=getenv("REMOTE_ADDR");
$agent=getenv("HTTP_USER_AGENT");
$user_admin = $row['uid'];
$_SESSION["global_uid"] = $user_admin;
$_SESSION["global_mail"] = $row['mail'];
$result_1 = $db->query("INSERT INTO jumi_adminlog (Datum, IP, user_agent, uid) VALUES ('$datum', '$ip', '$agent', '$user_admin')");
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Login wird durchgef&uuml;hrt</div>|***|success';
}
}
}
?>

View File

@ -57,6 +57,7 @@ if($action == ''){
$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");
@ -65,7 +66,7 @@ if($action == ''){
$value[] = $row;
}
$smarty->assign('table_data', $value);
*/
}

View File

@ -12,79 +12,10 @@ require_once "../language/german.inc.php";
$action = $_GET['action'];
if($action == ''){
if(isset($_GET['error'])){
$errorno = $_GET['error'];
$smarty->assign('index_error', 1);
if($errorno == 1){
$smarty->assign('index_error_text', "Es m&uuml;ssen alle Felder ausgef&uuml;llt werden");
}
if($errorno == 2){
$smarty->assign('index_error_text', "Der Benutzername ist im System nicht vorhanden");
}
if($errorno == 3){
$smarty->assign('index_error_text', "Der Benutzername oder das Passwort ist nicht korrekt.");
}
if($errorno == 4){
$smarty->assign('index_error_text', "Sie müssen sich einloggen!");
}
# Daten aufbereiten bei Fehler
if(isset($_SESSION["global_username"])){
$smarty->assign('index_user', $_SESSION["global_username"]);
}
}
}
if($action == 'anmeld'){
$mail=strtoupper($_POST["mail"]); //remove case sensitivity on the mail
$password=$_POST["password"];
if($_POST["mail"] != ""){
$_SESSION["global_mail"]=$mail;
}
if($mail == "" OR $password == ""){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=1\">";
}else{
$db = dbconnect();
$result = $db->query("SELECT uid, mail, passwort FROM jumi_admin WHERE UPPER(mail)='$mail'");
$row = $result->fetch_array();
if ($mail != strtoupper($row['mail'])) {
}
// Passwort falsch
elseif (md5($password) != $row['passwort']){ //verschlüsseltes Passwort überprüfen
# Cookies werden bereits gesetzt, falls sich jemand ein passwort zusenden lässt.
$_SESSION["global_uid"] = $row['uid'];
$_SESSION["global_mail"] = $row['mail'];
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF']."?error=3\">";
}else{
$db = dbconnect();
$datum=date("Y-m-d H:i:s");
$ip=getenv("REMOTE_ADDR");
$agent=getenv("HTTP_USER_AGENT");
$user_admin = $row['uid'];
$_SESSION["global_uid"] = $user_admin;
$_SESSION["global_mail"] = $row['mail'];
$result_1 = $db->query("INSERT INTO jumi_adminlog (Datum, IP, user_agent, uid) VALUES ('$datum', '$ip', '$agent', '$user_admin')");
$smarty->assign('index_login', "1");
}
}
}
$smarty->assign('action', "$action");
$smarty->display("modern/dashboard/$templatename");

View File

@ -0,0 +1,35 @@
function login(){
var mail = document.getElementById("mail").value;
var password = document.getElementById("password").value;
$.ajax({
type: 'POST',
url: '../controller/admin_login.php',
data: {
'function': 'login',
'mail': mail,
'password': password
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
document.getElementById("mail").value ="";
document.getElementById("password").value ="";
$('#msg').show().delay(1000).fadeOut(500);
$('#msg').html(a[0]);
$(document).ajaxStop(function(){
setTimeout(() => { window.location = "startseite.php"; }, 1000);
});
}else{
$('#msg').show().delay(10000).fadeOut(500);
$('#msg').html(a[0]);
}
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}

View File

@ -1,6 +1,6 @@
{if $action == ''}
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@ -28,6 +28,10 @@
<div id="navtop"></div>
{literal}
<script>
$(function() {
$("#mail").focus();
});
$(function(){
$("#footer").load("footer.php");
});
@ -36,11 +40,8 @@
<div id="layoutAuthentication">
<div id="layoutAuthentication_content">
<main>
{if $index_error == '1'}
<div class="alert alert-warning" role="alert">
{$index_error_text}
</div>
{/if}
<!--Anwendung-->
<script src="../js/components/admin_login.js"></script>
<div class="lottie-container" id="lottie-container"></div>
<div class="container">
<div class="row justify-content-center">
@ -50,13 +51,12 @@
<h3 class="text-center font-weight-light my-4">Login</h3>
</div>
<div class="card-body">
<form action=?action=anmeld method="POST" name="login">
<div class="form-floating mb-3">
<input class="form-control" id="inputEmail" name="mail" type="email" placeholder="Mailadresse" />
<input class="form-control" name="mail" id="mail" type="email" onkeydown="keysave(this)" placeholder="Mailadresse" />
<label for="inputEmail">Mailadresse</label>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputPassword" name="password" type="password" placeholder="Passwort" />
<input class="form-control" name="password" id="password" type="password" onkeydown="keysave(this)" placeholder="Passwort" />
<label for="inputPassword">Passwort</label>
</div>
<!--<div class="form-check mb-3">
@ -67,14 +67,14 @@
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<!--<a class="small" href="password.html">Forgot Password?</a>-->
&nbsp;
<input type='submit' class="btn btn-primary" name='senden' value="Login">
<input type='submit' class="btn btn-primary" onclick="login();" name='senden' value="Login">
</div>
</form>
</div>
<div class="card-footer text-center py-3">
<!--<div class="small"><a href="register.html">Need an account? Sign up!</a></div>-->
</div>
</div>
<div id="msg"></div>
</div>
</div>
</div>
@ -89,6 +89,15 @@
});
</script>
</main>
{literal}
<script type="text/javascript">
function keysave(ele) {
if(event.key === 'Enter') {
login();
}
}
</script>
{/literal}
</div>
<div id="layoutAuthentication_footer">
<!-- footer -->
@ -100,8 +109,3 @@
</body>
</html>
{/if}
{if $action == 'anmeld'}
{if $index_login == '1'}
<meta http-equiv="refresh" content="0; URL=startseite.php">
{/if}
{/if}

View File

@ -1,4 +1,21 @@
<!--Navigation top-->
<style>
<!-- abweichend von original styles.css -->
.sb-sidenav-dark .sb-sidenav-menu .nav-link {
color: rgba(255, 255, 255, 0.8);
}
.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon {
color: rgba(255, 255, 255, 0.8);
}
.sb-sidenav-dark {
background-color: #212529;
color: rgba(255, 255, 255, 0.8);
}
.navbar-dark {
--bs-navbar-color: rgba(255, 255, 255, 0.8)
}
</style>
<nav class="bg-juandmi sb-topnav navbar navbar-expand navbar-dark">
<!-- Navbar Brand-->
<a class="navbar-brand ps-3" href="startseite.php">Administration JU & MI</a>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<title>JU & MI Startseite</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-23 07:11:30
/* Smarty version 3.1.39, created on 2023-03-24 16:02:24
from 'F:\git\survey\templates\modern\dashboard\navtop.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641bed923ff229_64042105',
'unifunc' => 'content_641dbb803af655_42564944',
'has_nocache_code' => false,
'file_dependency' =>
array (
'15b779282fc1667ebc65227c3ff810b1d3ec06fd' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\navtop.html',
1 => 1679507927,
1 => 1679670142,
2 => 'file',
),
),
@ -20,11 +20,28 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641bed923ff229_64042105 (Smarty_Internal_Template $_smarty_tpl) {
function content_641dbb803af655_42564944 (Smarty_Internal_Template $_smarty_tpl) {
?><!--Navigation top-->
<style>
<!-- abweichend von original styles.css -->
.sb-sidenav-dark .sb-sidenav-menu .nav-link {
color: rgba(255, 255, 255, 0.8);
}
.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon {
color: rgba(255, 255, 255, 0.8);
}
.sb-sidenav-dark {
background-color: #212529;
color: rgba(255, 255, 255, 0.8);
}
.navbar-dark {
--bs-navbar-color: rgba(255, 255, 255, 0.8)
}
</style>
<nav class="bg-juandmi sb-topnav navbar navbar-expand navbar-dark">
<!-- Navbar Brand-->
<a class="navbar-brand ps-3" href="index.html">Administration JU & MI</a>
<a class="navbar-brand ps-3" href="startseite.php">Administration JU & MI</a>
<!-- Sidebar Toggle: js/scripts.js in der callbackfunktion vom Load aufrufen beim einbetten-->
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
<!-- Navbar Search-->
@ -46,6 +63,7 @@ function content_641bed923ff229_64042105 (Smarty_Internal_Template $_smarty_tpl)
<li><a class="dropdown-item" href="#!">Activity Log</a></li>
<li><hr class="dropdown-divider" /></li>
-->
<li><a class="dropdown-item" href="changepwd.php">Passwortwechsel</a></li>
<li><a class="dropdown-item" href="logout.php">Logout</a></li>
</ul>
</li>

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-23 13:32:44
/* Smarty version 3.1.39, created on 2023-03-24 16:42:10
from 'F:\git\survey\templates\modern\dashboard\startseite.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641c46ece59a94_89854142',
'unifunc' => 'content_641dc4d2a97536_46755722',
'has_nocache_code' => false,
'file_dependency' =>
array (
'1d7d9664b76f0bd4587451aa9401c286ca72b20b' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\startseite.html',
1 => 1679574760,
1 => 1679672515,
2 => 'file',
),
),
@ -20,10 +20,10 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641c46ece59a94_89854142 (Smarty_Internal_Template $_smarty_tpl) {
function content_641dc4d2a97536_46755722 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="en">
<head>
<head>
<title>JU & MI Startseite</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

View File

@ -0,0 +1,257 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-24 15:41:37
from 'F:\git\survey\templates\modern\dashboard\create_user.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641db6a15864d8_22074622',
'has_nocache_code' => false,
'file_dependency' =>
array (
'248e68c5bd756c9289901a93382d57da65ac1c94' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\create_user.html',
1 => 1679668664,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_641db6a15864d8_22074622 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="de">
<head>
<title>JU & MI Benutzer erstellen</title>
<link rel="stylesheet" href="../jquery/jquery-ui.css">
<link rel="stylesheet" href="../jquery/jquery.timepicker.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<?php echo '<script'; ?>
src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"><?php echo '</script'; ?>
>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<?php echo '<script'; ?>
src="all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
.multiselect-container {
position: absolute;
list-style-type: none;
margin: 5px 0 0 0;
width: 100%;
padding: 10px 0;
border: none;
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14); }
.multiselect-container .input-group {
margin: 5px; }
.multiselect-container > li {
padding: 0;
font-size: 14px; }
.multiselect-container > li > a.multiselect-all label {
font-weight: 700;
color: gray; }
.multiselect-container > li.multiselect-group label {
margin: 0;
padding: 3px 20px 3px 20px;
height: 100%;
font-weight: 700; }
.multiselect-container > li.multiselect-group-clickable label {
cursor: pointer; }
.multiselect-container > li > a {
padding: 5px 0;
color: #000;
display: block; }
.multiselect-container > li > a > label {
display: block;
position: relative;
padding-left: 20px;
margin-bottom: 12px;
cursor: pointer;
font-size: 16px;
font-weight: 500;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.multiselect-container > li > a > label:before {
content: "";
display: inline-block;
position: relative;
height: 20px;
width: 20px;
border: 2px solid rgba(0, 0, 0, 0.2);
border-radius: 4px;
background-color: transparent;
margin-right: 15px;
vertical-align: middle; }
.multiselect-container > li.active > a > label:before {
font-family: 'fontAwesome';
content: "\f00c";
color: #fff;
background-color: #52de97;
border: 0;
display: inline-block;
padding: 0;
line-height: 1.2;
padding-left: 2px; }
.multiselect-container > li > a > label.radio, .multiselect-container > li > a > label.checkbox {
margin: 0; }
.multiselect-container > li > a > label > input[type=checkbox] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0; }
.btn-group > .btn-group:nth-child(2) > .multiselect.btn {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px; }
.form-inline .multiselect-container label.checkbox, .form-inline .multiselect-container label.radio {
padding: 3px 20px 3px 40px; }
.form-inline .multiselect-container li a label.checkbox input[type=checkbox],
.form-inline .multiselect-container li a label.radio input[type=radio] {
margin-left: -20px;
margin-right: 0; }
.btn-group {
height: 52px;
width: calc(100% - 150px); }
.btn-group button {
border-radius: 4px;
background: #fff;
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
padding: 0 10px;
text-align: left;
position: relative; }
.btn-group button:after {
position: absolute;
top: 50%;
right: 20px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
color: #999999; }
.btn-group button:focus {
-webkit-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
-moz-box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
box-shadow: 0px 10px 23px -16px rgba(0, 0, 0, 0.14);
padding: 0 10px; }
.sl {
color: gray;
width: 150px; }
</style>
</head>
<body class="sb-nav-fixed">
<div id="navtop"></div>
<?php echo '<script'; ?>
>
$(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");
});
<?php echo '</script'; ?>
>
<div id="layoutSidenav">
<!-- Navigation left -->
<div id="navleft"></div>
<div id="layoutSidenav_content">
<main>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_create_user.js"><?php echo '</script'; ?>
>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-edit me-1"></i>
Benutzer erstellen
</div>
<div class="card-body">
<div class="row">
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Vorname:</div>
<div class="col-12 col-md-8"><input type="text" class="form-control" name="vorname" id="vorname" value="<?php echo $_smarty_tpl->tpl_vars['user_anlegen_vorname']->value;?>
"></div>
</div>
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Nachname:</div>
<div class="col-12 col-md-8"><input type="text" class="form-control" name="nachname" id="nachname" value="<?php echo $_smarty_tpl->tpl_vars['user_anlegen_nachname']->value;?>
"></div>
</div>
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Mailadresse:</div>
<div class="col-12 col-md-8"><input type="email" class="form-control" name="mail" id="mail" value="<?php echo $_smarty_tpl->tpl_vars['user_anlegen_mail']->value;?>
" onkeyup="checkUser()"></div>
</div>
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Rolle:</div>
<div class="col-12 col-md-8">
<select name="rollen[]"class="form-control" id="rollen" multiple="multiple">
<?php
$__section_table_data_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data_0_total = $__section_table_data_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data'] = new Smarty_Variable(array());
if ($__section_table_data_0_total !== 0) {
for ($__section_table_data_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] = 0; $__section_table_data_0_iteration <= $__section_table_data_0_total; $__section_table_data_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']++){
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['rid'];?>
"><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['bezeichnung'];?>
</option>
<?php
}
}
?>
</select>
</div>
</div>
<p align='center'>
<button class="col-6 btn btn-primary btn-sm mt-3" id="save" onclick="usersave();">Speichern</button>
</p>
</div>
</div>
</div>
<div id="msg"></div>
<div id="msg1"></div>
</main>
<!-- footer -->
<div id="footer"></div>
</div>
</div>
</body>
</html>
<?php }
}
}

View File

@ -0,0 +1,176 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-24 15:44:38
from 'F:\git\survey\templates\modern\dashboard\changepwd.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641db756b7b491_09794140',
'has_nocache_code' => false,
'file_dependency' =>
array (
'753dd0aa5f0b34da5600ce1f5a84936653b20b0c' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\changepwd.html',
1 => 1679668664,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_641db756b7b491_09794140 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="de">
<head>
<title>JU & MI Benutzer erstellen</title>
<link rel="stylesheet" href="../jquery/jquery-ui.css">
<link rel="stylesheet" href="../jquery/jquery.timepicker.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<?php echo '<script'; ?>
src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"><?php echo '</script'; ?>
>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<?php echo '<script'; ?>
src="all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
::-ms-reveal {
display: none;
}
button#toggle-password {
position: absolute;
top: 3px;
right: 4px;
z-index: 9;
width: 28px;
height: 30px;
background: 0;
border: 0;
}
button#toggle-password:active,
button#toggle-password:focus,
button#toggle-password:hover {
cursor: pointer;
}
button#toggle-password:focus {
outline: none !important;
}
.input-password {
padding-right: calc(1.5em + 0.75rem);
background-repeat: no-repeat;
background-position: right calc(0.375em + 0.1875rem) center;
background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
.input-password[type=text]:valid {
background-image: url("data:image/svg+xml,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z'/%3E%3Cpath d='M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299l.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z'/%3E%3Cpath d='M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709z'/%3E%3Cpath fill-rule='evenodd' d='M13.646 14.354l-12-12 .708-.708 12 12-.708.708z'/%3E%3C/svg%3E") !important;
}
.input-password[type=password]:valid {
background-image: url("data:image/svg+xml,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.134 13.134 0 0 0 1.66 2.043C4.12 11.332 5.88 12.5 8 12.5c2.12 0 3.879-1.168 5.168-2.457A13.134 13.134 0 0 0 14.828 8a13.133 13.133 0 0 0-1.66-2.043C11.879 4.668 10.119 3.5 8 3.5c-2.12 0-3.879 1.168-5.168 2.457A13.133 13.133 0 0 0 1.172 8z'/%3E%3Cpath fill-rule='evenodd' d='M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z'/%3E%3C/svg%3E") !important;
}
</style>
</head>
<body class="sb-nav-fixed">
<div id="navtop"></div>
<?php echo '<script'; ?>
>
$(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");
});
<?php echo '</script'; ?>
>
<div id="layoutSidenav">
<!-- Navigation left -->
<div id="navleft"></div>
<div id="layoutSidenav_content">
<main>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_changepwd.js"><?php echo '</script'; ?>
>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-edit me-1"></i>
Passwortwechsel
</div>
<div class="card-body">
<div class="row">
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Altes Passwort:</div>
<div class="col-12 col-md-8">
<div class="input-group">
<input type="password" id="password" class="form-control rounded-right" required>
<button id="toggle-password" type="button" class="d-none"
aria-label="Show password as plain text. Warning: this will display your password on the screen.">
</button>
</div>
</div>
</div>
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Neues Passwort:</div>
<div class="col-12 col-md-8">
<div class="input-group">
<input type="password" id="password_new1" class="form-control rounded-right" required>
<button id="toggle-password" type="button" class="d-none"
aria-label="Show password as plain text. Warning: this will display your password on the screen.">
</button>
</div>
</div>
</div>
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4">Passwortwiederholung:</div>
<div class="col-12 col-md-8">
<div class="input-group">
<input type="password" id="password_new2" class="form-control rounded-right" required>
<button id="toggle-password" type="button" class="d-none"
aria-label="Show password as plain text. Warning: this will display your password on the screen.">
</button>
</div>
</div>
</div>
</div>
<p align='center'>
<button class="col-6 btn btn-primary btn-sm mt-3" id="save" onclick="changepwd();">Speichern</button>
</p>
</div>
</div>
</div>
<div id="msg"></div>
<?php echo '<script'; ?>
src="../js/show-password-toggle.js" async><?php echo '</script'; ?>
>
</main>
<!-- footer -->
<div id="footer"></div>
</div>
</div>
</body>
</html>
<?php }
}
}

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-23 13:57:28
/* Smarty version 3.1.39, created on 2023-03-24 15:41:33
from 'F:\git\survey\templates\modern\dashboard\nav.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641c4cb8808ec8_48165588',
'unifunc' => 'content_641db69deb5996_50775611',
'has_nocache_code' => false,
'file_dependency' =>
array (
'8054340f19cd19b00acdfcb9f2ad878a473b1db6' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\nav.html',
1 => 1679576221,
1 => 1679668664,
2 => 'file',
),
),
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641c4cb8808ec8_48165588 (Smarty_Internal_Template $_smarty_tpl) {
function content_641db69deb5996_50775611 (Smarty_Internal_Template $_smarty_tpl) {
?><div id="layoutSidenav_nav">
<nav class="bg-juandmi sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
<div class="sb-sidenav-menu">
@ -32,7 +32,7 @@ function content_641c4cb8808ec8_48165588 (Smarty_Internal_Template $_smarty_tpl)
</a>
<div class="sb-sidenav-menu-heading">Umfrage</div>
<a class="nav-link" href="survey_erfassen.php?new=1">
<div class="sb-nav-link-icon"><i class="fas fa fa-pie-chart"></i></div>
<div class="sb-nav-link-icon"><i class="fas fa-pie-chart"></i></div>
Erstellen
</a>
<a class="nav-link" href="survey_edit.php?new=1">
@ -88,6 +88,20 @@ function content_641c4cb8808ec8_48165588 (Smarty_Internal_Template $_smarty_tpl)
<div class="sb-nav-link-icon"><i class="fas fa-cog"></i></div>
Systemparameter
</a>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseLayouts" aria-expanded="false" aria-controls="collapseLayouts">
<div class="sb-nav-link-icon"><i class="fas fa-user"></i></div>
Benutzerverwaltung
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="create_user.php">Benutzer erstellen</a>
<!--<a class="nav-link" href="layout-sidenav-light.html">Light Sidenav</a>-->
</nav>
</div>
<!--
<a class="nav-link" href="tables.html">
<div class="sb-nav-link-icon"><i class="fas fa-table"></i></div>

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-23 13:57:21
/* Smarty version 3.1.39, created on 2023-03-24 16:50:02
from 'F:\git\survey\templates\modern\dashboard\index.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641c4cb1cb5c45_23187818',
'unifunc' => 'content_641dc6aa4376e5_36783062',
'has_nocache_code' => false,
'file_dependency' =>
array (
'bf479f21e7ad507ad2c2c30536bdf206de07b30e' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\index.html',
1 => 1679569752,
1 => 1679673000,
2 => 'file',
),
),
@ -20,10 +20,10 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641c4cb1cb5c45_23187818 (Smarty_Internal_Template $_smarty_tpl) {
function content_641dc6aa4376e5_36783062 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@ -58,6 +58,10 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<?php echo '<script'; ?>
>
$(function() {
$("#mail").focus();
});
$(function(){
$("#footer").load("footer.php");
});
@ -67,12 +71,10 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<div id="layoutAuthentication">
<div id="layoutAuthentication_content">
<main>
<?php if ($_smarty_tpl->tpl_vars['index_error']->value == '1') {?>
<div class="alert alert-warning" role="alert">
<?php echo $_smarty_tpl->tpl_vars['index_error_text']->value;?>
</div>
<?php }?>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_login.js"><?php echo '</script'; ?>
>
<div class="lottie-container" id="lottie-container"></div>
<div class="container">
<div class="row justify-content-center">
@ -82,13 +84,12 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<h3 class="text-center font-weight-light my-4">Login</h3>
</div>
<div class="card-body">
<form action=?action=anmeld method="POST" name="login">
<div class="form-floating mb-3">
<input class="form-control" id="inputEmail" name="mail" type="email" placeholder="Mailadresse" />
<input class="form-control" name="mail" id="mail" type="email" onkeydown="keysave(this)" placeholder="Mailadresse" />
<label for="inputEmail">Mailadresse</label>
</div>
<div class="form-floating mb-3">
<input class="form-control" id="inputPassword" name="password" type="password" placeholder="Passwort" />
<input class="form-control" name="password" id="password" type="password" onkeydown="keysave(this)" placeholder="Passwort" />
<label for="inputPassword">Passwort</label>
</div>
<!--<div class="form-check mb-3">
@ -99,14 +100,14 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<!--<a class="small" href="password.html">Forgot Password?</a>-->
&nbsp;
<input type='submit' class="btn btn-primary" name='senden' value="Login">
<input type='submit' class="btn btn-primary" onclick="login();" name='senden' value="Login">
</div>
</form>
</div>
<div class="card-footer text-center py-3">
<!--<div class="small"><a href="register.html">Need an account? Sign up!</a></div>-->
</div>
</div>
<div id="msg"></div>
</div>
</div>
</div>
@ -123,6 +124,17 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<?php echo '</script'; ?>
>
</main>
<?php echo '<script'; ?>
type="text/javascript">
function keysave(ele) {
if(event.key === 'Enter') {
login();
}
}
<?php echo '</script'; ?>
>
</div>
<div id="layoutAuthentication_footer">
<!-- footer -->
@ -138,10 +150,5 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
</body>
</html>
<?php }
if ($_smarty_tpl->tpl_vars['action']->value == 'anmeld') {?>
<?php if ($_smarty_tpl->tpl_vars['index_login']->value == '1') {?>
<meta http-equiv="refresh" content="0; URL=startseite.php">
<?php }
}
}
}

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-23 14:12:49
/* Smarty version 3.1.39, created on 2023-03-23 15:11:40
from 'F:\git\survey\templates\modern\dashboard\parameter.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641c5051469090_99101993',
'unifunc' => 'content_641c5e1c133780_81148142',
'has_nocache_code' => false,
'file_dependency' =>
array (
'f48616efe837d676bc69b2f5a2015207b5d9beac' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\parameter.html',
1 => 1679577006,
1 => 1679577568,
2 => 'file',
),
),
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641c5051469090_99101993 (Smarty_Internal_Template $_smarty_tpl) {
function content_641c5e1c133780_81148142 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="en">
@ -83,8 +83,7 @@ for ($__section_table_data1_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_se
<div class="row mt-0 mt-sm-4 mb-0 mb-sm-4">
<div class="col-12 col-md-4"><?php echo $_smarty_tpl->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'];?>
</div>
<div class="col-12 col-md-8"><input type="text" class="form-control" name="<?php echo $_smarty_tpl->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)]['pid'];?>
" value="<?php echo $_smarty_tpl->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)]['wert'];?>
<div class="col-12 col-md-8"><input type="text" class="form-control" name="parameter[]" value="<?php echo $_smarty_tpl->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)]['wert'];?>
"></div>
</div>
<?php