This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
47 lines (41 loc) · 1.95 KB
/
index.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
<?php
require_once("sql.inc.php");
require_once("login.inc.php");
loginRequire();
if ($auth["grant"] && isset($_POST["createUser"])) {
if (empty($_POST["username"])) {
die("Leerer Benutzername");
} else {
loginCreateUser(stripslashes($_POST["username"]), (empty($_POST["accountPrefixes"]) ? array() : explode(",", $_POST["accountPrefixes"])), isset($_POST["grant"]), isset($_POST["database"]), isset($_POST["buchen"]), isset($_POST["kostenstellen"]), isset($_POST["kreditoren"]), isset($_POST["belege"]), isset($_POST["verifyTransaction"]), isset($_POST["simpleTransactions"]));
}
header("Location: index.php");
exit;
}
if ($auth["grant"] && isset($_POST["modifyUser"])) {
loginModifyUser(stripslashes($_POST["username"]), (empty($_POST["accountPrefixes"]) ? array() : explode(",", $_POST["accountPrefixes"])), isset($_POST["grant"]), isset($_POST["database"]), isset($_POST["buchen"]), isset($_POST["kostenstellen"]), isset($_POST["kreditoren"]), isset($_POST["belege"]), isset($_POST["verifyTransaction"]), isset($_POST["simpleTransactions"]));
header("Location: index.php");
exit;
}
if ($auth["grant"] && isset($_POST["removeUser"])) {
loginRemoveUser($_POST["username"]);
header("Location: index.php");
exit;
}
if ($auth["grant"]) {
$users = array();
foreach ($authDb as $username => $user) {
$users[] = array(
"username" => $username,
"accountPrefixes" => $user->accountPrefixes,
"grant" => isset($user->grant) && $user->grant,
"database" => isset($user->database) && $user->database,
"buchen" => isset($user->buchen) && $user->buchen,
"kostenstellen" => isset($user->kostenstellen) && $user->kostenstellen,
"kreditoren" => isset($user->kreditoren) && $user->kreditoren,
"belege" => isset($user->belege) && $user->belege,
"verifyTransaction" => isset($user->verifyTransaction) && $user->verifyTransaction,
"simpleTransactions" => isset($user->simpleTransactions) && $user->simpleTransactions,
);
}
}
include("templates/settings.php");