-
Notifications
You must be signed in to change notification settings - Fork 0
/
district-school-view.php
307 lines (274 loc) · 10.7 KB
/
district-school-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
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<?php
include 'connect.php';
session_start();
$school_id = $_GET['sid'];
$sql = "select * from school_info where school_id='$school_id'";
$run = mysqli_fetch_array(mysqli_query($con, $sql));
$did=$run['district_id'];
$sql1 = "select * from districts where district_id='$did'";
$run1 = mysqli_fetch_array(mysqli_query($con, $sql1));
$query="SELECT count(*) FROM student where school_id='$school_id' group by class_id";
$result=mysqli_query($con,$query) or die(mysqli_error);
foreach($result as $data){
$r1[]=$data['count(*)'];
}
$m="select concat(c.class,c.section) as cls from classes as c,schoolwise_class_details as sc where sc.school_id='$school_id' and sc.class_id=c.class_id";
$result=mysqli_query($con,$m) or die(mysqli_error);
foreach($result as $data){
$r[]=$data['cls'];
}
$sql2= mysqli_query($con,"select sc.class_id as class_id,c.class as cname,c.section as
section from school_info s , classes c , schoolwise_class_details sc where
s.school_id ='$school_id' and sc.class_id = c.class_id and sc.school_id=s.school_id");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<title>Student Details</title>
<!-- Favicon -->
<link rel="shortcut icon" href="assets/img/favicon.png">
<!-- Fontfamily -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,500;0,600;0,700;1,400&display=swap">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css">
<!-- Fontawesome CSS -->
<link rel="stylesheet" href="assets/plugins/fontawesome/css/fontawesome.min.css">
<link rel="stylesheet" href="assets/plugins/fontawesome/css/all.min.css">
<!-- Datatables CSS -->
<link rel="stylesheet" href="assets/plugins/datatables/datatables.min.css">
<!-- Main CSS -->
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<!-- Main Wrapper -->
<div class="main-wrapper">
<?php include 'district-menu.php'; ?>
Page Wrapper
<div class="page-wrapper">
<div class="content container-fluid">
<div class="page-header">
<div class="row">
<div class="col-sm-12">
<h3 class="page-title">School Details</h3>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="public-dashboard.php">Dashboard</a></li>
<li class="breadcrumb-item active">School Details</li>
</ul>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="about-info">
<h4>About <?php echo $run['school_name']?></h4>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="card-body">
<canvas id="acscore"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const ctx = document.getElementById('acscore');
const myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: <?php echo json_encode($r) ?>,
//echo json_encode($y),
datasets: [{
label: 'No.of Students',
data:<?php echo json_encode($r1) ?>,
//echo json_encode($x),
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
//maintainAspectRatio: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</div>
</div>
</div>
</div>
</div>
<div class="media mt-3 d-flex">
<img src="assets/img/user.jpg" class="me-3 flex-shrink-0" alt="...">
<div class="media-body flex-grow-1">
<ul>
<li>
<span class="title-span">School Name : </span>
<span class="info-span"><?php echo $run['school_name']; ?></span>
</li>
<li>
<span class="title-span">District : </span>
<span class="info-span"><?php echo $run['district_id'].'-'.$run1['district_name'];; ?></span>
</li>
</ul>
</div>
</div>
<div class="col-12 col-lg-4 col-xl-4 d-flex">
<div class="card flex-fill">
<div class="card-header">
<h5 class="card-title"><?php echo $run['school_name'];?> Classwise Top Performers list</h5>
</div>
<div class="card-body">
<ul class="activity-feed">
<?php
while($run2 = mysqli_fetch_assoc($sql2))
{
$cid=$run2['class_id'];
$cname=$run2['cname'];
$sec=$run2['section'];
$sql3=mysqli_query($con,"SELECT s.student_name as student_name, max(e.total) as total from exam_totals e,exam m,student s where s.student_id=e.student_id and e.school_id='$school_id' and e.eid=m.eid and m.status=1 and e.class_id='$cid'
and total=any(select max(e.total) as total from exam_totals e,exam m where e.school_id='$school_id' and e.eid=m.eid and m.status=1 and e.class_id='$cid')");
$run3 = mysqli_fetch_assoc($sql3);
$sid=$run3['student_name'];
echo '<li class="feed-item">
<div class="feed-date">'.$cname.'-'.$sec.'</div>
<span class="feed-text"><a>'.$sid.'</a></span>
</li>';
}
?>
</ul>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="card-body">
<canvas id="acscore"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const ctx = document.getElementById('acscore');
const myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: <?php echo json_encode($r) ?>,
//echo json_encode($y),
datasets: [{
label: 'No.of Students',
data:<?php echo json_encode($r1) ?>,
//echo json_encode($x),
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
//maintainAspectRatio: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</div>
</div>
</div>
</div>
</div>
<!--
<div class="row mt-3">
</div>
<div class="row follow-sec">
<div class="col-md-4 mb-3">
<div class="blue-box">
<h3>2850</h3>
<p>Followers</p>
</div>
</div>
<div class="col-md-4 mb-3">
<div class="blue-box">
<h3>2050</h3>
<p>Following</p>
</div>
</div>
<div class="col-md-4 mb-3">
<div class="blue-box">
<h3>2950</h3>
<p>Friends</p>
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-md-12">
<h5>Permanent Address</h5>
<p><?php echo $run['address']; ?></p>
</div>
</div>
<div class="row mt-2">
<div class="col-md-12">
<h5>Present Address</h5>
<p><?php echo $run['address']; ?></p>
</div>
</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<!-- <footer>
<p>Copyright © 2020 Dreamguys.</p>
</footer> -->
<!-- /Footer -->
</div>
<!-- /Page Wrapper -->
</div>
<!-- /Main Wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery-3.6.0.min.js"></script>
<!-- Bootstrap Core JS -->
<script src="assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Slimscroll JS -->
<script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Custom JS -->
<script src="assets/js/script.js"></script>
</body>
</html>