PageRenderTime 40ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/header.php

https://github.com/obenauer/equilibrium
PHP | 94 lines | 57 code | 15 blank | 22 comment | 19 complexity | d34219e6575ee5b0b036cdc0e15e5f8b MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0
  1. <?php
  2. // Copyright 2008, St. Jude Children's Research Hospital.
  3. // Written by Dr. John Obenauer, john.obenauer@stjude.org.
  4. // This file is part of Equilibrium. Equilibrium is free software:
  5. // you can redistribute it and/or modify it under the terms of the
  6. // GNU General Public License as published by the Free Software
  7. // Foundation, either version 2 of the License, or (at your option)
  8. // any later version.
  9. // Equilibrium is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // You should have received a copy of the GNU General Public License
  14. // along with Equilibrium. If not, see <http://www.gnu.org/licenses/>.
  15. // Start HTML header
  16. printf("<html><head>\n");
  17. printf("<title>%s Projects Database</title>\n", $organization_name);
  18. // Load JavaScript files
  19. printf("<script src='external/prototype.js' type='text/javascript'> </script>\n");
  20. printf("<script src='external/scriptaculous.js' type='text/javascript'> </script>\n");
  21. printf("<script src='external/calendarpopup.js' type='text/javascript'> </script>\n");
  22. printf("<script src='equilibrium.js' type='text/javascript'> </script>\n");
  23. printf("<!--[if lt IE 7.]>\n");
  24. printf("<script defer type=\"text/javascript\" src=\"external/pngfix.js\"></script>\n");
  25. printf("<![endif]-->\n");
  26. // Load style sheets
  27. printf("<link href='equilibrium.css' rel='stylesheet' type='text/css'>\n");
  28. printf("<link href='external/calendar-blue.css' rel='stylesheet' type='text/css' media='all' title='blue'>\n");
  29. printf("</head>\n");
  30. // Start page body
  31. printf("<body bgcolor='%s'>\n", $background_color);
  32. printf("<table width=100%% halign='center'>\n");
  33. printf("<tr><td><img src='images/equilibrium_logo.png'></td>");
  34. printf("<td><b><font size='3' color='blue'>$organization_name</font></b></td>\n");
  35. printf("<td align='right'><b><font size='2'>User: </font>" .
  36. "<font color=blue size='2'>%s</font></b> &nbsp; &nbsp; " .
  37. "<b><font color=blue size='2'><a href='index.php?cmd=logout'>Log out</a>" .
  38. "</font></b> &nbsp; &nbsp;</td></tr></table>\n", $_SESSION['SESSION_USER']);
  39. printf("<table align='right' frame=border rules=top border=0 bgcolor='$background_color' cellpadding=5><tr>\n");
  40. if (!isset($activepage)) {
  41. $activepage = "";
  42. }
  43. if ($activepage == "Projects") {
  44. printf("<td bgcolor='$heading_color'><b><a href='projects.php'>Projects</a></b></td>\n");
  45. } else {
  46. printf("<td><b><a href='projects.php'>Projects</a></b></td>\n");
  47. }
  48. if ($activepage == "Duties") {
  49. printf("<td bgcolor='$heading_color'><b><a href='duties.php'>Duties</a></b></td>\n");
  50. } else {
  51. printf("<td><b><a href='duties.php'>Duties</a></b></td>\n");
  52. }
  53. if ($activepage == "ToDo") {
  54. printf("<td bgcolor='$heading_color'><b><a href='todolist.php'>To Do</a></b></td>\n");
  55. } else {
  56. printf("<td><b><a href='todolist.php'>ToDo</a></b></td>\n");
  57. }
  58. if ($activepage == "Log") {
  59. printf("<td bgcolor='$heading_color'><b><a href='logbook.php'>Log</a></b></td>\n");
  60. } else {
  61. printf("<td><b><a href='logbook.php'>Log</a></b></td>\n");
  62. }
  63. if ($activepage == "Files") {
  64. printf("<td bgcolor='$heading_color'><b><a href='files.php'>Files</a></b></td>\n");
  65. } else {
  66. printf("<td><b><a href='files.php'>Files</a></b></td>\n");
  67. }
  68. //if ($activepage == "Reports") {
  69. // printf("<td bgcolor='$heading_color'><b><a href='reports.php'>Reports</a></b></td>\n");
  70. //} else {
  71. // printf("<td><b><a href='reports.php'>Reports</a></b></td>\n");
  72. //}
  73. if ($activepage == "Users") {
  74. printf("<td bgcolor='$heading_color'><b><a href='users.php'>Users</a></b></td>\n");
  75. } else {
  76. printf("<td><b><a href='users.php'>Users</a></b></td>\n");
  77. }
  78. printf("</tr></table>\n");
  79. ?>