1 | <?php
|
---|
2 |
|
---|
3 | include_once(dirname(__FILE__).'/../Module/Log/Model.php');
|
---|
4 | include_once(dirname(__FILE__).'/../Module/Permission/Model.php');
|
---|
5 | include_once(dirname(__FILE__).'/../Module/User/Model.php');
|
---|
6 | include_once(dirname(__FILE__).'/../Base/System.php');
|
---|
7 | include_once(dirname(__FILE__).'/../Version.php');
|
---|
8 |
|
---|
9 | class Application extends System
|
---|
10 | {
|
---|
11 | function __construct()
|
---|
12 | {
|
---|
13 | parent::__construct();
|
---|
14 |
|
---|
15 | RegisterType('YesNo', 'Enumeration', array('Ano', 'Ne'));
|
---|
16 | RegisterType('NoYes', 'Enumeration', array('Ne', 'Ano'));
|
---|
17 | RegisterType('GameType', 'Enumeration', array('Normální', 'PvP', 6 => 'RP', 8 => 'RPPvP'));
|
---|
18 | RegisterType('SecurityLevel', 'Enumeration', array('Hráči', 'Moderátoři', 'GM', 'Administrátoři', 'Nikdo'));
|
---|
19 | RegisterType('SkipCinematics', 'Enumeration', array('Ukázat vždy', 'Ukázat pouze pro první postavu rasy', 'Neukazovat vůbec'));
|
---|
20 | RegisterType('TaskState', 'Enumeration', array('Čekající', 'Běžící', 'Dokončeno'));
|
---|
21 | RegisterType('ServerExpansion', 'Enumeration', array('Classic', 'The Burning Crusade', 'Wrath of The Lich King'));
|
---|
22 | RegisterType('ServerType', 'Enumeration', array('Normální', 'PvP', 'RP', 'RPPvP'));
|
---|
23 | RegisterType('OnlineState', 'Enumeration', array('Neaktivní', 'Aktivní'));
|
---|
24 | RegisterType('Database', 'PointerOneToOne', array('Table' => 'Database', 'Id' => 'Id', 'Name' => 'CONCAT(Name, " ", Version, " r", Revision)', 'Condition' => 'Emulator <> 0'));
|
---|
25 | RegisterType('Client', 'PointerOneToOne', array('Table' => 'Client', 'Id' => 'Id', 'Name' => 'Version'));
|
---|
26 |
|
---|
27 | $this->AddModule('Log');
|
---|
28 | $this->AddModule('User');
|
---|
29 | $this->AddModule('Permission');
|
---|
30 | if(isset($_SERVER['REMOTE_ADDR'])) $this->Modules['User']->Check();
|
---|
31 | else $this->Modules['User']->Data['Id'] = $this->Config['Web']['UserConsoleId'];
|
---|
32 | $this->Modules['Permission']->LoadForUser($this->Modules['User']->Data['Id']);
|
---|
33 | }
|
---|
34 | }
|
---|