Changeset 524 for trunk/includes/global.php
- Timestamp:
- Feb 20, 2013, 9:40:53 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r512 r524 292 292 function WriteLanguages($Selected) 293 293 { 294 global $ LanguageList, $System;294 global $System; 295 295 296 296 $Output = '<select name="Language">'; … … 307 307 } 308 308 309 function ClientVersionSelection($Selected) 310 { 311 global $System; 312 313 $Output = '<select name="ClientVersion">'; 314 $DbResult = $System->Database->select('ClientVersion', '`Id`, `Version`', '`Imported` = 1'); 315 $Output .= '<option value=""'; 316 if($Selected == '') 317 $Output .= ' selected="selected"'; 318 $Output .= '>Žádná</option>'; 319 while($ClientVersion = $DbResult->fetch_assoc()) 320 { 321 $Output .= '<option value="'.$ClientVersion['Id'].'"'; 322 if($Selected == $ClientVersion['Id']) 323 $Output .= ' selected="selected"'; 324 $Output .= '>'.$ClientVersion['Version'].'</option>'; 325 } 326 $Output .= '</select>'; 327 return($Output); 328 } 329 309 330 function WriteLanguagesWithoutSel($Selected) 310 331 { … … 441 462 442 463 if(array_key_exists('language', $_GET)) $LanguageId = $_GET['language'] * 1; 443 else $LanguageId = 2;464 else $LanguageId = ''; 444 465 445 466 if(isset($LanguageList[$LanguageId]) == false) 446 467 { 447 ErrorMessage(ShowMessage('Jazyk dle zadaného Id neexistuje.', MESSAGE_CRITICAL)); 468 $LanguageId = reset($LanguageList); 469 $LanguageId = $LanguageId['Id']; 448 470 } 449 471 return($LanguageId);
Note:
See TracChangeset
for help on using the changeset viewer.