Changeset 805 for trunk/Modules/Log
- Timestamp:
- May 24, 2014, 11:35:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r765 r805 33 33 function WriteLog($Text, $Type) 34 34 { 35 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 36 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 37 38 if(isset($this->System->User) and !is_null($this->System->User->Id)) $UserId = $this->System->User->Id; 35 if(isset($this->System->User) and !is_null($this->System->User->Id)) 36 $UserId = $this->System->User->Id; 39 37 else $UserId = 'NULL'; 40 38 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 41 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 39 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'. 40 GetRemoteAddress().'", "'.GetRequestURI().'")'; 42 41 $this->System->Database->query($Query); 43 42 } … … 60 59 { 61 60 global $System, $User; 62 63 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 64 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 65 61 66 62 if(isset($User) and !is_null($User->Id)) $UserId = $User->Id; 67 63 else $UserId = 'NULL'; 68 64 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 69 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 65 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'. 66 GetRemoteAddress().'", "'.GetRequestURI().'")'; 70 67 $System->Database->query($Query); 71 68 }
Note:
See TracChangeset
for help on using the changeset viewer.