Changeset 32


Ignore:
Timestamp:
Jun 14, 2009, 8:42:12 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Stránka zobrazení stavu systému. Přidán soubor třídy zastupující funkce týkajícíc se samotné platformy.
Location:
trunk/www
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/global.php

    r28 r32  
    2727include('task.php');
    2828include('backup.php');
     29include('platform.php');
    2930
    3031$PrefixMultipliers = array
     
    8384      array('us', 'mikrosekunda', pow(10, -6)),
    8485      array('ms', 'milisekunda', pow(10, -3)),
    85       array('s', 'sekunda', 1),
    86       array('min', 'minuta', 60),
    87       array('hod', 'hodina', 60 * 60) ,
    88       array('den', 'den', 24 * 60 * 60),
    89       array('týd', 'týden', 7 * 24 * 60 * 60),
    90       array('měs', 'měsíc', 30 * 24 * 60 * 60),
    91       array('rok', 'rok', 364 * 24 * 60 * 60),
    92       array('des', 'desetiletí', 10 * 364 * 24 * 60 * 60),
    93       array('sta', 'staletí', 100 * 364 * 24 * 60 * 60),
    94       array('tis', 'tisiciletí', 10000 * 364 * 24 * 60 * 60),
     86      array('s', 'sekund', 1),
     87      array('minut', 'minuta', 60),
     88      array('hodin', 'hodina', 60 * 60) ,
     89      array('d', 'den', 24 * 60 * 60),
     90      array('týd', 'týden', 7 * 24 * 60 * 60),
     91      array('měsíců', 'měsíc', 30 * 24 * 60 * 60),
     92      array('roků', 'rok', 364 * 24 * 60 * 60),
     93      array('desitiletí', 'desetiletí', 10 * 364 * 24 * 60 * 60),
     94      array('staletí', 'staletí', 100 * 364 * 24 * 60 * 60),
     95      array('tisíciletí', 'tisiciletí', 10000 * 364 * 24 * 60 * 60),
    9596    ),
    9697  ),
  • trunk/www/index.php

    r31 r32  
    678678        } else $Output .= USER_BAD_ROLE;
    679679      } else     
     680      if($_GET['Action'] == 'State')
     681      {
     682        $Platform = new Platform($this->Database);
     683        $State = $Platform->State();
     684        $Output = '<h4>Stav systému</h4>'.
     685        '<table class="WideTable">'.
     686        '<tr><th>Veličina</th><th>Hodnota</th></tr>'.
     687        '<tr><td>Doba běhu serveru</td><td>'.$this->System->AddPrefixMultipliers($State['Uptime'], '', 4, 'Time').'</td></tr>'.
     688        '<tr><td>Použitá/celková paměť</td><td>'.$this->System->AddPrefixMultipliers($State['MemoryUsed'], 'B', 4, 'Binary').' / '.$this->System->AddPrefixMultipliers($State['MemoryTotal'], 'B', 4, 'Binary').'</td></tr>'.
     689        '<tr><td>Počet serverů</td><td>'.$State['ServerCount'].'</td></tr>'.
     690        '<tr><td>Počet aktivních serverů</td><td>'.$State['ServerOnlineCount'].'</td></tr>'.
     691        '<tr><td>Počet emulátorů</td><td>'.$State['EmulatorCount'].'</td></tr>'.
     692        '<tr><td>Počet uživatelů</td><td>'.$State['UserCount'].'</td></tr>'.
     693        '<tr><td>Počet záloh</td><td>'.$State['BackupCount'].'</td></tr>'.
     694        '<tr><td>Čekajících/všech úloh ve frontě</td><td>'.$State['TaskQueued'].' / '.$State['TaskCount'].'</td></tr>'.
     695        '</table>';
     696      } else
    680697      if($_GET['Action'] == 'Test')
    681698      {
     
    696713    }
    697714    if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId)
    698       $Output = '<table class="BasicTable"><tr><td class="UserMenu">'.$this->UserMenu().'</td><td class="Content">'.$Output.'</td></tr</table>';
     715      $Output = '<table class="BasicTable"><tr><td class="UserMenu">'.$this->UserMenu().'</td><td class="Content">'.$Output.'</td></tr></table>';
    699716    return($Output);
    700717  }
  • trunk/www/page.php

    r27 r32  
    2727    '<div class="Navigation"><span class="MenuItem">'.
    2828    '<a href="?Action=Info">Informace</a>'.
     29    ' <a href="?Action=State">Stav systému</a>'.
    2930    ' <a href="?">Seznam serverů</a>'.
    3031    ' <a href="?Action=ClientList">Verze klienta</a>'.
  • trunk/www/sql/full.sql

    r7 r32  
    44--
    55-- Počítač: localhost
    6 -- Vygenerováno: Středa 10. června 2009, 19:29
     6-- Vygenerováno: Neděle 14. června 2009, 15:41
    77-- Verze MySQL: 5.0.77
    88-- Verze PHP: 5.2.9
     
    2424  `Server` int(11) NOT NULL,
    2525  `Time` datetime NOT NULL,
    26   PRIMARY KEY  (`Id`)
    27 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    28 
    29 --
    30 -- Vypisuji data pro tabulku `Backup`
    31 --
    32 
    33 
    34 -- --------------------------------------------------------
    35 
    36 --
    37 -- Struktura tabulky `ClientVersion`
    38 --
    39 
    40 CREATE TABLE IF NOT EXISTS `ClientVersion` (
     26  `Description` varchar(255) NOT NULL,
     27  PRIMARY KEY  (`Id`)
     28) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
     29
     30
     31-- --------------------------------------------------------
     32
     33--
     34-- Struktura tabulky `Client`
     35--
     36
     37CREATE TABLE IF NOT EXISTS `Client` (
    4138  `Id` int(11) NOT NULL auto_increment,
    4239  `Version` varchar(16) NOT NULL,
    4340  `BuildNumber` int(11) NOT NULL,
    4441  `ReleaseDate` date NOT NULL,
    45   PRIMARY KEY  (`Id`)
    46 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ;
    47 
    48 --
    49 -- Vypisuji data pro tabulku `ClientVersion`
    50 --
    51 
    52 INSERT INTO `ClientVersion` (`Id`, `Version`, `BuildNumber`, `ReleaseDate`) VALUES
    53 (1, '3.1.3', 9947, '2009-06-02'),
    54 (2, '3.1.2', 9901, '2009-05-15'),
    55 (3, '3.1.1a', 9835, '2009-04-28'),
    56 (4, '3.1.1', 9806, '2009-04-21'),
    57 (5, '3.1.0', 9767, '2009-04-14'),
    58 (6, '3.0.9', 9551, '2009-02-10'),
    59 (7, '3.0.8a', 9506, '2009-01-27'),
    60 (8, '3.0.8', 9464, '2009-01-20'),
    61 (9, '3.0.3', 9183, '2008-11-04'),
    62 (10, '3.0.2', 9056, '2009-10-14'),
    63 (11, '2.4.3', 8606, '2008-07-15'),
    64 (12, '2.4.2', 8209, '2008-06-13'),
    65 (13, '2.4.1', 8125, '2008-04-01'),
    66 (14, '2.4.0', 8089, '2008-03-25'),
    67 (15, '2.3.3', 7799, '2008-01-22'),
    68 (16, '2.3.2', 7741, '2008-01-08'),
    69 (17, '2.3.0', 7561, '2007-11-13'),
    70 (18, '2.2.3', 7359, '2007-10-09'),
    71 (19, '2.2.2', 7318, '2007-10-02'),
    72 (20, '2.2.0', 7272, '2007-09-25'),
    73 (21, '2.1.3', 6898, '2007-07-10'),
    74 (22, '2.1.2', 6803, '2007-06-19'),
    75 (23, '2.1.1', 6739, '2007-06-05'),
    76 (24, '2.1.0a', 6729, '2007-05-22'),
    77 (25, '2.1.0', 6692, '2007-05-22'),
    78 (26, '2.0.12', 6546, '2007-04-03'),
    79 (27, '2.0.10', 6448, '2007-03-06'),
    80 (28, '2.0.8', 6403, '2007-02-16'),
    81 (29, '2.0.7', 6383, '2007-02-13'),
    82 (30, '2.0.6', 6337, '2007-01-23'),
    83 (31, '2.0.5', 6320, '2007-01-14'),
    84 (32, '2.0.4', 6320, '2007-01-12'),
    85 (33, '2.0.3', 6299, '2007-01-09'),
    86 (34, '2.0.1', 6180, '2006-11-05');
     42  `Title` varchar(255) NOT NULL,
     43  PRIMARY KEY  (`Id`)
     44) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=74 ;
     45
     46--
     47-- Vypisuji data pro tabulku `Client`
     48--
     49
     50INSERT INTO `Client` (`Id`, `Version`, `BuildNumber`, `ReleaseDate`, `Title`) VALUES
     51(1, '3.1.3', 9947, '2009-06-02', ''),
     52(2, '3.1.2', 9901, '2009-05-15', ''),
     53(3, '3.1.1a', 9835, '2009-04-28', ''),
     54(4, '3.1.1', 9806, '2009-04-21', ''),
     55(5, '3.1.0', 9767, '2009-04-14', 'Secrets of Ulduar'),
     56(6, '3.0.9', 9551, '2009-02-10', ''),
     57(7, '3.0.8a', 9506, '2009-01-27', ''),
     58(8, '3.0.8', 9464, '2009-01-20', ''),
     59(9, '3.0.3', 9183, '2008-11-04', ''),
     60(10, '3.0.2', 9056, '2009-10-14', 'Echoes of Doom'),
     61(11, '2.4.3', 8606, '2008-07-15', ''),
     62(12, '2.4.2', 8209, '2008-06-13', ''),
     63(13, '2.4.1', 8125, '2008-04-01', ''),
     64(14, '2.4.0', 8089, '2008-03-25', 'Fury of the Sunwell'),
     65(15, '2.3.3', 7799, '2008-01-22', ''),
     66(16, '2.3.2', 7741, '2008-01-08', ''),
     67(17, '2.3.0', 7561, '2007-11-13', 'The Gods of Zul''Aman'),
     68(18, '2.2.3', 7359, '2007-10-09', ''),
     69(19, '2.2.2', 7318, '2007-10-02', ''),
     70(20, '2.2.0', 7272, '2007-09-25', 'Voice Chat!'),
     71(21, '2.1.3', 6898, '2007-07-10', ''),
     72(22, '2.1.2', 6803, '2007-06-19', ''),
     73(23, '2.1.1', 6739, '2007-06-05', ''),
     74(24, '2.1.0a', 6729, '2007-05-22', ''),
     75(25, '2.1.0', 6692, '2007-05-22', 'The Black Temple'),
     76(26, '2.0.12', 6546, '2007-04-03', ''),
     77(27, '2.0.10', 6448, '2007-03-06', ''),
     78(28, '2.0.8', 6403, '2007-02-16', ''),
     79(29, '2.0.7', 6383, '2007-02-13', ''),
     80(30, '2.0.6', 6337, '2007-01-23', ''),
     81(31, '2.0.5', 6320, '2007-01-14', ''),
     82(32, '2.0.4', 6320, '2007-01-12', ''),
     83(33, '2.0.3', 6299, '2007-01-09', ''),
     84(34, '2.0.1', 6180, '2006-12-05', 'Before the Storm'),
     85(35, '1.12.2', 6005, '2006-11-13', ''),
     86(36, '1.12.1', 5875, '2006-09-26', ''),
     87(37, '1.12.0', 5595, '2006-09-22', 'Drums of War'),
     88(38, '1.11.2', 5464, '2006-07-11', ''),
     89(39, '1.11.1', 5462, '2006-06-28', ''),
     90(40, '1.11.0', 5428, '2006-06-20', 'Shadow of the Necropolis'),
     91(41, '1.10.2', 5302, '2006-05-02', ''),
     92(42, '1.10.1', 5230, '2006-04-11', ''),
     93(43, '1.10.0', 5195, '2006-03-28', 'Storms of Azeroth'),
     94(44, '1.9.4', 5086, '2006-03-14', ''),
     95(45, '1.9.3', 5059, '2006-02-07', 'Love is in the Air'),
     96(46, '1.9.2', 4996, '2006-01-12', ''),
     97(47, '1.9.1', 4983, '2006-01-10', ''),
     98(48, '1.9.0', 4937, '2006-01-03', 'The Gates of Ahn''Qiraj'),
     99(49, '1.8.4', 4878, '2005-12-05', ''),
     100(50, '1.8.3', 4807, '2005-11-15', ''),
     101(51, '1.8.2', 4784, '2005-10-27', ''),
     102(52, '1.8.1', 4769, '2005-10-25', ''),
     103(53, '1.8.0', 4735, '2005-10-10', 'Dragons of Nightmare'),
     104(54, '1.7.1', 4695, '2005-09-22', ''),
     105(55, '1.7.0', 4671, '2006-09-13', 'Rise of the Blood God'),
     106(56, '1.6.1', 4544, '2005-08-02', ''),
     107(57, '1.6.0', 4500, '2005-07-12', 'Assault on Blackwing Lair'),
     108(58, '1.5.1', 4449, '2005-06-14', ''),
     109(59, '1.5.0', 4442, '2005-06-07', 'Battlegrounds'),
     110(60, '1.4.2', 4375, '2005-05-03', ''),
     111(61, '1.4.1', 4364, '2005-05-03', ''),
     112(62, '1.4.0', 4341, '2005-04-08', 'The Call to War'),
     113(63, '1.3.2', 4299, '2005-03-22', ''),
     114(64, '1.3.1', 4297, '2005-03-22', ''),
     115(65, '1.3.0', 4284, '2005-03-07', 'Ruins of the Dire Maul'),
     116(66, '1.2.4', 4222, '2005-02-22', ''),
     117(67, '1.2.3', 4211, '2005-02-22', ''),
     118(68, '1.2.2', 4196, '2005-02-15', ''),
     119(69, '1.2.1', 4150, '2004-12-21', ''),
     120(70, '1.2.0', 4149, '2004-12-18', 'Mysteries of Maraudon'),
     121(71, '1.1.2', 4125, '2004-12-06', ''),
     122(72, '1.1.1', 4062, '2004-11-17', ''),
     123(73, '1.1.0', 4044, '2004-11-07', 'World of Warcraft');
    87124
    88125-- --------------------------------------------------------
     
    95132  `Id` int(11) NOT NULL auto_increment,
    96133  `Name` varchar(255) NOT NULL,
     134  `Title` varchar(255) NOT NULL,
    97135  `Version` varchar(16) NOT NULL,
    98136  `Revision` int(11) NOT NULL,
     
    102140  `Emulator` int(11) NOT NULL,
    103141  PRIMARY KEY  (`Id`)
    104 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
    105 
    106 --
    107 -- Vypisuji data pro tabulku `Database`
    108 --
    109 
    110 INSERT INTO `Database` (`Id`, `Name`, `Version`, `Revision`, `ScriptDev2Revision`, `ACIDRevision`, `SourceFileName`, `Emulator`) VALUES
    111 (1, 'UDB', '0.11.5', 371, 1012, 0, 'UDB_0.11.5_Core_7681_SD2_1012.sql', 1);
     142) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
     143
     144
     145-- --------------------------------------------------------
     146
     147--
     148-- Struktura tabulky `DatabaseUpdate`
     149--
     150
     151CREATE TABLE IF NOT EXISTS `DatabaseUpdate` (
     152  `Id` int(11) NOT NULL auto_increment,
     153  `Database` int(11) NOT NULL,
     154  `Revision` int(11) NOT NULL,
     155  `Updates` text NOT NULL,
     156  PRIMARY KEY  (`Id`)
     157) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
     158
    112159
    113160-- --------------------------------------------------------
     
    131178  `Configuration` text NOT NULL,
    132179  PRIMARY KEY  (`Id`)
    133 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    134 
    135 --
    136 -- Vypisuji data pro tabulku `Debug`
    137 --
     180) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
    138181
    139182
     
    147190  `Id` int(11) NOT NULL auto_increment,
    148191  `Name` varchar(255) NOT NULL,
    149   `ClientVersion` int(11) NOT NULL,
     192  `Client` int(11) NOT NULL,
    150193  `Revision` int(11) NOT NULL,
    151194  `CommitHash` varchar(255) NOT NULL,
    152195  `ScriptDev2PatchFileName` varchar(255) NOT NULL,
    153196  `ScriptDev2Revision` int(11) NOT NULL,
    154   PRIMARY KEY  (`Id`)
    155 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
    156 
    157 --
    158 -- Vypisuji data pro tabulku `Emulator`
    159 --
    160 
    161 INSERT INTO `Emulator` (`Id`, `Name`, `ClientVersion`, `Revision`, `CommitHash`, `ScriptDev2PatchFileName`, `ScriptDev2Revision`) VALUES
    162 (1, 'MaNGOS', 6, 7681, '1620b99f8c2d62d582011e757eb4dcf469f036ad', 'MaNGOS-7356-ScriptDev2.patch', 1012);
     197  `Version` varchar(16) NOT NULL,
     198  PRIMARY KEY  (`Id`)
     199) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
     200
    163201
    164202-- --------------------------------------------------------
     
    176214  KEY `Time` (`Time`)
    177215) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
    178 
    179216
    180217
     
    196233  `Type` int(11) NOT NULL,
    197234  `Homepage` varchar(255) NOT NULL,
    198   PRIMARY KEY  (`Id`)
    199 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
    200 
    201 --
    202 -- Vypisuji data pro tabulku `Server`
    203 --
    204 
    205 INSERT INTO `Server` (`Id`, `Name`, `NetworkPortRealmd`, `NetworkPortWorldd`, `User`, `Database`, `Motd`, `Description`, `Type`, `Homepage`) VALUES
    206 (1, 'Test 1', 3724, 8085, 2, 1, 'Vítejte na free WoW serveru', '', 0, '');
     235  `TimeCreation` datetime NOT NULL,
     236  `Online` int(11) NOT NULL,
     237  `CharacterOnlineCount` int(11) NOT NULL,
     238  `CharacterCount` int(11) NOT NULL,
     239  `AccountCount` int(11) NOT NULL,
     240  PRIMARY KEY  (`Id`)
     241) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
    207242
    208243
     
    218253  `Title` varchar(255) NOT NULL,
    219254  `CommandList` text NOT NULL,
    220   `Server` int(11) NOT NULL,
    221   `Executed` int(11) NOT NULL,
     255  `User` int(11) NOT NULL,
     256  `State` int(11) NOT NULL,
    222257  `Output` text NOT NULL,
    223258  PRIMARY KEY  (`Id`)
    224 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
    225 
    226 
    227 -- --------------------------------------------------------
     259) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
     260
    228261
    229262--
     
    243276  `Role` int(11) NOT NULL,
    244277  PRIMARY KEY  (`Id`)
    245 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
     278) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
    246279
    247280--
     
    251284INSERT INTO `User` (`Id`, `Name`, `Login`, `Password`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `Role`) VALUES
    252285(1, 'Anonym', 'anonymous', '711a5c2497eca9d90a9cb92c188c7f4b8a7bf672', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 1),
    253 (2, 'Administrátor', 'admin', 'd033e22ae348aeb5660fc2140aec35850c4da997', 'root@localhost', '192.168.0.3', '2009-06-09 17:19:59', '0000-00-00 00:00:00', 0, 3),
    254 (3, 'Uživatel', 'User', '8be3c943b1609fffbfc51aad666d0a04adf83c9d', 'user@localhost', '192.168.0.3', '2009-06-09 10:48:24', '0000-00-00 00:00:00', 0, 2);
    255 
     286(2, 'Administrátor', 'admin', 'd033e22ae348aeb5660fc2140aec35850c4da997', 'root@localhost', '192.168.0.3', '2009-06-13 22:39:43', '0000-00-00 00:00:00', 0, 3),
    256287
    257288-- --------------------------------------------------------
     
    272303  PRIMARY KEY  (`Id`),
    273304  KEY `User` (`User`)
    274 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
    275 
    276 
     305) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
Note: See TracChangeset for help on using the changeset viewer.