/
header.php
136 lines (123 loc) · 5.61 KB
/
header.php
1
<?php/** * @author Kevin Bohinski <bohinsk1@tcnj.edu> * @version 1.0 * @since 2015-12-1 * * Project Name: HackTCNJ 2016 * Description: HackTCNJ 2016 registration site. * * Filename: /header.php * Description: Header for HackTCNJ 2016 site. * Last Modified: 2015-12-1 * * Copyright (c) 2015 Kevin Bohinski. All rights reserved. */if (isset($LOGOUT) && $LOGOUT) { if (session_status() == PHP_SESSION_NONE) { session_start(); } session_destroy();}if (session_status() == PHP_SESSION_NONE) { session_start();}error_reporting(E_ERROR | E_PARSE);$active = 'class="active"';require_once('WebContent/db.php');?><!doctype html><html lang="en"><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="./WebContent/favicon.ico" type="image/x-icon"> <meta name="author" content="https://keybase.io/kbohinski"> <meta name="description" content="HackTCNJ 2016"> <title>HackTCNJ 2016</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"/> <link rel="stylesheet" href="http://bootswatch.com/flatly/bootstrap.min.css"/> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"/> <link rel="stylesheet" type="text/css" href="./sweetalert-1.1.1/dist/sweetalert.css"/> <link rel="stylesheet" type="text/css" href="./WebContent/style.css"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script> <script src="./sweetalert-1.1.1/dist/sweetalert.min.js"></script></head><body><nav class="navbar navbar-default" style="border-radius: 0px; position: fixed; top:0; left:0; right:0; z-index:999999999999; box-shadow: 0px 4px 10px 5px rgba(0, 0, 0, 0.33);"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a id="about" class="navbar-brand" href="<?php echo $dir . "/index.php"; ?>"><img src="./WebContent/logoWhiteHor.png" alt="HackTCNJ Logo" height="25"></a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li <?php if ($CURRENT_PAGE == "index") { echo $active; } ?>><a id="about1" href="<?php echo $dir; ?>">About</a></li> <li <?php if ($CURRENT_PAGE == "schedule") { echo $active; } ?>><a id="schedule" href="<?php echo $dir . "#schedule"; ?>">Schedule</a></li> <li <?php if ($CURRENT_PAGE == "faq") { echo $active; } ?>><a id="faq" href="<?php echo $dir . "#faq"; ?>">FAQ</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <?php if (isset($_SESSION['id'])) { /* Logged In */ $links = '<li '; if ($CURRENT_PAGE == "dashboard") { $links .= $active; } $links .= '><a href="' . $dir . '/dashboard.php">My Application</a></li><li '; if ($CURRENT_PAGE == "logout") { $links .= $active; } $links .= '><a href="' . $dir . '/index.php?logout=true">Logout</a></li>'; } else { /* Logged Out */ $links = '<li '; if ($CURRENT_PAGE == "login") { $links .= $active; } $links .= '><a href="' . $MLH_LOGIN_URL . '">Login</a></li><li '; if ($CURRENT_PAGE == "register") { $links .= $active; } $links .= '><a href="' . $dir . '/register_mlh.php">Apply</a></li>'; } echo $links; ?> <li <?php if ($CURRENT_PAGE == "contact") { echo $active; } ?>><a href="<?php echo $dir . "/contact.php"; ?>">Contact</a></li> <li <?php if ($CURRENT_PAGE == "sponsor") { echo $active; } ?>><a href="<?php echo $dir . "/contact.php?sponsor=true"; ?>">Sponsor</a></li> </ul> </div> </div> <a id="mlh-trust-badge" class="img-responsive" style="position:absolute;right:30px;max-width:80px;width:10%;min-width:60px;display:block;z-index:10000" href="https://mlh.io/?utm_campaign=Trust%20Badge" target="_blank"><img src="https://s3.amazonaws.com/logged-assets/trust-badge/s2016.png" alt="MLH Official - Spring 2016" style="width:100%;"></a></nav><div class="<?php if (isset($FLUID)) { echo 'container-fluid'; unset($FLUID);} else { echo 'container';} ?>" style="margin-top: 115px">