Changeset 566 for trunk/includes/global.php
- Timestamp:
- Aug 20, 2013, 11:37:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r563 r566 14 14 // Include application modules 15 15 // TODO: Make modules configurable 16 include_once(dirname(__FILE__).'/../Modules/Log/Log.php'); 16 17 include_once(dirname(__FILE__).'/../Modules/Translation/Translation.php'); 17 18 include_once(dirname(__FILE__).'/../Modules/AoWoW/AoWoW.php'); … … 69 70 70 71 // Initialize application modules 72 $System->ModuleManager->RegisterModule(new ModuleLog($System)); 71 73 $System->ModuleManager->RegisterModule(new ModuleUser($System)); 72 74 $System->ModuleManager->RegisterModule(new ModuleAoWoW($System)); … … 331 333 332 334 $Moderators = array('Překladatel', 'Moderátor', 'Administrátor'); 333 334 function WriteLog($Text, $Type)335 {336 global $System, $User;337 338 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole';339 else $IP = addslashes($_SERVER['REMOTE_ADDR']);340 341 if(!is_null($User->Id)) $UserId = $User->Id;342 else $UserId = 'NULL';343 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP` )344 VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'")';345 $System->Database->query($Query);346 }347 335 348 336 function HumanDate($SQLDateTime)
Note:
See TracChangeset
for help on using the changeset viewer.