Changeset 20 for trunk/www/index.php
- Timestamp:
- Jun 12, 2009, 11:18:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/index.php
r17 r20 10 10 function ShowServerListOnRow($Row) 11 11 { 12 $Row['NetworkPortRealmd'] = $this->System->Config['Web']['Host'].':'.$Row['NetworkPortRealmd'];12 $Row['NetworkPortRealmd'] = '<a href="realmlist.php?Id='.$Row['Id'].'">'.$this->System->Config['Web']['Host'].':'.$Row['NetworkPortRealmd'].'</a>'; 13 13 $Row['Name'] = '<a href="?Action=ServerShow&Id='.$Row['Id'].'">'.$Row['Name'].'</a>'; 14 14 return($Row); … … 230 230 else 231 231 { 232 $DbResult = $this->Database->query('SELECT MAX(NetworkPortRealmd), MAX(NetworkPortWorldd) FROM Server'); 233 $DbRow = $DbResult->fetch_row(); 234 $NewPortRealmd = $DbRow[0] + 1; 235 if($NewPortRealmd < $Config['BaseNetworkPortRealmd']) $NewPortRealmd = $Config['BaseNetworkPortRealmd']; 236 $NewPortWorldd = $DbRow[1] + 1; 237 if($NewPortWorldd < $Config['BaseNetworkPortWorldd']) $NewPortWorldd = $Config['BaseNetworkPortWorldd']; 238 232 239 $Form = new Form('NewServer', array()); 233 240 $Form->LoadValuesFromForm(); 234 $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->User['Id'], 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => 1 ));241 $this->Database->insert('Server', array('Name' => $Form->Values['Name'], 'Description' => $Form->Values['Description'], 'User' => $this->System->Modules['User']->User['Id'], 'Motd' => $Form->Values['Motd'], 'Homepage' => $Form->Values['Homepage'], 'Type' => $Form->Values['Type'], 'Database' => 1, 'NetworkPortWorldd' => $NewPortWorldd, 'NetworkPortRealmd' => $NewPortRealmd)); 235 242 $LastInsertId = $this->Database->insert_id; 236 243 $Server = new Server($this->Database, $LastInsertId);
Note:
See TracChangeset
for help on using the changeset viewer.