Changeset 290 for trunk/includes/global_function.php
- Timestamp:
- Dec 27, 2009, 1:08:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r289 r290 62 62 if($PagesMin < ($CurrentPage - $Around)) 63 63 { 64 $Result.= ' .. ';64 $Result.= ' ... '; 65 65 $PagesMin = $CurrentPage - $Around; 66 66 } … … 73 73 } 74 74 } 75 if($PagesMax < ($PageCount - 1)) $Result .= ' .. ';75 if($PagesMax < ($PageCount - 1)) $Result .= ' ... '; 76 76 if($CurrentPage < ($PageCount - 1)) 77 77 { … … 374 374 } 375 375 376 377 376 function GetBuildNumber($Version) 378 377 { … … 459 458 } 460 459 460 function LoadCommandLineParameters() 461 { 462 if(!array_key_exists('REMOTE_ADDR', $_SERVER)) 463 { 464 foreach($_SERVER['argv'] as $Parameter) 465 { 466 if(strpos($Parameter, '=') !== false) 467 { 468 $Index = substr($Parameter, 0, strpos($Parameter, '=')); 469 $Parameter = substr($Parameter, strpos($Parameter, '=') + 1); 470 //echo($Index.' ---- '.$Parameter); 471 $_GET[$Index] = $Parameter; 472 } 473 } 474 } 475 } 476 477 function ShowTabs($Tabs) 478 { 479 $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']); 480 481 if(array_key_exists('Tab', $_GET)) $_SESSION['Tab'] = $_GET['Tab']; 482 if(!array_key_exists('Tab', $_SESSION)) $_SESSION['Tab'] = 0; 483 if(($_SESSION['Tab'] < 0) or ($_SESSION['Tab'] > (count($Tabs) - 1))) $_SESSION['Tab'] = 0; 484 echo('<div id="header">'); 485 echo('<ul>'); 486 foreach($Tabs as $Index => $Tab) 487 { 488 $QueryItems['Tab'] = $Index; 489 if($Index == $_SESSION['Tab']) $Selected = ' id="selected"'; 490 else $Selected = ''; 491 echo('<li'.$Selected.'><a href="?'.SetQueryStringArray($QueryItems).'">'.$Tab.'</a></li>'); 492 } 493 echo('</ul></div>'); 494 } 495 496 function CheckBox($Name, $Checked = false, $Id = '', $Class = '', $Disabled = false) 497 { 498 if($Id) $Id = ' id="'.$Id.'"'; else $Id = ''; 499 if($Class) $Class = ' class="'.$Class.'"'; else $Class = ''; 500 if($Checked) $Checked = ' checked="checked"'; else $Checked = ''; 501 if($Disabled) $Disabled = ' disabled="disabled"'; else $Disabled = ''; 502 return('<input type="checkbox" value="checked" name="'.$Name.'"'.$Checked.$Disabled.$Id.$Class.' />'); 503 } 504 505 function RadioButton($Name, $Value, $Checked = false, $OnClick = '', $Disabled = false) 506 { 507 if($Checked) $Checked = ' checked="checked"'; else $Checked = ''; 508 if($OnClick != '') $OnClick = ' onclick="'.$OnClick.'"'; else $OnClick = ''; 509 if($Disabled) $Disabled = ' disabled="disabled"'; else $Disabled = ''; 510 return('<input type="radio" name="'.$Name.'" value="'.$Value.'"'.$Checked.$Disabled.$OnClick.'/>'); 511 } 512 513 function SelectOption($Name, $Text, $Selected = false) 514 { 515 if($Selected) $Selected = ' selected="selected"'; else $Selected = ''; 516 return('<option value="'.$Name.'"'.$Selected.'>'.$Text.'</option>'); 517 } 518 519 461 520 ?>
Note:
See TracChangeset
for help on using the changeset viewer.