Advertisement
Guest User

header

a guest
Jul 20th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.06 KB | None | 0 0
  1. <?php
  2. include_once 'assets/static/functions.php';
  3. ?>
  4. <!doctype html>
  5. <html>
  6. <head>
  7. <meta charset="utf-8">
  8. <meta http-equiv="x-ua-compatible" content="ie=edge">
  9. <title><?= $config['hotelName'] ?> | <?php echo title;?></title>
  10. <meta name="description" content="">
  11. <meta name="viewport" content="width=device-width, initial-scale=1">
  12.  
  13. <link rel="apple-touch-icon" href="apple-touch-icon.png">
  14. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  15. <link rel="stylesheet" href="/templates/illumina/assets/css/illumina.css?v=<?php echo time();?>">
  16. <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet"><script
  17. src="https://code.jquery.com/jquery-3.4.0.min.js"
  18. integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg="
  19. crossorigin="anonymous"></script>
  20.  
  21. <script src="//code.jquery.com/jquery-1.12.4.js"></script>
  22. <script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  23. <script src="/templates/brain/client/js/flashclient.js"></script>
  24. <script src="/templates/brain/client/js/flash_detect_min.js"></script>
  25. <script src="/templates/brain/client/js/browse.js"></script>
  26. <script src="/templates/brain/client/js/client.js" type="text/javascript"></script>
  27. <script src="/templates/illumina/assets/javascript/flash.js" type="text/javascript"></script>
  28. <script>
  29. var hotelname = '{hotelname}';
  30. </script>
  31. </head>
  32. <body>
  33. <?php if(loggedIn()){ ?>
  34. <header>
  35. <div class="container" id="header">
  36. <div id="navigation">
  37. <div class="header bit">
  38. <img src="/templates/illumina/assets/images/logo.gif"/><div class="online mobile"><span id="onlinecount">{online}</span> online now!</div><a class="enter_hotel mobile" id="enter_hotel" href="/client" target="_blank">Enter Hotel</a>
  39. </div>
  40. <nav class="navbar illumina_dark body">
  41. <?php
  42. $tabs = $dbh->prepare("SELECT * FROM `cms_navigation` WHERE `parent_id` = '-1' ORDER BY order_id ASC");
  43. $tabs->execute();
  44. echo '<ul>';
  45. while ($link = $tabs->fetch())
  46. {
  47. $allowDisplay = true;
  48. switch ($link['visibility'])
  49. {
  50. default:
  51. case 0:
  52. $allowDisplay = false;
  53. break;
  54.  
  55. case 1:
  56. break;
  57. }
  58. if (!$allowDisplay)
  59. {
  60. continue;
  61. }
  62. $active = '';
  63. if (defined('TAB_ID') && TAB_ID == $link['id'])
  64. {
  65. $active = 'class="active"';
  66. }
  67. echo '<li '. $active . ' id="'.$link['filename'].'"><a href="' . htmlspecialchars($link['filename']) . '">' . htmlspecialchars($link['caption']) . '</a></li>';
  68. }
  69. echo '<li><a href="{url}/logout">Sign Out</a></li></ul>';
  70. ?>
  71. </nav>
  72. <div class="subnav">
  73. <?php
  74. // Sub Navi
  75. $i = 0;
  76. $lookupParent = '1';
  77. if (defined('TAB_ID'))
  78. {
  79. $lookupParent = TAB_ID;
  80. }
  81. $data = $dbh->prepare("SELECT * FROM `cms_navigation` WHERE `parent_id` = :parent ORDER BY order_id ASC");
  82. $data->bindParam(':parent', $lookupParent);
  83. $data->execute();
  84. echo '<ul>';
  85. while ($link = $data->fetch())
  86. {
  87. $allowDisplay = true;
  88. switch ($link['visibility'])
  89. {
  90. default:
  91. case 0:
  92. $allowDisplay = false;
  93. break;
  94.  
  95. case 1:
  96. break;
  97. case 2:
  98. if (!loggedIn())
  99. {
  100. $allowDisplay = false;
  101. }
  102. break;
  103. case 3:
  104. if (loggedIn())
  105. {
  106. $allowDisplay = false;
  107. }
  108. break;
  109. }
  110. if (!$allowDisplay)
  111. {
  112. continue;
  113. }
  114. $class = '';
  115. if (defined('PAGE_ID') && PAGE_ID == $link['id'])
  116. {
  117. echo ' <li class="subactive"><span>' . filter($link['caption']) . '</span></li>';
  118. }
  119. else {
  120. echo ' <li><a href="' . htmlspecialchars($link['filename']) . '">' . htmlspecialchars($link['caption']) . '</a></li>';
  121. }
  122. }
  123. echo '</ul>';
  124. ?>
  125. </div>
  126. </div>
  127. </div>
  128. </header>
  129. <div class="container" id="main">
  130. <?php }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement