Changeset 245 for trunk/includes/global_function.php
- Timestamp:
- Jul 13, 2009, 4:17:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r241 r245 189 189 function WriteLog($Text, $Type) 190 190 { 191 global $Database, $Config ;191 global $Database, $Config,$_SERVER; 192 192 193 $user = @$_SESSION['UserID']; 193 if(!isset($_SERVER['REMOTE_ADDR'])) 194 { 195 $user = 0; 196 $ip = 'Konzole'; 197 } else { 198 $user = @$_SESSION['UserID']; 199 $ip = addslashes($_SERVER['REMOTE_ADDR']); 200 } 201 194 202 if($user == '') $user = 0; 195 203 $Database->SelectDatabase($Config['Database']['Database']); 196 204 $Query = 'INSERT INTO `log` ( `user` , `type` , `text` , `date` , `IP` ) 197 VALUES ('.$user.', '.$Type.', "'.addslashes($Text).'", NOW(), "'. addslashes($_SERVER['REMOTE_ADDR']).'")';205 VALUES ('.$user.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$ip.'")'; 198 206 $Database->SQLCommand($Query); 199 207 }
Note:
See TracChangeset
for help on using the changeset viewer.