So many changes... I wanted to do this piece by piece, but once I

got started, I couldn't stop:
Update Smarty
Update bootstrap
Switch to using cards
Set up themes
Improve sorting (add direction)
Use modals for viewing, editing, adding items.
Add Help page
Add bookmarklet
Add footer
This commit is contained in:
Michael Erdely 2024-10-18 22:07:51 -04:00
parent a3855e078c
commit 1044fa8ccb
692 changed files with 40696 additions and 35959 deletions

View file

@ -22,14 +22,14 @@ if (isset($_POST["action"]) && $_POST["action"] == "forgot") {
$username = $_POST["username"];
try {
// make sure that username is valid
// make sure that username is valid
$stmt = $smarty->dbh()->prepare("SELECT email FROM {$opt["table_prefix"]}users WHERE username = ?");
$stmt->bindParam(1, $username, PDO::PARAM_STR);
$stmt->execute();
if ($row = $stmt->fetch()) {
$email = $row["email"];
if ($email == "")
$error = "The username '" . $username . "' does not have an e-mail address, so the password could not be sent.";
else {
@ -42,7 +42,7 @@ if (isset($_POST["action"]) && $_POST["action"] == "forgot") {
mail(
$email,
"Gift Registry password reset",
"Your Gift Registry account information:\r\n" .
"Your Gift Registry account information:\r\n" .
"Your username is '" . $username . "' and your new password is '$pwd'.",
"From: {$opt["email_from"]}\r\nReply-To: {$opt["email_reply_to"]}\r\nX-Mailer: {$opt["email_xmailer"]}\r\n"
) or die("Mail not accepted for $email");
@ -64,6 +64,8 @@ if (isset($_POST["action"]) && $_POST["action"] == "forgot") {
}
}
else {
if (!isset($username)) $username = "";
$smarty->assign('username', $username);
$smarty->display('forgot.tpl');
}
?>