$check_admin = $check_admin_query->fields; // Crypted password mods - create a new password, update the database and mail it to them include_once OWP_FUNCTIONS_DIR . $owpFilename['password_crypt']; $newpass = owpCreatePassword(PASSWORD_MIN_LENGTH); $crpted_password = owpCryptPassword($newpass); $db->Execute("UPDATE " . $owpDBTable['administrators'] . " \n SET admin_password = "******"\n WHERE admin_id = '" . owpDBInput($check_admin['admin_id']) . "'"); $name = $check_admin['admin_firstname'] . " " . $check_admin['admin_lastname']; if ($check_admin['admin_gender'] == 'm') { $email_text = EMAIL_GREET_MR . $check_admin['admin_lastname'] . ',' . "\n\n"; } else { $email_text = EMAIL_GREET_MS . $check_admin['admin_lastname'] . ',' . "\n\n"; } $email_text .= EMAIL_PASSWORD_INTRO; $email_text .= sprintf(EMAIL_PASSWORD_BODY, $newpass); $email_text .= EMAIL_PASSWORD_FOOT; owpMail($name, $check_admin['admin_email_address'], EMAIL_PASSWORD_SUBJECT, nl2br($email_text), OWP_NAME, OWP_EMAIL_ADDRESS); $messageStack->add_session(SUCCESS_PASSWORD_SENT, 'success'); owpRedirect(owpLink($owpFilename['login'], '', 'SSL')); } else { $messageStack->add(ERROR_NO_USER, 'error'); } } $breadcrumb->add(NAVBAR_TITLE_1, owpLink($owpFilename['login'], '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2, owpLink($owpFilename['password_forgotten'], '', 'SSL')); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?> > <head>
<br> </body> </html> <?php } else { include_once OWP_FUNCTIONS_DIR . $owpFilename['password_crypt']; $owp_pwd = owpCryptPassword($password); $login = DEFAULT_ADMIN_LOGIN; $db->Execute("UPDATE " . $owpDBTable['administrators'] . " \n\t SET admin_gender = " . $db->qstr($gender) . ",\n admin_firstname = " . $db->qstr($firstname) . ",\n admin_lastname = " . $db->qstr($lastname) . ",\n admin_email_address = " . $db->qstr($email_address) . ",\n admin_telephone = " . $db->qstr($telephone) . ",\n admin_fax = " . $db->qstr($fax) . ",\n admin_password = "******",\n admin_login = "******"\n WHERE admin_id = '" . $_SESSION['user_id'] . "'"); $today = date("Y-m-d H:i:s"); $db->Execute("UPDATE " . $owpDBTable['administrators_info'] . " \n\t SET admin_info_date_account_last_modified = " . $db->DBTimeStamp($today) . "\n WHERE admin_info_id = '" . $_SESSION['user_id'] . "'"); // build the message content $name = $firstname . " " . $lastname; if ($_POST['gender'] == 'm') { $email_text = EMAIL_GREET_MR . $_POST['lastname'] . ',' . "\n\n"; } else { $email_text = EMAIL_GREET_MS . $_POST['lastname'] . ',' . "\n\n"; } $email_text .= EMAIL_UPDATE . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_FOOT; owpMail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), OWP_OWNER, OWP_OWNER_EMAIL_ADDRESS); $email_owner = OWNER_EMAIL_SUBJECT . "\n" . EMAIL_SEPARATOR . "\n" . OWNER_EMAIL_NUMBER . ' ' . $admin_id . "\n" . OWNER_EMAIL_URL . "\n" . OWP_HTTP_SERVER . '/' . $owpFilename['administrators'] . '?selected_box=administrators&page=1&aID=' . $admin_id . '&action=edit' . "\n" . OWNER_EMAIL_DATE . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n" . EMAIL_SEPARATOR . "\n"; $email_owner .= OWNER_EMAIL_FIRST_NAME . ' ' . $firstname . "\n" . OWNER_EMAIL_LAST_NAME . ' ' . $lastname . "\n\n" . OWNER_EMAIL_CONTACT . "\n" . OWNER_EMAIL_TELEPHONE_NUMBER . ' ' . $telephone . "\n" . OWNER_EMAIL_FAX_NUMBER . ' ' . $fax . "\n" . OWNER_EMAIL_ADDRESS . ' ' . $email_address . "\n" . EMAIL_SEPARATOR . "\n\n" . OWNER_EMAIL_OPTIONS . "\n"; if ($newsletter == '1') { $email_owner .= OWNER_EMAIL_NEWSLETTER . ENTRY_NEWSLETTER_YES . "\n"; } else { $email_owner .= OWNER_EMAIL_NEWSLETTER . ENTRY_NEWSLETTER_NO . "\n"; } owpMail(OWP_OWNER, OWP_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, nl2br($email_owner), $name, $email_address); owpRedirect(owpLink($owpFilename['logoff'], '', 'SSL')); } require OWP_INCLUDES_DIR . 'nice_exit.php';
$name = $check_admin['admin_firstname'] . " " . $check_admin['admin_lastname']; if ($check_admin['admin_gender'] == 'm') { $email_text = EMAIL_GREET_MR . $check_admin['admin_lastname'] . ',' . "\n\n"; } else { $email_text = EMAIL_GREET_MS . $check_admin['admin_lastname'] . ',' . "\n\n"; } $email_text .= EMAIL_WELCOME . EMAIL_TEXT; if ($check_admin['admin_password'] == '') { include_once OWP_FUNCTIONS_DIR . $owpFilename['password_crypt']; $newpass = owpCreatePassword(PASSWORD_MIN_LENGTH); $crpted_password = owpCryptPassword($newpass); $db->Execute("UPDATE " . $owpDBTable['administrators'] . " \n SET admin_password = "******"\n WHERE admin_id = '" . $_GET['aID'] . "'"); $email_text .= sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass); } $email_text .= EMAIL_CONTACT . EMAIL_FOOT; owpMail($name, $check_admin['admin_email_address'], EMAIL_SUBJECT, nl2br($email_text), OWP_OWNER, OWP_OWNER_EMAIL_ADDRESS); owpRedirect(owpLink($owpFilename['administrators'], 'page=' . $_GET['page'] . '&aID=' . $_GET['aID'])); } } } } break; case 'update': $sPages = $_POST['adm_pages']; if ($adm_type == 'all') { $aPages = '*'; } else { $aPages = implode('|', $sPages); } $db->Execute("UPDATE " . $owpDBTable['administrators'] . " \n\t SET admin_gender = " . $db->qstr($admin_gender) . ", \n admin_firstname = " . $db->qstr($admin_firstname) . ", \n admin_lastname = " . $db->qstr($admin_lastname) . ",\n admin_email_address = " . $db->qstr($admin_email_address) . ", \n admin_telephone = " . $db->qstr($admin_telephone) . ",\n admin_fax = " . $db->qstr($admin_fax) . ",\n admin_allowed_pages = " . $db->qstr($aPages) . ", \n admin_newsletter = " . $db->qstr($admin_newsletter) . " \n WHERE admin_id = '" . $_GET['aID'] . "'"); $today = date("Y-m-d H:i:s");