-
Notifications
You must be signed in to change notification settings - Fork 6
/
department_view.php
76 lines (75 loc) · 5.68 KB
/
department_view.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
<?php
include_once 'header_h.php';
?>
<?php
include_once 'roles.php';
?>
<form action="#" method="post" id="Department_view">
<section class="content">
<div class="container-fluid">
<div class="block-header">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2><b>DEPARTMENT VIEW<div style="margin-left: 85%"><input class="btn btn-primary waves-effect" name="add" type="submit" formaction="./department.php" value="ADD DEPARTMENT"></button></b></div></h2>
</div>
<div class="body">
<div class="dataTables_wrapper form-inline dt-bootstrap" id="DataTables_Table_0_wrapper">
<div class="row">
<div class="col-sm-6">
<div class="dataTables_length" id="DataTables_Table_0_length">
</div>
</div>
<div class="col-sm-6">
<div class="dataTables_filter" id="DataTables_Table_0_filter">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable" id="DataTables_Table_0" role="grid" aria-describedby="DataTables_Table_0_info">
<thead>
<tr role="row">
<th tabindex="0" class="sorting_asc" aria-controls="DataTables_Table_0" style="width: 191px;" aria-label="DEPARTMENT ID: activate to sort column descending" aria-sort="ascending" rowspan="1" colspan="1">DEPARTMENT ID</th>
<th tabindex="0" class="sorting" aria-controls="DataTables_Table_0" style="width: 309px;" aria-label="DEPARTMENT NAME: activate to sort column ascending" rowspan="1" colspan="1">DEPARTMENT NAME</th>
<th tabindex="0" class="sorting" aria-controls="DataTables_Table_0" style="width: 135px;" aria-label="VIEW MORE: activate to sort column ascending" rowspan="1" colspan="1">VIEW MORE</th>
<th tabindex="0" class="sorting" aria-controls="DataTables_Table_0" style="width: 110px;" aria-label="UPDATE: activate to sort column ascending" rowspan="1" colspan="1">UPDATE</th>
<th tabindex="0" class="sorting" aria-controls="DataTables_Table_0" style="width: 110px;" aria-label="DELETE: activate to sort column ascending" rowspan="1" colspan="1">DELETE</th>
</tr>
</thead>
<?php
include_once 'config/config.php';
$q = "Select * from department";
$status = mysqli_query($connection_obj, $q);
if ($status) {
while ($row = mysqli_fetch_assoc($status)) {
echo '<tr class="odd" role="row">';
echo "<td class='sorting_1'><b>" . $row['Department_id'] . "</b></td>";
echo "<td class='sorting_1'>" . $row['Department_name'] . "</td>";
echo "<td><center><a href=department_viewmore.php?id=" . $row['Department_id'] . " ><button class='btn btn-info btn-circle-lg waves-effect waves-circle waves-float' name=information type='button'><i class='material-icons'>information</i></button></a></td>";
echo "<td><center><a href=Department1.php?id=" . $row['Department_id'] . "><button class='btn btn-success btn-circle-lg waves-effect waves-circle waves-float' name='update' type='button'><i class='material-icons'>update</i></button></a></td>";
echo "<td><center><a href=department_delete.php?id=" . $row['Department_id'] . " ><button class='btn btn-danger btn-circle-lg waves-effect waves-circle' waves-float name=delete type='button'><i class='material-icons'>delete</i></button></a></td>";
echo "</tr>";
}
echo "</tbody> </table>";
} else {
echo " error" . mysqli_error($connection_obj);
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<center>
<a href="<?= ADMIN_URL ?>home_page.php"><input class="btn btn-primary waves-effect" name="close" type="button" value="CLOSE"></a></button>
</center>
</section>
</form>
<?php
include_once 'footer_h.php';
?>