* Adresse: http://forum.lotgd.dyndns.biz * * Beschreibung: * Mit diesem kleinen DTS (Debug- Tracking- System) * werden alle Fehler direkt in der Datenbank eingetragen. * Damit schafft es ein wenig Abhilfe und man sieht sofort * wo die Fehler sind und um welche es sich Handelt. * Ich kann für einen freien lauf des Scripts nicht Garantieren! */ require_once ('./common.php'); //require_once ('./lib/isnewday.php'); /** Functions **/ function error_list () { $script = array(); $result = db_query('SELECT `script`, COUNT(`msg`) AS `anz` FROM `lotgd_other`.`debug` GROUP BY `script` ORDER BY `script` DESC'); while ($row = db_fetch_assoc($result)){ $script[$row['anz']] = $row; } return $script; } function addtd ($key) { if(is_array($key)) foreach ($key as $val) output(''.$val.'', true); else output(''.$key.'', true); } /** Functions end **/ isnewday (2); page_header ('DTS - Debug Tracking System'); output('`c`9`bDTS - Debug Tracking System`b`0`c`n`n'); if ($_GET['op'] == 'delete') { db_query('DELETE FROM `lotgd_other`.`debug` WHERE `id` = "'.$_GET['id'].'"'); redirect('sudebug.php?op=list§ion='.$_GET['section']); } elseif ($_GET['op'] == 'list') { rawoutput(''); rawoutput(''); addtd(array('`&ID`0', '`&Datei`0', '`&Fehlerbericht`0', '`&Autor`0', '`&Uhrzeit`0', '`&Ops`0')); $result = db_query('SELECT `id`, `script`, `owner`, `msg`, `msgtime`, `accounts`.`name` FROM `lotgd_other`.`debug` LEFT JOIN `accounts` ON `accounts`.`acctid` = `owner` WHERE `script` = "'.$_GET['section'].'.php" ORDER BY `msg` DESC'); while ($row = db_fetch_assoc($result)) { $i++; rawoutput(''); addtd(array($i, $row['script'], $row['msg'], $row['name'], date('Y.m.d H:i:s', $row['msgtime']), 'Löschen')); addnav('', 'sudebug.php?op=delete&id='.$row['id'].'§ion='.$_GET['section']); rawoutput(''); } rawoutput(''); rawoutput('
'); } else { output('`iWillkommen beim "`bDTS`b (`bD`bebug `bT`bracking `bS`bystem)"`i, `n'); output('du kannst nun hier alle Debugs der einzelnen Bereiche / Dateien verfolgen. Desweiteren wird der eine Liste der Dateien Links aufgelistet. '); output('Ansonsten noch viel Spaß beim Tracking ;)'); } $list = error_list(); foreach ($list as $count => $row) { if ($script != $row['script']) { $script = $row['script']; addnav($row['script'].' ('.$count.')', 'sudebug.php?op=list§ion='.substr($row['script'], 0, -4)); } } addnav ('Zurück'); addnav ('G?Zurück zur Grotte', 'superuser.php'); addnav ('W?Zurück zum Weltlichen', 'village.php'); page_footer(); ?>