Changeset 41


Ignore:
Timestamp:
Jun 16, 2009, 6:47:25 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazovat pouze zálohy daného uživatele.
  • Opraveno: Chyba nastavování času ukončení úloh.
Location:
trunk/www
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/index.php

    r39 r41  
    174174        $Table = new Table('BackupList');
    175175        $Table->OnRow = array($this, 'ShowBackupListOnRow');
    176         $Table->Table = '(SELECT * FROM `Backup` WHERE `Server` = '.$ServerId.')';
     176        $Table->Definition['Table'] = '(SELECT * FROM `Backup` WHERE `Server` = '.$Server->Id.')';
    177177        $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => 'Id', 'Default' => '');
    178178        $Table->Definition['Items']['Lock'] = array('Type' => 'Hidden', 'Caption' => 'Zámek', 'Default' => '');
     
    192192          if($Server->Server['Lock'] == 0) $Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd&amp;Id='.$ServerId.'">Zálohovat</a></dev>';     
    193193        }
    194       } else $this->SystemMessage('Zastavení serveru', 'Nemáte oprávnění');
    195     } else $Output .= USER_BAD_ROLE;   
     194      } else $Output = $this->SystemMessage('Zastavení serveru', 'Nemáte oprávnění');
     195    } else $Output = USER_BAD_ROLE;   
    196196    return($Output);
    197197  }
  • trunk/www/server.php

    r40 r41  
    7676      'mysql --user=server'.$this->Id.' --password=server'.$this->Id.' server'.$this->Id.'_realmd < emulator/'.$this->Server['Database']['Emulator']['Id'].'/share/mangos/sql/realmd.sql',
    7777      'mysql --user=server'.$this->Id.' --password=server'.$this->Id.' server'.$this->Id.'_characters < emulator/'.$this->Server['Database']['Emulator']['Id'].'/share/mangos/sql/characters.sql',
    78       'php www/shell.php ServerDatabaseChange '.$this->Server['Database']['Id'],
    79       'php www/shell.php ServerUnLock '.$thisr->Id,
     78      'php www/shell.php ServerDatabaseChange '.$this->Id.' '.$this->Server['Database']['Id'],
     79      'php www/shell.php ServerUnLock '.$this->Id,
    8080    ));   
    8181    $this->Task->Add('Inicializace databáze', $CommandList);
     
    8686  {
    8787    $this->Lock();
     88    $this->SaveConfiguration();
    8889    $this->Task->Add('Start emulátoru', array(
    8990      'php www/shell.php ServerLock '.$this->Id,
  • trunk/www/sql/full.sql

    r32 r41  
    44--
    55-- Počítač: localhost
    6 -- Vygenerováno: Neděle 14. června 2009, 15:41
     6-- Vygenerováno: Úterý 16. června 2009, 18:24
    77-- Verze MySQL: 5.0.77
    88-- Verze PHP: 5.2.9
     
    2525  `Time` datetime NOT NULL,
    2626  `Description` varchar(255) NOT NULL,
    27   PRIMARY KEY  (`Id`)
    28 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
    29 
     27  `Lock` int(11) NOT NULL,
     28  `Database` int(11) NOT NULL,
     29  PRIMARY KEY  (`Id`)
     30) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    3031
    3132-- --------------------------------------------------------
     
    4243  `Title` varchar(255) NOT NULL,
    4344  PRIMARY KEY  (`Id`)
    44 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=74 ;
    45 
    46 --
    47 -- Vypisuji data pro tabulku `Client`
    48 --
    49 
    50 INSERT 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');
     45) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    12446
    12547-- --------------------------------------------------------
     
    14062  `Emulator` int(11) NOT NULL,
    14163  PRIMARY KEY  (`Id`)
    142 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
    143 
     64) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    14465
    14566-- --------------------------------------------------------
     
    15576  `Updates` text NOT NULL,
    15677  PRIMARY KEY  (`Id`)
    157 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
    158 
     78) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    15979
    16080-- --------------------------------------------------------
     
    17898  `Configuration` text NOT NULL,
    17999  PRIMARY KEY  (`Id`)
    180 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
    181 
     100) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    182101
    183102-- --------------------------------------------------------
     
    196115  `ScriptDev2Revision` int(11) NOT NULL,
    197116  `Version` varchar(16) NOT NULL,
    198   PRIMARY KEY  (`Id`)
    199 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
    200 
     117  `Lock` int(11) NOT NULL,
     118  PRIMARY KEY  (`Id`)
     119) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
     120
     121-- --------------------------------------------------------
     122
     123--
     124-- Struktura tabulky `History`
     125--
     126
     127CREATE TABLE IF NOT EXISTS `History` (
     128  `Time` int(11) NOT NULL,
     129  `Period` int(11) NOT NULL,
     130  `Measure` int(11) NOT NULL,
     131  `Server` int(11) NOT NULL,
     132  `Minimum` double NOT NULL,
     133  `Average` double NOT NULL,
     134  `Maximum` double NOT NULL,
     135  UNIQUE KEY `Time_2` (`Time`,`Period`,`Measure`,`Server`),
     136  KEY `Time` (`Time`),
     137  KEY `Measure` (`Measure`),
     138  KEY `Server` (`Server`),
     139  KEY `Period` (`Period`)
     140) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    201141
    202142-- --------------------------------------------------------
     
    215155) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
    216156
     157-- --------------------------------------------------------
     158
     159--
     160-- Struktura tabulky `News`
     161--
     162
     163CREATE TABLE IF NOT EXISTS `News` (
     164  `Id` int(11) NOT NULL auto_increment,
     165  `User` int(11) NOT NULL,
     166  `Time` datetime NOT NULL,
     167  `Title` varchar(255) NOT NULL,
     168  `Content` text NOT NULL,
     169  PRIMARY KEY  (`Id`)
     170) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    217171
    218172-- --------------------------------------------------------
     
    233187  `Type` int(11) NOT NULL,
    234188  `Homepage` varchar(255) NOT NULL,
    235   `TimeCreation` datetime NOT NULL,
     189  `TimeCreate` datetime NOT NULL,
    236190  `Online` int(11) NOT NULL,
    237191  `CharacterOnlineCount` int(11) NOT NULL,
    238192  `CharacterCount` int(11) NOT NULL,
    239193  `AccountCount` int(11) NOT NULL,
    240   PRIMARY KEY  (`Id`)
    241 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
    242 
     194  `Lock` int(11) NOT NULL,
     195  PRIMARY KEY  (`Id`)
     196) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    243197
    244198-- --------------------------------------------------------
     
    250204CREATE TABLE IF NOT EXISTS `Task` (
    251205  `Id` int(11) NOT NULL auto_increment,
    252   `Time` datetime NOT NULL,
     206  `TimeCreate` datetime default NULL,
     207  `TimeStart` datetime default NULL,
     208  `TimeEnd` datetime default NULL,
    253209  `Title` varchar(255) NOT NULL,
    254210  `CommandList` text NOT NULL,
     
    256212  `State` int(11) NOT NULL,
    257213  `Output` text NOT NULL,
    258   PRIMARY KEY  (`Id`)
    259 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
    260 
     214  `Error` text NOT NULL,
     215  PRIMARY KEY  (`Id`)
     216) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
     217
     218-- --------------------------------------------------------
    261219
    262220--
     
    276234  `Role` int(11) NOT NULL,
    277235  PRIMARY KEY  (`Id`)
    278 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
    279 
    280 --
    281 -- Vypisuji data pro tabulku `User`
    282 --
    283 
    284 INSERT INTO `User` (`Id`, `Name`, `Login`, `Password`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `Role`) VALUES
    285 (1, 'Anonym', 'anonymous', '711a5c2497eca9d90a9cb92c188c7f4b8a7bf672', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 1),
    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),
     236) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    287237
    288238-- --------------------------------------------------------
     
    303253  PRIMARY KEY  (`Id`),
    304254  KEY `User` (`User`)
    305 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
     255) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
  • trunk/www/task.php

    r38 r41  
    2525    $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = 0 ORDER BY Id,TimeCreate ASC');
    2626    $this->Database->query('UPDATE Task SET State=2 WHERE State=1'); // Change not finished running tasks to finished
    27     $this->Database->query('UPDATE Task SET TimeEnd=NOW() WHERE State=2'); // Set end time to finished tasks
     27    $this->Database->query('UPDATE Task SET TimeEnd=NOW() WHERE State=2 AND TimeEnd = NULL'); // Set end time to finished tasks
    2828    while($Task = $DbResult->fetch_assoc())
    2929    {
Note: See TracChangeset for help on using the changeset viewer.