-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.inc
121 lines (119 loc) · 4.61 KB
/
header.inc
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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Gallery
</title>
<!-- Included Libraries: -->
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Fancybox -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.0.47/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.0.47/jquery.fancybox.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Custom scripts written by yours truly -->
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!--Navbar-->
<!-- Navigation -->
<div class="container" style="width:100%; background-color:#C0C0C0">
<div class="navbar-header">
<button type="button" class="navbar-toggle glyphicon glyphicon-menu-hamburger" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars">
</i>
</button>
<ul>
<li>
<a style="float:left" class="navbar-brand page-scroll" href="index.php">Home
</a>
</li></ul>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<!-- Link to upload image form -->
<li>
<a href="index.php?form=true">Upload Image
</a>
</li>
<!-- If user is editor show display settings -->
<?php
if (isset($_SESSION['isEditor']) && $_SESSION['isEditor'] == true)
echo '
<!-- display modes(public, private, all) -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">Display
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li>
<form action="index.php" method="post" class="navbar-form navbar-nav ">
<button type="submit" name="access" value="all" class="btn btn-default">all</button>
</form>
</a>
</li>
<li>
<form action="index.php" method="post"
class="navbar-form navbar-nav ">
<button type="submit" name="access" value="public" class="btn btn-default">Public</button>
</form>
</li>
<li>
<form action="index.php" method="post"
class="navbar-form navbar-nav ">
<button type="submit" name="access" value="private" class="btn btn-default">Private</button>
</form>
</li>
</ul>';
?>
<!-- Sorting options -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">Sort
<span class="caret">
</span>
</a>
<ul class="dropdown-menu">
<li>
<a href="index.php?sort=firstname">First Name
</a>
</li>
<li>
<a href="index.php?sort=lastname">Last Name
</a>
</li>
<li>
<a href="index.php?sort=date">Date
</a>
</li>
</ul>
</li>
<!--Seachbar and submit button-->
<li>
<input type="text" id="search" name="search" class="form-control searchplacing" placeholder="Search" style="position:relative; top:8px" required>
</li>
<li>
<button type="submit" id="submitsearch" value="submit" class="btn btn-default" style="position:relative; top:7px">
Search
</button>
</li>
<!-- If user is editor show authorize images and edit views -->
<?php
if (isset($_SESSION['isEditor']) && $_SESSION['isEditor'] == true)
include 'moderatorbuttons.inc';
// print logout or login depending on current status
if (isset($_SESSION['isEditor']) && $_SESSION['isEditor'] == true)
echo '<li><a href="index.php?isEditor='.'false">Logout</a></li>';
else
echo '<li><a href="index.php?isEditor='.'true">Login</a></li>';
?>
</ul>
</div>
</div>
<!-- main container -->
<div id="container-fluid" style="padding-left:15%; padding-right:15%; padding-top:5%">
<div class="row">
<div class="col-sm-12 main">
<!-- other files determine what to show here -->