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.

133 lines
5.5 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/footer.inc.php
  11. // Repository: $HeadURL: file:///svn/p/refbase/code/branches/bleeding-edge/includes/footer.inc.php $
  12. // Author(s): Matthias Steffens <mailto:refbase@extracts.de>
  13. //
  14. // Created: 28-Jul-02, 11:30
  15. // Modified: $Date: 2012-02-28 23:26:30 +0000 (Tue, 28 Feb 2012) $
  16. // $Author: msteffens $
  17. // $Revision: 1344 $
  18. // This is the footer include file.
  19. // It contains functions that build the footer
  20. // which gets displayed on every page.
  21. // --------------------------------------------------------------------
  22. // Inserts the closing HTML </body> and </html> tags:
  23. function displayHTMLfoot()
  24. {
  25. ?>
  26. </body>
  27. </html>
  28. <?php
  29. }
  30. // --------------------------------------------------------------------
  31. // Displays the visible footer:
  32. function showPageFooter($HeaderString)
  33. {
  34. global $officialDatabaseName; // usage example: <a href="index.php">[? echo encodeHTML($officialDatabaseName); ?]</a>
  35. global $adminLoginEmail;
  36. global $hostInstitutionAbbrevName; // usage example: <a href="[? echo $hostInstitutionURL; ?]">[? echo encodeHTML($hostInstitutionAbbrevName); ?] Home</a>
  37. global $hostInstitutionName; // (note: in the examples above, square brackets must be replaced by their respective angle brackets)
  38. global $hostInstitutionURL;
  39. global $helpResourcesURL;
  40. global $librarySearchPattern;
  41. global $loginWelcomeMsg; // these variables are globally defined in function 'showLogin()' in 'include.inc.php'
  42. global $loginStatus;
  43. global $loginLinks;
  44. global $loginEmail;
  45. global $loc; // '$loc' is made globally available in 'core.php'
  46. ?>
  47. <hr class="pagefooter" align="center" width="95%">
  48. <table class="pagefooter" align="center" border="0" cellpadding="0" cellspacing="10" width="95%" summary="This table holds the footer">
  49. <tr>
  50. <td class="small" width="105"><a href="index.php"<?php echo addAccessKey("attribute", "home"); ?> title="<?php echo $loc["LinkTitle_Home"] . addAccessKey("title", "home"); ?>"><?php echo $loc["Home"]; ?></a></td>
  51. <td class="small" align="center"><?php
  52. // -------------------------------------------------------
  53. // ... include a link to 'opensearch.php':
  54. ?>
  55. <a href="opensearch.php"<?php echo addAccessKey("attribute", "cql_search"); ?> title="<?php echo $loc["LinkTitle_CQLSearch"] . addAccessKey("title", "cql_search"); ?>"><?php echo $loc["CQLSearch"]; ?></a><?php
  56. // -------------------------------------------------------
  57. if (isset($_SESSION['user_permissions']) AND preg_match("/allow_sql_search/", $_SESSION['user_permissions'])) // if the 'user_permissions' session variable contains 'allow_sql_search'...
  58. {
  59. // ... include a link to 'sql_search.php':
  60. ?>
  61. &nbsp;|&nbsp;
  62. <a href="sql_search.php"<?php echo addAccessKey("attribute", "sql_search"); ?> title="<?php echo $loc["LinkTitle_SQLSearch"] . addAccessKey("title", "sql_search"); ?>"><?php echo $loc["SQLSearch"]; ?></a><?php
  63. }
  64. // -------------------------------------------------------
  65. if (!empty($librarySearchPattern))
  66. {
  67. // ... include a link to 'library_search.php':
  68. ?>
  69. &nbsp;|&nbsp;
  70. <a href="library_search.php"<?php echo addAccessKey("attribute", "lib_search"); ?> title="<?php echo $loc["LinkTitle_LibrarySearch_Prefix"] . encodeHTML($hostInstitutionName) . $loc["LinkTitle_LibrarySearch_Suffix"] . addAccessKey("title", "lib_search"); ?>"><?php echo $loc["LibrarySearch"]; ?></a><?php
  71. }
  72. // -------------------------------------------------------
  73. if (isset($_SESSION['user_permissions']) AND preg_match("/allow_details_view/", $_SESSION['user_permissions'])) // if the 'user_permissions' session variable contains 'allow_details_view'...
  74. {
  75. // ... include a link to 'show.php':
  76. ?>
  77. &nbsp;|&nbsp;
  78. <a href="show.php"<?php echo addAccessKey("attribute", "show_rec"); ?> title="<?php echo $loc["LinkTitle_ShowRecord"] . addAccessKey("title", "show_rec"); ?>"><?php echo $loc["ShowRecord"]; ?></a><?php
  79. }
  80. // -------------------------------------------------------
  81. if (isset($_SESSION['user_permissions']) AND preg_match("/allow_cite/", $_SESSION['user_permissions'])) // if the 'user_permissions' session variable contains 'allow_cite'...
  82. {
  83. // ... include a link to 'extract.php':
  84. ?>
  85. &nbsp;|&nbsp;
  86. <a href="extract.php"<?php echo addAccessKey("attribute", "extract"); ?> title="<?php echo $loc["LinkTitle_ExtractCitations"] . addAccessKey("title", "extract"); ?>"><?php echo $loc["ExtractCitations"]; ?></a><?php
  87. }
  88. // -------------------------------------------------------
  89. if (isset($_SESSION['loginEmail']) && ($loginEmail == $adminLoginEmail)) // if the admin is logged in ('$adminLoginEmail' is specified in 'ini.inc.php')...
  90. {
  91. // ... include a link to 'duplicate_manager.php':
  92. ?>
  93. &nbsp;|&nbsp;
  94. <a href="duplicate_manager.php" title="<?php echo $loc["LinkTitle_ManageDuplicates"]; ?>"><?php echo $loc["ManageDuplicates"]; ?></a><?php
  95. }
  96. // -------------------------------------------------------
  97. ?>
  98. </td>
  99. <td class="small" align="right" width="105"><?php
  100. if (!empty($helpResourcesURL))
  101. {
  102. ?><a href="<?php echo $helpResourcesURL; ?>" title="<?php echo $loc["LinkTitle_Help"]; ?>"><?php echo $loc["Help"]; ?></a><?php
  103. }
  104. ?></td>
  105. </tr>
  106. </table><?php
  107. }
  108. ?>