Changeset 712
- Timestamp:
- Jan 5, 2014, 4:28:51 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FrontPage/FrontPage.php
r691 r712 36 36 if(array_key_exists('LoginUser', $_POST) and array_key_exists('LoginPass', $_POST)) 37 37 { 38 $this->System->User->Login($_POST['LoginUser'], $_POST['LoginPass']); 38 if(array_key_exists('LoginUser', $_POST)) $StayLogged = true; 39 else $StayLogged = false; 40 $this->System->User->Login($_POST['LoginUser'], $_POST['LoginPass'], $StayLogged); 39 41 if($this->System->User->Role == LICENCE_ANONYMOUS) 40 42 { -
trunk/Modules/User/User.php
r627 r712 12 12 parent::__construct($System); 13 13 $this->Name = 'User'; 14 $this->Version = '1. 0';14 $this->Version = '1.1'; 15 15 $this->Creator = 'Chronos'; 16 16 $this->License = 'GNU/GPL'; … … 26 26 $this->System->RegisterPage('registrace.php', 'PageUserRegistration'); 27 27 $this->System->RegisterPage('user.php', 'PageUserProfile'); 28 $this->System->RegisterPage('login', 'PageUserLogin'); 28 29 $this->System->RegisterMenuItem(array( 29 30 'Title' => T('Translators'), … … 41 42 { 42 43 $Output = T('Online translators').':<br />'; 43 $DbResult = $this->System->Database->query('SELECT ` Name`, `GM`, `User`.`ID` AS `ID` FROM `User` '.44 'LEFT JOIN `User Trace` ON `UserTrace`.`User` = `User`.`Id` '.45 'WHERE (` LastLogin` >= NOW() - 300) AND ((`LastLogout` < `LastLogin`) OR (ISNULL(`LastLogout`)))');44 $DbResult = $this->System->Database->query('SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '. 45 'LEFT JOIN `User` ON `User`.`ID` = `UserOnline`.`User` '. 46 'WHERE (`ActivityTime` >= NOW() - 300) '); 46 47 while($DbUser = $DbResult->fetch_assoc()) 47 48 { … … 51 52 return($Output); 52 53 } 54 } 55 56 class PageUserLogin extends Page 57 { 58 function Show() 59 { 60 $Output = '<form action="'.$this->System->Link('/?action=login').'" method="post">'. 61 '<fieldset><legend>'.T('Login').'</legend> 62 <table> 63 <tr> 64 <td>'.T('Name').':</td><td><input type="text" name="LoginUser" size="13" /></td> 65 </tr> 66 <tr> 67 <td>'.T('Password').':</td><td><input type="password" name="LoginPass" size="13" /></td> 68 </tr> 69 <tr> 70 <td>'.T('Stay logged').':</td><td><input type="checkbox" name="StayLogged" /></td> 71 </tr> 72 <tr> 73 <th><input type="submit" value="'.T('Do login').'" /></th> 74 </tr> 75 </table> 76 </fieldset></form>'; 77 return($Output); 78 } 53 79 } 54 80 … … 68 94 var $Language; 69 95 var $System; 96 var $Database; 97 var $OnlineStateTimeout; 70 98 71 99 function __construct($System) 72 100 { 73 101 $this->System = &$System; 74 if(isset($_SESSION)) $this->Restore(); 75 else $this->SetAnonymous(); 102 $this->Database = &$System->Database; 103 $this->OnlineStateTimeout = 600; // in seconds 104 if(isset($_SESSION)) $this->Check(); 76 105 } 77 106 78 107 function __destroy() 79 108 { 80 if(isset($_SESSION)) $this->Store();81 }82 83 function Login($Name, $Password)84 {85 $DbResult = $this-> System->Database->query('SELECT `ID` FROM `User` WHERE '.109 } 110 111 function Login($Name, $Password, $StayLogged = false) 112 { 113 $SID = session_id(); 114 $DbResult = $this->Database->query('SELECT `ID` FROM `User` WHERE '. 86 115 'LOWER(`Name`) = LOWER("'.$Name.'") AND `Pass` = '.$this->CryptPasswordSQL('"'.$Password.'"', '`Salt`')); 87 116 if($DbResult->num_rows > 0) 88 117 { 89 118 $User = $DbResult->fetch_assoc(); 90 $this->Id = $User['ID']; 91 $this->Load(); 92 $this->System->ModuleManager->Modules['Log']->WriteLog('Login: '.$Name, LOG_TYPE_USER); 93 $this->UpdateState(); 94 } else $this->Role = LICENCE_ANONYMOUS; 119 $this->Id = $User['ID']; 120 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => $User['ID'], 'StayLogged' => $StayLogged)); 121 $this->Database->query('UPDATE `UserTrace` SET '. 122 '`LastLogin` = NOW(), '. 123 '`LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", '. 124 '`UserAgent` = "'.$this->System->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'" '. 125 ' WHERE `User` = '.$this->Id); 126 $this->System->ModuleManager->Modules['Log']->WriteLog('Login', LOG_TYPE_USER); 127 $this->Check(); 128 }; 95 129 } 96 130 97 131 function Logout() 98 132 { 133 $SID = session_id(); 99 134 if($this->Role != LICENCE_ANONYMOUS) 100 $this->System->Database->query('UPDATE `UserTrace` SET '. 135 { 136 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => null)); 137 $this->Database->query('UPDATE `UserTrace` SET '. 101 138 '`LastLogout` = NOW() WHERE `User` = '.$this->Id); 102 $this->SetAnonymous(); 139 $this->System->ModuleManager->Modules['Log']->WriteLog('Logout: '.$this->Name, LOG_TYPE_USER); 140 $this->Check(); 141 } 103 142 } 104 143 105 144 function Load() 106 145 { 107 $DbResult = $this-> System->Database->query('SELECT * FROM `User` WHERE `ID` = '.$this->Id);146 $DbResult = $this->Database->query('SELECT * FROM `User` WHERE `ID` = '.$this->Id); 108 147 if($DbResult->num_rows > 0) 109 148 { … … 122 161 } 123 162 124 function Restore()125 {126 if(array_key_exists('UserId', $_SESSION))127 {128 $this->Id = $_SESSION['UserId'];129 if($this->Id != 0)130 {131 $this->Load();132 $this->UpdateState();133 } else $this->SetAnonymous();134 } else $this->SetAnonymous();135 }136 137 function Store()138 {139 $_SESSION['UserId'] = $this->Id;140 }141 142 163 function SetAnonymous() 143 164 { … … 159 180 function CheckToken($Licence, $Token) 160 181 { 161 $DbResult = $this-> System->Database->select('APIToken', 'User', '`Token`="'.$Token.'"');182 $DbResult = $this->Database->select('APIToken', 'User', '`Token`="'.$Token.'"'); 162 183 if($DbResult->num_rows > 0) 163 184 { 164 185 $DbRow = $DbResult->fetch_assoc(); 165 $DbResult2 = $this-> System->Database->select('User', 'GM', '`ID`="'.$DbRow['User'].'"');186 $DbResult2 = $this->Database->select('User', 'GM', '`ID`="'.$DbRow['User'].'"'); 166 187 $DbRow2 = $DbResult2->fetch_assoc(); 167 188 return($DbRow2['GM'] >= $Licence); … … 179 200 } 180 201 181 function UpdateState() 182 { 183 if(array_key_exists('REMOTE_ADDR', $_SERVER) and ($this->Role != LICENCE_ANONYMOUS)) 184 $this->System->Database->query('UPDATE `UserTrace` SET '. 185 '`LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", '. 186 '`LastLogin` = NOW(), '. 187 '`UserAgent` = "'.$this->System->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'" '. 188 'WHERE `User` = '.$this->Id); 202 function Check() 203 { 204 $SID = session_id(); 205 // Lookup user record 206 $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"'); 207 if($Query->num_rows > 0) 208 { 209 // Refresh time of last access 210 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('ActivityTime' => 'NOW()')); 211 } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 212 'User' => null, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 213 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 214 'ScriptName' => $_SERVER['PHP_SELF'])); 215 216 // Check login 217 $Query = $this->Database->select('UserOnline', '*', '`SessionId`="'.$SID.'"'); 218 $Row = $Query->fetch_assoc(); 219 if($Row['User'] != '') 220 { 221 $this->Id = $Row['User']; 222 $this->Load(); 223 } else 224 { 225 $this->SetAnonymous(); 226 } 227 228 // Remove nonactive users 229 $DbResult = $this->Database->select('UserOnline', '`Id`, `User`', '(`ActivityTime` < DATE_SUB(NOW(), INTERVAL '.$this->OnlineStateTimeout.' SECOND)) AND (`StayLogged` = 0)'); 230 while($DbRow = $DbResult->fetch_array()) 231 { 232 $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']); 233 } 189 234 } 190 235 … … 192 237 { 193 238 $Salt = $this->GetPasswordSalt(); 194 $this-> System->Database->query('INSERT INTO `User` '.239 $this->Database->query('INSERT INTO `User` '. 195 240 '(`Name` , `Pass` , `Salt`, `Email` , `Language` , `Team` , `NeedUpdate`, `RegistrationTime`, `PreferredVersion` ) '. 196 241 'VALUES ("'.$UserName.'", '.$this->CryptPasswordSQL('"'.$Password.'"', '"'.$Salt.'"'). 197 242 ', "'.$Salt.'", "'.$Email.'", '.$Language.', '.$Team.', 1, NOW(), '.$PreferredVersion.')'); 198 $UserId = $this-> System->Database->insert_id;199 $this-> System->Database->query('INSERT INTO `UserTrace` (`User`, `LastIP`, `UserAgent`) '.243 $UserId = $this->Database->insert_id; 244 $this->Database->query('INSERT INTO `UserTrace` (`User`, `LastIP`, `UserAgent`) '. 200 245 'VALUES ('.$UserId.', "'.$_SERVER['REMOTE_ADDR'].'", '. 201 '"'.$this-> System->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")');246 '"'.$this->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")'); 202 247 } 203 248 } -
trunk/admin/UpdateTrace.php
r695 r712 1949 1949 1950 1950 -- 1951 -- Omezen à pro exportovanétabulky1952 -- 1953 1954 -- 1955 -- Omezen Ãpro tabulku `CzWoWPackageVersion`1951 -- Omezení pro exportované tabulky 1952 -- 1953 1954 -- 1955 -- Omezení pro tabulku `CzWoWPackageVersion` 1956 1956 -- 1957 1957 ALTER TABLE `CzWoWPackageVersion` … … 1959 1959 1960 1960 -- 1961 -- Omezen Ãpro tabulku `Dictionary`1961 -- Omezení pro tabulku `Dictionary` 1962 1962 -- 1963 1963 ALTER TABLE `Dictionary` … … 1966 1966 1967 1967 -- 1968 -- Omezen Ãpro tabulku `Export`1968 -- Omezení pro tabulku `Export` 1969 1969 -- 1970 1970 ALTER TABLE `Export` … … 1974 1974 1975 1975 -- 1976 -- Omezen Ãpro tabulku `ExportGroup`1976 -- Omezení pro tabulku `ExportGroup` 1977 1977 -- 1978 1978 ALTER TABLE `ExportGroup` … … 1982 1982 1983 1983 -- 1984 -- Omezen Ãpro tabulku `ExportLanguage`1984 -- Omezení pro tabulku `ExportLanguage` 1985 1985 -- 1986 1986 ALTER TABLE `ExportLanguage` … … 1989 1989 1990 1990 -- 1991 -- Omezen Ãpro tabulku `ExportTask`1991 -- Omezení pro tabulku `ExportTask` 1992 1992 -- 1993 1993 ALTER TABLE `ExportTask` … … 1995 1995 1996 1996 -- 1997 -- Omezen Ãpro tabulku `ExportUser`1997 -- Omezení pro tabulku `ExportUser` 1998 1998 -- 1999 1999 ALTER TABLE `ExportUser` … … 2002 2002 2003 2003 -- 2004 -- Omezen Ãpro tabulku `ExportVersion`2004 -- Omezení pro tabulku `ExportVersion` 2005 2005 -- 2006 2006 ALTER TABLE `ExportVersion` … … 2009 2009 2010 2010 -- 2011 -- Omezen Ãpro tabulku `GroupItem`2011 -- Omezení pro tabulku `GroupItem` 2012 2012 -- 2013 2013 ALTER TABLE `GroupItem` … … 2015 2015 2016 2016 -- 2017 -- Omezen Ãpro tabulku `GroupItemDBC`2017 -- Omezení pro tabulku `GroupItemDBC` 2018 2018 -- 2019 2019 ALTER TABLE `GroupItemDBC` … … 2022 2022 2023 2023 -- 2024 -- Omezen Ãpro tabulku `Log`2024 -- Omezení pro tabulku `Log` 2025 2025 -- 2026 2026 ALTER TABLE `Log` … … 2029 2029 2030 2030 -- 2031 -- Omezen Ãpro tabulku `News`2031 -- Omezení pro tabulku `News` 2032 2032 -- 2033 2033 ALTER TABLE `News` … … 2035 2035 2036 2036 -- 2037 -- Omezen Ãpro tabulku `Referrer`2037 -- Omezení pro tabulku `Referrer` 2038 2038 -- 2039 2039 ALTER TABLE `Referrer` … … 2041 2041 2042 2042 -- 2043 -- Omezen Ãpro tabulku `ShoutBox`2043 -- Omezení pro tabulku `ShoutBox` 2044 2044 -- 2045 2045 ALTER TABLE `ShoutBox` … … 2047 2047 2048 2048 -- 2049 -- Omezen Ãpro tabulku `Team`2049 -- Omezení pro tabulku `Team` 2050 2050 -- 2051 2051 ALTER TABLE `Team` … … 2053 2053 2054 2054 -- 2055 -- Omezen Ãpro tabulku `TextAchievement`2055 -- Omezení pro tabulku `TextAchievement` 2056 2056 -- 2057 2057 ALTER TABLE `TextAchievement` … … 2063 2063 2064 2064 -- 2065 -- Omezen Ãpro tabulku `TextAchievementCategory`2065 -- Omezení pro tabulku `TextAchievementCategory` 2066 2066 -- 2067 2067 ALTER TABLE `TextAchievementCategory` … … 2071 2071 2072 2072 -- 2073 -- Omezen Ãpro tabulku `TextAchievementCriteria`2073 -- Omezení pro tabulku `TextAchievementCriteria` 2074 2074 -- 2075 2075 ALTER TABLE `TextAchievementCriteria` … … 2079 2079 2080 2080 -- 2081 -- Omezen Ãpro tabulku `TextArea`2081 -- Omezení pro tabulku `TextArea` 2082 2082 -- 2083 2083 ALTER TABLE `TextArea` … … 2093 2093 2094 2094 -- 2095 -- Omezen Ãpro tabulku `TextAreaPOI`2095 -- Omezení pro tabulku `TextAreaPOI` 2096 2096 -- 2097 2097 ALTER TABLE `TextAreaPOI` … … 2101 2101 2102 2102 -- 2103 -- Omezen Ãpro tabulku `TextAreaTriggerTavern`2103 -- Omezení pro tabulku `TextAreaTriggerTavern` 2104 2104 -- 2105 2105 ALTER TABLE `TextAreaTriggerTavern` … … 2109 2109 2110 2110 -- 2111 -- Omezen Ãpro tabulku `TextAreaTriggerTeleport`2111 -- Omezení pro tabulku `TextAreaTriggerTeleport` 2112 2112 -- 2113 2113 ALTER TABLE `TextAreaTriggerTeleport` … … 2117 2117 2118 2118 -- 2119 -- Omezen Ãpro tabulku `TextCharacterClass`2119 -- Omezení pro tabulku `TextCharacterClass` 2120 2120 -- 2121 2121 ALTER TABLE `TextCharacterClass` … … 2125 2125 2126 2126 -- 2127 -- Omezen Ãpro tabulku `TextCharacterRace`2127 -- Omezení pro tabulku `TextCharacterRace` 2128 2128 -- 2129 2129 ALTER TABLE `TextCharacterRace` … … 2133 2133 2134 2134 -- 2135 -- Omezen Ãpro tabulku `TextChatChannel`2135 -- Omezení pro tabulku `TextChatChannel` 2136 2136 -- 2137 2137 ALTER TABLE `TextChatChannel` … … 2141 2141 2142 2142 -- 2143 -- Omezen Ãpro tabulku `TextCreature`2143 -- Omezení pro tabulku `TextCreature` 2144 2144 -- 2145 2145 ALTER TABLE `TextCreature` … … 2149 2149 2150 2150 -- 2151 -- Omezen Ãpro tabulku `TextCreatureType`2151 -- Omezení pro tabulku `TextCreatureType` 2152 2152 -- 2153 2153 ALTER TABLE `TextCreatureType` … … 2157 2157 2158 2158 -- 2159 -- Omezen Ãpro tabulku `TextEmote`2159 -- Omezení pro tabulku `TextEmote` 2160 2160 -- 2161 2161 ALTER TABLE `TextEmote` … … 2165 2165 2166 2166 -- 2167 -- Omezen Ãpro tabulku `TextGameObject`2167 -- Omezení pro tabulku `TextGameObject` 2168 2168 -- 2169 2169 ALTER TABLE `TextGameObject` … … 2173 2173 2174 2174 -- 2175 -- Omezen Ãpro tabulku `TextGameTip`2175 -- Omezení pro tabulku `TextGameTip` 2176 2176 -- 2177 2177 ALTER TABLE `TextGameTip` … … 2181 2181 2182 2182 -- 2183 -- Omezen Ãpro tabulku `TextGlobalString`2183 -- Omezení pro tabulku `TextGlobalString` 2184 2184 -- 2185 2185 ALTER TABLE `TextGlobalString` … … 2188 2188 2189 2189 -- 2190 -- Omezen Ãpro tabulku `TextGlueLocalization`2190 -- Omezení pro tabulku `TextGlueLocalization` 2191 2191 -- 2192 2192 ALTER TABLE `TextGlueLocalization` … … 2196 2196 2197 2197 -- 2198 -- Omezen Ãpro tabulku `TextGlueString`2198 -- Omezení pro tabulku `TextGlueString` 2199 2199 -- 2200 2200 ALTER TABLE `TextGlueString` … … 2203 2203 2204 2204 -- 2205 -- Omezen Ãpro tabulku `TextItem`2205 -- Omezení pro tabulku `TextItem` 2206 2206 -- 2207 2207 ALTER TABLE `TextItem` … … 2211 2211 2212 2212 -- 2213 -- Omezen Ãpro tabulku `TextItemSubClass`2213 -- Omezení pro tabulku `TextItemSubClass` 2214 2214 -- 2215 2215 ALTER TABLE `TextItemSubClass` … … 2219 2219 2220 2220 -- 2221 -- Omezen Ãpro tabulku `TextMangosCommand`2221 -- Omezení pro tabulku `TextMangosCommand` 2222 2222 -- 2223 2223 ALTER TABLE `TextMangosCommand` … … 2226 2226 2227 2227 -- 2228 -- Omezen Ãpro tabulku `TextMangosString`2228 -- Omezení pro tabulku `TextMangosString` 2229 2229 -- 2230 2230 ALTER TABLE `TextMangosString` … … 2234 2234 2235 2235 -- 2236 -- Omezen Ãpro tabulku `TextNPC`2236 -- Omezení pro tabulku `TextNPC` 2237 2237 -- 2238 2238 ALTER TABLE `TextNPC` … … 2241 2241 2242 2242 -- 2243 -- Omezen Ãpro tabulku `TextNPCOption`2243 -- Omezení pro tabulku `TextNPCOption` 2244 2244 -- 2245 2245 ALTER TABLE `TextNPCOption` … … 2249 2249 2250 2250 -- 2251 -- Omezen Ãpro tabulku `TextPage`2251 -- Omezení pro tabulku `TextPage` 2252 2252 -- 2253 2253 ALTER TABLE `TextPage` … … 2256 2256 2257 2257 -- 2258 -- Omezen Ãpro tabulku `TextQuest`2258 -- Omezení pro tabulku `TextQuest` 2259 2259 -- 2260 2260 ALTER TABLE `TextQuest` … … 2265 2265 2266 2266 -- 2267 -- Omezen Ãpro tabulku `TextSD2EventAI`2267 -- Omezení pro tabulku `TextSD2EventAI` 2268 2268 -- 2269 2269 ALTER TABLE `TextSD2EventAI` … … 2273 2273 2274 2274 -- 2275 -- Omezen Ãpro tabulku `TextSD2Script`2275 -- Omezení pro tabulku `TextSD2Script` 2276 2276 -- 2277 2277 ALTER TABLE `TextSD2Script` … … 2281 2281 2282 2282 -- 2283 -- Omezen Ãpro tabulku `TextSkillCategory`2283 -- Omezení pro tabulku `TextSkillCategory` 2284 2284 -- 2285 2285 ALTER TABLE `TextSkillCategory` … … 2294 2294 2295 2295 -- 2296 -- Omezen Ãpro tabulku `TextSkillLine`2296 -- Omezení pro tabulku `TextSkillLine` 2297 2297 -- 2298 2298 ALTER TABLE `TextSkillLine` … … 2302 2302 2303 2303 -- 2304 -- Omezen Ãpro tabulku `TextSpell`2304 -- Omezení pro tabulku `TextSpell` 2305 2305 -- 2306 2306 ALTER TABLE `TextSpell` … … 2310 2310 2311 2311 -- 2312 -- Omezen Ãpro tabulku `TextTalentTab`2312 -- Omezení pro tabulku `TextTalentTab` 2313 2313 -- 2314 2314 ALTER TABLE `TextTalentTab` … … 2318 2318 2319 2319 -- 2320 -- Omezen Ãpro tabulku `TextTotemCategory`2320 -- Omezení pro tabulku `TextTotemCategory` 2321 2321 -- 2322 2322 ALTER TABLE `TextTotemCategory` … … 2326 2326 2327 2327 -- 2328 -- Omezen Ãpro tabulku `TextTransport`2328 -- Omezení pro tabulku `TextTransport` 2329 2329 -- 2330 2330 ALTER TABLE `TextTransport` … … 2334 2334 2335 2335 -- 2336 -- Omezen Ãpro tabulku `TextWorldStateUI`2336 -- Omezení pro tabulku `TextWorldStateUI` 2337 2337 -- 2338 2338 ALTER TABLE `TextWorldStateUI` … … 2342 2342 2343 2343 -- 2344 -- Omezen Ãpro tabulku `User`2344 -- Omezení pro tabulku `User` 2345 2345 -- 2346 2346 ALTER TABLE `User` … … 2349 2349 2350 2350 $Manager->Execute('INSERT INTO `DbVersion` (`Id` ,`Revision`) VALUES ("1", "498")'); 2351 $Manager->Execute('INSERT INTO `Language` (`Id` ,`Name` ,`Enabled`)VALUES (NULL , "Angli Ätina", 0);');2352 $Manager->Execute('INSERT INTO `Language` (`Id` ,`Name` ,`Enabled`)VALUES (NULL , " ÄeÅ¡tina", 1);');2351 $Manager->Execute('INSERT INTO `Language` (`Id` ,`Name` ,`Enabled`)VALUES (NULL , "Angličtina", 0);'); 2352 $Manager->Execute('INSERT INTO `Language` (`Id` ,`Name` ,`Enabled`)VALUES (NULL , "Čeština", 1);'); 2353 2353 $Manager->Execute("INSERT INTO `LogType` (`Id`, `Name`, `Color`, `Description`) VALUES 2354 (1, 'P Åeklady', 'green', 'Operace s pÅeklady'),2355 (2, 'Sta ženÃ', 'brown', 'StáhnutÃsouboru'),2356 (3, 'U živatelé', 'blue', 'PÅihlášenà uživatelů, nastavenÃ, registrace'),2357 (4, 'Moder átor', 'orange', 'Operace administrátorů a moderátorů'),2358 (10, 'Chyby', 'red', 'Zachycen é chybové hlášenÃ'),2359 (11, 'Import', 'magenta', 'Z áznam zmÄn pÅi importu'),2360 (12, 'Export', '#1080F0', 'Z áznam akcÃs exporty'),2361 (13, 'CzWoW', 'violet', 'P ÅekládacÃaddon CzWoW'),2362 (14, 'Administrace', 'olive', 'Administrativn Ãakce');");2354 (1, 'Překlady', 'green', 'Operace s překlady'), 2355 (2, 'Stažení', 'brown', 'Stáhnutí souboru'), 2356 (3, 'Uživatelé', 'blue', 'Přihlášení uživatelů, nastavení, registrace'), 2357 (4, 'Moderátor', 'orange', 'Operace administrátorů a moderátorů'), 2358 (10, 'Chyby', 'red', 'Zachycené chybové hlášení'), 2359 (11, 'Import', 'magenta', 'Záznam změn při importu'), 2360 (12, 'Export', '#1080F0', 'Záznam akcí s exporty'), 2361 (13, 'CzWoW', 'violet', 'Překládací addon CzWoW'), 2362 (14, 'Administrace', 'olive', 'Administrativní akce');"); 2363 2363 $Manager->Execute("INSERT INTO `ClientVersion` (`Id`, `Version`, `BuildNumber`, `ReleaseDate`, `Title`, `Imported`) VALUES 2364 2364 (1, '3.1.3', 9947, '2009-06-02', '', 0), … … 2467 2467 (104, '5.1.0a', 16357, '2012-12-10', '', 0);"); 2468 2468 $Manager->Execute("INSERT INTO `ExportOutputType` (`Id`, `Name`) VALUES 2469 (1, 'MaNGOS SQL - p ÅÃmo zobrazit'),2470 (2, 'MaNGOS SQL - komprimovan ýsoubor'),2471 (3, 'AoWoW SQL - p ÅÃmo zobrazit'),2472 (4, 'AoWoW SQL - komprimovan ýsoubor'),2473 (5, 'XML - p ÅÃmo zobrazit'),2474 (6, 'XML - komprimovan ýsoubor'),2475 (7, 'Addon - komprimovan ýsoubor'),2476 (8, 'Lua skripty - komprimovan ýsoubor'),2469 (1, 'MaNGOS SQL - přímo zobrazit'), 2470 (2, 'MaNGOS SQL - komprimovaný soubor'), 2471 (3, 'AoWoW SQL - přímo zobrazit'), 2472 (4, 'AoWoW SQL - komprimovaný soubor'), 2473 (5, 'XML - přímo zobrazit'), 2474 (6, 'XML - komprimovaný soubor'), 2475 (7, 'Addon - komprimovaný soubor'), 2476 (8, 'Lua skripty - komprimovaný soubor'), 2477 2477 (9, 'DBC soubory');"); 2478 2478 } … … 2612 2612 { 2613 2613 $Manager->Execute("INSERT INTO `LogType` (`Id` ,`Name` ,`Color` ,`Description`) 2614 VALUES (NULL , 'Nenalezen é', 'teal', 'Nenalezené stránky');");2614 VALUES (NULL , 'Nenalezené', 'teal', 'Nenalezené stránky');"); 2615 2615 } 2616 2616 … … 2644 2644 ADD `Code` VARCHAR( 255 ) NOT NULL ;'); 2645 2645 $Manager->Execute('UPDATE `Language` SET `Default` = 1, 2646 `Code` = "en" WHERE `Language`.`Name` ="Angli Äitna";');2647 $Manager->Execute('UPDATE `Language` SET `Code` = "cs" WHERE `Language`.`Name` =" ÄeÅ¡tina";');2648 $Manager->Execute('UPDATE `Language` SET `Code` = "sk" WHERE `Language`.`Name` ="Sloven Å¡tina";');2646 `Code` = "en" WHERE `Language`.`Name` ="Angličitna";'); 2647 $Manager->Execute('UPDATE `Language` SET `Code` = "cs" WHERE `Language`.`Name` ="Čeština";'); 2648 $Manager->Execute('UPDATE `Language` SET `Code` = "sk" WHERE `Language`.`Name` ="Slovenština";'); 2649 2649 } 2650 2650 … … 2675 2675 function UpdateTo666($Manager) 2676 2676 { 2677 $Manager->Execute('INSERT INTO `ExportOutputType` (`Id` ,`Name`)VALUES (\'10\' , \'Instalace - Instala ènísoubor pro klienta\');');2677 $Manager->Execute('INSERT INTO `ExportOutputType` (`Id` ,`Name`)VALUES (\'10\' , \'Instalace - Instala�n� soubor pro klienta\');'); 2678 2678 $Manager->Execute('INSERT INTO `ExportVersion` (`Id` ,`ExportType` ,`ClientVersion`)VALUES (NULL , \'10\', \'84\');'); 2679 2679 } … … 2692 2692 'ADD CONSTRAINT `ExportGroupItem_ibfk_1` FOREIGN KEY (`Export`) REFERENCES `Export` (`Id`),'. 2693 2693 'ADD CONSTRAINT `ExportGroupItem_ibfk_2` FOREIGN KEY (`GroupItem`) REFERENCES `GroupItem` (`Id`);'); 2694 } 2695 2696 function UpdateTo712($Manager) 2697 { 2698 $Manager->Execute('CREATE TABLE IF NOT EXISTS `UserOnline` ( 2699 `Id` int(11) NOT NULL AUTO_INCREMENT, 2700 `User` int(11) DEFAULT NULL, 2701 `ActivityTime` datetime NULL, 2702 `LoginTime` datetime NULL, 2703 `SessionId` varchar(255) NOT NULL DEFAULT "", 2704 `IpAddress` varchar(16) NOT NULL DEFAULT "", 2705 `HostName` varchar(255) NOT NULL DEFAULT "", 2706 `ScriptName` varchar(255) NOT NULL, 2707 `StayLogged` int(11) NOT NULL, 2708 PRIMARY KEY (`Id`), 2709 KEY `User` (`User`) 2710 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 2694 2711 } 2695 2712 … … 2713 2730 666 => array('Revision' => 678 , 'Function' => 'UpdateTo678'), 2714 2731 678 => array('Revision' => 695 , 'Function' => 'UpdateTo695'), 2732 695 => array('Revision' => 712 , 'Function' => 'UpdateTo712'), 2715 2733 ); -
trunk/includes/Version.php
r711 r712 6 6 // and system will need database update. 7 7 8 $Revision = 71 1; // Subversion revision9 $DatabaseRevision = 695; // Database structure revision8 $Revision = 712; // Subversion revision 9 $DatabaseRevision = 712; // Database structure revision 10 10 $ReleaseTime = '2014-01-05'; -
trunk/includes/global.php
r703 r712 712 712 return($Output); 713 713 } 714 715 function GetRemoteAddress() 716 { 717 if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR'] ; 718 else if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR']; 719 else $IP = '0.0.0.0'; 720 return($IP); 721 } -
trunk/includes/system.php
r711 r712 279 279 } else 280 280 { 281 $Output .= '<form action="'.$this->System->Link('/?action=login').'" method="post"> '. 282 T('Name').': <input type="text" name="LoginUser" size="8 " /> '. 283 T('Password').': <td><input type="password" name="LoginPass" size="8" /> '. 284 '<input type="submit" value="'.T('Login').'" /></form> '. 281 $Output .= '<a href="'.$this->System->Link('/login/').'">'.T('Login').'</a> '. 285 282 '<a href="'.$this->System->Link('/registrace.php').'">'.T('Registration').'</a>'; 286 283 } … … 446 443 '</body>'. 447 444 '</html>'; 448 $this->System->User->Store();449 445 return($Output); 450 446 }
Note:
See TracChangeset
for help on using the changeset viewer.