Changeset 35 for trunk/www/shell.php
- Timestamp:
- Jun 15, 2009, 10:19:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/shell.php
r34 r35 3 3 include('global.php'); 4 4 5 $Output = ''; 5 6 if(count($_SERVER['argv']) > 1) 6 7 { … … 18 19 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 19 20 { 20 $Server = new Server($ _SERVER['argv'][2]);21 $Server = new Server($Database, $_SERVER['argv'][2]); 21 22 $Server->Lock(); 22 23 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; … … 26 27 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 27 28 { 28 $Server = new Server($ _SERVER['argv'][2]);29 $Server = new Server($Database, $_SERVER['argv'][2]); 29 30 $Server->UnLock(); 30 31 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; 32 } else 33 if($Command == 'EmulatorLock') 34 { 35 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 36 { 37 $Emulator = new Emulator($Database, $_SERVER['argv'][2]); 38 $Emulator->Lock(); 39 } else $Output = 'Jako druhý parameter je nutno zadat Id emulátoru.'; 40 } else 41 if($Command == 'EmulatorUnLock') 42 { 43 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 44 { 45 $Emulator = new Emulator($Database, $_SERVER['argv'][2]); 46 $Emulator->UnLock(); 47 } else $Output = 'Jako druhý parameter je nutno zadat Id emulátoru.'; 48 } else 49 if($Command == 'BackupLock') 50 { 51 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 52 { 53 $Backup = new Backup($Database, $_SERVER['argv'][2]); 54 $Backup->Lock(); 55 } else $Output = 'Jako druhý parameter je nutno zadat Id zálohy.'; 56 } else 57 if($Command == 'BackupUnLock') 58 { 59 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 60 { 61 $Backup = new Backup($Database, $_SERVER['argv'][2]); 62 $Backup->UnLock(); 63 } else $Output = 'Jako druhý parameter je nutno zadat Id zálohy.'; 31 64 } else 32 65 if($Command == 'TaskProcess') 33 66 { 34 67 $Task = new Task($Database); 35 while(1) 68 $Task->ProcessAllCycle(); 69 } else 70 if($Command == 'ServerDatabaseChange') 71 { 72 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 36 73 { 37 $ Task->ProcessAll();38 sleep(1);39 } 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.'; 40 77 } else 41 78 $Output = 'Neznámý příkaz '.$Command; 42 } else $Output = 'Jako první parameter je nutno zada rpovel.';79 } else $Output = 'Jako první parameter je nutno zadat povel.'; 43 80 echo($Output); 44 81
Note:
See TracChangeset
for help on using the changeset viewer.