Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
38 views2 pages

Dashboard Analytics Overview

The document is a PHP dashboard code that displays transaction, customer, and outlet analytics and a table of the top 10 recent transactions. It requires header and footer files, queries the database to retrieve count of transactions, customers, outlets and recent transactions data. It then displays the counts and recent transactions table on the dashboard page.

Uploaded by

Yudha Rahayu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Dashboard Analytics Overview

The document is a PHP dashboard code that displays transaction, customer, and outlet analytics and a table of the top 10 recent transactions. It requires header and footer files, queries the database to retrieve count of transactions, customers, outlets and recent transactions data. It then displays the counts and recent transactions table on the dashboard page.

Uploaded by

Yudha Rahayu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1 <?

php
2 $title = 'dashboard';
3 require 'functions.php';
4 require 'layout_header.php';
5 $jTransaksi = ambilsatubaris($conn,'SELECT COUNT(id_transaksi) as jumlahtransaksi FROM
transaksi');
6 $jPelanggan = ambilsatubaris($conn,'SELECT COUNT(id_member) as jumlahmember FROM member'
);
7 $joutlet = ambilsatubaris($conn,'SELECT COUNT(id_outlet) as jumlahoutlet FROM outlet');
8 $query = "SELECT transaksi.*,member.nama_member , detail_transaksi.total_harga FROM
transaksi INNER JOIN member ON member.id_member = transaksi.member_id INNER JOIN
detail_transaksi ON detail_transaksi.transaksi_id = transaksi.id_transaksi ORDER BY
transaksi.id_transaksi DESC LIMIT 10";
9 $data = ambildata($conn,$query);
10 ?>
11 <div class="container-fluid">
12 <div class="row bg-title">
13 <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
14 <h4 class="page-title">Dashboard</h4> </div>
15 <div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
16 <ol class="breadcrumb">
17 <li><a href="#">Dashboard</a></li>
18 </ol>
19 </div>
20 <!-- /.col-lg-12 -->
21 </div>
22 <!-- /.row -->
23 <!-- ============================================================== -->
24 <!-- Different data widgets -->
25 <!-- ============================================================== -->
26 <!-- .row -->
27 <div class="row">
28 <div class="col-lg-4 col-sm-6 col-xs-12">
29 <div class="white-box analytics-info">
30 <h3 class="box-title">Oulet</h3>
31 <ul class="list-inline two-part">
32 <li>
33 <div id="sparklinedash"></div>
34 </li>
35 <li class="text-right"><i class="ti-arrow-up text-success"></i>
<span class="counter text-success"><?= htmlspecialchars($joutlet[
'jumlahoutlet']); ?></span></li>
36 </ul>
37 </div>
38 </div>
39 <div class="col-lg-4 col-sm-6 col-xs-12">
40 <div class="white-box analytics-info">
41 <h3 class="box-title">Pelanggan</h3>
42 <ul class="list-inline two-part">
43 <li>
44 <div id="sparklinedash2"></div>
45 </li>
46 <li class="text-right"><i class="ti-arrow-up text-purple"></i> <span
class="counter text-purple"><?= htmlspecialchars($jPelanggan[
'jumlahmember']); ?></span></li>
47 </ul>
48 </div>
49 </div>
50 <div class="col-lg-4 col-sm-6 col-xs-12">
51 <div class="white-box analytics-info">
52 <h3 class="box-title">Transaksi</h3>
53 <ul class="list-inline two-part">
54 <li>
55 <div id="sparklinedash3"></div>
56 </li>
57 <li class="text-right"><i class="ti-arrow-up text-info"></i> <span
class="counter text-info"><?= htmlspecialchars($jTransaksi[
'jumlahtransaksi']); ?></span></li>
58 </ul>
59 </div>
60 </div>
61 </div>
62 <div class="row">
63 <div class="col-md-12 col-lg-12 col-sm-12">
64 <div class="white-box">
65 <h3 class="box-title">10 Transaksi Terbaru</h3>
66 <div class="table-responsive">
67 <table class="table ">
68 <thead>
69 <tr>
70 <th>#</th>
71 <th>Invoice</th>
72 <th>Member</th>
73 <th>Status</th>
74 <th>Pemabayaran</th>
75 <th>Total Harga</th>
76 <th width="15%">Aksi</th>
77 </tr>
78 </thead>
79 <tbody>
80 <?php $no=1; foreach($data as $transaksi): ?>
81 <tr>
82 <td><?= $no++ ?></td>
83 <td><?= htmlspecialchars($transaksi['kode_invoice'
]); ?></td>
84 <td><?= htmlspecialchars($transaksi['nama_member']);
?></td>
85 <td><?= htmlspecialchars($transaksi['status']); ?>
</td>
86 <td><?= htmlspecialchars($transaksi['status_bayar'
]); ?></td>
87 <td><?= htmlspecialchars($transaksi['total_harga']);
?></td>
88 <td align="center">
89 <a href="transaksi_detail.php?id=<?=
htmlspecialchars($transaksi['id_transaksi']);
?>" data-toggle="tooltip" data-placement=
"bottom" title="Edit" class="btn btn-success
btn-block">Detail</a>
90 </td>
91 </tr>
92 <?php endforeach; ?>
93 </tbody>
94 </table>
95 </div>
96 </div>
97 </div>
98 </div>
99 </div>
100 <?php
101 require 'layout_footer.php';
102 ?>
103

You might also like