Changeset 36
- Timestamp:
- Jun 15, 2009, 10:34:43 AM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/backup.php
r35 r36 32 32 'mysql --user=server'.$ServerId.' --password=server'.$ServerId.' server'.$ServerId.'_scriptdev2 < temp/wowhosting/scriptdev2.sql', 33 33 'rm -rf temp/wowhosting', 34 'php www/shell.php ServerDatabaseChange '.$ServerId.' '.$this->Backup['Database'], 34 35 'php www/shell.php ServerUnLock '.$ServerId, 35 36 )); … … 41 42 $Server = new Server($this->Database, $ServerId); 42 43 $Description = 'MaNGOS r'.$Server->Server['Database']['Emulator']['Revision'].', UDB r'.$Server->Server['Database']['Revision'].', SD2 r'.$Server->Server['Database']['ScriptDev2Revision'].', Client '.$Server->Server['Database']['Emulator']['Client']['Version']; 43 $this->Database->insert('Backup', array('Server' => $ServerId, 'Time' => 'NOW()', 'Description' => $Description, 'Lock' => 1 ));44 $this->Database->insert('Backup', array('Server' => $ServerId, 'Time' => 'NOW()', 'Description' => $Description, 'Lock' => 1, 'Database' => $Server->Server['Database']['Id'])); 44 45 $this->Id = $this->Database->insert_id; 45 46 $this->Task->Add('Záloha databáze serveru', array( -
trunk/www/index.php
r35 r36 166 166 foreach($Table->Values as $Index => $Value) 167 167 { 168 $Table->Values[$Index]['Actions'] = ''; 168 169 if($Value['Lock'] == 0) $Table->Values[$Index]['Actions'] = '<a href="?Action=BackupDownload&Id='.$Value['Id'].'">Stáhnout</a>'; 169 170 if(($Server->Server['Lock'] == 0) and ($Value['Lock'] == 0)) $Table->Values[$Index]['Actions'] .= ' <a href="?Action=BackupRestore&Id='.$Value['Id'].'">Obnovit</a>'; -
trunk/www/server.php
r35 r36 317 317 } 318 318 $Commands = array_merge($Commands, array( 319 'php www/shell.php ServerDatabaseChange '.$ DatabaseId,319 'php www/shell.php ServerDatabaseChange '.$this->Id.' '.$DatabaseId, 320 320 'php www/shell.php ServerUnLock '.$this->Id, 321 321 )); -
trunk/www/shell.php
r35 r36 70 70 if($Command == 'ServerDatabaseChange') 71 71 { 72 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2]))72 if((count($_SERVER['argv']) > 3) and is_numeric($_SERVER['argv'][2]) and is_numeric($_SERVER['argv'][3])) 73 73 { 74 74 $Server = new Server($Database, $_SERVER['argv'][2]); 75 $Server->ChangeDatabaseId($_SERVER['argv'][ 2]);76 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru .';75 $Server->ChangeDatabaseId($_SERVER['argv'][3]); 76 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru, jako třetí Id databáze.'; 77 77 } else 78 78 $Output = 'Neznámý příkaz '.$Command;
Note:
See TracChangeset
for help on using the changeset viewer.