-
Notifications
You must be signed in to change notification settings - Fork 3
/
i_statistik.php
executable file
·175 lines (93 loc) · 4.23 KB
/
i_statistik.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
<?php
/*
******************************************************************
* CMS-TOKO-BIASAWAE v1.0 (code : Daun Muda). 2018
******************************************************************
* Dikembangkan oleh : Agus Muhajir *
* http://github.com/hajirodeon *
* http://hajirodeon.wordpress.com *
* http://facebook.com/hajirodeon *
* sms/wa/telegram : 081-829-88-54 *
* email : hajirodeon@gmail.com *
* ****************************************************************
*/
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM m_item");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_item = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT SUM(jml) AS total ".
"FROM m_item");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_stock = nosql($rtyk['total']);
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_order");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_order = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_order ".
"WHERE konfirmasi = 'false'");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_pending = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_order ".
"WHERE konfirmasi = 'true' ".
"AND tgl_kirim = '0000-00-00'");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_proses = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_order ".
"WHERE konfirmasi = 'true' ".
"AND tgl_kirim <> '0000-00-00'");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_dikirim = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_order ".
"WHERE konfirmasi = 'true' ".
"AND tgl_diterima <> '0000-00-00'");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_selesai = mysqli_num_rows($qtyk);
//query
$qtyk = mysqli_query($koneksi, "SELECT AVG(nilai_kualitas_no) AS total ".
"FROM member_testimoni");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_kualitas = round(mysqli_num_rows($qtyk));
//persen
$kualitas_persen = round(($jml_kualitas / 5) * 100);
//query
$qtyk = mysqli_query($koneksi, "SELECT AVG(nilai_manfaat_no) AS total ".
"FROM member_testimoni");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_manfaat = round(mysqli_num_rows($qtyk));
//persen
$manfaat_persen = round(($jml_manfaat / 5) * 100);
//query
$qtyk = mysqli_query($koneksi, "SELECT AVG(jml_speed_kirim) AS total ".
"FROM member_order ".
"WHERE tgl_diterima <> '0000-00-00'");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_speed_kirim = round(nosql($rtyk['total']));
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_diskusi");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_diskusi = round(mysqli_num_rows($qtyk));
//query
$qtyk = mysqli_query($koneksi, "SELECT * FROM member_testimoni");
$rtyk = mysqli_fetch_assoc($qtyk);
$jml_testimoni = round(mysqli_num_rows($qtyk));
echo '<div class="box box-widget widget-user-2">
<div class="box-footer no-padding">
<ul class="nav nav-stacked">
<li><a href="#">Kecepatan Kirim (Hari)<span class="pull-right badge bg-black">'.$jml_speed_kirim.'</span></a></li>
<li><a href="#">Diskusi <span class="pull-right badge bg-red">'.$jml_diskusi.'</span></a></li>
<li><a href="#">Testimoni <span class="pull-right badge bg-orange">'.$jml_testimoni.'</span></a></li>
<li><a href="#">Item <span class="pull-right badge bg-blue">'.$jml_item.'</span></a></li>
<li><a href="#">Stock <span class="pull-right badge bg-aqua">'.$jml_stock.'</span></a></li>
<li><a href="#">Total Transaksi <span class="pull-right badge bg-green">'.$jml_order.'</span></a></li>
<li><a href="#">Transaksi Pending <span class="pull-right badge bg-red">'.$jml_pending.'</span></a></li>
<li><a href="#">Transaksi Proses <span class="pull-right badge bg-orange">'.$jml_proses.'</span></a></li>
<li><a href="#">Transaksi Sedang Dikirim <span class="pull-right badge bg-magenta">'.$jml_dikirim.'</span></a></li>
<li><a href="#">Transaksi Selesai <span class="pull-right badge bg-purple">'.$jml_selesai.'</span></a></li>
</ul>
</div>
</div>';