-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
132 lines (117 loc) · 5.55 KB
/
header.php
File metadata and controls
132 lines (117 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<!--Test change-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>ClimbOn - Your climbing location resource!</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/simple-sidebar.css" rel="stylesheet">
<link href="css/modal.css" rel="stylesheet">
<link href="css/loginmodal.css" rel="stylesheet">
<link href="css/climbOn.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script>
function openModal(id, data) {
console.log(id, data);
var modal = $('#' + id);
if (modal) {
modal.css('display','block');
var keys = Object.keys(data);
for (var i = 0; i < keys.length; i++) {
$('#' + id + '_' + keys[i]).html(data[keys[i]]);
}
}
}
</script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div id="id01" class="modal">
<!-- Modal Content -->
<div class="modal-content animate content">
<span class="close" title="Close Modal">x</span>
<form class="login" action="login.php" method="POST">
<div class="form-group">
<input id="name" class="form-control" type="text" placeholder="Username" name="username" required>
</div>
<div class="form-group">
<input id="password" class="form-control" type="password" placeholder="Password" name="password"
required>
</div>
<div class="form-group">
<input class="btn btn-block btn-primary" class="form-control" name="submit" type="submit" value="Login">
</div>
<div class="form-group">
<a href="register.php" class="btn btn-block btn-link" class="form-control">
Don't have an account? Register
</a>
</div>
</form>
</div>
</div>
<div id="wrapper" class="active">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul id="sidebar" class="sidebar-nav">
<li class="sidebar-brand">
<a id="menu-toggle" href="#">
Menu
<span id="main_icon" class="glyphicon glyphicon-menu-hamburger"></span>
</a>
</li>
<li><a href="index.php">Home<span class="sub_icon glyphicon glyphicon-home"></span></a></li>
<li><a href="gym_list.php">Gym<span class="sub_icon glyphicon glyphicon-map-marker"></span></a></li>
<li><a href="site_list.php">Outdoor<span class="sub_icon glyphicon glyphicon-leaf"></span></a></li>
<li><a href="store_list.php">Store<span class="sub_icon glyphicon glyphicon-shopping-cart"></span></a></li>
<li><a href="about.php">About<span class="sub_icon glyphicon glyphicon-info-sign"></span></a></li>
<?php if($_SESSION['admin']) {
echo '<li ><a href = "admin_list.php" > Admin<span class="sub_icon glyphicon glyphicon-cog" ></span ></a ></li>';
}
?>
</ul>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid page-content inset">
<div class="content-header">
<h1>Climb On</h1>
<div style="float:right">
<?php
if ($_SESSION["valid"] == false) {
echo "<class='btn btn-default' role='button'";
echo "onclick=\"document.getElementById('id01').style.display='block'\">";
echo "Login <span class=\"glyphicon glyphicon-log-in\"</span></a>";
} else {
echo "<div class='btn-group'>"
."<button type='button' class='btn btn-default'>$_SESSION[userName]</button>"
."<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'"
."aria-haspopup='true' aria-expanded='false'>"
."<span class='caret'></span>"
."<span class='sr-only'>Toggle Dropdown</span>"
."</button>"
."<ul class='dropdown-menu'>"
."<li><a href='profile.php?usr=".$_SESSION['userName']."'>Edit</a></li>"
."<li role='seperator' class='divider'></li>"
."<li><a href='logout.php'>Logout</a></li>"
."</ul>"
."</div>";
}
?>
</div>
</div>