diff --git a/css/base.css b/css/base.css index eaf28cd..a386d81 100644 --- a/css/base.css +++ b/css/base.css @@ -53,6 +53,14 @@ input[type="submit"] { font-weight: bold; padding: 8px; } +input[type="submit"]:disabled { + background: none repeat scroll 0 0 #FF0000; + border: medium none; + color: #FFFFFF; + cursor: pointer; + font-weight: bold; + padding: 8px; +} .label { display: block; margin: 0 10px 0 0; diff --git a/index.php b/index.php index b72137d..2084592 100644 --- a/index.php +++ b/index.php @@ -18,6 +18,16 @@ if (!is_logged_in() and isset($_POST['formname']) and $_POST['formname'] === "lo } } +if (is_logged_in() and isset($_POST['formname']) and $_POST['formname'] === "changepwform") { + if (get_sess_user() == $_POST['username']) { + if (!update_user(get_sess_user(), is_adminuser(), $_POST['password'])) { + $errormsg = "Unable to update password!\n"; + } + } else { + $errormsg = "You can only update your own password!".$_POST['username']; + } +} + ?> @@ -114,9 +124,14 @@ if ($blocklogin === TRUE) {
Hi . You can change your password here.
+ + +