/
index.php
53 lines (45 loc) · 1.56 KB
/
index.php
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
<html lang="en">
<?php
//Redirect user if not logged in
include("check_login.php");
include("html_head.php");
?>
<body>
<?php
//Include central page header
include("header.php");
?>
<div class="container">
<div style="padding-top: 10px;" class="row">
<div class="col-md-8"></div>
<div class="col-md-4"></div>
</div>
<?php
//include search functions and echo the top tags
if (isset($_SESSION['user']) && ($_SESSION['user'] === "admin")) {
echo 'Admin user cannot execute search functions.';
} else {
echo '<form name="search_form_tags" id="search_form_tags" class="form_class" >';
echo '<div style="text-align: center; padding-top: 10px; " class="row">';
echo ' <div class="col-md-6">';
echo ' <input id="searchField_tags" type="text" class="form-control" placeholder="Search">';
echo ' </div>';
echo ' <div class="col-md-1">';
echo ' <button id="btn_search_tags" type="button" class="btn btn-default btn-sm">';
echo ' <span class="glyphicon glyphicon-search"></span> Search';
echo ' </button>';
echo ' </div>';
echo '</div>';
echo '</form>';
echo '<p class="bg-info"><h4>Top Tags</h4></p>';
include("search.php");
echo topTags();
echo '<div style="display:none;" id="loader"><img style="margin-left: auto;margin-right: auto;display: block;" src="Searching.gif"></div>';
echo '<div style="padding-top: 15px" id="searchResults">';
echo '<p id="get_started" class="bg-info"><h5>Search to get started</h5></p>';
}
?>
</div>
</div>
</body>
</html>