Changeset 577 for trunk/Modules/Log
- Timestamp:
- Sep 11, 2013, 10:37:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r569 r577 26 26 function DoAddItem($Message) 27 27 { 28 WriteLog($Message, LOG_TYPE_ERROR); 28 $this->WriteLog($Message, LOG_TYPE_ERROR); 29 } 30 31 function WriteLog($Text, $Type) 32 { 33 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 34 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 35 36 if(!is_null($this->System->User->Id)) $UserId = $this->System->User->Id; 37 else $UserId = 'NULL'; 38 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 39 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 40 $this->System->Database->query($Query); 29 41 } 30 42 }
Note:
See TracChangeset
for help on using the changeset viewer.