Changeset 362 for administrace
- Timestamp:
- May 21, 2008, 7:56:49 AM (17 years ago)
- Location:
- administrace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/debug_list.php
r348 r362 8 8 } 9 9 10 echo('<table width="100%"><tr><td width="1 50px" valign="top">');11 echo('<strong>Restart list</strong><br>');10 echo('<table width="100%"><tr><td width="10%" valign="top" style="">'); 11 echo('<strong>Restart history:</strong><br>'); 12 12 13 13 if(array_key_exists('Id', $_GET)) $Id = addslashes($_GET['Id']); 14 14 else $Id = 0; 15 if(array_key_exists('Page', $_GET)) $Page = addslashes($_GET['Page']); 16 else $Page = 0; 15 17 16 $DbResult = $Database->query('SELECT Id, Time FROM debug WHERE 1 ORDER BY Time DESC'); 18 $DbResult = $Database->query('SELECT COUNT(*) FROM debug'); 19 $DbRow = $DbResult->fetch_array(); 20 $Total = $DbRow[0]; 21 22 $DbResult = $Database->query('SELECT Id, Time FROM debug WHERE 1 ORDER BY Time DESC LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage); 17 23 while($DbRow = $DbResult->fetch_array()) 18 24 { 19 25 if($DbRow['Id'] == $Id) echo('<strong>'); 20 echo('<a href="?Id='.$DbRow['Id'].'& Show=Backtrace">'.str_replace(" ", " ", $DbRow['Time']).'</a>');26 echo('<a href="?Id='.$DbRow['Id'].'&Page='.$Page.'&Show=Backtrace">'.str_replace(" ", " ", $DbRow['Time']).'</a>'); 21 27 if($DbRow['Id'] == $Id) echo('</strong>'); 22 28 echo('<br>'); 23 29 } 30 echo(PagesList('?Page=', $Page, $Total, $ItemPerPage, 2)); 24 31 25 echo('</td><td valign="top" >');32 echo('</td><td valign="top" width="90%">'); 26 33 27 34 if($Id > 0) … … 39 46 ' <a href="?Id='.$Id.'&Show=Log">Mangos log</a>'. 40 47 ' <a href="?Id='.$Id.'&Show=Error">Console error log</a>'. 41 ' <a href="?Id='.$Id.'&Show=DbErrors">Database error log</a><hr>'); 48 ' <a href="?Id='.$Id.'&Show=DbErrors">Database error log</a>'. 49 ' <a href="?Id='.$Id.'&Show=Configuration">Mangos configuration</a>'. 50 '<hr>'); 42 51 if(array_key_exists('Show', $_GET)) 43 52 { … … 45 54 switch($Show) 46 55 { 47 case 'Backtrace': 48 echo('<strong>Backtrace:</strong> <br><pre>'.htmlspecialchars($DbRow['Backtrace']).'</pre>'); 56 case 'Backtrace': 57 $Content = htmlspecialchars($DbRow['Backtrace']); 58 for($I = 1; $I < 8; $I++) 59 { 60 $Content = str_replace('Thread '.$I, '<hr><strong id="'.$I.'">Thread '.$I.'</strong>', $Content); 61 $Content = str_replace($I.' Thread', '<a href="#'.$I.'"">'.$I.' Thread</a>', $Content); 62 } 63 echo('<strong>Backtrace:</strong> <br><pre>'.$Content.'</pre>'); 49 64 break; 50 65 case 'Log': … … 57 72 echo('<strong>Database error log:</strong> <br><pre>'.htmlspecialchars($DbRow['DbErrors']).'</pre>'); 58 73 break; 74 case 'Configuration': 75 echo('<strong>Mangos configuration:</strong> <br><pre>'.htmlspecialchars($DbRow['Configuration']).'</pre>'); 76 break; 59 77 } 60 78 } -
administrace/global.php
r329 r362 4 4 5 5 // Configuration 6 $MangosConfFile = '/a/mangos/etc/mangosd.conf'; 6 7 $StdOutLogFile = '/a/log/mangos/mangos-worldd.log'; 7 8 $ErrOutLogFile = '/a/log/mangos/mangos-worldd.err'; 8 9 $MangosLogFile = '/a/log/mangos/Server.log'; 9 10 $MangosDbErrorsLogFile = '/a/log/mangos/DBErrors.log'; 11 $ItemPerPage = 35; 10 12 11 13 //$DatabaseHost = $Config['Database']['Host']; -
administrace/process_log.php
r329 r362 53 53 //echo($Database->error); 54 54 55 $Log = addslashes(file_get_contents($MangosConfFile)); 56 $Database->query('UPDATE `debug` SET Configuration="'.$Log.'" WHERE Id='.$InsertId); 57 55 58 // Clear log files 56 59 unlink($MangosLogFile);
Note:
See TracChangeset
for help on using the changeset viewer.