-
Notifications
You must be signed in to change notification settings - Fork 0
/
inner.php
195 lines (176 loc) · 7.72 KB
/
inner.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?php
# Initialize the session
session_start();
# If user is not logged in then redirect him to login page
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== TRUE) {
echo "<script>" . "window.location.href='login/login.php';" . "</script>";
exit;
}
?>
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Trainer Details</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.png">
<!-- Normalize CSS -->
<link rel="stylesheet" href="css/normalize.css">
<!-- Main CSS -->
<link rel="stylesheet" href="css/main.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Fontawesome CSS -->
<link rel="stylesheet" href="css/all.min.css">
<!-- Flaticon CSS -->
<link rel="stylesheet" href="fonts/flaticon.css">
<!-- Animate CSS -->
<link rel="stylesheet" href="css/animate.min.css">
<!-- Data Table CSS -->
<link rel="stylesheet" href="css/jquery.dataTables.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="style.css">
<!-- Modernize js -->
<style>
</style>
<script src="js/modernizr-3.6.0.min.js"></script>
</head>
<body>
<!-- Preloader Start Here -->
<div id="preloader"></div>
<!-- Preloader End Here -->
<div id="wrapper" class="wrapper bg">
<!-- Header Menu Area Start Here -->
<!-- Header Menu Area End Here -->
<!-- Page Area Start Here -->
<div class="dashboard-page-one">
<!-- Sidebar Area Start Here -->
<!-- Sidebar Area End Here -->
<div class="dashboard-content-one">
<!-- Breadcubs Area Start Here -->
<!-- Breadcubs Area End Here -->
<!-- Student Table Area Start Here -->
<div class="card height-auto">
<div class="card-body">
<div class="heading-layout1">
<div class="item-title">
<h3>Course - Section wise Completed Data</h3>
</div>
<div class="dropdown">
<a class="dropdown-toggle" href="#" role="button" data-toggle="dropdown"
aria-expanded="false">...</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#"><i
class="fas fa-times text-orange-red"></i>Close</a>
<a class="dropdown-item" href="#"><i
class="fas fa-cogs text-dark-pastel-green"></i>Edit</a>
<a class="dropdown-item" href="#"><i
class="fas fa-redo-alt text-orange-peel"></i>Refresh</a>
</div>
</div>
</div>
<!-- <form class="mg-b-20">
<div class="row gutters-8">
<div class="col-3-xxxl col-xl-3 col-lg-3 col-12 form-group">
<input type="text" placeholder="Search by Roll ..." class="form-control">
</div>
<div class="col-4-xxxl col-xl-4 col-lg-3 col-12 form-group">
<input type="text" placeholder="Search by Name ..." class="form-control">
</div>
<div class="col-4-xxxl col-xl-3 col-lg-3 col-12 form-group">
<input type="text" placeholder="Search by Class ..." class="form-control">
</div>
<div class="col-1-xxxl col-xl-2 col-lg-3 col-12 form-group">
<button type="submit" class="fw-btn-fill btn-gradient-yellow">SEARCH</button>
</div>
</div>
</form> -->
<?php
// Database connection parameters
include 'conn.php';
// SQL query to fetch trainer details
$sql = "SELECT * FROM ections";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "<div class='table-responsive'>
<table class='table display data-table text-nowrap'>
<thead>
<tr>
<th>Section ID</th>
<th>Name</th>
<th>Aptitude Completed Hrs</th>
<th>Communication Completed Hrs</th>
<th>Total Hrs</th>
<th>Pending Hrs</th>
</tr>
</thead>
<tbody>";
// Output data of each row
while ($row = $result->fetch_assoc()) {
echo "<tr>
<td>
<div class='form-check'>
<input type='checkbox' class='form-check-input'>
<label class='form-check-label'>" . $row["id"] . "</label>
</div>
</td>
<td>" . $row["name"] . "</td>
<td>" . $row["apti"] . "</td>
<td>" . $row["comm"] . "</td>
<td>" . $row["tot"] . "</td>
<td>" . $row["pending"] . "</td>
</tr>";
}
echo " </tbody>
</table>
</div>";
} else {
echo "0 results";
}
$conn->close();
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Student Table Area End Here -->
<!-- <footer class="footer-wrap-layout1">
<div class="copyright">© Copyrights <a href="#">akkhor</a> 2019. All rights reserved. Designed by <a
href="#">PsdBosS</a></div>
</footer> -->
</div>
</div>
<!-- Page Area End Here -->
</div>
<!-- jquery-->
<script src="js/jquery-3.3.1.min.js"></script>
<!-- Plugins js -->
<script src="js/plugins.js"></script>
<!-- Popper js -->
<script src="js/popper.min.js"></script>
<!-- Bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<!-- Scroll Up Js -->
<script src="js/jquery.scrollUp.min.js"></script>
<!-- Data Table Js -->
<!-- <script src="js/jquery.dataTables.min.js"></script> -->
<!-- Custom Js -->
<script src="js/main.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function () {
$('.data-table').DataTable({
"pageLength": 10
});
});
</script>
</body>
</html>