$ok_record_id = $record->getRecordId(); } else { $record->updateRecord("brief"); } // Show feedback $feedback = $record->getMessage(); // See query? //$record->deBug(); } else { ///////////////////// // Start the record display //////////////////// $record = new Staff($ok_record_id, '', TRUE); // show feedback if it isn't already set if (!$feedback) { $feedback = $record->getMessage(); } echo "<div class=\"feedback\">{$feedback}</div><br /><br />"; } $record->outputSelfEditForm(); //$record->deBug(); include "../includes/footer.php"; ?> <script type="text/javascript"> var headshot_location = "<?php print $record->getHeadshotLoc(); ?> ";
<?php require_once "includes/config.php"; require_once "includes/functions.php"; use SubjectsPlus\Control\Querier; use SubjectsPlus\Control\Staff; $db = new Querier(); $lstrForm = ''; if (!isset($_GET['id'])) { if (isset($_POST['email'])) { $lobjStaff = new Staff('', 'forgot'); if ($lobjStaff->getRecordId() == NULL) { $introtext = "<p align=\"center\" style=\"clear: both;\" class=\"smaller\"><br />" . _("{$lobjStaff->getMessage()}") . "</p>"; $lstrForm = $lobjStaff->outputEmailForm(); } else { $lobjTodayDate = new DateTime(); //The code is a hased string composed of the user's email, installation's salt, and today's date MMDDYYYY $lstrCode = md5($lobjStaff->getEmail() . $salt . $lobjTodayDate->format('mdY')); $lstrMessage = "Hello {$lobjStaff->getFullName()},\n\nHere is the link to reset your password. Link only works for three days. {$BaseURL}control/forgotpassword.php?id={$lobjStaff->getRecordID()}&code={$lstrCode}"; mail($lobjStaff->getEmail(), 'Reset password for SubjectsPlus', $lstrMessage, "From: {$administrator_email}"); $introtext = "<p align=\"center\" style=\"clear: both;\" class=\"smaller\"><br /><strong>" . _("An email has been sent to reset your password. Please click the link in the email and follow the instructions.") . "</strong></p>"; } } else { $lobjStaff = new Staff(); $introtext = "<p align=\"center\" style=\"clear: both;\" class=\"smaller\"><br />" . _("Please enter your <strong>email</strong> so we can email you a link to reset your password.") . "</p>"; $lstrForm = $lobjStaff->outputEmailForm(); } } else { $_SESSION['staff_id'] = $_GET['id']; $lobjStaff = new Staff($_GET['id']); if (isset($_POST['password'])) {