The source code for Calhoun's IT Club.
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.

173 lines
4.4 KiB

  1. <?
  2. //
  3. // index.php
  4. // IT Club
  5. //
  6. // Copyright (c) 2015, Mr. Gecko's Media (James Coleman)
  7. // All rights reserved.
  8. //
  9. // The site header.
  10. //
  11. ?>
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  16. <title>Calhoun IT Club</title>
  17. <link rev="made" href="mailto:james@coleman.io" />
  18. <meta name="Copyright" content="Copyright (c) 2015, Mr. Gecko's Media (James Coleman)" />
  19. <meta name="Author" content="James Coleman" />
  20. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  21. <link href="<?=$_MGM['installPath']?>css/bootstrap.min.css" rel="stylesheet" />
  22. <link href="<?=$_MGM['installPath']?>css/bootstrap-responsive.min.css" rel="stylesheet" />
  23. <script type="text/javascript" src="<?=$_MGM['installPath']?>js/jquery.min.js"></script>
  24. <script type="text/javascript" src="<?=$_MGM['installPath']?>js/bootstrap.min.js"></script>
  25. <style>
  26. body {
  27. margin: 0px;
  28. padding-right: 0px;
  29. padding-left: 0px;
  30. background: #f8f8f8;
  31. }
  32. #wrapper {
  33. padding-left: 350px;
  34. transition: all 0.4s ease 0s;
  35. }
  36. #page-content-wrapper {
  37. width: 100%;
  38. }
  39. #page-content-wrapper p {
  40. margin-left: 10px;
  41. }
  42. #sidebar-wrapper {
  43. margin-left: -350px;
  44. left: 350px;
  45. width: 350px;
  46. background: #e6e6e6;
  47. position: fixed;
  48. height: 100%;
  49. overflow-y: auto;
  50. z-index: 1000;
  51. transition: all 0.4s ease 0s;
  52. }
  53. .sidebar-nav {
  54. position: absolute;
  55. top: 0px;
  56. width: 350px;
  57. list-style: outside none none;
  58. margin: 0px;
  59. padding: 0px;
  60. }
  61. #sidebar-logo {
  62. width: 321px;
  63. height: 165px;
  64. }
  65. .sidebar-link {
  66. padding-top: 5px;
  67. padding-bottom: 5px;
  68. background: none;
  69. width: 100%;
  70. }
  71. .sidebar-link:hover {
  72. background: #dfdfdf;
  73. }
  74. .sidebar-link a {
  75. color: #000;
  76. font-size: 18pt;
  77. margin-left: 20px;
  78. }
  79. .sidebar-link a:link {
  80. text-decoration: none;
  81. }
  82. .sidebar-link a:visited {
  83. text-decoration: none;
  84. }
  85. .sidebar-link a:hover {
  86. text-decoration: underline;
  87. }
  88. .sidebar-link a:active {
  89. text-decoration: underline;
  90. }
  91. .content-header {
  92. height: auto;
  93. background-color: #ededed;
  94. }
  95. .content-header h1 {
  96. font-size: 32px;
  97. color: #000;
  98. display: block;
  99. margin: 0px 20px 20px;
  100. line-height: normal;
  101. border-bottom: medium none;
  102. }
  103. @media only screen and (max-device-width : 800px) {
  104. #wrapper {
  105. padding-left: 0px;
  106. }
  107. #sidebar-wrapper {
  108. margin-left: 0px;
  109. left: 0px;
  110. width: 100%;
  111. background: #e6e6e6;
  112. position: relative;
  113. height: auto;
  114. overflow-y: visible;
  115. z-index: auto;
  116. transition: all 0.4s ease 0s;
  117. }
  118. .sidebar-nav {
  119. position: relative;
  120. top: 0px;
  121. width: 100%;
  122. list-style: outside none none;
  123. margin: 0px;
  124. padding: 0px;
  125. }
  126. #sidebar-logo {
  127. max-width: 100%;
  128. width: auto;
  129. height: auto;
  130. }
  131. .sidebar-link a {
  132. font-size: 14pt;
  133. margin-left: 10px;
  134. }
  135. .content-header h1 {
  136. font-size: 22px;
  137. }
  138. }
  139. </style>
  140. </head>
  141. <body>
  142. <div id="wrapper">
  143. <nav id="sidebar-wrapper">
  144. <ul class="sidebar-nav">
  145. <li class="sidebar-brand">
  146. <a href="<?=$_MGM['installPath']?>"><img src="<?=$_MGM['installPath']?>logo.png" alt="logo" id="sidebar-logo" /></a>
  147. </li>
  148. <?
  149. $results = databaseQuery("SELECT * FROM `sidebar` ORDER BY `order`");
  150. while ($result = databaseFetchAssoc($results)) {
  151. ?><li class="sidebar-link"><a <?=(substr($result['url'], 0, 1)=="/" ? "" : "target=\"_blank\"")?> href="<?=htmlspecialchars($result['url'], ENT_COMPAT | ENT_HTML401, 'UTF-8', true)?>"><?=htmlspecialchars($result['title'], ENT_COMPAT | ENT_HTML401, 'UTF-8', true)?></a></li><?
  152. }
  153. ?>
  154. <?if (isset($_MGM['user'])) {?>
  155. <li><h3>Admin Stuff</h3></li>
  156. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>members">Members</a></li>
  157. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>meetings">Meetings</a></li>
  158. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>announcements">Announcements</a></li>
  159. <?if ($_MGM['user']['level']==1) {?>
  160. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>users/">User Management</a></li>
  161. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>sidebar/">Sidebar Links</a></li>
  162. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>settings/">Settings</a></li>
  163. <?}?>
  164. <li class="sidebar-link"><a href="<?=$_MGM['installPath']?>logout">Logout</a></li>
  165. <?}?>
  166. </ul>
  167. </nav>
  168. <div id="page-content-wrapper">