inc_header.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?php
  2. if(!isset($page))
  3. {
  4. $page = 1;
  5. }
  6. require("php/connect.php");
  7. function active ($num)
  8. {
  9. global $page;
  10. if ($num == $page) { echo('class="active"'); }
  11. }
  12. function activepage ($num)
  13. {
  14. global $page;
  15. if ($num == $page) { return true; }
  16. else { return false; }
  17. }
  18. $title = " | Color Strike";
  19. if($page == 1)
  20. {
  21. $title = "Dashboard" . $title;
  22. }
  23. else if($page == 2)
  24. {
  25. $title = "Games" . $title;
  26. }
  27. else if($page == 3)
  28. {
  29. $title = "Highscores" . $title;
  30. }
  31. else if($page == 4)
  32. {
  33. $title = "Songs" . $title;
  34. }
  35. ?>
  36. <!DOCTYPE html>
  37. <html>
  38. <head>
  39. <meta charset="UTF-8">
  40. <title><?php echo $title; ?></title>
  41. <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  42. <!-- REQUIRED CSS STYLESHEETS -->
  43. <!-- Bootstrap 3.3.4 -->
  44. <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  45. <!-- Font Awesome Icons -->
  46. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  47. <!-- Ionicons -->
  48. <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
  49. <!-- Theme style -->
  50. <link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
  51. <!-- Colorstrike Skins. -->
  52. <link href="dist/css/skins/skin-red.min.css" rel="stylesheet" type="text/css" />
  53. <?php
  54. /**
  55. * Page Specific CSS
  56. */
  57. if(activepage(1))
  58. { ?>
  59. <!-- Morris Charts -->
  60. <link href="plugins/morris/morris.css" rel="stylesheet" type="text/css" />
  61. <?php } else if(activepage(2) || activepage(3) || activepage(4)){ ?>
  62. <!-- DATA TABLES -->
  63. <link href="plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
  64. <link href="plugins/morris/morris.css" rel="stylesheet" type="text/css" />
  65. <?php }
  66. ?>
  67. <!-- REQUIRED JS SCRIPTS -->
  68. <!-- jQuery 2.1.4 -->
  69. <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
  70. <!-- Bootstrap 3.3.2 JS -->
  71. <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  72. <!-- ColorStrike App -->
  73. <script src="dist/js/app.min.js" type="text/javascript"></script>
  74. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  75. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  76. <!--[if lt IE 9]>
  77. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  78. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  79. <![endif]-->
  80. </head>
  81. <body class="skin-red sidebar-mini">
  82. <div class="wrapper">
  83. <!-- Main Header -->
  84. <header class="main-header">
  85. <!-- Logo -->
  86. <a href="<?php url('') ?>" class="logo">
  87. <!-- mini logo for sidebar mini 50x50 pixels -->
  88. <span class="logo-mini"><b>CL</b>S</span>
  89. <!-- logo for regular state and mobile devices -->
  90. <span class="logo-lg"><b>Color</b>Strike</span>
  91. </a>
  92. <!-- Header Navbar -->
  93. <nav class="navbar navbar-static-top" role="navigation">
  94. <!-- Sidebar toggle button-->
  95. <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
  96. <span class="sr-only">Toggle navigation</span>
  97. </a>
  98. </nav>
  99. </header>
  100. <!-- Left side column. contains the logo and sidebar -->
  101. <aside class="main-sidebar">
  102. <!-- sidebar: style can be found in sidebar.less -->
  103. <section class="sidebar">
  104. <!-- Sidebar Menu -->
  105. <ul class="sidebar-menu">
  106. <li class="header">MENU</li>
  107. <!-- Optionally, you can add icons to the links -->
  108. <li <?php active(1); ?>><a href="<?php url('') ?>"><i class='fa fa-dashboard'></i> <span>Dashboard</span></a></li>
  109. <li <?php active(2); ?>><a href="<?php url('games.php') ?>"><i class='fa fa-gamepad'></i> <span>Games</span></a></li>
  110. <li <?php active(3); ?>><a href="<?php url('scores.php') ?>"><i class='ion ion-ribbon-a'></i> <span>Highscores</span></a></li>
  111. <li <?php active(4); ?>><a href="<?php url('songs.php') ?>"><i class='ion ion-music-note'></i> <span>Songs</span></a></li>
  112. </ul><!-- /.sidebar-menu -->
  113. </section>
  114. <!-- /.sidebar -->
  115. </aside>