Changeset 3 for trunk/show_errors.php


Ignore:
Timestamp:
Jul 27, 2016, 8:36:02 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Updated to work with PHP7. Old database class replaced by Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/show_errors.php

    r1 r3  
    11<?php
     2
    23include_once('global.php');
     4
    35ShowHeader(array('Výpis chyb' => '/errors.php'), 'Výpis chyb aplikací');
    46
     
    68$PageItems = 20;
    79
    8 $Cols = array('time' => 'Èas', 'application' => 'Aplikace', 'version' => 'Verze', 'release_date' => 'Datum vydání', 'unit' => 'Jednotka', 'method' => 'Metoda', 'line_number' => 'Øádek', 'message' => 'Zpráva', 'exception' => 'Vyjímka', 'address' => 'Adresa', 'state' => 'Stav', 'remote_addr' => 'IP adresa', 'remote_host' => 'Poèítaè');
     10$Cols = array('time' => 'Čas', 'application' => 'Aplikace', 'version' => 'Verze', 'release_date' => 'Datum vydání', 'unit' => 'Jednotka', 'method' => 'Metoda', 'line_number' => 'Řádek', 'message' => 'Zpráva', 'exception' => 'Vyjímka', 'address' => 'Adresa', 'state' => 'Stav', 'remote_addr' => 'IP adresa', 'remote_host' => 'Počítač');
    911$Output .= '<table style="font-size: 9px;" border="1" cellspacing="0" cellpadiing="3"><tr>';
    10 foreach($Cols as $Index => $Item) $Output .= '<th>'.$Item.'</td>'; 
     12foreach($Cols as $Index => $Item) $Output .= '<th>'.$Item.'</td>';
    1113$Output .= '</tr>';
    12 DB_Select('app_errors', '*', '1 ORDER BY id DESC LIMIT '.$Page*$PageItems.','.$PageItems);
    13 while($Row = DB_Row())
     14$DbResult = $Database->select($DB_Prefix.'app_errors', '*', '1 ORDER BY id DESC LIMIT '.$Page*$PageItems.','.$PageItems);
     15while($Row = $DbResult->fetch_assoc())
    1416{
    1517  $Output .= '<tr>';
    16   foreach($Cols as $Index => $Item) 
     18  foreach($Cols as $Index => $Item)
    1719  {
    18     if($Row[$Index]=='') $Output .= '<td>&nbsp;</td>'; 
     20    if($Row[$Index]=='') $Output .= '<td>&nbsp;</td>';
    1921    else $Output .= '<td>'.$Row[$Index].'</td>';
    2022  }
     
    2224}
    2325$Output .= '</table>';
    24 DB_Select('app_errors', 'COUNT(*)');
    25 $Count = DB_Row();
     26$DbResult = $Database->select($DB_Prefix.'app_errors', 'COUNT(*)');
     27$Count = $DbResult->fetch_assoc();
    2628$Output .= PagesList('show_errors.php?page=', $_GET['page'], $Count[0], $PageItems);
     29
    2730ShowFooter();
    28 
    29 ?>
Note: See TracChangeset for help on using the changeset viewer.