header.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. define ("ABSOLUTE_PATH", dirname (__FILE__) . "/");
  3. if (extension_loaded ('zlib')) {
  4. ob_start ('ob_gzhandler');
  5. }
  6. require_once (ABSOLUTE_PATH . "lib/webstart.php");
  7. if (! is_file (ABSOLUTE_PATH . "config/config.php")) {
  8. die ('You have to <a href="./install.php">install</a> Online-Bookmarks.');
  9. }
  10. else {
  11. require_once (ABSOLUTE_PATH . "config/config.php");
  12. }
  13. require_once (ABSOLUTE_PATH . "lib/mysql.php");
  14. $mysql = new mysql;
  15. require_once (ABSOLUTE_PATH . "lib/auth.php");
  16. $auth = new Auth;
  17. require_once (ABSOLUTE_PATH . "lib/lib.php");
  18. require_once (ABSOLUTE_PATH . "lib/login.php");
  19. ?>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  21. "http://www.w3.org/TR/html4/loose.dtd">
  22. <html>
  23. <head>
  24. <title>Online-Bookmarks</title>
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <meta http-equiv="Pragma" content="No-cache">
  27. <link rel="stylesheet" type="text/css" href="./style.css">
  28. <link rel="shortcut icon" href="favicon.ico">
  29. <script type="text/javascript" src="./lib/lib.js"></script>
  30. </head>
  31. <body>
  32. <?php
  33. if (is_file (ABSOLUTE_PATH . "install.php") && !$development ) {
  34. message ('Remove "install.php" before using Online-Bookmarks.');
  35. }
  36. if ($display_login_form) {
  37. $auth->display_login_form ();
  38. require_once (ABSOLUTE_PATH . "footer.php");
  39. }
  40. ?>