Changeset 71 for trunk/www/Application/View/Server.php
- Timestamp:
- Aug 23, 2009, 6:14:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/Server.php
r69 r71 97 97 foreach($Table->Values as $Index => $Item) 98 98 { 99 $Table->Values[$Index]['Actions'] = '<a href="? Action=ServerShow&Id='.$Item['Id'].'">Podrobnosti</a>';99 $Table->Values[$Index]['Actions'] = '<a href="?Module=Server&Action=Show&Id='.$Item['Id'].'">Podrobnosti</a>'; 100 100 unset($Table->Values[$Index]['Id']); 101 101 } … … 109 109 $DbRow = $DbResult->fetch_row(); 110 110 if(($ServerCount < $Config['MaxServerCount']) and ($DbRow[0] < $Config['MaxServerCountPerUser'])) 111 $Output .= '<br /><div style="text-align: center;"><a href="? Action=ServerAdd">Vytvořit nový server</a></dev>';111 $Output .= '<br /><div style="text-align: center;"><a href="?Module=Server&Action=Add">Vytvořit nový server</a></dev>'; 112 112 } 113 113 return($Output); … … 123 123 { 124 124 $Output = '<h4>Podrobnosti serveru</h4>'; 125 $Form = new Form($this-> ItemFormClass);125 $Form = new Form($this->System, $this->ItemFormClass); 126 126 $Form->LoadValuesFromDatabase($Id); 127 127 $Form->Definition['Items']['Realmlist'] = array('Type' => 'String', 'Caption' => 'Adresa k připojení', 'Default' => ''); … … 142 142 if(array_key_exists('Id', $Server->Server['Database']) and ($Server->Server['Lock'] == 0)) 143 143 { 144 if($ServerStatus['RealmdPortState'] == true) $Output .= ' <a href="?Action=ServerStop&Id='.$Server->Id.'">Zastavit</a> <a href="? Action=ServerRestart&Id='.$Server->Id.'">Restartovat</a>';145 else $Output .= ' <a href="? Action=ServerStart&Id='.$Server->Id.'">Spustit</a>';144 if($ServerStatus['RealmdPortState'] == true) $Output .= ' <a href="?Action=ServerStop&Id='.$Server->Id.'">Zastavit</a> <a href="?Module=Server&Action=Restart&Id='.$Server->Id.'">Restartovat</a>'; 145 else $Output .= ' <a href="?Module=Server&Action=Start&Id='.$Server->Id.'">Spustit</a>'; 146 146 } 147 147 if($Server->Server['Lock'] == 0) 148 148 { 149 $Output .= ' <a href="? Action=ServerEdit&Id='.$Server->Id.'">Upravit základní nastavení</a>';149 $Output .= ' <a href="?Module=Server&Action=Edit&Id='.$Server->Id.'">Upravit základní nastavení</a>'; 150 150 } 151 151 //$Output .= ' <a href="?Action=ServerDatabaseImport&Id='.$Server->Id.'">Načtení čisté databáze</a>'; 152 $Output .= ' <a href="? Action=RealmAdd&Id='.$Server->Id.'">Vytvořit nový svět</a>';153 $Output .= ' <a href="? Action=UpdateRealmCharacters&Id='.$Server->Id.'">Aktualizovat počty postav</a>';152 $Output .= ' <a href="?Module=Realm&Action=Add&Id='.$Server->Id.'">Vytvořit nový svět</a>'; 153 $Output .= ' <a href="?Module=Realm&Action=UpdateCharacters&Id='.$Server->Id.'">Aktualizovat počty postav</a>'; 154 154 } 155 $Output .= ' <a href="? Action=GameAccountRegister&Id='.$Server->Id.'">Vytvoření herního účtu</a>';155 $Output .= ' <a href="?Module=Server&Action=GameAccountRegister&Id='.$Server->Id.'">Vytvoření herního účtu</a>'; 156 156 $Output .= '</div>'; 157 157 158 158 // Show realmlist 159 $RealmView = new RealmView($this-> Database, $this->System);159 $RealmView = new RealmView($this->System); 160 160 $Output .= $RealmView->ItemList(); 161 161 } else $Output = $this->System->SystemMessage('Zobrazení serveru', 'Server se zadaným id nenalezen.'); … … 180 180 else 181 181 { 182 $Form = new Form($this-> CreateFormClass);182 $Form = new Form($this->System, $this->CreateFormClass); 183 183 $Form->LoadValuesFromForm(); 184 184 $Form->OnSubmit = '?Action=ServerCreate'; … … 208 208 if($NewPortRealmd < $Config['BaseNetworkPortRealmd']) $NewPortRealmd = $Config['BaseNetworkPortRealmd']; 209 209 210 $Form = new Form($this-> CreateFormClass, array());210 $Form = new Form($this->System, $this->CreateFormClass, array()); 211 211 $Form->LoadValuesFromForm(); 212 212 $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->User['Id'], 'Homepage' => $Form->Values['Homepage'], 'Database' => $Form->Values['Database'], 'NetworkPortRealmd' => $NewPortRealmd, 'Lock' => 1, 'TimeCreate' => 'NOW()')); … … 215 215 $Server->CreateDatabase(); 216 216 $Output .= $this->System->SystemMessage('Vytvoření serveru', $Server->ImportDatabase(true)); 217 $TaskView = new TaskView($this-> Database, $this->System);217 $TaskView = new TaskView($this->System); 218 218 $Output .= $TaskView->ItemList(); 219 219 //$UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']); … … 231 231 if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 232 232 { 233 $Form = new Form($this-> EditFormClass, array());233 $Form = new Form($this->System, $this->EditFormClass, array()); 234 234 $Form->LoadValuesFromForm(); 235 235 $ServerId = $_POST['ServerId']; … … 253 253 if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 254 254 { 255 $Form = new Form($this-> EditFormClass);255 $Form = new Form($this->System, $this->EditFormClass); 256 256 $Form->LoadValuesFromDatabase($_GET['Id']); 257 257 $Form->Values['ServerId'] = $_GET['Id']; … … 271 271 { 272 272 $Output .= $this->System->SystemMessage('Spuštění serveru', $Server->Start()); 273 $TaskView = new TaskView($this-> Database, $this->System);273 $TaskView = new TaskView($this->System); 274 274 $Output .= $TaskView->ItemList();; 275 275 } else $this->System->SystemMessage('Spuštění serveru', 'Nemáte oprávnění'); … … 287 287 { 288 288 $Output .= $this->System->SystemMessage('Zastavení serveru', $Server->Stop()); 289 $TaskView = new TaskView($this-> Database, $this->System);289 $TaskView = new TaskView($this->System); 290 290 $Output .= $TaskView->ItemList();; 291 291 } else $this->System->SystemMessage('Zastavení serveru', 'Nemáte oprávnění'); … … 296 296 function AccountCreate() 297 297 { 298 $Form = new Form($this-> GameAccountNewFormClass);298 $Form = new Form($this->System, $this->GameAccountNewFormClass); 299 299 $Form->LoadValuesFromForm(); 300 300 $Form->Values['ServerId'] = $_GET['Id']; 301 $Form->OnSubmit = '? Action=GameAccountRegister2';301 $Form->OnSubmit = '?Module=Server&Action=GameAccountRegisterFinish'; 302 302 $Output = $Form->ShowEditForm(); 303 303 return($Output); … … 306 306 function AccountCreateFinish() 307 307 { 308 $Form = new Form($this-> GameAccountNewFormClass);308 $Form = new Form($this->System, $this->GameAccountNewFormClass); 309 309 $Form->LoadValuesFromForm(); 310 310 $Server = new Server($this->Database, $Form->Values['ServerId']); 311 311 $Output = $this->System->SystemMessage('Vytvoření herního účtu', $Server->NewAccount($Form->Values['Name'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Expansion'])); 312 $Output .= '<a href="? Action=GameAccountRegister&Id='.$Form->Values['ServerId'].'">Zpět k zadání údajů</a>';312 $Output .= '<a href="?Module=Server&Action=GameAccountRegister&Id='.$Form->Values['ServerId'].'">Zpět k zadání údajů</a>'; 313 313 return($Output); 314 314 }
Note:
See TracChangeset
for help on using the changeset viewer.