-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail_rombel_table.php
144 lines (135 loc) · 8.23 KB
/
detail_rombel_table.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
<!DOCTYPE html>
<html lang="en">
<?php include "connect_db.php";
include "layout/head.php" ?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<div class="col-md-3 left_col">
<div class="left_col scroll-view">
<?php include "layout/sidebar.php" ?>
</div>
</div>
<?php include "layout/top_navigation.php" ?>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="row">
<div class="col-md-12"> <!--Kolom terlalu lebar-->
<div class="x_panel">
<div class="x_title">
<h2>Daftar Kelompok</h2>
<a class="collapse-link pull-right"><i class="fa fa-chevron-up"></i></a>
<a class="btn btn-primary pull-right" data-toggle="modal" data-target="#addKelompok"><li class="fa fa-user-plus"></li> Kelompok </a>
<div class="clearfix"></div>
</div>
<div class="x_content">
<!-- start project list -->
<table class="table table-striped projects">
<thead>
<tr>
<th style="width: 1%">No</th>
<th style="width: 1%">Kode</th>
<th style="width: 10%">Nama Kelompok</th>
<th style="width: 15%">Aksi</th>
</tr>
</thead>
<tbody>
<!---------------------------Content------------------------------------->
<!---------------------------Content------------------------------------->
<?php
$n=0;
$query ="SELECT * FROM rombel";
$rombel = pg_query($konek, $query);
while($data = pg_fetch_object($rombel)){?>
<tr>
<td><?php echo ++$n; ?></td>
<td><?php echo $data->id_rombel ?></td>
<td><?php echo $data->nama ?></td>
<td>
<form action="proses/rombelProses.php" method="POST">
<a class="btn btn-warning btn-xs" href="rombel_edit.php?id=<?php echo $data->id_rombel?>"><i class="glyphicon glyphicon-edit"></i> </a>
<input hidden name="id_rombel" value="<?php echo $data->id_rombel; ?>">
<button class="btn btn-danger btn-xs" name="rombel_delete" onclick="return confirm('Apakah kamu yakin menghapus kelompok ini? penghapusan data ini akan menghapus data rombel juga.')"> <i class="glyphicon glyphicon-trash"></i></button>
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<!---------------------------Content------------------------------------->
<!---------------------------Content------------------------------------->
</tbody>
</table>
<!-- end project list -->
</div>
</div>
</div>
</div>
<!-- <div class="clearfix"></div> -->
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Daftar Rombongan Belajar(Rombel)</h2>
<a class="collapse-link pull-right"><i class="fa fa-chevron-up"></i></a>
<a class="btn btn-primary pull-right" data-toggle="modal" data-target="#addDetailRombel"><li class="fa fa-user-plus"></li> Rombel </a>
<div class="clearfix"></div>
</div>
<div class="x_content">
<?php
$query ="SELECT *,rombel.nama as namar,pendidik.nama as namap, tahun_ajaran.tahun_ajaran as ta FROM detail_rombel JOIN tahun_ajaran ON detail_rombel.id_tahun_ajaran=tahun_ajaran.id_tahun_ajaran JOIN rombel ON detail_rombel.id_rombel=rombel.id_rombel JOIN pendidik ON detail_rombel.pendidik_nik=pendidik.nik";
$detail_rombel = pg_query($konek, $query);
?>
<table class="table table-hover">
<thead>
<th>No</th>
<th>Kode</th>
<th>Nama Rombel</th>
<th>Tahun Ajaran</th>
<th>Semester</th>
<th>Usia</th>
<th>Pendidik</th>
<th>Aksi</th>
</thead>
<tbody>
<?php
$n=0;
while($data = pg_fetch_object($detail_rombel)){?>
<tr>
<td><?php echo ++$n; ?></td>
<td><?php echo $data->id_detail_rombel ?></td>
<td><?php echo $data->namar ?></td>
<td><?php echo $data->ta ?></td>
<td><?php echo $data->semester ?></td>
<td><?php echo $data->usia ?></td>
<td><?php echo $data->namap ?></td>
<td>
<form action="proses/detailRombelProses.php" method="POST">
<a class="btn btn-warning btn-xs" href="detail_rombel_edit.php?id=<?php echo $data->id_detail_rombel?>"><i class="glyphicon glyphicon-edit"></i> </a>
<input hidden name="id_detail_rombel" value="<?php echo $data->id_detail_rombel; ?>">
<button class="btn btn-danger btn-xs" name="detail_rombel_delete" onclick="return confirm('Apakah kamu yakin menghapus rombel ini?')"> <i class="glyphicon glyphicon-trash"></i></button>
<a class="btn btn-info btn-xs" href="peserta_rombel.php?id=<?php echo $data->id_detail_rombel?>&ta=<?php echo $data->id_tahun_ajaran?>&semester=<?php echo $data->semester ?> "><i class="fa fa-eye"></i> Peserta Rombel</a>
<input hidden name="id_detail_rombel" value="<?php echo $data->id_detail_rombel; ?>">
<!-- <a href="peserta_rombel.php" class="btn btn-primary btn-xs"><i class="fa fa-eye"></i> Peserta Rombel </a></td> -->
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include "rombel_add.php"; ?>
<?php include "detail_rombel_add.php"; ?>
<!-- /page content -->
<?php include "layout/footer.php" ?>
</div>
</div>
<?php include "layout/script.php";?>
</body>
</html>