- Timestamp:
- Mar 21, 2010, 9:57:48 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/server.php
r690 r697 375 375 function RealmSelection($FormNameSufix = '') 376 376 { 377 global $html, $QueryItems, $System; 378 377 379 $Output = ''; 378 380 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Realm WHERE Enabled=1'); … … 384 386 if(array_key_exists('page', $_GET)) $Target = '?page='.$_GET['page']; 385 387 else $Target = ''; 386 $Output .= '<div style="text-align: center;"><form id="RealmSelection'.$FormNameSufix.'" action="'.$Target.'" method="post">'.387 '<div>Výběr světa <select name="RealmIndex" onchange="document.getElementById(\'RealmSelection'.$FormNameSufix.'\').submit()">';388 $Output .= '<div style="text-align: center;"><form name="realm_selection">'. 389 '<div>Výběr světa <select onchange="loadPage(this.form.elements[0])">'; 388 390 389 $DbResult = $this->Database->query('SELECT * FROM Realm WHERE Enabled=1');391 $DbResult = $this->Database->query('SELECT *, '.$System->SQLURLName('Name').' AS URLName FROM Realm WHERE Enabled=1'); 390 392 while($Realm = $DbResult->fetch_assoc()) 391 393 { 392 if($ _COOKIE['RealmIndex'] == $Realm['Id']) $Selected = ' selected="selected"';394 if($QueryItems[1] == $Realm['URLName']) $Selected = ' selected="selected"'; 393 395 else $Selected = ''; 394 $Output .= '<option value="'.$Realm['Id'].'"'.$Selected.'>'.$Realm['Name'].'</option>'; 396 $NewQueryItems = $QueryItems; 397 $NewQueryItems[0] = 'svety'; 398 $NewQueryItems[1] = $Realm['URLName']; 399 $NewURL = $html->Link('/'.implode('/', $NewQueryItems).'/'); 400 $Output .= '<option value="'.$NewURL.'"'.$Selected.'>'.$Realm['Name'].'</option>'; 395 401 } 396 402 $Output .= '</select></div>'.
Note:
See TracChangeset
for help on using the changeset viewer.