-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-header.php
139 lines (99 loc) · 6.94 KB
/
user-header.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
<?php
if (basename($_SERVER['PHP_SELF'])==basename(__FILE__)) {
exit("Bu sayfaya erişim yasak");
}
?>
<div class="col-lg-9 col-md-8 col-sm-8 col-xs-12 col-lg-push-3 col-md-push-4 col-sm-push-4">
<div class="inner-page-main-body">
<div class="single-banner">
<img src="img\banner\1.jpg" alt="product" class="img-responsive">
</div>
<div class="author-summery">
<div class="single-item">
<div class="item-title">Bölge:</div>
<div class="item-details"><?php echo $kullanicicek['kullanici_ilce']." / ".$kullanicicek['kullanici_il'] ?></div>
</div>
<div class="single-item">
<div class="item-title">Kayıt Tarihi</div>
<div class="item-details"><?php echo $kullanicicek['kullanici_zaman']; ?></div>
</div>
<div class="single-item">
<div class="item-title">Puan:</div>
<div class="item-details">
<?php
$puansay=$db->prepare("SELECT COUNT(yorumlar.yorum_puan) as say, SUM(yorumlar.yorum_puan) as topla, yorumlar.*,urun.* FROM yorumlar INNER JOIN urun ON yorumlar.urun_id=urun.urun_id where urun.kullanici_id=:id");
$puansay->execute(array(
'id' => $_GET['kullanici_id']
));
$puancek=$puansay->fetch(PDO::FETCH_ASSOC);
$puan=round($puancek['topla']/ $puancek['say']);
?>
<ul class="default-rating">
<?php
switch ($puan) {
case '5': ?>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li>(<span> <?php echo $puan ?></span> )</li>
<?php
break;
case '4': ?>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li>(<span> <?php echo $puan ?></span> )</li>
<?php
break;
case '3': ?>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li>(<span> <?php echo $puan ?></span> )</li>
<?php
break;
case '2': ?>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li>(<span> <?php echo $puan ?></span> )</li>
<?php
break;
case '1': ?>
<li><i class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li><i style="color:grey" class="fa fa-star" aria-hidden="true"></i></li>
<li>(<span> <?php echo $puan ?></span> )</li>
<?php
break;
}
?>
</ul>
</div>
</div>
<div align="center" class="single-item">
<div class="item-title">Toplam Satış:</div>
<div class="item-name">
<?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);
echo $saycek['say'];
?>
</div>
</div>
</div>
</div>
</div>