<?php session_start(); $_SESSION['redir'] = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $_SESSION['u'] = $_GET['u']; $_SESSION['v'] = urldecode($_GET['v']); $UID = $_GET['u']; $varString = urldecode($_GET['v']); $validSubmission = false; if (isset($UID) && isset($varString)) { include "DB/Models/User.php"; /** @var User $User */ $User = User::getUserByUID($UID); if ($User->getVarString() == $varString) { $validSubmission = true; } } if (!$validSubmission) { echo "<h3>This validation link is not valid</h3>"; exit; } ?> <html> <body> <?php if (isset($_GET['result'])) { if ($_GET['result'] == 1) { echo "<h3>Please fill out all fields</h3>"; } else { echo "<h3>Sorry, the information you provided doesn't match our records.</h3>";
<?php session_start(); include "../../bossflex/Helpers/Reject.php"; Reject::permission($_SESSION['bfUser']); include "../../bossflex/DB/Models/BossFlexEmployee.php"; include "../../bossflex/DB/Models/Employee.php"; include "../../bossflex/DB/Models/User.php"; include "../../bossflex/DB/Models/Company.php"; include "../../bossflex/DB/Models/Ticket.php"; include "../../bossflex/Helpers/BFPage.php"; include "../../bossflex/Helpers/Material.php"; $bfEmp = BossFlexEmployee::getEmployeeByBFID($_SESSION['bfUser']['EID']); $User = User::getUserByUID($_SESSION['bfUser']['UID']); $tickets = Ticket::assignedTicketList($bfEmp); $ticketData = Ticket::numTicketsPerDayLastMonth(); $error = false; $success = false; if (isset($_GET['s'])) { $success = urldecode($_GET['s']); } //Handle Profile Changes $first = $_POST['first']; $last = $_POST['last']; $email = $_POST['email']; if (isset($first) && isset($last) && isset($email)) { $User->setEmail($email); $User->saveToDB(); $bfEmp->setFname($first); $bfEmp->setLname($last); $bfEmp->saveToDB();
<?php session_start(); $_SESSION['NewUser'] = true; $uid = $_GET['u'] ? $_GET['u'] : $_POST['u']; include "DB/Models/User.php"; include "DB/Models/Auth.php"; $user = User::getUserByUID($uid); $pass = $_POST['password']; if (isset($pass)) { Auth::changePassword($user, $pass); } ?> <html> <body> <h2>Register</h2> <h3>Please fill out all information below</h3> <form action="ChangePass.php" method="post"> <input type="hidden" name="u" value="<?php echo $uid; ?> "> <p>Password <br> <input type="password" name="password"></p> <input type="submit" value="Submit"> </form> </body> </html>