-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport-list.php
148 lines (138 loc) · 7.38 KB
/
report-list.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
<?php
include "src/header.php";
date_default_timezone_set('Asia/Kuala_Lumpur');
$currentMonth = date('m');
$currentYear = date('Y');
$listCustomer = "SELECT customer.*, MAX(report.usage_size) as total_size
FROM customer
INNER JOIN department ON customer.cust_id = department.cust_id
INNER JOIN folder ON department.dept_id = folder.dept_id
INNER JOIN report ON folder.folder_id = report.folder_id
WHERE report.month = '".$currentMonth."' AND report.year = '".$currentYear."'";
$execListCustomer = mysqli_query($conn, $listCustomer);
?>
<!-- ============================================================== -->
<!-- Page wrapper -->
<!-- ============================================================== -->
<div class="page-wrapper">
<!-- ============================================================== -->
<!-- Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
<div class="page-breadcrumb">
<div class="row">
<div class="col-7 align-self-center">
<h4 class="page-title text-truncate text-dark font-weight-medium mb-1">User List</h4>
<div class="d-flex align-items-center">
<nav aria-label="breadcrumb">
<ol class="breadcrumb m-0 p-0">
<li class="breadcrumb-item text-muted active" aria-current="page">User List</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<!-- ============================================================== -->
<!-- End Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- Container fluid -->
<!-- ============================================================== -->
<div class="container-fluid">
<!-- ============================================================== -->
<!-- Start Page Content -->
<!-- ============================================================== -->
<div class="row">
<!-- Start List Directory Table -->
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="zero_config" class="table table-striped table-bordered no-wrap">
<thead>
<tr>
<th>No</th>
<th>Customer</th>
<th>Current Total Usage Size (GB)</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<?php
foreach($execListCustomer as $row) {
echo "<tr>";
echo "<td>1</td>";
echo "<td>".$row['cust_name']."</td>";
// calculate Bytes to GBs [size / 1073741824]
$total_size = $row['total_size']/1073741824;
echo "<td><b>".number_format($total_size)."</b></td>";
echo "<td class='text-center'>";
echo "<a href='isilon-report.php?cust_id=".$row['cust_id']."&report_date=".$currentYear."-".$currentMonth."' class='btn btn-sm btn-primary btn-rounded'>";
echo "Isilon";
echo "</a>";
echo "<a href='workfolder-summary.php?cust_id=".$row['cust_id']."&report_date=".$currentYear."-".$currentMonth."' class='btn btn-sm btn-success btn-rounded'>";
echo "Workfolder";
echo "</a>";
echo "<a href='departmental-summary.php?cust_id=".$row['cust_id']."&report_date=".$currentYear."-".$currentMonth."' class='btn btn-sm btn-dark btn-rounded'>";
echo "Departmental";
echo "</a>";
echo "<a href='usage-breakdown.php?cust_id=".$row['cust_id']."&report_date=".$currentYear."-".$currentMonth."' class='btn btn-sm btn-danger btn-rounded'>";
echo "Breakdown";
echo "</a>";
echo "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- End List Directory Table -->
</div>
<!-- ============================================================== -->
<!-- End PAge Content -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- Right sidebar -->
<!-- ============================================================== -->
<!-- .right-sidebar -->
<!-- ============================================================== -->
<!-- End Right sidebar -->
<!-- ============================================================== -->
</div>
<!-- ============================================================== -->
<!-- End Container fluid -->
<!-- ============================================================== -->
</div>
<!-- ============================================================== -->
<!-- End Page wrapper -->
<!-- ============================================================== -->
<?php
include "src/footer.php";
?>
</body>
<!-- SignIn modal content -->
<div id="login-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-body">
<div class="text-center mt-2 mb-4">
<h4 class="card-title">Upload report file</h4>
</div>
<form action="#" class="pl-3 pr-3">
<div class="form-group">
<fieldset class="form-group">
<input type="file" class="form-control-file" id="exampleInputFile">
</fieldset>
</div>
<div class="form-group text-center">
<button class="btn btn-rounded btn-primary" type="submit">Submit</button>
</div>
</form>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</html>