($bannedIp['banExpiry'] != null ? coreFunctions::formatDate($bannedIp['banExpiry']) : t('later', 'later'))))); } } // initial validation if (notification::isErrors() == false) { if (!strlen($loginUsername)) { // log failure Auth::logFailedLoginAttempt(coreFunctions::getUsersIPAddress(), $loginUsername); notification::setError(t("please_enter_your_username", "Please enter your username")); } elseif (!strlen($loginPassword)) { // log failure Auth::logFailedLoginAttempt(coreFunctions::getUsersIPAddress(), $loginUsername); notification::setError(t("please_enter_your_password", "Please enter your password")); } } if (notification::isErrors() == false) { $rs = $Auth->login($loginUsername, $loginPassword, true); if ($rs) { // if we know the file if (isset($_REQUEST['loginShortUrl'])) { // download file $file = file::loadByShortUrl(trim($_REQUEST['loginShortUrl'])); if ($file) { coreFunctions::redirect($file->getFullShortUrl()); } } // successful login coreFunctions::redirect(coreFunctions::getCoreSitePath() . '/account_home.' . SITE_CONFIG_PAGE_EXTENSION); } else { // login failed notification::setError(t("username_and_password_is_invalid", "Your username and password are invalid")); } } } // header top require_once(SITE_TEMPLATES_PATH . '/partial/_header_file_manager_top.inc.php'); ?>