-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.php
More file actions
24 lines (24 loc) · 12.1 KB
/
users.php
File metadata and controls
24 lines (24 loc) · 12.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
goto FoKIP; bTB7a: $lastname = substr($_SESSION["\x6e\141\x6d\x65"], $last_word_start); goto KZsLg; SGAdv: $user_array = array(); goto V3du3; SAP10: echo $_SESSION["\x72\141\x6e\153"] . "\40" . $firstname . "\40" . substr($lastname, 0, 1); goto FiCGT; FoKIP: require "\162\145\161\165\151\x72\x65\163\57\x63\157\x6e\x66\x69\147\56\160\150\x70"; goto ksMRD; tW4OV: ?>
<li class="nav-item"><a class="nav-link-report"href="createreport">NIEUW RAPPORT</a></li></ul></div></nav><main class="container"role="main"><div class="content-introduction"><h3>Gebruikers Instellingen</h3><p class="lead">Hier kun je gebruikers aanmaken, bewerken en verwijderen.<br><strong>Wanneer gebruikers verwijderd worden kan het niet meer ongedaan worden gemaakt!</strong></p></div><div class="users-container"><?php goto cWl_i; E_ZYj: $respone = false; goto an7YM; an7YM: if ($_SERVER["\122\105\x51\x55\x45\x53\124\x5f\115\x45\124\110\117\104"] == "\x50\117\x53\x54") { if (trim($_POST["\164\x79\x70\x65"]) == NULL) { Header("\114\x6f\143\141\164\151\157\x6e\72\x64\x61\163\150\142\x6f\141\162\144"); } if ($_POST["\164\x79\160\x65"] == "\143\162\145\x61\164\145") { $insert = $con->query("\x49\116\123\x45\x52\124\40\111\x4e\x54\117\40\x75\163\145\162\x73\40\x28\165\163\x65\162\x6e\141\155\145\x2c\x70\x61\x73\x73\x77\157\x72\x64\54\156\141\x6d\x65\x2c\162\x6f\x6c\145\x2c\x72\141\x6e\153\x2c\154\x61\163\x74\x5f\x6c\157\147\151\156\51\40\x56\x41\114\125\105\x53\50\x27" . $con->real_escape_string($_POST["\x75\163\x65\162\156\141\155\x65"]) . "\47\54\x27" . password_hash($con->real_escape_string($_POST["\x70\141\163\163\167\x6f\162\144"]), PASSWORD_BCRYPT) . "\x27\54\47" . $con->real_escape_string($_POST["\146\x75\x6c\x6c\x6e\141\x6d\x65"]) . "\x27\x2c\x27\165\163\145\162\x27\x2c\x27" . $con->real_escape_string($_POST["\162\x61\156\x6b"]) . "\47\54\47" . date("\x59\x2d\x6d\x2d\144") . "\47\x29"); if ($insert) { $respone = true; } } elseif ($_POST["\x74\171\160\x65"] == "\144\x65\154\x65\x74\145") { $sql = "\x44\x45\114\x45\x54\105\x20\106\122\117\x4d\40\165\163\145\162\163\40\x57\110\105\x52\105\x20\x69\x64\40\75\x20" . $con->real_escape_string($_POST["\144\145\x6c\145\164\145\x75\163\x65\162"]); if ($con->query($sql)) { $respone = true; } else { echo "\105\162\x72\x6f\x72\40\x64\145\x6c\x65\164\x69\156\x67\x20\x72\145\x63\157\162\144\x3a\40" . mysqli_error($conn); die; } } elseif ($_POST["\x74\171\x70\145"] == "\x65\x64\x69\x74") { $query = $con->query("\x53\x45\114\105\x43\124\40\x2a\x20\x46\x52\x4f\115\40\x75\163\x65\x72\x73\40\x57\110\105\122\x45\x20\151\x64\40\x3d\40" . $con->real_escape_string($_POST["\145\144\x69\164\x75\163\x65\x72"])); $selecteduser = $query->fetch_assoc(); } elseif ($_POST["\x74\171\x70\x65"] == "\162\x65\x61\x6c\x65\x64\x69\x74") { $update = $con->query("\x55\120\x44\101\124\105\40\165\163\x65\x72\163\x20\x53\105\124\x20\x75\x73\145\x72\156\141\x6d\x65\x20\75\40\47" . $con->real_escape_string($_POST["\165\163\145\x72\156\x61\155\x65"]) . "\x27\54\x20\156\x61\x6d\145\x20\x3d\x20\47" . $con->real_escape_string($_POST["\x66\x75\154\154\x6e\141\155\145"]) . "\47\54\x20\x72\x61\156\153\40\x3d\x20\47" . $con->real_escape_string($_POST["\x72\141\x6e\x6b"]) . "\x27\40\127\x48\x45\122\105\40\151\x64\x20\x3d\x20" . $_POST["\165\x73\x65\162\151\x64"]); if ($update) { $respone = true; } else { $response = false; } } } goto qYekp; cWl_i: if ($_SERVER["\x52\x45\x51\x55\x45\x53\x54\137\x4d\105\x54\x48\117\104"] == "\120\x4f\x53\x54" && $_POST["\x74\x79\x70\145"] == "\x65\x64\x69\x74") { ?>
<div class="left-panel-container"><h5 class="panel-container-title">Pas gebruiker aan</h5><form method="post"><input name="type"value="realedit"type="hidden"> <input name="userid"value="<?php echo $selecteduser["\x69\x64"]; ?>
"type="hidden"><div class="input-group mb-3"><input name="username"value="<?php echo $selecteduser["\x75\x73\145\162\156\x61\155\x65"]; ?>
"class="form-control login-user"placeholder="gebruikersnaam"></div><div class="input-group mb-3"><input name="fullname"value="<?php echo $selecteduser["\156\141\155\145"]; ?>
"class="form-control login-user"placeholder="volledige naam"></div><div class="input-group mb-3"><input name="rank"value="<?php echo $selecteduser["\162\141\x6e\x6b"]; ?>
"class="form-control login-user"placeholder="rank"></div><div class="form-group"><button class="btn btn-police btn-primary"type="submit"name="create">Pas aan</button></div></form></div><?php } else { ?>
<div class="left-panel-container"><h5 class="panel-container-title">Pas gebruiker aan</h5><?php if ($_SERVER["\122\105\x51\125\105\123\124\x5f\x4d\105\124\x48\x4f\104"] == "\x50\x4f\123\124" && $_POST["\164\171\x70\x65"] == "\x72\145\141\x6c\x65\x64\x69\x74" && $respone) { echo "\x3c\160\40\x73\164\x79\x6c\145\x3d\x27\x63\157\x6c\157\162\x3a\40\43\61\x33\x62\x61\62\143\73\x27\76\x47\145\142\162\x75\151\x6b\145\x72\40\141\141\x6e\x67\145\160\141\x73\164\41\x3c\x2f\160\x3e"; } if ($_SERVER["\x52\105\121\125\x45\x53\x54\x5f\115\x45\x54\x48\117\104"] == "\x50\x4f\x53\124" && $_POST["\164\x79\x70\x65"] == "\162\x65\141\154\145\x64\151\164" && !$respone) { echo "\x3c\x70\40\163\164\171\154\x65\75\x27\x63\x6f\x6c\157\162\72\43\x39\x66\61\x30\x31\x30\73\47\x3e\107\x65\x62\162\165\151\x6b\x65\162\40\156\x69\x65\x74\40\141\x61\x6e\147\x65\160\x61\163\164\41\74\x2f\x70\76"; } ?>
<form method="post"><input name="type"value="edit"type="hidden"><div class="form-group"><label for="userselect">Gebruiker</label> <select class="form-control"name="edituser"><?php foreach ($user_array as $user) { ?>
<option value="<?php echo $user["\x69\x64"]; ?>
"><?php echo $user["\x6e\141\155\145"]; ?>
</option><?php } ?>
</select></div><div class="form-group"><button class="btn btn-police btn-primary"type="submit"name="edit">Pas aan</button></div></form></div><div class="right-panel-container"><h5 class="panel-container-title">Verwijder gebruiker</h5><?php if ($_SERVER["\x52\x45\x51\125\105\x53\x54\x5f\x4d\x45\x54\x48\117\104"] == "\x50\x4f\123\124" && $_POST["\164\x79\x70\145"] == "\144\145\154\145\x74\145" && $respone) { echo "\x3c\160\x20\x73\x74\x79\154\145\75\x27\143\157\154\157\162\x3a\x20\x23\61\x33\x62\141\x32\143\x3b\47\x3e\x47\145\142\162\x75\151\x6b\145\162\40\x76\145\162\x77\151\152\144\x65\162\x64\41\x3c\57\160\x3e"; } ?>
<form method="post"><input name="type"value="delete"type="hidden"><div class="form-group"><label for="userselect">Gebruiker</label> <select class="form-control"name="deleteuser"><?php foreach ($user_array as $user) { ?>
<option value="<?php echo $user["\151\x64"]; ?>
"><?php echo $user["\156\x61\155\145"]; ?>
</option><?php } ?>
</select></div><div class="form-group"><button class="btn btn-police btn-primary"type="submit"name="delete">Verwijder</button></div></form></div><div class="left-panel-container"><h5 class="panel-container-title">Voeg gebruiker toe</h5><?php if ($_SERVER["\122\x45\121\x55\x45\x53\x54\x5f\x4d\x45\124\x48\117\x44"] == "\120\x4f\123\124" && $_POST["\164\x79\160\x65"] == "\143\x72\x65\x61\x74\x65" && $respone) { echo "\x3c\x70\40\x73\164\x79\x6c\145\x3d\47\143\x6f\154\157\162\x3a\x20\43\x31\63\x62\x61\x32\x63\x3b\47\x3e\107\145\142\x72\165\x69\x6b\145\162\40\x74\x6f\x65\x67\145\166\157\145\147\144\41\x3c\x2f\x70\76"; } ?>
<form method="post"><input name="type"value="create"type="hidden"><div class="input-group mb-3"><input name="username"value=""class="form-control login-user"placeholder="gebruikersnaam"required></div><div class="input-group mb-2"><input name="password"value=""class="form-control login-pass"placeholder="wacthtwoord"required type="password"></div><div class="input-group mb-3"><input name="fullname"value=""class="form-control login-user"placeholder="volledige naam"required></div><select class="form-control"name="rank"required style="margin-bottom:2vh"><option value="Aspirant">Aspirant</option><option value="Surveillant">Surveillant</option><option value="Agent">Agent</option><option value="Hoofdagent">Hoofdagent</option><option value="Brigadier">Brigadier</option><option value="Inspecteur">Inspecteur</option><option value="Hoofdinspecteur">Hoofdinspecteur</option></select><div class="form-group"><button class="btn btn-police btn-primary"type="submit"name="create">Voeg toe</button></div></form></div><?php } goto j56p0; ba99z: ?>
<!doctypehtml><html lang="en"><head><meta charset="utf-8"><meta content="width=device-width,initial-scale=1,shrink-to-fit=no"name="viewport"><meta content=""name="description"><meta content=""name="author"><link href="https://www.politie.nl/politie2018/assets/images/icons/favicon.ico"rel="shortcut icon"type="image/x-icon"><link href="https://www.politie.nl/politie2018/assets/images/icons/favicon-16.png"rel="icon"type="image/png"sizes="16x16"><link href="https://www.politie.nl/politie2018/assets/images/icons/favicon-32.png"rel="icon"type="image/png"sizes="32x32"><link href="https://www.politie.nl/politie2018/assets/images/icons/favicon-64.png"rel="icon"type="image/png"sizes="64x64"><title>Politie Databank</title><link href="https://getbootstrap.com/docs/4.0/examples/starter-template/"rel="canonical"><link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"rel="stylesheet"crossorigin="anonymous"integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"><link href="assets/css/main.css"rel="stylesheet"></head><body><nav class="bg-custom fixed-top navbar navbar-custom navbar-expand-lg"><div class="collapse navbar-collapse"id="navbarsExampleDefault"><ul class="navbar-nav mr-auto"><li class="nav-item"><a class="nav-label"href="#"><img alt=""height="22"src="assets/images/icon.png"width="22"> <span class="title">Welkom<?php goto SAP10; DgbNs: $firstname = $name[0]; goto Od_XS; KZsLg: $result = $con->query("\x53\105\x4c\x45\x43\x54\40\52\x20\106\x52\117\115\40\165\163\145\162\163\40\127\110\105\x52\105\x20\x72\157\154\145\x20\x3d\40\47\165\163\x65\162\47"); goto SGAdv; Kjub4: if ($_SESSION["\x72\x6f\x6c\145"] != "\141\x64\155\151\156") { Header("\114\157\x63\x61\164\x69\x6f\156\72\40\144\x61\x73\150\x62\157\141\x72\144"); } goto E_ZYj; ksMRD: if (!$_SESSION["\x6c\157\147\147\x65\144\151\156"]) { Header("\114\x6f\x63\x61\x74\x69\x6f\x6e\72\40\x6c\157\147\151\156"); } goto Kjub4; qYekp: $name = explode("\40", $_SESSION["\156\141\155\145"]); goto DgbNs; FiCGT: ?>
.</span></a></li><li class="nav-item"><a class="nav-button"href="logout"><button class="btn btn-logout btn-outline-light my-2 my-sm-0"type="button">LOG UIT</button></a></li></ul><ul class="navbar-nav ml-auto"><li class="nav-item active"><a class="nav-link"href="dashboard">DASHBOARD</a></li><li class="nav-item dropdown"><a class="nav-link dropdown-toggle"href="#"aria-expanded="false"aria-haspopup="true"data-toggle="dropdown"id="navbarDropdown"role="button">OPZOEKEN</a><div class="dropdown-menu"aria-labelledby="navbarDropdown"><a class="dropdown-item"href="profiles">PERSONEN</a> <a class="dropdown-item"href="reports">REPORTS</a> <a class="dropdown-item"href="#">VOERTUIGEN</a></div></li><li class="nav-item"><a class="nav-link"href="warrants">ARRESTATIEBEVELEN</a></li><?php goto YuLUR; YuLUR: if ($_SESSION["\162\157\x6c\145"] == "\141\144\155\151\156") { ?>
<li class="nav-item dropdown"><a class="nav-link dropdown-toggle"href="#"aria-expanded="false"aria-haspopup="true"data-toggle="dropdown"id="navbarDropdown"role="button">ADMIN</a><div class="dropdown-menu"aria-labelledby="navbarDropdown"><a class="dropdown-item"href="laws">STRAFFEN</a> <a class="dropdown-item"href="users">GEBRUIKERS</a></div></li><?php } goto tW4OV; V3du3: while ($data = $result->fetch_assoc()) { $user_array[] = $data; } goto ba99z; Od_XS: $last_word_start = strrpos($_SESSION["\x6e\x61\x6d\x65"], "\x20") + 1; goto bTB7a; j56p0: ?>
</div></main><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"crossorigin="anonymous"integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"crossorigin="anonymous"integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"crossorigin="anonymous"integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"></script><script src="assets/js/main.js"></script></body></html>