diff --git a/src/admin.php b/src/admin.php index d235ff2..91ae062 100644 --- a/src/admin.php +++ b/src/admin.php @@ -41,7 +41,7 @@ if ($action == "approve") { $stmt->execute(); } $stmt = $smarty->dbh()->prepare("UPDATE {$opt["table_prefix"]}users SET approved = 1, password = {$opt["password_hasher"]}(?) WHERE userid = ?"); - $stmt->bindParam(1, $pwd, PDO::PARAM_INT); + $stmt->bindParam(1, $pwd, PDO::PARAM_STR); $stmt->bindValue(2, (int) $_GET["userid"], PDO::PARAM_INT); $stmt->execute(); @@ -54,7 +54,9 @@ if ($action == "approve") { $row["email"], "Gift Registry application approved", "Your Gift Registry application was approved by " . $_SESSION["fullname"] . ".\r\n" . - "Your username is " . $row["username"] . " and your password is $pwd.", + "Your username is " . $row["username"] . " and your password is '$pwd'.\r\n" . + "Log in to https://wishlist.erdelynet.com/ and change your password under\r\n" . + "Update Profile as soon as possible.", "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 " . $row["email"]); } diff --git a/src/includes/config.php b/src/includes/config.php index c28a417..4db0795 100644 --- a/src/includes/config.php +++ b/src/includes/config.php @@ -18,11 +18,11 @@ function getGlobalOptions() { /* The PDO connection string. http://www.php.net/manual/en/pdo.connections.php */ - "pdo_connection_string" => "mysql:host=localhost;dbname=giftreg", + "pdo_connection_string" => "mysql:host=127.0.0.1;dbname=phpgiftreg", /* The database username and password. */ - "pdo_username" => "giftreg", - "pdo_password" => "cn3Malk", + "pdo_username" => "phpgiftreg", + "pdo_password" => "Disquietingly195.prosubstitution", /* The maximum number of days before an event which produces a notification. */ "event_threshold" => "60", @@ -31,7 +31,7 @@ function getGlobalOptions() { 0 = auto-approve, 1 = require approval */ - "shop_requires_approval" => 1, + "shop_requires_approval" => 0, /* Whether or not requesting a new account is immediately approved. 0 = auto-approve, @@ -46,10 +46,10 @@ function getGlobalOptions() { "items_per_page" => 10, /* The e-mail From: header. */ - "email_from" => "webmaster@" . $_SERVER['SERVER_NAME'], + "email_from" => "wishlist@erdelynet.com", /* The e-mail Reply-To: header. */ - "email_reply_to" => "rwalberg@mts.net", + "email_reply_to" => "mike@erdelynet.com", /* The e-mail X-Mailer header. */ "email_xmailer" => "PHP/" . phpversion(), @@ -59,14 +59,14 @@ function getGlobalOptions() { 0 = don't help text, 1 = show help text */ - "show_helptext" => 0, + "show_helptext" => 1, /* Whether or not clicking the Delete Item link requires a JavaScript-based confirmation. 0 = don't show confirmation, 1 = show confirmation */ - "confirm_item_deletes" => 0, + "confirm_item_deletes" => 1, /* Whether or not to allow multiple quantities of an item. */ "allow_multiples" => 1, @@ -113,7 +113,7 @@ function getGlobalOptions() { UPDATE users SET password = MD5(password) on your database to convert the passwords. This operation is NON-REVERSIBLE! */ - "password_hasher" => "MD5", + "password_hasher" => "SHA1", /* Whether or not to allow image uploads. If on, the next option must point to a valid subdirectory that is writeable by the web server. The setup.php diff --git a/src/item.php b/src/item.php index d5964b3..e2f8538 100644 --- a/src/item.php +++ b/src/item.php @@ -256,7 +256,7 @@ while ($row = $stmt->fetch()) { $categories[] = $row; } -$stmt = $smarty->dbh()->prepare("SELECT ranking, title FROM {$opt["table_prefix"]}ranks ORDER BY rankorder"); +$stmt = $smarty->dbh()->prepare("SELECT ranking, title FROM {$opt["table_prefix"]}ranks ORDER BY rankorder DESC"); $stmt->execute(); $ranks = array(); while ($row = $stmt->fetch()) { diff --git a/src/signup.php b/src/signup.php index 03139ce..c7e0174 100644 --- a/src/signup.php +++ b/src/signup.php @@ -80,7 +80,9 @@ if (isset($_POST["action"]) && $_POST["action"] == "signup") { $email, "Gift Registry account created", "Your Gift Registry account was created.\r\n" . - "Your username is $username and your password is $pwd.", + "Your username is $username and your password is '$pwd'.\r\n" . + "Log in to https://wishlist.erdelynet.com/ and change your password under\r\n" . + "Update Profile as soon as possible.", "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"); } diff --git a/src/templates/navbar.tpl b/src/templates/navbar.tpl index 56ed8c0..3103513 100644 --- a/src/templates/navbar.tpl +++ b/src/templates/navbar.tpl @@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Gift Registry + + Gift Registry