-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.php
234 lines (158 loc) · 10.5 KB
/
user.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?php
require_once 'header.php';
$kullanicisor = $db->prepare("SELECT * FROM kullanici where kullanici_id=:id and kullanici_magaza=:magaza");
$kullanicisor->execute(array(
'id' => $_GET['kullanici_id'],
'magaza' => 2
));
$say = $kullanicisor->rowCount();
if ($say == 0) {
#Header("Location:404.php");
}
$kullanicicek = $kullanicisor->fetch(PDO::FETCH_ASSOC);
?>
<div class="inner-banner-area">
<div class="container">
</div>
</div>
<div class="pagination-area bg-secondary">
<div class="container">
<div class="pagination-wrapper">
</div>
</div>
</div>
<div class="profile-page-area bg-secondary section-space-bottom">
<div class="container">
<div class="row">
<?php require_once 'user-header.php' ?>
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12 col-lg-pull-9 col-md-pull-8 col-sm-pull-8">
<div class="fox-sidebar">
<div class="sidebar-item">
<div class="sidebar-item-inner">
<h3 class="sidebar-item-title">Satıcı</h3>
<div class="sidebar-author-info">
<div class="sidebar-author-img">
<img src="<?php echo $kullanicicek['kullanici_magazafoto']; ?>" alt="product"
class="img-responsive">
</div>
<div class="sidebar-author-content">
<h3><?php echo $kullanicicek['kullanici_ad'] . " " . $kullanicicek['kullanici_soyad'] ?></h3>
<?php
$kullanici_sonzaman = strtotime($kullanicicek['kullanici_sonzaman']);
$suan = time();
echo $fark = ($suan - $kullanici_sonzaman);
if ($fark < 600) { ?>
<a href="#" class="view-profile"><i class="fa fa-circle"
aria-hidden="true"></i> online</a>
<?php } else { ?>
<a href="#" class="view-profile"><i style="color:red" class="fa fa-circle"
aria-hidden="true"></i> offline</a>
<?php }
?>
</div>
</div>
<ul class="sidebar-badges-item">
<?php
$urunsay = $db->prepare("SELECT COUNT(kullanici_idsatici) as say FROM siparis_detay where kullanici_idsatici=:id");
$urunsay->execute(array(
'id' => $_GET['kullanici_id']
));
$saycek = $urunsay->fetch(PDO::FETCH_ASSOC);
if ($saycek['say'] > 1 and $saycek['say'] <= 9) { ?>
<li><img src="img\profile\badges1.png" alt="badges" class="img-responsive"></li>
<?php } else if ($saycek['say'] > 9 and $saycek['say'] <= 99) { ?>
<li><img src="img\profile\badges1.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges2.png" alt="badges" class="img-responsive"></li>
<?php } else if ($saycek['say'] > 99 and $saycek['say'] <= 999) { ?>
<li><img src="img\profile\badges1.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges2.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges3.png" alt="badges" class="img-responsive"></li>
<?php } else if ($saycek['say'] > 999 and $saycek['say'] <= 9999) { ?>
<li><img src="img\profile\badges1.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges2.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges3.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges4.png" alt="badges" class="img-responsive"></li>
<?php } else if ($saycek['say'] > 9999) { ?>
<li><img src="img\profile\badges1.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges2.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges3.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges4.png" alt="badges" class="img-responsive"></li>
<li><img src="img\profile\badges5.png" alt="badges" class="img-responsive"></li>
<?php } ?>
</ul>
</div>
</div>
<ul class="social-default">
<li><a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
<li><a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a></li>
</ul>
<ul class="sidebar-product-btn">
<?php
if (empty($_SESSION['userkullanici_id'])) { ?>
<li><a href="login" class="buy-now-btn" id="buy-button"><i class="fa fa-envelope-o"
aria-hidden="true"></i> Mesaj
Gönder</a></li>
<?php } else if ($_SESSION['userkullanici_id'] == $_GET['kullanici_id']) { ?>
<li>
<button disabled="" class="buy-now-btn" id="buy-button"><i class="fa fa-ban"
aria-hidden="true"></i>
Mesaj Gönder
</button>
</li>
<?php } else { ?>
<li><a href="mesaj-gonder?kullanici_gel=<?php echo $_GET['kullanici_id'] ?>"
class="buy-now-btn" id="buy-button"><i class="fa fa-envelope-o"
aria-hidden="true"></i> Mesaj Gönder</a>
</li>
<?php } ?>
</ul>
</div>
</div>
</div>
<div class="row profile-wrapper">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<?php require_once 'user-sidebar.php' ?>
</div>
<div class="col-lg-9 col-md-8 col-sm-8 col-xs-12">
<div class="tab-content">
<div class="tab-pane fade active in" id="Products">
<h3 class="title-inner-section">Ürünleri</h3>
<div class="inner-page-main-body">
<div class="row more-product-item-wrapper">
<?php
$urunsor = $db->prepare("SELECT urun.*,kategori.* FROM urun INNER JOIN kategori ON urun.kategori_id=kategori.kategori_id where urun.kullanici_id=:kullanici_id ");
$urunsor->execute(array(
'kullanici_id' => $_GET['kullanici_id']
));
while ($uruncek = $urunsor->fetch(PDO::FETCH_ASSOC)) { ?>
<div class="col-lg-4 col-md-6 col-sm-4 col-xs-6">
<div class="more-product-item">
<div class="more-product-item-img">
<img style="width: 100px; height: 90px;"
src="<?php echo $uruncek['urunfoto_resimyol'] ?>"
alt="<?php echo $uruncek['urunfoto_ad'] ?>"
class="img-responsive">
</div>
<div class="more-product-item-details">
<h4>
<a href="urun-<?= seo($uruncek['urun_ad']) . "-" . $uruncek['urun_id'] ?>"><?php echo mb_substr($uruncek['urun_ad'], 0, 20, 'UTF-8') ?></a>
</h4>
<div class="p-title"><?php echo $uruncek['kategori_ad'] ?></div>
<div class="p-price"><?php echo $uruncek['urun_fiyat'] ?> TL</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
require_once 'footer.php';
?>