Changeset 404
- Timestamp:
- Jan 28, 2009, 11:23:01 AM (16 years ago)
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/global.php
r362 r404 4 4 5 5 // Configuration 6 $MangosConfFile = '/a/mangos /etc/mangosd.conf';7 $StdOutLogFile = '/a/ log/mangos/mangos-worldd.log';8 $ErrOutLogFile = '/a/ log/mangos/mangos-worldd.err';9 $MangosLogFile = '/a/ log/mangos/Server.log';10 $MangosDbErrorsLogFile = '/a/ log/mangos/DBErrors.log';6 $MangosConfFile = '/a/mangos1/etc/mangosd.conf'; 7 $StdOutLogFile = '/a/mangos1/log/mangos-worldd.log'; 8 $ErrOutLogFile = '/a/mangos1/log/mangos-worldd.err'; 9 $MangosLogFile = '/a/mangos1/log/Server.log'; 10 $MangosDbErrorsLogFile = '/a/mangos1/log/DBErrors.log'; 11 11 $ItemPerPage = 35; 12 12 -
administrace/home.php
r389 r404 3 3 function Show() 4 4 { 5 global $Database ;5 global $Database, $Config; 6 6 7 7 echo('<h3>Správa serveru</h3>'); … … 11 11 echo('<a href="gm_rules.php">Pravidla pro GM</a><br>'); 12 12 echo('</td><td valign="top">'); 13 echo('<a href="http:// game.zdechov.net/statistic/">Statistiky provozu</a><br>');13 echo('<a href="http://stat.zdechov.net/game/">Statistiky provozu</a><br>'); 14 14 echo('<a href="../navody/">Návody</a><br>'); 15 15 echo('<a href="../db/index.php?id=bugreport">Bug report</a>'); … … 29 29 30 30 echo('<table class="TableAdmin" cellspacing="0" width="100%" style="color: white;" border="1">'); 31 $DbResult = $Database->query('SELECT wow.gm_news.text as text, realmd.account.username as username FROM wow.gm_news JOIN realmd.account ON wow.gm_news.author = realmd.account.Id ORDER BY wow.gm_news.time DESC LIMIT '.$Page*$PerPage.', '.$PerPage);31 $DbResult = $Database->query('SELECT wow.gm_news.text as text, '.$Config['Mangos']['DatabaseRealmd'].'.account.username as username FROM wow.gm_news JOIN '.$Config['Mangos']['DatabaseRealmd'].'.account ON wow.gm_news.author = '.$Config['Mangos']['DatabaseRealmd'].'.account.Id ORDER BY wow.gm_news.time DESC LIMIT '.$Page*$PerPage.', '.$PerPage); 32 32 while($Row = $DbResult->fetch_array()) 33 33 { -
administrace/process_log.php
r371 r404 22 22 23 23 // Get used database version from database 24 $DbResult = $Database->query('SELECT * FROM ` mangos`.`db_version`');24 $DbResult = $Database->query('SELECT * FROM `'.$Config['Mangos']['DatabaseMangos'].'`.`db_version`'); 25 25 $DbRow = $DbResult->fetch_array(); 26 26 $DbVersion = $DbRow['version']; 27 27 28 28 // Get last uptime info 29 $DbResult = $Database->query('SELECT * FROM ` mangos`.`uptime` ORDER BY `starttime` DESC LIMIT 1');29 $DbResult = $Database->query('SELECT * FROM `'.$Config['Mangos']['DatabaseMangos'].'`.`uptime` ORDER BY `starttime` DESC LIMIT 1'); 30 30 echo($Database->error); 31 31 $DbRow = $DbResult->fetch_array(); -
administrace/rss_tickets.php
r389 r404 7 7 // Get news from database by selected categories 8 8 $Items = array(); 9 $Database->select_db( 'characters');9 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 10 10 $DbResult = $Database->query("SELECT `character_ticket`.`ticket_text` AS `text`, `characters`.`name` AS `name` FROM `character_ticket` JOIN `characters` ON `characters`.`guid` = `character_ticket`.`guid`"); 11 11 while($Row = $DbResult->fetch_array()) -
administrace/user.php
r389 r404 23 23 function Login($Username, $Password) 24 24 { 25 global $Config; 25 26 global $Database; 26 $Database->select_db( 'realmd');27 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 27 28 $DbResult = $Database->select('account', 'Id,username', '(gmlevel > 0) AND (username = "'.$Username.'") AND (sha_pass_hash = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))'); 28 29 if($DbResult->num_rows > 0) -
config.sample.php
r403 r404 20 20 'MaxOnlinePlayers' => 100, 21 21 'RequiredOnlinePlayers' => 70, 22 'DatabaseMangos' => 'mangos', 23 'DatabaseCharacters' => 'characters', 24 'DatabaseRealmd' => 'realmd', 25 'DatabaseScriptDev2' => 'scriptdev2', 22 26 ), 23 27 'Web' => array( -
events.php
r389 r404 1 1 <?php 2 include('global.php'); 2 3 3 4 $EventsLinks = array( … … 40 41 function Events() 41 42 { 42 global $Database, $EventsLinks; 43 global $Database, $EventsLinks, $Config; 44 43 45 $Events = array('Running' => array(), 'Planned' => array()); 44 $Database->select_db( 'mangos');46 $Database->select_db($Config['Mangos']['DatabaseMangos']); 45 47 46 48 // Add already started events … … 87 89 } 88 90 89 include('global.php');90 91 ShowHeader(); 91 92 -
global.php
r403 r404 41 41 function OnlinePlayerCount() 42 42 { 43 global $Database; 44 $Database->select_db('characters'); 43 global $Database, $Config; 44 45 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 45 46 $Result = $Database->select('characters', 'COUNT(*)', 'online=1'); 46 47 $Row = $Result->fetch_array(); … … 50 51 function CharacterCount() 51 52 { 52 global $Database ;53 $Database->select_db( 'characters');53 global $Database, $Config; 54 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 54 55 $Result = $Database->select('characters', 'COUNT(*)'); 55 56 $Row = $Result->fetch_array(); … … 59 60 function AccountCount() 60 61 { 61 global $Database ;62 $Database->select_db( 'realmd');62 global $Database, $Config; 63 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 63 64 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 64 65 $Row = $DbResult->fetch_array(); … … 68 69 function MangosUptime() 69 70 { 70 global $Database ;71 $Database->select_db( 'mangos');71 global $Database, $Config; 72 $Database->select_db($Config['Mangos']['DatabaseMangos']); 72 73 $DbResult = $Database->query('SELECT `starttime`, `uptime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1'); 73 74 $Row = $DbResult->fetch_array(); … … 85 86 function RunningEventCount() 86 87 { 87 global $Database ;88 global $Database, $Config; 88 89 $Count = 0; 89 $Database->select_db( 'mangos');90 $Database->select_db($Config['Mangos']['DatabaseMangos']); 90 91 $DbResult = $Database->select('game_event', 'occurence, length, UNIX_TIMESTAMP(start_time) as start', 'end_time > NOW() AND start_time < NOW()'); 91 92 while($Row = $DbResult->fetch_array()) -
gm.php
r390 r404 10 10 11 11 $ChronosId = 11432; 12 $Database->select_db( 'realmd');12 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 13 13 $Result = $Database->query('SELECT * FROM account WHERE (locked = 0) AND (id != '.$ChronosId.') AND (gmlevel > 0) ORDER BY gmlevel DESC'); 14 14 echo('<table border="0">'); … … 33 33 $Acc = $Line['AccID']; 34 34 */ 35 $Database->select_db( 'characters');35 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 36 36 echo('<tr><td><p>GM Postavy ve hře:</p></td>'); 37 37 echo('<td><p><b>'); … … 46 46 echo('</b></p></td></tr>'); 47 47 48 $Database->select_db('realmd');48 // $Database->select_db($Config['Mangos']['DatabaseRealmd']); 49 49 if($Line['ForumId'] != 0) 50 50 { -
guildy.php
r389 r404 28 28 } 29 29 30 $Database->select_db( 'characters');30 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 31 31 if(!array_key_exists('guild', $_GET)) 32 32 { -
honor.php
r391 r404 4 4 5 5 echo('<h3>Nejlepší hráči:</h3><div align="center">'); 6 $Database->select_db( 'characters');6 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 7 7 8 8 $HonorRanks = array( -
index.php
r403 r404 37 37 include('registrace/reg_config.php'); 38 38 $AccountCount = AccountCount(); 39 $Remain = $MaximumAccountCount -$AccountCount;39 $Remain = $MaximumAccountCount - $AccountCount; 40 40 if($Remain <= 0) echo('VYČERPANÉ'); else echo('VOLNÉ'); 41 41 echo('</td></tr>'); … … 74 74 <div>'); 75 75 $ChronosId = 11432; 76 $Database->select_db( 'realmd');76 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 77 77 $Result = $Database->query('SELECT username FROM account WHERE (locked = 0) AND (id != '.$ChronosId.') AND (gmlevel > 0) ORDER BY gmlevel DESC'); 78 78 while($Row = $Result->fetch_array()) -
online_player.php
r389 r404 4 4 5 5 echo('<h3>Online hráči:</h3><div align="center">'); 6 $Database->select_db( 'characters');6 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 7 7 8 8 $order_by = (isset($_GET['order_by'])) ? $Database->real_escape_string($_GET['order_by']) : "name"; -
registrace/index.php
r403 r404 5 5 include('reg_config.php'); 6 6 7 $Database->select_db( 'realmd');7 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 8 8 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 9 9 $Row = $DbResult->fetch_array(); -
stat/stat.php
r313 r404 5 5 $Username = $Config['Database']['User']; 6 6 $Password = $Config['Database']['Password']; 7 $Database = 'mangos'; // must contains characters table7 $Database = $Config['Mangos']['DatabaseMangos']; // must contains characters table 8 8 $RealmHostname = $Hostname; 9 9 $RealmUsername = $Username; 10 10 $RealmPassword = $Password; 11 $RealmDatabase = 'realmd'; // must contains zone_coordinates and accounts table12 $CharactersDatabase = 'characters'; // must contains zone_coordinates and accounts table11 $RealmDatabase = $Config['Mangos']['DatabaseRealmd']; // must contains zone_coordinates and accounts table 12 $CharactersDatabase = $Config['Mangos']['DatabaseCharacters']; // must contains zone_coordinates and accounts table 13 13 $EmuVersion = $Config['Mangos']['Version']; 14 14 $Owner = $Config['Web']['Admin']; -
system/freeze_restart.php
r389 r404 3 3 $RestartDeadTime = 3 * 60; // Maximum dead time [seconds] 4 4 $LoopSleepTime = 10; // Checking period [seconds] 5 $MangosProcessName = '/a/mangos /bin/mangos-worldd';5 $MangosProcessName = '/a/mangos1/bin/mangos-worldd'; 6 6 7 7 include('../global.php'); … … 9 9 echo('MaNGOS freeze restarter. Checking DB every '.$LoopSleepTime." seconds\n"); 10 10 $Restarted = 0; 11 $Database->select_db(' mangos');11 $Database->select_db('realm1_mangos'); 12 12 while(1) 13 13 {
Note:
See TracChangeset
for help on using the changeset viewer.