-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage-classes.php
More file actions
139 lines (114 loc) · 5.39 KB
/
manage-classes.php
File metadata and controls
139 lines (114 loc) · 5.39 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
<?php include('includes/header.php'); ?>
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="row row-deck row-cards">
<div class="row page-title-div">
<div class="col-md-6">
<h2 class="title">Manage Classes</h2>
</div>
<!-- /.col-md-6 text-right -->
</div>
<!-- /.row -->
<div class="row breadcrumb-div">
<div class="col-md-6">
<ul class="breadcrumb">
<li><a href="dashboard.php"><i class="fa fa-home"></i> Home</a></li>
<li> / Classes</li>
<li class="active">Manage Classes</li>
</ul>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
<section class="section">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<h5>View Classes Info</h5>
</div>
</div>
<?php if ($msg) { ?>
<div class="alert alert-success left-icon-alert" role="alert">
<strong>Well done!</strong><?php echo htmlentities($msg); ?>
</div><?php } else if ($error) { ?>
<div class="alert alert-danger left-icon-alert" role="alert">
<strong>Oh snap!</strong> <?php echo htmlentities($error); ?>
</div>
<?php } ?>
<div class="panel-body p-20">
<table id="example" class="display table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>#</th>
<th>Class Name</th>
<th>Class Name Numeric</th>
<th>Section</th>
<th>Creation Date</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Class Name</th>
<th>Class Name Numeric</th>
<th>Section</th>
<th>Creation Date</th>
<th>Action</th>
</tr>
</tfoot>
<tbody>
<?php $sql = "SELECT * from tblclasses";
$query = $dbh->prepare($sql);
$query->execute();
$results = $query->fetchAll(PDO::FETCH_OBJ);
$cnt = 1;
if ($query->rowCount() > 0) {
foreach ($results as $result) { ?>
<tr>
<td><?php echo htmlentities($cnt); ?></td>
<td><?php echo htmlentities($result->ClassName); ?></td>
<td><?php echo htmlentities($result->ClassNameNumeric); ?></td>
<td><?php echo htmlentities($result->Section); ?></td>
<td><?php echo htmlentities($result->CreationDate); ?></td>
<td>
<a href="edit-class.php?classid=<?php echo htmlentities($result->id); ?>"><i class="fa fa-edit" title="Edit Record"></i> </a>
</td>
</tr>
<?php $cnt = $cnt + 1;
}
} ?>
</tbody>
</table>
<!-- /.col-md-12 -->
</div>
</div>
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.col-md-12 -->
</div>
</div>
<!-- /.panel -->
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.section -->
</div>
<!-- /.main-page -->
</div>
<!-- /.content-container -->
</div>
</div>
<?php include('includes/footer.php'); ?>
<?php //}
?>