-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-suply.php
114 lines (95 loc) · 3.34 KB
/
archive-suply.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
103
104
105
106
107
108
109
110
111
112
113
114
<?php
/**
* The main template file.
*
*/
get_header();
?>
<?php
$l = et_page_config();
$content_layout = etheme_get_option('blog_layout');
$full_width = false;
if($content_layout == 'mosaic') {
$full_width = etheme_get_option('blog_full_width');
}
if($content_layout == 'mosaic') {
$content_layout = 'grid';
}
?>
<div class="page-heading bc-type-<?php esc_attr_e( $l['breadcrumb'] ); ?>">
<div class="container">
<div class="row">
<div class="col-md-12 a-center">
<?php etheme_breadcrumbs(); ?>
<h1 class="title"><span>
<?php $sb_type = get_query_var('sb_type');
if(isset($sb_type) && $sb_type=='sell'){
echo __('Products for Sell','delminco');
} elseif(isset($sb_type) && $sb_type=='buy'){
echo __('Products for Buy','delminco');
}else{
echo __('Products for Sell and Buy','delminco');
}
?>
</span></h1>
</div>
</div>
</div>
</div>
<div class="<?php echo (!$full_width) ? 'container' : 'blog-full-width'; ?>">
<div class="page-content sidebar-position-<?php esc_attr_e( $l['sidebar'] ); ?>">
<div class="row">
<div class="content <?php esc_attr_e( $l['content-class'] ); ?>">
<div class="<?php if ($content_layout == 'grid'): ?>blog-masonry row<?php endif ?>">
<?php
if(have_posts()): ?>
<table class="suply-archive-table">
<tbody>
<tr>
<th><?php echo __('For','delminco');?></th>
<th><?php echo __('Name','delminco');?></th>
<th><?php echo __('Date','delminco');?></th>
<th><?php echo __('Country','delminco');?></th>
<th><?php echo __('ID','delminco');?></th>
</tr>
<?php while(have_posts()) : the_post(); ?>
<tr>
<td>
<?php $sell_buy = get_post_meta(get_the_ID(),'_suply_sell_buy',1);
if($sell_buy == 'sell'){
$sell_buy_icon = '<i class="fa fa-arrow-up"></i>'.' '.__('Sell','delminco');
} elseif($sell_buy == 'buy') {
$sell_buy_icon = '<i class="fa fa-arrow-down"></i>'.' '.__('Buy','delminco');
}
echo $sell_buy_icon;?>
</td>
<td><a href="<?php echo get_the_permalink();?>"><?php the_title();?></a></td>
<td><?php the_time(get_option('date_format'));?></td>
<td>
<?php
$user_id = get_the_author_ID();
$country_array = country_array();
$country_code = get_usermeta($user_id,'billing_country',1);
echo '<span class="f16 country-flag"><span class="flag '.strtolower($country_code).'"></span>'.' '.$country_array[$country_code].'</span>';
?>
</td>
<td><?php echo $post->ID;?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php else: ?>
<h1><?php _e('No products were found!', ET_DOMAIN) ?></h1>
<?php endif; ?>
</div>
<div class="articles-nav">
<?php delminco_pagination(); ?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php
get_footer();
?>