Changeset 519 for trunk


Ignore:
Timestamp:
Feb 18, 2013, 10:40:08 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazovat html kód záznamů pouze u typu "chyba".
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Version.php

    r518 r519  
    11<?php
    22
    3 $Revision = 518; // Subversion revision
     3$Revision = 519; // Subversion revision
    44$DatabaseRevision = 510;
    55$ReleaseTime = '2013-02-18';
  • trunk/log.php

    r518 r519  
    7777  $TableColumns = array(
    7878    array('Name' => 'Date', 'Title' => 'Čas'),
    79     array('Name' => 'Text', 'Title' => 'Text'),
     79    array('Name' => 'LogName', 'Title' => 'Typ'),
     80        array('Name' => 'Text', 'Title' => 'Text'),
    8081    array('Name' => 'UserName', 'Title' => 'Uživatel'),
    8182    array('Name' => 'IP', 'Title' => 'Adresa'),
     
    8586    $Order['Output'];
    8687 
    87   $sql = 'SELECT *, `LogType`.`Color` AS `LogColor`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `Log`.`User`) AS `UserName` FROM `Log` LEFT JOIN `LogType` ON `LogType`.`Id`=`Log`.`Type` '.$Where.$Order['SQL'].$PageList['SQLLimit'];
     88  $sql = 'SELECT *, `LogType`.`Color` AS `LogColor`, `LogType`.`Name` AS `LogName`, '.
     89    '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `Log`.`User`) AS `UserName` FROM `Log` LEFT JOIN `LogType` ON `LogType`.`Id`=`Log`.`Type` '.$Where.$Order['SQL'].$PageList['SQLLimit'];
    8890  $DbResult = $System->Database->query($sql);
    8991  while($Line = $DbResult->fetch_assoc())
    9092  {
     93        if($Line['Type'] == LOG_TYPE_ERROR) $Line['Text'] = htmlspecialchars($Line['Text']);
    9194    $Output .= '<tr><td>'.$Line['Date'].'</td>'.
    92     '<td><span style="color: '.$Line['LogColor'].'">'.htmlspecialchars($Line['Text']).'</span></td>'.
     95    '<td>'.$Line['LogName'].'</td>'.
     96    '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'.
    9397    '<td>'.$Line['UserName'].'</td>'.
    9498    '<td>'.$Line['IP'].'</td></tr>';
Note: See TracChangeset for help on using the changeset viewer.