From 10ce319b5aa386cfe2936ba1689c63cead104976 Mon Sep 17 00:00:00 2001 From: SteveD Date: Mon, 18 Feb 2013 22:31:57 +0000 Subject: [PATCH] Issue #105 - hide LOGINMESSAGE in login.php if no error to report --- login.php | 189 +++++++++++++++++++++++++++--------------------------- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/login.php b/login.php index 2938d7693..0fe36470c 100644 --- a/login.php +++ b/login.php @@ -1,95 +1,96 @@ -"; - $LOGIN_TABLE_PASSWORD = ""; - if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) - { - $LOGIN_TABLE_PASSWORD .= "\n\n"; - } - if ($use_imagecode) - { - $LOGIN_TABLE_SECIMG_LAN = LAN_LOGIN_13; - $LOGIN_TABLE_SECIMG_HIDDEN = ""; - $LOGIN_TABLE_SECIMG_SECIMG = $sec_img->r_image(); - $LOGIN_TABLE_SECIMG_TEXTBOC = ""; - } - $LOGIN_TABLE_AUTOLOGIN = ""; - $LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8; - $LOGIN_TABLE_SUBMIT = ""; - - if (!isset($LOGIN_TABLE) || !$LOGIN_TABLE) - { - if (file_exists(THEME.'login_template.php')) - { - require_once(THEME.'login_template.php'); - } - else - { - require_once(e_BASE.$THEMES_DIRECTORY."templates/login_template.php"); - } - } - $text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE); - echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER); - - $login_message = LAN_LOGIN_3." | ".SITENAME; - $ns->tablerender($login_message, $text, 'login_page'); - - $LOGIN_TABLE_FOOTER_USERREG = ' '; // In case no registration system enabled - if ($pref['user_reg']) - { - $LOGIN_TABLE_FOOTER_USERREG = "".LAN_LOGIN_11.""; - } - echo preg_replace("/\{([^ ]*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_FOOTER); -} - -echo ""; - -$sql->db_Close(); - +"; + $LOGIN_TABLE_PASSWORD = ""; + if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) + { + $LOGIN_TABLE_PASSWORD .= "\n\n"; + } + if ($use_imagecode) + { + $LOGIN_TABLE_SECIMG_LAN = LAN_LOGIN_13; + $LOGIN_TABLE_SECIMG_HIDDEN = ""; + $LOGIN_TABLE_SECIMG_SECIMG = $sec_img->r_image(); + $LOGIN_TABLE_SECIMG_TEXTBOC = ""; + } + $LOGIN_TABLE_AUTOLOGIN = ""; + $LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8; + $LOGIN_TABLE_SUBMIT = ""; + + if (!isset($LOGIN_TABLE) || !$LOGIN_TABLE) + { + if (file_exists(THEME.'login_template.php')) + { + require_once(THEME.'login_template.php'); + } + else + { + require_once(e_BASE.$THEMES_DIRECTORY."templates/login_template.php"); + } + } + $text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE); + echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER); + + $login_message = LAN_LOGIN_3." | ".SITENAME; + $ns->tablerender($login_message, $text, 'login_page'); + + $LOGIN_TABLE_FOOTER_USERREG = ' '; // In case no registration system enabled + if ($pref['user_reg']) + { + $LOGIN_TABLE_FOOTER_USERREG = "".LAN_LOGIN_11.""; + } + echo preg_replace("/\{([^ ]*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_FOOTER); +} + +echo ""; + +$sql->db_Close(); + ?> \ No newline at end of file