Changeset 72 for trunk/www/Application/View/Realm.php
- Timestamp:
- Aug 23, 2009, 6:37:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/Realm.php
r69 r72 118 118 foreach($Table->Values as $Index => $Item) 119 119 { 120 $Table->Values[$Index]['Actions'] = '<a href="? Action=RealmShow&Id='.$Item['Id'].'">Podrobnosti</a>';120 $Table->Values[$Index]['Actions'] = '<a href="?Module=Realm&Action=Show&Id='.$Item['Id'].'">Podrobnosti</a>'; 121 121 unset($Table->Values[$Index]['Id']); 122 122 } … … 130 130 //$DbRow = $DbResult->fetch_row(); 131 131 if(($RealmCount < $Config['MaxRealmPerServerCount'])) 132 $Output .= '<br /><div style="text-align: center;"><a href="? Action=RealmAdd">Vytvořit nový svět</a></dev>';132 $Output .= '<br /><div style="text-align: center;"><a href="?Module=Realm&Action=Add">Vytvořit nový svět</a></dev>'; 133 133 } 134 134 return($Output); … … 144 144 //{ 145 145 $Output = '<h4>Podrobnosti světa</h4>'; 146 $Form = new Form($this-> ItemFormClass);146 $Form = new Form($this->System, $this->ItemFormClass); 147 147 $Form->LoadValuesFromDatabase($Id); 148 148 $Form->Definition['Items']['Uptime'] = array('Type' => 'String', 'Caption' => 'Doba běhu', 'Default' => ''); … … 159 159 if(array_key_exists('Id', $Realm->Data['Database']) and ($Realm->Data['Lock'] == 0)) 160 160 { 161 if($RealmStatus['WorlddPortState'] == true) $Output .= ' <a href="? Action=RealmStop&Id='.$Realm->Id.'">Zastavit</a> <a href="?Action=RealmRestart&Id='.$Realm->Id.'">Restartovat</a>';162 else $Output .= ' <a href="? Action=RealmStart&Id='.$Realm->Id.'">Spustit</a>';161 if($RealmStatus['WorlddPortState'] == true) $Output .= ' <a href="?Module=Realm&Action=Stop&Id='.$Realm->Id.'">Zastavit</a> <a href="?Module=Realm&Action=Restart&Id='.$Realm->Id.'">Restartovat</a>'; 162 else $Output .= ' <a href="?Module=Realm&Action=Start&Id='.$Realm->Id.'">Spustit</a>'; 163 163 } 164 164 if($Realm->Data['Lock'] == 0) 165 165 { 166 $Output .= ' <a href="? Action=RealmEdit&Id='.$Realm->Id.'">Upravit základní nastavení</a>';167 $Output .= ' <a href="? Action=RealmEditDetailed&Id='.$Realm->Id.'">Upravit podrobné nastavení</a>';168 $Output .= ' <a href="? Action=RealmInitDatabase&Id='.$Realm->Id.'">Vynulovat databázi</a>';166 $Output .= ' <a href="?Module=Realm&Action=Edit&Id='.$Realm->Id.'">Upravit základní nastavení</a>'; 167 $Output .= ' <a href="?Module=Realm&Action=EditDetailed&Id='.$Realm->Id.'">Upravit podrobné nastavení</a>'; 168 $Output .= ' <a href="?Module=Realm&Action=InitDatabase&Id='.$Realm->Id.'">Vynulovat databázi</a>'; 169 169 } 170 $Output .= ' <a href="? Action=DebugList&Id='.$Realm->Id.'">Ladící informace</a>';170 $Output .= ' <a href="?Module=Debug&Action=ItemList&Id='.$Realm->Id.'">Ladící informace</a>'; 171 171 //$Output .= ' <a href="?Action=ServerDatabaseImport&Id='.$Server->Id.'">Načtení čisté databáze</a>'; 172 172 } … … 193 193 else 194 194 { 195 $Form = new Form($this-> CreateFormClass);195 $Form = new Form($this->System, $this->CreateFormClass); 196 196 $Form->LoadValuesFromForm(); 197 $Form->OnSubmit = '? Action=RealmCreate&Id='.$ServerId;197 $Form->OnSubmit = '?Module=Realm&Action=Create&Id='.$ServerId; 198 198 $Output .= 'Tento formulář vám umožní si vytvořit nový svět. Pečlivě vyplňte požadované údaje.'; 199 199 $Output .= $Form->ShowEditForm(); … … 223 223 if($NewPortWorldd < $Config['BaseNetworkPortWorldd']) $NewPortWorldd = $Config['BaseNetworkPortWorldd']; 224 224 225 $Form = new Form($this-> CreateFormClass, array());225 $Form = new Form($this->System, $this->CreateFormClass, array()); 226 226 $Form->LoadValuesFromForm(); 227 227 $this->Database->insert('Realm', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'Server' => $ServerId, 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => $Form->Values['Database'], 'NetworkPortWorldd' => $NewPortWorldd, 'Lock' => 1, 'TimeCreate' => 'NOW()')); … … 247 247 if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 248 248 { 249 $Form = new Form($this-> EditFormClass, array());249 $Form = new Form($this->System, $this->EditFormClass, array()); 250 250 $Form->LoadValuesFromForm(); 251 251 $RealmId = $_POST['RealmId']; … … 253 253 $Output .= $this->System->SystemMessage('Upravit svět', 'Nastavení světa uloženo.'); 254 254 $Form->SaveValuesToDatabase($_POST['RealmId']); 255 $Form->OnSubmit = '? Action=RealmSave';255 $Form->OnSubmit = '?Module=Realm&Action=Save'; 256 256 257 257 $Realm = new Realm($this->Database, $_POST['RealmId']); … … 269 269 if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 270 270 { 271 $Form = new Form($this-> EditFormClass);271 $Form = new Form($this->System, $this->EditFormClass); 272 272 $Form->LoadValuesFromDatabase($_GET['Id']); 273 273 $Form->Values['RealmId'] = $_GET['Id']; 274 $Form->OnSubmit = '? Action=RealmSave';274 $Form->OnSubmit = '?Module=Realm&Action=Save'; 275 275 $Output .= $Form->ShowEditForm(); 276 276 } else $Output = $this->System->SystemMessage('Nastavení světa', 'Nemáte oprávnění'); … … 284 284 if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 285 285 { 286 $Form = new Form($this->S ettingDetailedFormClass);286 $Form = new Form($this->System, $this->SettingDetailedFormClass); 287 287 $EmulatorConfig = new MangosConfigurationFile($this->Database); 288 288 $EmulatorConfig->Load('../realm/'.$Realm->Id.'/etc/mangosd.conf'); … … 291 291 $Form->Values[str_replace('.', '_', $Index)] = $Item; 292 292 $Form->Values['RealmId'] = $_GET['Id']; 293 $Form->OnSubmit = '? Action=RealmSaveDetailed';293 $Form->OnSubmit = '?Module=Realm&Action=SaveDetailed'; 294 294 $Output .= $Form->ShowEditForm(); 295 295 } else $this->System->SystemMessage('Nastavení světa', 'Nemáte oprávnění'); … … 303 303 if(($this->System->Modules['User']->User['Id'] == $Realm->GetUser()) or ($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR)) 304 304 { 305 $Form = new Form($this->S ettingDetailedFormClass, array());305 $Form = new Form($this->System, $this->SettingDetailedFormClass, array()); 306 306 $Form->LoadValuesFromForm(); 307 307 $EmulatorConfig = new MangosConfigurationFile($this->Database); … … 318 318 $Output .= $this->System->SystemMessage('Upravit svět', 'Nastavení světa uloženo.'); 319 319 //$Form->SaveValuesToDatabase($_POST['ServerId']); 320 $Form->OnSubmit = '? Action=RealmSaveDetailed';320 $Form->OnSubmit = '?Module=Realm&Action=SaveDetailed'; 321 321 322 322 $Realm = new Realm($this->Database, $_POST['RealmId']);
Note:
See TracChangeset
for help on using the changeset viewer.