forked from socidx/happy-hacktoberfest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
118 lines (112 loc) · 5.48 KB
/
home.php
File metadata and controls
118 lines (112 loc) · 5.48 KB
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
<!--sidebar end-->
<!-- **********************************************************************************************************************************************************
MAIN CONTENT
*********************************************************************************************************************************************************** -->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="row">
<div class="col-lg-9">
<div class="row" style="margin-left:1pc;margin-right:1pc;">
<h1>DASHBOARD</h1>
<hr>
<?php
$sql=" select * from barang where stok <= 3";
$row = $config -> prepare($sql);
$row -> execute();
$r = $row -> rowCount();
if($r > 0){
?>
<?php
echo "
<div class='alert alert-warning'>
<span class='glyphicon glyphicon-info-sign'></span> Ada <span style='color:red'>$r</span> barang yang Stok tersisa sudah kurang dari 3 items. silahkan pesan lagi !!
<span class='pull-right'><a href='index.php?page=barang&stok=yes'>Tabel Barang <i class='fa fa-angle-double-right'></i></a></span>
</div>
";
}
?>
<?php $hasil_barang = $lihat -> barang_row();?>
<?php $hasil_kategori = $lihat -> kategori_row();?>
<?php $stok = $lihat -> barang_stok_row();?>
<?php $jual = $lihat -> jual_row();?>
<div class="row">
<!--STATUS PANELS -->
<div class="col-md-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h5><i class="fa fa-desktop"></i> Nama Barang</h5>
</div>
<div class="panel-body">
<center><h1><?php echo number_format($hasil_barang);?></h1></center>
</div>
<div class="panel-footer">
<h4 style="font-size:15px;font-weight:700;"><a href='index.php?page=barang'>Tabel Barang <i class='fa fa-angle-double-right'></i></a></h4>
</div>
</div><!--/grey-panel -->
</div><!-- /col-md-3-->
<!-- STATUS PANELS -->
<div class="col-md-3">
<div class="panel panel-success">
<div class="panel-heading">
<h5><i class="fa fa-desktop"></i> Stok Barang</h5>
</div>
<div class="panel-body">
<center><h1><?php echo number_format($stok['jml']);?></h1></center>
</div>
<div class="panel-footer">
<h4 style="font-size:15px;font-weight:700;"><a href='index.php?page=barang'>Tabel Barang <i class='fa fa-angle-double-right'></i></a></h4>
</div>
</div><!--/grey-panel -->
</div><!-- /col-md-3-->
<!-- STATUS PANELS -->
<div class="col-md-3">
<div class="panel panel-info">
<div class="panel-heading">
<h5><i class="fa fa-desktop"></i> Telah Terjual</h5>
</div>
<div class="panel-body">
<center><h1><?php echo number_format($jual['stok']);?></h1></center>
</div>
<div class="panel-footer">
<h4 style="font-size:15px;font-weight:700;font-weight:700;"><a href='index.php?page=laporan'>Tabel laporan <i class='fa fa-angle-double-right'></i></a></h4>
</div>
</div><!--/grey-panel -->
</div><!-- /col-md-3-->
<div class="col-md-3">
<div class="panel panel-danger">
<div class="panel-heading">
<h5><i class="fa fa-desktop"></i> Kategori Barang</h5>
</div>
<div class="panel-body">
<center><h1><?php echo number_format($hasil_kategori);?></h1></center>
</div>
<div class="panel-footer">
<h4 style="font-size:15px;font-weight:700;"><a href='index.php?page=kategori'>Tabel Kategori <i class='fa fa-angle-double-right'></i></a></h4>
</div>
</div><!--/grey-panel -->
</div><!-- /col-md-3-->
</div>
</div>
</div><!-- /col-lg-9 END SECTION MIDDLE -->
<!-- **********************************************************************************************************************************************************
RIGHT SIDEBAR CONTENT
*********************************************************************************************************************************************************** -->
<div class="col-lg-3 ds">
<div id="calendar" class="mb">
<div class="panel green-panel no-margin">
<div class="panel-body">
<div id="date-popover" class="popover top" style="cursor: pointer; disadding: block; margin-left: 33%; margin-top: -50px; width: 175px;">
<div class="arrow"></div>
<h3 class="popover-title" style="disadding: none;"></h3>
<div id="date-popover-content" class="popover-content"></div>
</div>
<div id="my-calendar"></div>
</div>
</div>
</div><!-- / calendar -->
</div><!-- /col-lg-3 -->
</div><! --/row -->
<div class="clearfix" style="padding-top:18%;"></div>
</section>
</section>