source: trunk/www/form_classes.php@ 11

Last change on this file since 11 was 11, checked in by george, 16 years ago
  • Opraveno: Přidávání úloh z třídy Server a Emulator.
  • Přidáno: Třídy pro zobrazení seznamu emulátorů a položek emulátorů.
  • Přidáno: Třídy pro výpis seznamu položek.
  • Opraveno: Zpracování úloh ve frontě.
  • Přidáno: Soubory tříd různých datových typů používaných při zobrazovaní na webu.
File size: 6.4 KB
Line 
1<?php
2
3$FormClasses = array(
4 'UserOptions' => array(
5 'Title' => 'Základní nastavení',
6 'Table' => 'User',
7 'SubmitText' => 'Uložit',
8 'Items' => array(
9 'Login' => array('Type' => 'String', 'Caption' => 'Přihlašovací jméno', 'Default' => ''),
10 'Password' => array('Type' => 'Password', 'Caption' => 'Heslo', 'Default' => ''),
11 'Name' => array('Type' => 'String', 'Caption' => 'Zobrazované jméno', 'Default' => ''),
12 'Email' => array('Type' => 'String', 'Caption' => 'E-mail', 'Default' => ''),
13 //'PhoneNumber' => array('Type' => 'String', 'Caption' => 'Telefón', 'Default' => ''),
14 //'ICQ' => array('Type' => 'String', 'Caption' => 'ICQ', 'Default' => ''),
15 ),
16 ),
17 'UserRegister' => array(
18 'Title' => 'Registrace uživatele',
19 'SubmitText' => 'Registrovat',
20 'Table' => 'User',
21 'Items' => array(
22 'Login' => array('Type' => 'String', 'Caption' => 'Přihlašovací jméno', 'Default' => ''),
23 'Password' => array('Type' => 'Password', 'Caption' => 'Heslo', 'Default' => ''),
24 'Password2' => array('Type' => 'Password', 'Caption' => 'Potvrzení hesla', 'Default' => ''),
25 'Name' => array('Type' => 'String', 'Caption' => 'Zobrazované jméno', 'Default' => ''),
26 'Email' => array('Type' => 'String', 'Caption' => 'E-mail', 'Default' => ''),
27 //'PhoneNumber' => array('Type' => 'String', 'Caption' => 'Telefón', 'Default' => ''),
28 //'ICQ' => array('Type' => 'String', 'Caption' => 'ICQ', 'Default' => ''),
29 ),
30 ),
31 'UserLogin' => array(
32 'Title' => 'Přihlášení uživatele',
33 'SubmitText' => 'Přihlásit',
34 'Table' => '',
35 'Items' => array(
36 'Username' => array('Type' => 'String', 'Caption' => 'Přihlašovací jméno', 'Default' => ''),
37 'Password' => array('Type' => 'Password', 'Caption' => 'Heslo', 'Default' => ''),
38 ),
39 ),
40 'NewServer' => array(
41 'Title' => 'Nový server',
42 'Table' => 'Server',
43 'SubmitText' => 'Registrovat',
44 'Items' => array(
45 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => 'WoW server'),
46 'Description' => array('Type' => 'Text', 'Caption' => 'Popis', 'Default' => ''),
47 'Homepage' => array('Type' => 'String', 'Caption' => 'Webové stránky', 'Default' => ''),
48 'Type' => array('Type' => 'TServerType', 'Caption' => 'Typ', 'Default' => 0),
49 'Database' => array('Type' => 'TDatabase', 'Caption' => 'Databáze', 'Default' => 0),
50 'Motd' => array('Type' => 'String', 'Caption' => 'Zpráva dne', 'Default' => 'Vítejte na free WoW serveru'),
51 ),
52 ),
53 'EditServer' => array(
54 'Title' => 'Nastavení',
55 'Table' => 'Server',
56 'SubmitText' => 'Uložit',
57 'Items' => array(
58 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => 'WoW server'),
59 'Description' => array('Type' => 'Text', 'Caption' => 'Popis', 'Default' => ''),
60 'Homepage' => array('Type' => 'Hyperlink', 'Caption' => 'Webové stránky', 'Default' => ''),
61 'Type' => array('Type' => 'ServerType', 'Caption' => 'Typ', 'Default' => 0),
62 'Database' => array('Type' => 'Database', 'Caption' => 'Databáze', 'Default' => 0),
63 'Motd' => array('Type' => 'String', 'Caption' => 'Zpráva dne', 'Default' => 'Vítejte na free WoW serveru'),
64 //'TimeCreation' => array('Type' => 'DateTime', 'Caption' => 'Datum založení', 'Default' => 'NOW()'),
65 ),
66 ),
67 'ServerList' => array(
68 'Title' => 'Server',
69 'Table' => '(SELECT `ClientVersion`.`Version`, `Server`.`Name`, `Server`.`Id`, `Server`.`NetworkPortRealmd`, `User`.`Name` AS `UserName` FROM `Server` JOIN `User` ON `User`.`Id` = `Server`.`User` JOIN `Database` ON `Database`.`Id` = `Server`.`Database` JOIN `Emulator` ON `Emulator`.`Id` = `Database`.`Emulator` JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Emulator`.`ClientVersion`) AS T',
70 'Items' => array(
71 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
72 'UserName' => array('Type' => 'String', 'Caption' => 'Správce', 'Default' => ''),
73 'NetworkPortRealmd' => array('Type' => 'Integer', 'Caption' => 'Realmd port', 'Default' => ''),
74 'Version' => array('Type' => 'Integer', 'Caption' => 'Verze', 'Default' => 0),
75 'Online' => array('Type' => 'OnlineState', 'Caption' => 'Stav', 'Default' => 0),
76 'CharacterCount' => array('Type' => 'Integer', 'Caption' => 'Hráčů online', 'Default' => 0),
77 'AccountCount' => array('Type' => 'Integer', 'Caption' => 'Účtů', 'Default' => 0),
78 'CharacterCount' => array('Type' => 'Integer', 'Caption' => 'Postav', 0),
79 ),
80 ),
81 'EmulatorList' => array(
82 'Title' => 'Emulátor',
83 'Table' => '(SELECT `Emulator`.`Name`, `ClientVersion`.`Version` AS `ClientVersion`, `Emulator`.`Revision`, `Emulator`.`ScriptDev2Revision`, `Emulator`.`ScriptDev2PatchFileName`, `Emulator`.`CommitHash` FROM `Emulator` JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Emulator`.`ClientVersion`) AS T',
84 'Items' => array(
85 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
86 'Revision' => array('Type' => 'Integer', 'Caption' => 'Revize', 'Default' => 0),
87 'ClientVersion' => array('Type' => 'Integer', 'Caption' => 'Verze klienta', 'Default' => 0),
88 'ScriptDev2Revision' => array('Type' => 'Integer', 'Caption' => 'Verze SD2', 'Default' => 0),
89 'ScriptDev2PatchFileName' => array('Type' => 'String', 'Caption' => 'SD2 záplata', 'Default' => ''),
90 'CommitHash' => array('Type' => 'String', 'Caption' => 'Commit HASH', 'Default' => ''),
91 ),
92 ),
93 'EmulatorItem' => array(
94 'Title' => 'Emulátor',
95 'Table' => 'Emulator',
96 'Items' => array(
97 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
98 'Revision' => array('Type' => 'Integer', 'Caption' => 'Revize', 'Default' => 0),
99 //'ClientVersion' => array('Type' => 'PointerOneToOne', 'Caption' => 'Verze klienta', 'Default' => 0),
100 'ScriptDev2Revision' => array('Type' => 'Integer', 'Caption' => 'Verze SD2', 'Default' => 0),
101 'ScriptDev2PatchFileName' => array('Type' => 'String', 'Caption' => 'SD2 záplata', 'Default' => ''),
102 'CommitHash' => array('Type' => 'String', 'Caption' => 'Commit HASH', 'Default' => ''),
103 ),
104 ),
105);
106
107RegisterType('ServerType', 'Enumeration', array('Normální', 'PvP', 'RP', 'RPPvP'));
108RegisterType('OnlineState', 'Enumeration', array('Neaktivní', 'Aktivní'));
109
110//RegisterType('Database', 'PointerOneToOne', array('Table' => 'Database', 'Id' => 'Id', 'Name' => 'CONCAT(Name, " ", Version, " r", Revision)'));
111
112?>
Note: See TracBrowser for help on using the repository browser.