-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.php
executable file
·102 lines (96 loc) · 4.32 KB
/
main.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
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
<?php
/*
* Osclass – software for creating and publishing online classified
* advertising platforms
*
* Copyright (C) 2014 OSCLASS
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// meta tag robots
osc_add_hook('header','osclassclsx_follow_construct');
osclassclsx_add_body_class('home');
$buttonClass = '';
$listClass = '';
// if(osclassclsx_show_as() == 'gallery'){
$listClass = 'listing-grid';
$buttonClass = 'active';
// }
?>
<?php osc_current_web_theme_path('header.php') ; ?>
<div class="row">
<div id="main" class="medium-8 columns order-1 medium-order-2">
<?php osc_run_hook('inside-main'); ?>
</div> <!-- main -->
<div id="sidebar" class="columns order-2 medium-order-1">
<?php if( osc_get_preference('sidebar-300x250', 'osclassclsx') != '') {?>
<!-- sidebar ad 350x250 -->
<div class="ads_300">
<?php echo osc_get_preference('sidebar-300x250', 'osclassclsx'); ?>
</div>
<!-- /sidebar ad 350x250 -->
<?php } ?>
<div class="widget-box">
<?php if(osc_count_list_regions() > 0 ) { ?>
<div class="box location">
<h3><strong><?php _e("Location", 'osclassclsx') ; ?></strong></h3>
<ul>
<?php while(osc_has_list_regions() ) { ?>
<li><a href="<?php echo osc_list_region_url(); ?>"><?php echo osc_list_region_name() ; ?> <em>(<?php echo osc_list_region_items() ; ?>)</em></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
</div> <!-- sidebar -->
</div>
<!-- Latests ads -->
<div class="latest_ads row">
<div class="columns small-12 clearfix">
<h1 class="float-left"><strong><?php _e('Latest Listings', 'osclassclsx') ; ?></strong></h1>
<?php if( osc_count_latest_items() == 0) { ?>
</div>
<p class="empty"><?php _e("There aren't listings available at this moment", 'osclassclsx'); ?></p>
<?php } else { ?>
<!-- <div class="actions float-right">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_base_url(true); ?>?sShowAs=list" class="list-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('List', 'osclassclsx'); ?></span></a>
<a href="<?php echo osc_base_url(true); ?>?sShowAs=gallery" class="grid-button" data-class-toggle="listing-grid" data-destination="#listing-card-list"><span><?php _e('Grid', 'osclassclsx'); ?></span></a>
</span>
</div> -->
</div>
<div class="columns small-12">
<?php
View::newInstance()->_exportVariableToView("listType", 'latestItems');
View::newInstance()->_exportVariableToView("listClass",$listClass);
osc_current_web_theme_path('loop.php');
?>
</div>
<div class="clear"></div>
<?php if( osc_count_latest_items() == osc_max_latest_items() ) { ?>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url() ; ?>">
<strong><?php _e('See all listings', 'osclassclsx') ; ?> »</strong></a>
</p>
<?php } ?>
<?php } ?>
</div>
<div class="clear"></div><!-- do not close, use main clossing tag for this case -->
<?php if( osc_get_preference('homepage-728x90', 'osclassclsx') != '') { ?>
<!-- homepage ad 728x60-->
<div class="ads_728">
<?php echo osc_get_preference('homepage-728x90', 'osclassclsx'); ?>
</div>
<!-- /homepage ad 728x60-->
<?php } ?>
<?php osc_current_web_theme_path('footer.php') ; ?>