-
Notifications
You must be signed in to change notification settings - Fork 0
/
auswertungindex.php
143 lines (88 loc) · 3.99 KB
/
auswertungindex.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="#" rel="shortcut icon" />
<link href="plugins/bootstrap-4.5.3-dist/css/bootstrap.min.css" rel="stylesheet">
<!-- selectpicker -->
<link rel="stylesheet" href="plugins/bootstrap-select-1.14.0-beta3/css/bootstrap-select.css">
<link href="plugins/fontawesome-free-5.15.1-web/css/all.css" rel="stylesheet">
<link href="styles/auswertungindex.css" rel="stylesheet" type="text/css">
<title>Auswertung</title>
<?php
/**
* A simple, clean and secure PHP Login Script / MINIMAL VERSION
*
* Uses PHP SESSIONS, modern password-hashing and salting and gives the basic functions a proper login system needs.
*
* @author Panique
* @link https://github.com/panique/php-login-minimal/
* @license http://opensource.org/licenses/MIT MIT License
*/
// checking for minimum PHP version
if (version_compare(PHP_VERSION, '5.3.7', '<')) {
exit("Sorry, Simple PHP Login does not run on a PHP version smaller than 5.3.7 !");
} else if (version_compare(PHP_VERSION, '5.5.0', '<')) {
// if you are using PHP 5.3 or PHP 5.4 you have to include the password_api_compatibility_library.php
// (this library adds the PHP 5.5 password hashing functions to older versions of PHP)
require_once("libraries/password_compatibility_library.php");
}
// include the configs / constants for the database connection
require_once("/documents/config/db.php");
require_once("utils/util.php");
// load the login class
require_once("classes/Login.php");
// create a login object. when this object is created, it will do all login/logout stuff automatically
// so this single line handles the entire login process. in consequence, you can simply ...
//stellt nur session un datenbankverbindungen wiederher wenn schon eingeloggt
$login = new Login();
$login_connection = $login->getlogin_connection();
//navbar includen
$currentpage = "auswertungindex";
include('navbar/navbar.php');
?>
<h2>Auswertung</h2>
</head>
<body>
<?php
// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true) {
// the user is logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are logged in" view.
//gucken ob es est ist
if (isUserAdmin($login_connection) == true) {
//gucken ob Datenbankverbindung zu platinendb (bzw auch login) besteht, sonnst abbruch
if (isset($login)) {
if ($login->errors) {
foreach ($login->errors as $error) {
if ($error != false) {
echo '<div class="alert alert-danger"> ' . $error . ' </div> ';
die();
}
}
}
}
include("views/auswertung.php");
} else {
header("location: index.php");
}
} else {
// the user is not logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are not logged in" view.
header("location: index.php");
}
?>
<script src="plugins/jquery3.5.1/dist/jquery.min.js" type="text/javascript"></script>
<script src="plugins/popper1.14.7/dist/umd/popper.min.js"></script>
<script src="plugins/bootstrap-4.5.3-dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="plugins/bootstrap-4.5.3-dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="plugins/chart/chart.js/dist/chart.umd.js" type="text/javascript"></script>
<script src="plugins/chart/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.min.js" type="text/javascript"></script>
<script src="javascript/auswertungindex.js"></script>
<!-- selectpicker -->
<script src="plugins/bootstrap-select-1.14.0-beta3/js/bootstrap-select.js"></script>
<script src="plugins\jsPDF-2.5.1\dist\jspdf.umd.min.js" type="text/javascript"></script>
<script src="javascript/auftraggeber!bearbeiter.js?v=1.0"></script>
</body>
</html>