Responsive Dashboard hinzugefügt
This commit is contained in:
52
dashboard/401.html#
Normal file
52
dashboard/401.html#
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<title>404 Error - SB Admin</title>
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="layoutError">
|
||||
<div id="layoutError_content">
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="text-center mt-4">
|
||||
<h1 class="display-1">401</h1>
|
||||
<p class="lead">Unauthorized</p>
|
||||
<p>Access to this resource is denied.</p>
|
||||
<a href="index.html">
|
||||
<i class="fas fa-arrow-left me-1"></i>
|
||||
Return to Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div id="layoutError_footer">
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © Your Website 2023</div>
|
||||
<div>
|
||||
<a href="#">Privacy Policy</a>
|
||||
·
|
||||
<a href="#">Terms & Conditions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||
<script src="js/scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
51
dashboard/404.html#
Normal file
51
dashboard/404.html#
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<title>404 Error - SB Admin</title>
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="layoutError">
|
||||
<div id="layoutError_content">
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="text-center mt-4">
|
||||
<img class="mb-4 img-error" src="assets/img/error-404-monochrome.svg" />
|
||||
<p class="lead">This requested URL was not found on this server.</p>
|
||||
<a href="index.html">
|
||||
<i class="fas fa-arrow-left me-1"></i>
|
||||
Return to Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div id="layoutError_footer">
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © Your Website 2023</div>
|
||||
<div>
|
||||
<a href="#">Privacy Policy</a>
|
||||
·
|
||||
<a href="#">Terms & Conditions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||
<script src="js/scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
51
dashboard/500.html#
Normal file
51
dashboard/500.html#
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<title>404 Error - SB Admin</title>
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="layoutError">
|
||||
<div id="layoutError_content">
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="text-center mt-4">
|
||||
<h1 class="display-1">500</h1>
|
||||
<p class="lead">Internal Server Error</p>
|
||||
<a href="index.html">
|
||||
<i class="fas fa-arrow-left me-1"></i>
|
||||
Return to Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div id="layoutError_footer">
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © Your Website 2023</div>
|
||||
<div>
|
||||
<a href="#">Privacy Policy</a>
|
||||
·
|
||||
<a href="#">Terms & Conditions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||
<script src="js/scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
7
dashboard/Chart.min.js
vendored
Normal file
7
dashboard/Chart.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
dashboard/all.js
Normal file
6
dashboard/all.js
Normal file
File diff suppressed because one or more lines are too long
54
dashboard/assets#/demo/chart-area-demo.js
Normal file
54
dashboard/assets#/demo/chart-area-demo.js
Normal file
@ -0,0 +1,54 @@
|
||||
// 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
|
||||
}
|
||||
}
|
||||
});
|
46
dashboard/assets#/demo/chart-bar-demo.js
Normal file
46
dashboard/assets#/demo/chart-bar-demo.js
Normal file
@ -0,0 +1,46 @@
|
||||
// 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
|
||||
}
|
||||
}
|
||||
});
|
16
dashboard/assets#/demo/chart-pie-demo.js
Normal file
16
dashboard/assets#/demo/chart-pie-demo.js
Normal file
@ -0,0 +1,16 @@
|
||||
// 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'],
|
||||
}],
|
||||
},
|
||||
});
|
4
dashboard/assets#/demo/datatables-demo.js
Normal file
4
dashboard/assets#/demo/datatables-demo.js
Normal file
@ -0,0 +1,4 @@
|
||||
// Call the dataTables jQuery plugin
|
||||
$(document).ready(function() {
|
||||
$('#dataTable').DataTable();
|
||||
});
|
1
dashboard/assets#/img/error-404-monochrome.svg
Normal file
1
dashboard/assets#/img/error-404-monochrome.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 6.0 KiB |
@ -11240,4 +11240,9 @@ body {
|
||||
width: 20px !important;
|
||||
font-size: 0.75rem;
|
||||
border-radius: 0.375rem !important;
|
||||
}
|
||||
|
||||
.bg-juandmi {
|
||||
--bs-bg-opacity: 1;
|
||||
background-color: #0D7377 !important;
|
||||
}
|
21
dashboard/footer.php
Normal file
21
dashboard/footer.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
|
||||
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
#require_once("../config.inc.php");
|
||||
require_once("../config/datenbankanbindung.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
||||
|
48
dashboard/index.html_bak
Normal file
48
dashboard/index.html_bak
Normal file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="author" content="" />
|
||||
<title>Dashboard - SB Admin</title>
|
||||
|
||||
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.ali.css" rel="stylesheet">
|
||||
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
|
||||
<!-- icons in nav-->
|
||||
<script src="all.js" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
</head>
|
||||
<body class="sb-nav-fixed">
|
||||
|
||||
<div id="navtop"></div>
|
||||
<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");
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="layoutSidenav">
|
||||
<!-- Navigation left -->
|
||||
<div id="navleft"></div>
|
||||
<div id="layoutSidenav_content">
|
||||
<main>
|
||||
TEST
|
||||
</main>
|
||||
<!-- footer -->
|
||||
<div id="navleft"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
91
dashboard/index.php
Normal file
91
dashboard/index.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if(!isset($_SESSION)) { session_start(); }
|
||||
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
#require_once("../config.inc.php");
|
||||
require_once("../config/datenbankanbindung.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']),0,-3)."html";
|
||||
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üssen alle Felder ausgefü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");
|
||||
?>
|
@ -3,24 +3,23 @@
|
||||
* Copyright 2013-2023 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE)
|
||||
*/
|
||||
//
|
||||
//
|
||||
// Scripts
|
||||
//
|
||||
//
|
||||
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
|
||||
// Toggle the side navigation
|
||||
const sidebarToggle = document.body.querySelector('#sidebarToggle');
|
||||
|
||||
if (sidebarToggle) {
|
||||
// Uncomment Below to persist sidebar toggle between refreshes
|
||||
// if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
|
||||
// document.body.classList.toggle('sb-sidenav-toggled');
|
||||
// }
|
||||
|
||||
sidebarToggle.addEventListener('click', event => {
|
||||
event.preventDefault();
|
||||
document.body.classList.toggle('sb-sidenav-toggled');
|
||||
localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
<meta name="author" content="" />
|
||||
<title>Login - SB Admin</title>
|
||||
<link href="css/styles.css" rel="stylesheet" />
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
<script src="all.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body class="bg-primary">
|
||||
<div id="layoutAuthentication">
|
||||
|
6
dashboard/logout.php
Normal file
6
dashboard/logout.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
session_start(); //to ensure you are using same session
|
||||
session_destroy(); //destroy the session
|
||||
header("location:index.php"); //to redirect back to "index.php" after logging out
|
||||
exit();
|
||||
?>
|
22
dashboard/nav.php
Normal file
22
dashboard/nav.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
|
||||
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
require_once("../config.inc.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
$result_name = $db->query("SELECT vorname, nachname, mail FROM jumi_admin WHERE uid='$uid'");
|
||||
$row_name = $result_name->fetch_array();
|
||||
$smarty->assign('nav_name', "$row_name[vorname] $row_name[nachname]");
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
21
dashboard/navtop.php
Normal file
21
dashboard/navtop.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
|
||||
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
#require_once("../config.inc.php");
|
||||
require_once("../config/datenbankanbindung.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
||||
|
8
dashboard/simple-datatables.min.js
vendored
Normal file
8
dashboard/simple-datatables.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
dashboard/startseite.php
Normal file
24
dashboard/startseite.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
## INDEX gegen DB
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
#$_SESSION['sessionid'] = session_id();
|
||||
|
||||
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
require_once("../config.inc.php");
|
||||
$smarty = new SmartyAdmin();
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
|
||||
$result_name = $db->query("SELECT vorname, nachname, mail FROM jumi_admin WHERE uid='$uid'");
|
||||
$row_name = $result_name->fetch_array();
|
||||
$smarty->assign('startseite_name', "$row_name[vorname] $row_name[nachname]");
|
||||
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("modern/dashboard/$templatename");
|
||||
?>
|
8
dashboard/style.min.css
vendored
Normal file
8
dashboard/style.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using clean-css v5.3.1.
|
||||
* Original file: /npm/simple-datatables@7.1.2/dist/style.css
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
.datatable-wrapper.no-header .datatable-container{border-top:1px solid #d9d9d9}.datatable-wrapper.no-footer .datatable-container{border-bottom:1px solid #d9d9d9}.datatable-bottom,.datatable-top{padding:8px 10px}.datatable-bottom>div:first-child,.datatable-bottom>nav:first-child,.datatable-top>div:first-child,.datatable-top>nav:first-child{float:left}.datatable-bottom>div:last-child,.datatable-bottom>nav:last-child,.datatable-top>div:last-child,.datatable-top>nav:last-child{float:right}.datatable-selector{padding:6px}.datatable-input{padding:6px 12px}.datatable-info{margin:7px 0}.datatable-pagination ul{margin:0;padding-left:0}.datatable-pagination li{list-style:none;float:left}.datatable-pagination li.datatable-hidden{visibility:hidden}.datatable-pagination a{border:1px solid transparent;float:left;margin-left:2px;padding:6px 12px;position:relative;text-decoration:none;color:#333;cursor:pointer}.datatable-pagination a:hover{background-color:#d9d9d9}.datatable-pagination .datatable-active a,.datatable-pagination .datatable-active a:focus,.datatable-pagination .datatable-active a:hover{background-color:#d9d9d9;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover,.datatable-pagination .datatable-ellipsis a{pointer-events:none;cursor:default}.datatable-pagination .datatable-disabled a,.datatable-pagination .datatable-disabled a:focus,.datatable-pagination .datatable-disabled a:hover{cursor:not-allowed;opacity:.4}.datatable-pagination .datatable-pagination a{font-weight:700}.datatable-table{max-width:100%;width:100%;border-spacing:0;border-collapse:separate}.datatable-table>tbody>tr>td,.datatable-table>tbody>tr>th,.datatable-table>tfoot>tr>td,.datatable-table>tfoot>tr>th,.datatable-table>thead>tr>td,.datatable-table>thead>tr>th{vertical-align:top;padding:8px 10px}.datatable-table>thead>tr>th{vertical-align:bottom;text-align:left;border-bottom:1px solid #d9d9d9}.datatable-table>tfoot>tr>th{vertical-align:bottom;text-align:left;border-top:1px solid #d9d9d9}.datatable-table th{vertical-align:bottom;text-align:left}.datatable-table th a{text-decoration:none;color:inherit}.datatable-filter,.datatable-sorter{display:inline-block;height:100%;position:relative;width:100%}.datatable-sorter::after,.datatable-sorter::before{content:"";height:0;width:0;position:absolute;right:4px;border-left:4px solid transparent;border-right:4px solid transparent;opacity:.2}.datatable-sorter::before{border-top:4px solid #000;bottom:0}.datatable-sorter::after{border-bottom:4px solid #000;border-top:4px solid transparent;top:0}.datatable-ascending .datatable-filter::after,.datatable-ascending .datatable-sorter::after,.datatable-descending .datatable-filter::before,.datatable-descending .datatable-sorter::before{opacity:.6}.datatable-filter::before{content:"";position:absolute;right:4px;opacity:.2;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-radius:50%;border-top:10px solid #000;top:25%}.datatable-filter-active .datatable-filter::before{opacity:.6}.datatable-empty{text-align:center}.datatable-bottom::after,.datatable-top::after{clear:both;content:" ";display:table}table.datatable-table:focus tr.datatable-cursor>td:first-child{border-left:3px #00f solid}table.datatable-table:focus{outline:solid 1px black;outline-offset:-1px}
|
||||
/*# sourceMappingURL=/sm/7faebb93ab083e20bf71c693c970b2206a78620f4a20eb890eeaee129d14cd66.map */
|
297
dashboard/survey_erfassen.php
Normal file
297
dashboard/survey_erfassen.php
Normal file
@ -0,0 +1,297 @@
|
||||
<?php
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
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";
|
||||
|
||||
|
||||
|
||||
if (isset($_GET['action'])) {
|
||||
$action = $_GET['action'];
|
||||
} else {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
|
||||
if ($action == '') {
|
||||
# if (isset($_GET['edit'])) {
|
||||
# $_SESSION["umfrageerf_status"] = 'edit';
|
||||
# $yid = $_GET['edit'];
|
||||
# $_SESSION["umfrageerf_yid"] = $yid;
|
||||
# } else {
|
||||
# $_SESSION["umfrageerf_status"] = 'neu';
|
||||
# }
|
||||
#
|
||||
# # -- Fehlermeldungen -- #
|
||||
if($_GET['new'] == 1){
|
||||
unset($_SESSION["umfrageerf_value_datumvon"]);
|
||||
unset($_SESSION["umfrageerf_value_zeitvon"]);
|
||||
unset($_SESSION["umfrageerf_value_datumbis"]);
|
||||
unset($_SESSION["umfrageerf_value_zeitbis"]);
|
||||
unset($_SESSION["umfrageerf_value_headline"]);
|
||||
unset($_SESSION["umfrageerf_value_freitext"]);
|
||||
$smarty->assign('umfrageerf_value_freitext', 0);
|
||||
unset($_SESSION["umfrageerf_umid"]);
|
||||
unset($_SESSION["umfrageerf_ufid"]);
|
||||
unset($_SESSION["umfrageerf_uaid"]);
|
||||
# $_SESSION["umfrageerf_new"] = 1;
|
||||
|
||||
}else{
|
||||
$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"]);
|
||||
$smarty->assign('umfrageerf_value_zeitbis', $_SESSION["umfrageerf_value_zeitbis"]);
|
||||
$smarty->assign('umfrageerf_value_headline', $_SESSION["umfrageerf_value_headline"]);
|
||||
$smarty->assign('umfrageerf_value_freitext', $_SESSION["umfrageerf_value_freitext"]);
|
||||
# $smarty->assign('umfrageerf_value_new', "0");
|
||||
# $_SESSION["umfrageerf_new"] = 0;
|
||||
}
|
||||
|
||||
if (isset($_GET['error'])) {
|
||||
|
||||
$errorno = $_GET['error'];
|
||||
|
||||
$smarty->assign('umfrageerf_error', 1);
|
||||
|
||||
if ($errorno == 1) {
|
||||
# Pflichtfelder
|
||||
$smarty->assign('umfrageerf_error_text', "Bitte füllen Sie alle Felder aus");
|
||||
}
|
||||
if ($errorno == 2) {
|
||||
# Datumsformat
|
||||
$smarty->assign('umfrageerf_error_text', "Ein Datumsformat ist falsch");
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# # --- Wenn Werte editiert werden ------------
|
||||
# if ($_SESSION["umfrageerf_status"] == 'edit') {
|
||||
# $result_edit = $db->query("SELECT yid, date_format(datum, '%d.%m.%Y') datum, date_format(datum, '%H:%i') zeit, url
|
||||
# FROM jumi_youtube_termine
|
||||
# WHERE yid = $yid");
|
||||
# $row_edit = $result_edit->fetch_array();
|
||||
# $smarty->assign('umfrageerf_value_datum', "$row_edit[datum]");
|
||||
# $smarty->assign('umfrageerf_value_zeit', "$row_edit[zeit]");
|
||||
# $smarty->assign('umfrageerf_value_url', "$row_edit[url]");
|
||||
#
|
||||
# }
|
||||
# # --- Wenn Werte editiert werden Ende -------
|
||||
#
|
||||
# if ($_GET['editende'] == 1) {
|
||||
# # Editieren ist beendet, als ein update auf einen Datensatz. Dann ist der status wieder Neu, damit wird wieder ein Insert durchgeführt
|
||||
# $_SESSION["umfrageerf_status"] = 'neu';
|
||||
# }
|
||||
#
|
||||
#
|
||||
# # Gespeicherte Werte
|
||||
# $query1 = "SELECT yid, date_format(datum, '%d.%m.%Y') datum_form, date_format(datum, '%H:%i') zeit, url
|
||||
# FROM jumi_youtube_termine
|
||||
# WHERE datum > DATE_SUB( NOW() , INTERVAL 14 DAY )
|
||||
# ORDER BY datum desc, zeit 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 ($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 "<meta http-equiv=\"refresh\" content=\"3; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
|
||||
}
|
||||
$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 "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
|
||||
}
|
||||
$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 "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
|
||||
}
|
||||
$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 "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
|
||||
}
|
||||
$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 "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=1\">";
|
||||
}
|
||||
$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 "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!validateDate($datumbis_form)) {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; URL=" . $_SERVER['PHP_SELF'] . "?error=2\">";
|
||||
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");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user