This repository has been archived by the owner on Nov 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch-sidebar.php
75 lines (75 loc) · 3.41 KB
/
search-sidebar.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
$category = __get("category");
if(!isset($category['pk_i_id']) ) {
$category['pk_i_id'] = null;
}
?>
<div id="sidebar">
<?php osc_alert_form(); ?>
<div class="filters">
<form action="<?php echo osc_base_url(true); ?>" method="get" class="nocsrf">
<input type="hidden" name="page" value="search"/>
<input type="hidden" name="sOrder" value="<?php echo osc_search_order(); ?>" />
<input type="hidden" name="iOrderType" value="<?php $allowedTypesForSorting = Search::getAllowedTypesForSorting() ; echo $allowedTypesForSorting[osc_search_order_type()]; ?>" />
<?php foreach(osc_search_user() as $userId) { ?>
<input type="hidden" name="sUser[]" value="<?php echo $userId; ?>"/>
<?php } ?>
<fieldset class="first">
<h3><?php _e('Your search', 'matrix'); ?></h3>
<div class="row">
<input class="input-text" type="text" name="sPattern" id="query" value="<?php echo osc_esc_html(osc_search_pattern()); ?>" />
</div>
</fieldset>
<fieldset>
<h3><?php _e('City', 'matrix'); ?></h3>
<div class="row">
<input class="input-text" type="hidden" id="sRegion" name="sRegion" value="<?php echo osc_esc_html(Params::getParam('sRegion')); ?>" />
<input class="input-text" type="text" id="sCity" name="sCity" value="<?php echo osc_esc_html(osc_search_city()); ?>" />
</div>
</fieldset>
<?php if( osc_images_enabled_at_items() ) { ?>
<fieldset>
<h3><?php _e('Show only', 'matrix') ; ?></h3>
<div class="row">
<input type="checkbox" name="bPic" id="withPicture" value="1" <?php echo (osc_search_has_pic() ? 'checked' : ''); ?> />
<label for="withPicture"><?php _e('listings with pictures', 'matrix') ; ?></label>
</div>
</fieldset>
<?php } ?>
<?php if( osc_price_enabled_at_items() ) { ?>
<fieldset>
<div class="row price-slice">
<h3><?php _e('Price', 'matrix') ; ?></h3>
<span><?php _e('Min', 'matrix') ; ?>.</span>
<input class="input-text" type="text" id="priceMin" name="sPriceMin" value="<?php echo osc_esc_html(osc_search_price_min()); ?>" size="6" maxlength="6" />
<span><?php _e('Max', 'matrix') ; ?>.</span>
<input class="input-text" type="text" id="priceMax" name="sPriceMax" value="<?php echo osc_esc_html(osc_search_price_max()); ?>" size="6" maxlength="6" />
</div>
</fieldset>
<?php } ?>
<div class="plugin-hooks">
<?php
if(osc_search_category_id()) {
osc_run_hook('search_form', osc_search_category_id()) ;
} else {
osc_run_hook('search_form') ;
}
?>
</div>
<?php
$aCategories = osc_search_category();
foreach($aCategories as $cat_id) { ?>
<input type="hidden" name="sCategory[]" value="<?php echo osc_esc_html($cat_id); ?>"/>
<?php } ?>
<div class="actions">
<button type="submit"><?php _e('Apply', 'matrix') ; ?></button>
</div>
</form>
<fieldset>
<div class="row ">
<h3><?php _e('Refine category', 'matrix') ; ?></h3>
<?php mtx_sidebar_category_search($category['pk_i_id']); ?>
</div>
</fieldset>
</div>
</div>