You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.0 KiB

  1. <?php
  2. // Project: Web Reference Database (refbase) <http://www.refbase.net>
  3. // Copyright: Matthias Steffens <mailto:refbase@extracts.de> and the file's
  4. // original author(s).
  5. //
  6. // This code is distributed in the hope that it will be useful,
  7. // but WITHOUT ANY WARRANTY. Please see the GNU General Public
  8. // License for more details.
  9. //
  10. // File: ./includes/results_header.inc.php
  11. // Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/includes/results_header.inc.php $
  12. // Author(s): Matthias Steffens <mailto:refbase@extracts.de>
  13. //
  14. // Created: 07-May-04, 14:38
  15. // Modified: $Date: 2008-09-29 21:36:08 +0000 (Mon, 29 Sep 2008) $
  16. // $Author: msteffens $
  17. // $Revision: 1248 $
  18. // This is the results header include file.
  19. // It contains functions that build the results header
  20. // which gets displayed on every search results page.
  21. // TODO: I18n
  22. // --------------------------------------------------------------------
  23. function displayResultsHeader($href, $formElementsGroup, $formElementsRefine, $formElementsDisplayOptions, $displayType)
  24. {
  25. global $useVisualEffects; // these variables are defined in 'ini.inc.php'
  26. global $displayResultsHeaderDefault;
  27. global $loc; // defined in 'locales/core.php'
  28. $resultsHeaderToggleText = "Search & Display Options";
  29. if (isset($displayResultsHeaderDefault[$displayType]) AND ($displayResultsHeaderDefault[$displayType] == "open"))
  30. {
  31. $resultsHeaderDisplayStyle = "block";
  32. $resultsHeaderToggleImage = "img/open.gif";
  33. $resultsHeaderInitialToggleText = "";
  34. }
  35. else
  36. {
  37. $resultsHeaderDisplayStyle = "none";
  38. $resultsHeaderToggleImage = "img/closed.gif";
  39. $resultsHeaderInitialToggleText = encodeHTML($resultsHeaderToggleText); // function 'encodeHTML()' is defined in 'include.inc.php'
  40. }
  41. if ($useVisualEffects == "yes")
  42. $toggleVisibilityFunction = "toggleVisibilitySlide";
  43. else
  44. $toggleVisibilityFunction = "toggleVisibility";
  45. ?>
  46. <div class="resultsheader">
  47. <div class="showhide">
  48. <a href="javascript:<?php echo $toggleVisibilityFunction; ?>('resultoptions','resultsHeaderToggleimg','resultsHeaderToggletxt','<?php echo rawurlencode($resultsHeaderToggleText); ?>')"<?php echo addAccessKey("attribute", "header"); ?> title="<?php echo $loc["LinkTitle_ToggleVisibility"] . addAccessKey("title", "header"); ?>">
  49. <img id="resultsHeaderToggleimg" class="toggleimg" src="<?php echo $resultsHeaderToggleImage; ?>" alt="<?php echo $loc["LinkTitle_ToggleVisibility"]; ?>" width="9" height="9" hspace="0" border="0">
  50. <span id="resultsHeaderToggletxt" class="toggletxt"><?php echo $resultsHeaderInitialToggleText; ?></span>
  51. </a>
  52. </div>
  53. <div id="resultoptions" style="display: <?php echo $resultsHeaderDisplayStyle; ?>;">
  54. <div id="showgroup">
  55. <?php echo $formElementsGroup; ?>
  56. </div>
  57. <div id="refineresults">
  58. <?php echo $formElementsRefine; ?>
  59. </div>
  60. <div id="displayopt">
  61. <?php echo $formElementsDisplayOptions; ?>
  62. </div>
  63. </div>
  64. </div><?php
  65. }
  66. ?>