'); echo('Restart history:
'); if(array_key_exists('Id', $_GET)) $Id = addslashes($_GET['Id']); else $Id = 0; if(array_key_exists('Page', $_GET)) $Page = addslashes($_GET['Page']); else $Page = 0; $DbResult = $Database->query('SELECT COUNT(*) FROM debug'); $DbRow = $DbResult->fetch_array(); $Total = $DbRow[0]; $DbResult = $Database->query('SELECT Id, Time FROM debug WHERE 1 ORDER BY Time DESC LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage); while($DbRow = $DbResult->fetch_array()) { if($DbRow['Id'] == $Id) echo(''); echo(''.str_replace(" ", " ", $DbRow['Time']).''); if($DbRow['Id'] == $Id) echo(''); echo('
'); } echo(PagesList('?Page=', $Page, $Total, $ItemPerPage, 2)); echo(''); if($Id > 0) { $DbResult = $Database->query('SELECT * FROM debug WHERE Id="'.$Id.'" ORDER BY Time'); if($DbResult->num_rows > 0) { $DbRow = $DbResult->fetch_array(); echo('Time: '.$DbRow['Time'].'
'); echo('MaNGOS version: '.$DbRow['MangosVersion'].'
'); echo('Database version: '.$DbRow['DbVersion'].'
'); echo('Uptime: '.TimeToHumanTime($DbRow['Uptime']).'
'); echo('MaxPlayerCount: '.$DbRow['MaxPlayerCount'].'

'); echo('Backtrace'. ' Mangos log'. ' Console error log'. ' Database error log'. ' Mangos configuration'. '
'); if(array_key_exists('Show', $_GET)) { $Show = addslashes($_GET['Show']); switch($Show) { case 'Backtrace': $Content = htmlspecialchars($DbRow['Backtrace']); for($I = 1; $I < 8; $I++) { $Content = str_replace('Thread '.$I.' ', '
Thread '.$I.'', $Content); $Content = str_replace($I.' Thread ', ''.$I.' Thread', $Content); } echo('Backtrace:
'.$Content.'
'); break; case 'Log': echo('Console standard output log:
'.htmlspecialchars($DbRow['Log']).'
'); break; case 'Error': echo('Console error log:
'.htmlspecialchars($DbRow['ErrorLog']).'
'); break; case 'DbErrors': echo('Database error log:
'.htmlspecialchars($DbRow['DbErrors']).'
'); break; case 'Configuration': echo('Mangos configuration:
'.htmlspecialchars($DbRow['Configuration']).'
'); break; } } } } echo(''); ?>