Changeset 567 for trunk/Modules/Log/Log.php
- Timestamp:
- Aug 20, 2013, 11:49:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r566 r567 24 24 } 25 25 26 // Log types 27 define('LOG_TYPE_TRANSLATION', 1); 28 define('LOG_TYPE_DOWNLOAD', 2); 29 define('LOG_TYPE_USER', 3); 30 define('LOG_TYPE_MODERATOR', 4); 31 define('LOG_TYPE_ERROR', 10); 32 define('LOG_TYPE_IMPORT', 11); 33 define('LOG_TYPE_EXPORT', 12); 34 define('LOG_TYPE_CZWOW', 13); 35 define('LOG_TYPE_ADMINISTRATION', 14); 36 37 // TODO: Change global function to module class local method 26 38 function WriteLog($Text, $Type) 27 39 { … … 33 45 if(!is_null($User->Id)) $UserId = $User->Id; 34 46 else $UserId = 'NULL'; 35 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP` )36 VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'" )';47 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) 48 VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 37 49 $System->Database->query($Query); 38 50 } … … 137 149 array('Name' => 'UserName', 'Title' => 'Uživatel'), 138 150 array('Name' => 'IP', 'Title' => 'Adresa'), 151 array('Name' => 'URL', 'Title' => 'URL'), 139 152 ); 140 153 $Order = GetOrderTableHeader($TableColumns, 'date', 1); … … 153 166 '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'. 154 167 '<td><a href="user.php?user='.$Line['User'].'">'.$Line['UserName'].'</a></td>'. 155 '<td>'.$Line['IP'].'</td></tr>'; 168 '<td>'.$Line['IP'].'</td>'. 169 '<td>'.$Line['URL'].'</td></tr>'; 156 170 } 157 171 $Output .= '</table>'.
Note:
See TracChangeset
for help on using the changeset viewer.