-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
40 lines (26 loc) · 1.18 KB
/
search.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
<?php define("TITLE", "Search | PHP CMS Project") ?>
<!-- WEB PAGE -->
<?php include "includes/header.php" ?>
<!-- Navigation -->
<?php include "includes/navbar.php" ?>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
<?php
if( isset( $_POST[ 'submit' ] ) ) {
$search = escape($_POST[ 'search' ]);
$orderBy = escape($_POST[ 'orderBy' ]);
$order = escape($_POST[ 'order' ]);
$searchResults = searchPosts( $search, $orderBy, $order, SEARCH_POST_LIMIT );
}
?>
<h1 class="page-header"><?php echo SEARCH_HEAD ?> <small><?php echo SEARCH_DESC ?></small></h1>
<?php displayPosts( $searchResults ) ?>
</div> <!-- .col-md-8 -->
<!-- Blog Sidebar Widgets Column -->
<?php include "includes/sidebar.php" ?>
</div><!-- .row -->
<hr>
<?php include "includes/footer.php" ?>