Changeset 183 for trunk/LogShow.php
- Timestamp:
- Mar 26, 2009, 8:51:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LogShow.php
r182 r183 1 1 <?php 2 include_once('global.php'); 2 include('global.php'); 3 include('aktuality/rss_generator.php'); 3 4 4 5 class LogShow extends Page … … 18 19 $Output = '<div align="center"><table class="WideTable" style="font-size: small;">'; 19 20 $Output .= '<tr><th>Čas</th><th>Uživatel</th><th>Modul</th><th>Operace</th><th>Hodnota</th></tr>'; 20 $DbResult = $this->Database->query('SELECT *, `User`.`Name` as UserName FROM `is`.`Log` LEFT JOIN `is`.`User` ON `User`.`Id` = `Log`.`User` ORDER BY Time DESC LIMIT '.$Page * $this->RowPerPage.','.$this->RowPerPage);21 while($DbRow = $DbResult->fetch_a rray())21 $DbResult = $this->Database->query('SELECT Log.*, `User`.`Name` as UserName FROM `Log` LEFT JOIN `User` ON `User`.`Id` = `Log`.`User` ORDER BY Time DESC LIMIT '.$Page * $this->RowPerPage.','.$this->RowPerPage); 22 while($DbRow = $DbResult->fetch_assoc()) 22 23 { 23 24 $Output .= '<tr><td>'.$DbRow['Time'].'</td><td>'.$DbRow['UserName'].'</td><td>'.$DbRow['Module'].'</td><td>'.$DbRow['Operation'].'</td><td>'.$DbRow['Value'].'</td></tr>'; … … 30 31 } 31 32 32 $System->AddModule(new LogShow()); 33 $System->Modules['LogShow']->GetOutput(); 33 if(array_key_exists('Action', $_GET)) 34 { 35 if($_GET['Action'] == 'rss') 36 { 37 $DbResult = $Database->query('SELECT UNIX_TIMESTAMP(Time), Log.*, `User`.`Name` as UserName FROM `Log` LEFT JOIN `User` ON `User`.`Id` = `Log`.`User` ORDER BY Time DESC LIMIT 0, 50'); 38 while($Row = $DbResult->fetch_assoc()) 39 { 40 $Info = $Row['UserName'].': '.$Row['Module'].' '.$Row['Operation'].' '.$Row['Value']; 41 $Items[] = array 42 ( 43 'Title' => $Info, 44 'Link' => 'http://'.$Config['Web']['Host'].'/', 45 'Description' => $Info, 46 'Time' => $Row['UNIX_TIMESTAMP(Time)'], 47 ); 48 } 49 echo(GenerateRSS(array( 50 'Title' => $Config['Web']['Title'].' - Záznamy operací', 51 'Link' => 'http://'.$Config['Web']['Host'].'/', 52 'Description' => 'Záznamy operací', 53 'WebmasterEmail' => $Config['Web']['AdminEmail'], 54 'Items' => $Items))); 55 } else 56 { 57 $System->AddModule(new LogShow()); 58 $System->Modules['LogShow']->GetOutput(); 59 } 60 } else 61 { 62 $System->AddModule(new LogShow()); 63 $System->Modules['LogShow']->GetOutput(); 64 } 34 65 35 66 ?>
Note:
See TracChangeset
for help on using the changeset viewer.