} // If allow book vehicles has been pressed if (isset($_POST['bookvehicles'])) { makeBookVehicles($_POST['bookvehicles']); } // If make SLT has been pressed if (isset($_POST['bookslt'])) { makeSLT($_POST['bookslt']); } // If set own password is pressed if (isset($_POST['setmypassword'])) { setNewPassword($conn, $_POST['setmypassword'], $_POST['mypassword']); } // Set password for another user if (isset($_POST['setuserpass'])) { setNewPassword($conn, $_POST['setuserpass'], $_POST['hiddenpassword']); } ?> <br> <!-- Form to set your own password--> <form method="POST" action="admin.php"> <table style="border:1px solid black;"> <th class="nostyle">Set Your Password</th> <th class="nostyle"></th> <tr> <td class="nostyle">New Password:</td> <td class="nostyle"> <input type="text" id="mypassword" name="mypassword" /> </td> </tr> <tr>
<?php if (isset($do) && $do == 'anfordern') { $mail = filter_input(INPUT_POST, 'mail'); if (isset($mail) && !empty($mail)) { $newPassword = setNewPassword($mail, $db); if ($newPassword) { sendNewPassword($mail, $newPassword); $message['cls'] = 'success'; $message['msg'] = 'Ihnen wurde ein neues Passwort zugesendet.'; } else { $message['cls'] = 'error'; $message['msg'] = 'Es konnte kein neues Passwort gesendet werden, bitte versuchen Sie es erneut!'; } } else { $message['cls'] = 'error'; $message['msg'] = 'Geben Sie Ihre E-Mail Adresse ein!'; } }