forked from microweber-templates/shopmag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
49 lines (40 loc) · 1.54 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
41
42
43
44
45
46
47
48
49
<?php include template_dir() . "header.php"; ?>
<?php
$keywords = '';
if (isset($_GET['keywords'])) {
$keywords = htmlspecialchars($_GET['keywords']);
}
$searchType = '';
if (isset($_GET['search-type'])) {
$searchType = htmlspecialchars($_GET['search-type']);
}
if(function_exists('xss_clean')){
$keywords = xss_clean($keywords);
$searchType = xss_clean($searchType);
}
$keywords = strip_tags($keywords);
$searchType = strip_tags($searchType);
?>
<?php if ($searchType == 'blog' OR $searchType == ''): ?>
<section class="section">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<div class="m-auto allow-drop" style="max-width: 800px;">
<h1><?php _lang('Results found', 'templates/shopmag'); ?><span class="text-primary">.</span></h1>
<p class="lead"><em><?php _lang('Mentioning', 'templates/shopmag'); ?></em> “<?php print $keywords; ?>”</p>
</div>
</div>
</div>
</div>
</section>
<?php endif; ?>
<section>
<div class="container-fluid">
<?php if ($searchType == 'blog' OR $searchType == ''): ?>
<module type="posts" limit="18" keyword="<?php print $keywords; ?>" description-length="70"/>
<module type="shop/products" template="skin-1" limit="18" keyword="<?php print $keywords; ?>" description-length="70"/>
<?php endif; ?>
</div>
</section>
<?php include template_dir() . "footer.php"; ?>