Changeset 873 for trunk/Modules/Log
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r681 r873 49 49 function NewRecord($Module, $Operation, $Value = '') 50 50 { 51 if (array_key_exists('User', $this->System->ModuleManager->Modules) and51 if (array_key_exists('User', $this->System->ModuleManager->Modules) and 52 52 array_key_exists('Id', $this->System->User->User)) 53 53 $UserId = $this->System->User->User['Id']; 54 54 else $UserId = NULL; 55 if (array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR'];55 if (array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR']; 56 56 else $IPAddress = ''; 57 57 $this->Database->insert('Log', array('Time' => 'NOW()', … … 69 69 $Output = ''; 70 70 $Items = array(); 71 if (array_key_exists('type', $_GET)) $Where = ' WHERE `Type` = "'.($_GET['type'] * 1).'"';71 if (array_key_exists('type', $_GET)) $Where = ' WHERE `Type` = "'.($_GET['type'] * 1).'"'; 72 72 else $Where = ''; 73 73 $sql = 'SELECT *, UNIX_TIMESTAMP(`Time`) AS `TimeCreate`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`Id` = `Log`.`User`) AS `UserName`, `Time` FROM `Log`'. 74 74 $Where.' ORDER BY `Time` DESC LIMIT '.$Count; 75 75 $DbResult = $this->System->Database->query($sql); 76 while ($Line = $DbResult->fetch_assoc())76 while ($Line = $DbResult->fetch_assoc()) 77 77 { 78 78 $Line['Value'] = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $Line['Value']); … … 96 96 $RSS->WebmasterEmail = $this->System->Config['Web']['AdminEmail']; 97 97 $RSS->Items = $Items; 98 return ($RSS->Generate());98 return ($RSS->Generate()); 99 99 } 100 100 }
Note:
See TracChangeset
for help on using the changeset viewer.