This repository was archived by the owner on Apr 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdashboard.php
More file actions
156 lines (147 loc) · 5.43 KB
/
dashboard.php
File metadata and controls
156 lines (147 loc) · 5.43 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
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
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1>
</div>
<!-- Content Row -->
<div class="row d-flex justify-content-center">
<!-- Total Jadwal Card -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-primary shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1">
Jumlah Jadwal (Total)</div>
<div class="h5 mb-0 font-weight-bold text-gray-800"><?= $total; ?></div>
</div>
<div class="col-auto">
<i class="fas fa-calendar-alt fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>
<!-- New Jadwal Card -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-success shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-success text-uppercase mb-1">
Jadwal Aktif (Baru)</div>
<div class="h5 mb-0 font-weight-bold text-gray-800"><?= $jaktif; ?></div>
</div>
<div class="col-auto">
<i class="fas fa-calendar-check fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>
<!-- Student Card -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-info shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Mahasiswa Terdaftar
</div>
<div class="h5 mb-0 mr-3 font-weight-bold text-gray-800"><?= $juser; ?></div>
</div>
<div class="col-auto">
<i class="fas fa-users fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Content Row -->
<div class="row">
<!-- Area Chart -->
<div class="col-xl col-lg">
<div class="card shadow mb-4">
<!-- Card Header - Dropdown -->
<div class="card-header py-3 d-md-flex flex-row align-items-center justify-content-between">
<h6 class="m-0 font-weight-bold text-primary">Jadwal Seminar Proposal</h6>
<form class="form-inline" action="<?= site_url('admin/dashboard'); ?>">
<div class="input-group">
<input class="form-control" type="search" placeholder="Cari" name="find">
<div class="input-group-append">
<button class="btn btn-primary" type="submit"><i class="fas fa-search fa-sm"></i></button>
</div>
</div>
</form>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="row d-flex flex-wrap mb-3">
<?php foreach ($jadwal as $key => $j) : ?>
<div class="col-sm-3">
<div class="card bg-white shadow rounded mb-3 h-100">
<a href="<?= site_url('admin/jadwal_detail/') . $j['id']; ?>">
<img src="https://images.unsplash.com/photo-1488998427799-e3362cec87c3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1050&q=80" class="img-fluid card-img-top" alt="...">
</a>
<div class="mt-4 mx-4">
<?php
$id = $j['id'];
$jumlahPendaftar = $this->Admin_model->jumlah_pendaftar($id);
if ($j['is_active'] == 1) {
if ($jumlahPendaftar < $j['kuota']) {
?>
<span class="badge badge-success mb-3">Tersedia</span>
<?php
} else {
?>
<span class="badge badge-warning mb-3">Penuh</span>
<?php
}
} else {
?>
<span class="badge badge-secondary mb-3">Selesai</span>
<?php
}; ?>
<a class="text-decoration-none" href="<?= site_url('admin/jadwal_detail/') . $j['id']; ?>">
<h6>
<?php
$num_char = 50;
$text = $j['judul'];
echo substr($text, 0, $num_char) . '...';
?>
</h6>
</a>
<small class="text-muted"><?= $j['mhs']; ?></small>
<span style="font-size: 12px" class="text-muted d-flex align-items-center justify-content-between mb-2 mt-3">
<i class="fas fa-xs fa-calendar-alt"></i>
<?php setlocale(LC_ALL, 'id-ID', 'id_ID'); ?>
<?= strftime('%A, %d %B %Y', strtotime($j['tgl'])); ?>
</span>
<span style="font-size: 12px" class="text-muted d-flex align-items-center justify-content-between mb-2">
<i class="fas fa-xs fa-clock"></i>
<?= date('H:i', strtotime($j['waktua'])); ?> - <?= date('H:i', strtotime($j['waktub'])); ?>
</span>
<span style="font-size: 12px" class="text text-capitalize text-muted d-flex align-items-center justify-content-between mb-2">
<i class="fas fa-xs fa-map-marker-alt"></i>
<?= $j['lokasi']; ?>
</span>
<span style="font-size: 12px" class="text-muted d-flex align-items-center justify-content-between mb-2">
<i class="fas fa-xs fa-user-plus"></i>
<?= $jumlahPendaftar; ?> / <?= $j['kuota']; ?>
</span>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?= $pagination; ?>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->