* @license http://www.gnu.org/licenses/ */ // *** Make sure the file isn't accessed directly defined('APPHP_EXEC') or die('Restricted Access'); //-------------------------------------------------------------------------- $act = isset($_POST['act']) ? prepare_input($_POST['act']) : ''; $password_sent = (bool) Session::Get('password_sent'); $email = isset($_POST['email']) ? prepare_input($_POST['email']) : ''; $msg = ''; if ($act == 'send') { if (!check_email_address($email)) { $msg = draw_important_message(_EMAIL_IS_WRONG, false); } else { if (!$password_sent) { $objAdmin = new Admins($objSession->GetSessionVariable('session_account_id')); if ($objAdmin->SendPassword($email)) { $msg = draw_success_message(_PASSWORD_SUCCESSFULLY_SENT, false); Session::Set('password_sent', true); } else { $msg = draw_important_message($objAdmin->error, false); } } else { $msg = draw_message(_PASSWORD_ALREADY_SENT, false); } } } // Draw title bar draw_title_bar(prepare_breadcrumbs(array(_ADMIN => '', _PASSWORD_FORGOTTEN => ''))); // Check if user is logged in if (!$objLogin->IsLoggedIn()) { echo $msg;