Changeset 880 for trunk/Modules/FrontPage/FrontPage.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FrontPage/FrontPage.php
r854 r880 31 31 global $Message, $MessageType; 32 32 33 if (array_key_exists('action', $_GET))33 if (array_key_exists('action', $_GET)) 34 34 { 35 if ($_GET['action'] == 'login')35 if ($_GET['action'] == 'login') 36 36 { 37 if (array_key_exists('LoginUser', $_POST) and array_key_exists('LoginPass', $_POST))37 if (array_key_exists('LoginUser', $_POST) and array_key_exists('LoginPass', $_POST)) 38 38 { 39 if (array_key_exists('StayLogged', $_POST)) $StayLogged = true;39 if (array_key_exists('StayLogged', $_POST)) $StayLogged = true; 40 40 else $StayLogged = false; 41 41 $this->System->User->Login($_POST['LoginUser'], $_POST['LoginPass'], $StayLogged); 42 if ($this->System->User->Role == LICENCE_ANONYMOUS)42 if ($this->System->User->Role == LICENCE_ANONYMOUS) 43 43 { 44 44 $Message = T('Incorrect name or password'); … … 55 55 } 56 56 } else 57 if ($_GET['action'] == 'logout')57 if ($_GET['action'] == 'logout') 58 58 { 59 if ($this->System->User->Role != LICENCE_ANONYMOUS)59 if ($this->System->User->Role != LICENCE_ANONYMOUS) 60 60 { 61 61 $this->System->ModuleManager->Modules['Log']->WriteLog('Odhlášení', LOG_TYPE_USER); … … 78 78 $this->System->ModuleManager->Modules['FrontPage']->HandleLoginForm(); 79 79 $Output = ''; 80 if (isset($Message)) $Output .= ShowMessage($Message, $MessageType);80 if (isset($Message)) $Output .= ShowMessage($Message, $MessageType); 81 81 82 82 $Output .= ''. … … 90 90 '<div class="box-left">'.$this->System->ModuleManager->Modules['Forum']->ShowBox().'</div>'. 91 91 '<div class="box-right">'.$this->System->ModuleManager->Modules['Translation']->ShowBox().'</div>'; 92 return ($Output);92 return $Output; 93 93 } 94 94 … … 96 96 { 97 97 // Cookies have to be used before any text is sent to output 98 if (!array_key_exists('HideWelcome', $_COOKIE)) $_COOKIE['HideWelcome'] = 0;99 if (isset($_GET['Action']))98 if (!array_key_exists('HideWelcome', $_COOKIE)) $_COOKIE['HideWelcome'] = 0; 99 if (isset($_GET['Action'])) 100 100 { 101 if ($_GET['Action'] == 'HideWelcome')101 if ($_GET['Action'] == 'HideWelcome') 102 102 { 103 103 $_COOKIE['HideWelcome'] = 1; 104 104 setcookie('HideWelcome', $_COOKIE['HideWelcome'], time() + 3600 * 24 * 365); 105 105 } 106 if ($_GET['Action'] == 'UnHideWelcome')106 if ($_GET['Action'] == 'UnHideWelcome') 107 107 { 108 108 $_COOKIE['HideWelcome'] = 0; … … 111 111 } 112 112 113 if (isset($_COOKIE['HideWelcome']) and ($_COOKIE['HideWelcome'] == 1))113 if (isset($_COOKIE['HideWelcome']) and ($_COOKIE['HideWelcome'] == 1)) 114 114 { 115 115 $Action = '<a href="?Action=UnHideWelcome">'.T('Show welcome').'</a>'; … … 122 122 123 123 // Echo text even if it is hidden because of caching by external searching engines 124 return ('<div style="'.$HideWelcome.'">'.124 return '<div style="'.$HideWelcome.'">'. 125 125 '<div id="bannertitle">'.$this->System->Config['Web']['Title'].'</div>'. 126 126 T('Open web system for translation texts from game World of Warcraft (WoW).<br/>'. … … 133 133 '<li>Thanks for sophisticated system of selectable exports you can download any part of translation, even just quests. And so exclude translation of items, creatures and others.</li>'. 134 134 '<li>Texts can be translated to multiple languages, e.g. Czech and Slovak.</li>'. 135 '</ul>').'</div>'.$Action );135 '</ul>').'</div>'.$Action; 136 136 } 137 137 }
Note:
See TracChangeset
for help on using the changeset viewer.