Changeset 285 for trunk/log.php
- Timestamp:
- Dec 11, 2009, 12:43:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/log.php
r284 r285 6 6 { 7 7 $Items = array(); 8 if(array_key_exists('type', $_GET)) $Where = ' WHERE type = "'. $_GET['type'].'"';8 if(array_key_exists('type', $_GET)) $Where = ' WHERE type = "'.($_GET['type'] * 1).'"'; 9 9 else $Where = ''; 10 10 $sql = 'SELECT *,UNIX_TIMESTAMP(date), (SELECT user.user FROM user WHERE user.id = log.user) as user FROM log'.$Where.' ORDER BY date DESC LIMIT 100'; … … 12 12 while($Line = mysql_fetch_assoc($ID)) 13 13 { 14 if(array_key_exists($Line['type'], $LogTypes)) $TypeName = $LogTypes[$Line['type']]['Name']; 15 else $TypeName = ''; 14 16 $Items[] = array 15 (16 'Title' => strip_tags($ LogTypes[$Line['type']]['Name'].': '.$Line['text'].' ('.$Line['user'].', '.$Line['IP'].')'),17 ( 18 'Title' => strip_tags($TypeName.': '.$Line['text'].' ('.$Line['user'].', '.$Line['IP'].')'), 17 19 'Link' => $Config['Web']['BaseURL'].'log.php', 18 'Description' => $ LogTypes[$Line['type']]['Name'].': '.$Line['text'].' ('.$Line['user'].', '.$Line['IP'].')',20 'Description' => $TypeName.': '.$Line['text'].' ('.$Line['user'].', '.$Line['IP'].')', 19 21 'Time' => $Line['UNIX_TIMESTAMP(date)'], 20 22 );
Note:
See TracChangeset
for help on using the changeset viewer.