Changeset 805
- Timestamp:
- May 24, 2014, 11:35:47 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ProcessAoWoWExport.php
r737 r805 2 2 3 3 ini_set('memory_limit', '100M'); 4 5 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';6 $_SERVER['REQUEST_URI'] = __FILE__;7 4 8 5 include_once('../../includes/global.php'); … … 14 11 $System->DoNotShowPage = true; 15 12 $System->Run(); 16 17 $_SERVER['REQUEST_URI'] = __FILE__;18 13 19 14 $Output = ''; -
trunk/Modules/Export/ProcessTask.php
r776 r805 2 2 3 3 ini_set('memory_limit', '100M'); 4 5 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';6 $_SERVER['REQUEST_URI'] = __FILE__;7 4 8 5 include_once(dirname(__FILE__).'/../../includes/global.php'); -
trunk/Modules/Export/cmdmpqexport.php
r741 r805 2 2 3 3 ini_set('memory_limit', '100M'); 4 5 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';6 $_SERVER['REQUEST_URI'] = __FILE__;7 4 8 5 include_once(dirname(__FILE__).'/../../includes/global.php'); -
trunk/Modules/Forum/Forum.php
r792 r805 261 261 $this->System->Database->query('INSERT INTO `'.$Table.'` ( `User`, `UserName` , `Text` , `Date` , `IP` , `Thread` ) '. 262 262 ' VALUES ('.$this->System->User->Id.', "'.$this->System->User->Name. 263 '", "'.$Text.'", NOW(), "'. $_SERVER['REMOTE_ADDR'].'","'.$_GET['Thread'].'")');263 '", "'.$Text.'", NOW(), "'.GetRemoteAddress().'","'.$_GET['Thread'].'")'); 264 264 } else $Output .= ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 265 265 } else 266 266 $this->System->Database->query('INSERT INTO `'.$Table.'` ( `User`, `UserName` , `Text` , `Date` , `IP`) '. 267 267 ' VALUES ('.$this->System->User->Id.', "'.$this->System->User->Name. 268 '", "'.$Text.'", NOW(), "'. $_SERVER['REMOTE_ADDR'].'")');268 '", "'.$Text.'", NOW(), "'.GetRemoteAddress().'")'); 269 269 $Output .= ShowMessage(T('Added.')); 270 270 } -
trunk/Modules/Import/cmd.php
r727 r805 1 1 <?php 2 3 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';4 $_SERVER['REQUEST_URI'] = __FILE__;5 6 2 7 3 include_once('../../includes/global.php'); … … 13 9 $System->Run(); 14 10 $Import = new Import($System); 15 $_SERVER['REQUEST_URI'] = __FILE__;16 11 17 12 $Output = ''; -
trunk/Modules/Log/Log.php
r765 r805 33 33 function WriteLog($Text, $Type) 34 34 { 35 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 36 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 37 38 if(isset($this->System->User) and !is_null($this->System->User->Id)) $UserId = $this->System->User->Id; 35 if(isset($this->System->User) and !is_null($this->System->User->Id)) 36 $UserId = $this->System->User->Id; 39 37 else $UserId = 'NULL'; 40 38 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 41 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 39 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'. 40 GetRemoteAddress().'", "'.GetRequestURI().'")'; 42 41 $this->System->Database->query($Query); 43 42 } … … 60 59 { 61 60 global $System, $User; 62 63 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 64 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 65 61 66 62 if(isset($User) and !is_null($User->Id)) $UserId = $User->Id; 67 63 else $UserId = 'NULL'; 68 64 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 69 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 65 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'. 66 GetRemoteAddress().'", "'.GetRequestURI().'")'; 70 67 $System->Database->query($Query); 71 68 } -
trunk/Modules/Referrer/Referrer.php
r804 r805 40 40 if(!in_array($HostName, $this->Excludes)) 41 41 { 42 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 43 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 44 42 $IP = GetRemoteAddress(); 43 45 44 // Check if client IP is not blocked as spam source 46 45 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Referrer` WHERE `LastIP` = "'.$IP.'" AND (`Visible` = 0)'); -
trunk/Modules/ShoutBox/ShoutBox.php
r765 r805 125 125 $this->System->Database->query('INSERT INTO `ShoutBox` ( `User`, `UserName` , `Text` , `Date` , `IP` ) '. 126 126 ' VALUES ('.$this->System->User->Id.', "'.$this->System->User->Name. 127 '", "'.$Text.'", NOW(), "'. $_SERVER['REMOTE_ADDR'].'")');127 '", "'.$Text.'", NOW(), "'.GetRemoteAddress().'")'); 128 128 $Output .= ShowMessage('Zpráva vložena.'); 129 129 } -
trunk/Modules/User/User.php
r801 r805 137 137 $this->Database->query('UPDATE `UserTrace` SET '. 138 138 '`LastLogin` = NOW(), '. 139 '`LastIP` = "'. $_SERVER['REMOTE_ADDR'].'", '.139 '`LastIP` = "'.GetRemoteAddress().'", '. 140 140 '`UserAgent` = "'.$this->System->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'" '. 141 141 ' WHERE `User` = '.$this->Id); … … 194 194 function Licence($Licence) 195 195 { 196 if( !isset($_SERVER['REMOTE_ADDR'])) return(true); // Execution from command line197 else return($this->Role >= $Licence);196 if(GetRemoteAddress() == '') return(true); // Execution from command line 197 else return($this->Role >= $Licence); 198 198 } 199 199 … … 229 229 // Refresh time of last access 230 230 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('ActivityTime' => 'NOW()')); 231 } else $this->Database->insert('UserOnline', array('SessionId' => $SID, 231 } else { 232 if(GetRemoteAddress() != '') $HostName = gethostbyaddr(GetRemoteAddress()); 233 else $HostName = ''; 234 $this->Database->insert('UserOnline', array('SessionId' => $SID, 232 235 'User' => null, 'LoginTime' => 'NOW()', 'ActivityTime' => 'NOW()', 233 'IpAddress' => GetRemoteAddress(), 'HostName' => gethostbyaddr(GetRemoteAddress()), 234 'ScriptName' => $_SERVER['REQUEST_URI'])); 235 236 'IpAddress' => GetRemoteAddress(), 'HostName' => $HostName, 237 'ScriptName' => GetRequestURI())); 238 } 239 236 240 // Logged permanently? 237 241 if(array_key_exists('LoginHash', $_COOKIE)) … … 281 285 $UserId = $this->Database->insert_id; 282 286 $this->Database->query('INSERT INTO `UserTrace` (`User`, `LastIP`, `UserAgent`) '. 283 'VALUES ('.$UserId.', "'. $_SERVER['REMOTE_ADDR'].'", '.287 'VALUES ('.$UserId.', "'.GetRemoteAddress().'", '. 284 288 '"'.$this->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")'); 285 289 } -
trunk/admin/install.php
r765 r805 95 95 $Output = "<?php 96 96 97 \$IsDeveloper = in_array( \$_SERVER['REMOTE_ADDR'], array('127.0.0.1'));97 \$IsDeveloper = in_array(GetRemoteAddress(), array('127.0.0.1')); 98 98 99 99 \$Config = array( … … 119 119 'ShowSQLQuery' => false, 120 120 'ShowSQLError' => \$IsDeveloper, 121 'LogSQLQuery' => false, 121 122 'ShowPHPError' => \$IsDeveloper, 122 123 'ShowRuntimeInfo' => \$IsDeveloper, 123 124 'FormatOutput' => \$IsDeveloper, 124 'ItemsPerPage' => ".$Config['Web']['ItemsPerPage'].", 125 'TempFolder' => '../tmp/', 125 'ItemsPerPage' => ".$Config['Web']['ItemsPerPage'].", 126 'TempFolder' => 'tmp/', 127 'SourceFolder' => 'source/', 126 128 'GameVersion' => '3.3.5a', 127 129 'VisiblePagingItems' => ".$Config['Web']['VisiblePagingItems'].", … … 135 137 'MaxExportPerUser' => 10, 136 138 'AoWoWExportId' => 1, 137 139 'OriginalLanguage' => 1, 138 140 'SystemPassword' => '".$Config['SystemPassword']."', 139 141 );"; -
trunk/includes/Update.php
r553 r805 54 54 $InstallMethod = $this->InstallMethod; 55 55 $InstallMethod($this); 56 $this->Update(); 56 57 } 57 58 -
trunk/includes/Version.php
r804 r805 6 6 // and system will need database update. 7 7 8 $Revision = 80 4; // Subversion revision8 $Revision = 805; // Subversion revision 9 9 $DatabaseRevision = 803; // Database structure revision 10 $ReleaseTime = '2014-0 4-14';10 $ReleaseTime = '2014-05-24'; -
trunk/includes/global.php
r800 r805 754 754 if(substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1); 755 755 $PathItems = explode('/', $PathString); 756 if(strpos( $_SERVER['REQUEST_URI'], '?') !== false)757 $_SERVER['QUERY_STRING'] = substr( $_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1);756 if(strpos(GetRequestURI(), '?') !== false) 757 $_SERVER['QUERY_STRING'] = substr(GetRequestURI(), strpos(GetRequestURI(), '?') + 1); 758 758 else $_SERVER['QUERY_STRING'] = ''; 759 759 parse_str($_SERVER['QUERY_STRING'], $_GET); … … 780 780 } 781 781 782 function GetClientProxyAddresses() 783 { 784 if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR']; 785 else $IP = array(); 786 } 787 782 788 function GetRemoteAddress() 783 789 { 784 if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR'] ; 785 else if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR']; 786 else $IP = '0.0.0.0'; 790 if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR']; 791 else $IP = ''; 787 792 return($IP); 788 793 } 794 795 function GetRequestURI() 796 { 797 if(array_key_exists('REQUEST_URI', $_SERVER)) return($_SERVER['REQUEST_URI']); 798 else return($_SERVER['PHP_SELF']); 799 } -
trunk/includes/system.php
r800 r805 110 110 $ScriptStartTime = GetMicrotime(); 111 111 112 if( isset($_SERVER['REMOTE_ADDR'])) session_start();112 if(GetRemoteAddress() != '') session_start(); 113 113 114 114 if(!isset($Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.'); … … 433 433 $ScriptGenerateDuration.' s / '.ini_get('max_execution_time').' s '.T('Used memory').': '. 434 434 HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B <a href="http://validator.w3.org/check?uri='. 435 htmlentities('http://'.$_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'].'?'.$_SERVER['QUERY_STRING']).'">HTML validator</a></td></tr>';435 htmlentities('http://'.$_SERVER['HTTP_HOST'].GetRequestURI().'?'.$_SERVER['QUERY_STRING']).'">HTML validator</a></td></tr>'; 436 436 $Output .= '</table>'. 437 437 '</body>'. -
trunk/locale/cs.php
r792 r805 202 202 'Additional files: modified wow.exe, fonts to game, translated interface aowow and more can be found on page' => 'Doplňkové soubory: upravené wow.exe, fonty do hry, přeložené rozhraní aowow a další najdete na stránce', 203 203 'If none of these files is suitable for you, for example, to the Czech without the translated interface. You can generate your own section in section' => 'Pokud vám nevyhovuje žádný z následujících souborů, například chcete češtinu bez přeloženého rozhraní. Můžete si vygenerovat vlastní v sekci', 204 'The following files are generated every day, if needed. That means if is added new translation to database. Therefore, if you translate a translation or correct the mistake, tomorrow you can download the new patched version. Or you can rebuild and download for a few minutes the repaired file.' => 'Následující soubory se generují každý den, pokud je zapotřebí. To z anamená, pokud se v databázi oběví nové překlady. Proto, pokud přeložíte nějaký překlad nebo opravíte chybu, zítrasi můžete stáhnout novou opravenou verzi. Nebo si můžete přegenerovat a stáhnout si za pár minut opravený soubor.',204 'The following files are generated every day, if needed. That means if is added new translation to database. Therefore, if you translate a translation or correct the mistake, tomorrow you can download the new patched version. Or you can rebuild and download for a few minutes the repaired file.' => 'Následující soubory se generují každý den, pokud je zapotřebí. To znamená, pokud se v databázi objeví nové překlady. Proto, pokud přeložíte nějaký překlad nebo opravíte chybu, následující den si můžete stáhnout novou opravenou verzi. Nebo si můžete přegenerovat a stáhnout si za pár minut opravený soubor.', 205 205 'If you no longer want translation in game, you can uninstall it by file Uninstall.exe at the directory of game.' => 'Pokud si češtinu dále nebudete přát, můžete ji jednoduše odinstalovat pomocí souboru Uninstall.exe ve složce hry.', 206 206 'Make export' => 'Exportovat',
Note:
See TracChangeset
for help on using the changeset viewer.