page-elements.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * Personal website of UltrasonicMadness
  4. * Copyright (C) 2017-2018, 2021-2023 UltrasonicMadness
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. // This function generates HTML head contents based on the page title, page theme and whether to enable JavaScript.
  20. function gen_html_head($title, $color)
  21. {
  22. print("<title>${title} - UltrasonicMadness</title>");
  23. include($_SERVER['DOCUMENT_ROOT'] . '/../backend/include/style.inc');
  24. print("<link type='text/css' rel='stylesheet' href='/common/style/themes/${color}.css' />");
  25. }
  26. function gen_common_pane()
  27. {
  28. print('<div id="common-pane">');
  29. include($_SERVER['DOCUMENT_ROOT'] . '/../backend/include/usmlogo.inc');
  30. include($_SERVER['DOCUMENT_ROOT'] . '/../backend/include/menu.inc');
  31. print('</div>');
  32. }
  33. function inc_footer()
  34. {
  35. include($_SERVER['DOCUMENT_ROOT'] . '/../backend/include/footer.inc');
  36. }