-
Notifications
You must be signed in to change notification settings - Fork 0
/
newn.Step by Step, Noida.php
271 lines (256 loc) · 12.1 KB
/
newn.Step by Step, Noida.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
<?php
include('connection.php');
?>
<?php
$mn=$_GET['sn'];
$qn=mysqli_real_escape_string($conn,$mn);
if(!$qn)
{
header('location:about_school.php');
}
else
{
$query="SELECT * FROM cms,points WHERE cms.schoolname='$qn' AND cms.cms_fk=points.pid";
$data=mysqli_query($conn,$query);
$total=mysqli_num_rows($data);
if($total!=0)
{
while($result=mysqli_fetch_assoc($data))
{
?>
<html>
<head>
<title>Ranking Website</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="<?php echo $result['keyword'] ?>">
<meta name="description" content="<?php echo $result['description'] ?>">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="cmsstyle.css">
</head>
<body>
<?php include('navbar.php'); ?>
<div class="navigation-menu">
<ul class="navigation-menu-list">
<li><a href="#overview" rel="m_PageScroll2id" data-ps2id-offset="100">Overview</a></li>
<li><a href="#academics" rel="m_PageScroll2id" data-ps2id-offset="100">Academics</a></li>
<li><a href="#admission" rel="m_PageScroll2id" data-ps2id-offset="100">Admission</a></li>
<li><a href="#achievements" rel="m_PageScroll2id" data-ps2id-offset="100">Achievements</a></li>
<li><a href="#photo-gallery" rel="m_PageScroll2id" data-ps2id-offset="100">Photo Galary</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="container">
<div class="row">
<div class="contentPart card bg-light col-md-12">
<div id="quickFacts" class="cardBlk checkBlk">
<div class="headingContainer">
<h2 class="blockHeading"><?php echo $result['schoolname'] ?></h2>
</div>
<div class="quickFact">
<div class="row">
<div class="col-md-4">
<div class="display-table vtop">
<div class="display-cell leftBlk">
<img src="https://static.careers360.mobi/images/frontend/desktop/rating.svg" alt="Rating" width="45">
</div>
<div class="display-cell rightBlk">
<div class="rightUpr">
Ranked in School
</div>
<div class="rightBtm"><strong class="blockHeading"><?php echo $result['rank'] ?></strong></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="display-table vtop">
<div class="display-cell leftBlk">
<img src="https://static.careers360.mobi/images/frontend/desktop/ownership.svg" alt="Ownership" width="45">
</div>
<div class="display-cell rightBlk">
<div class="rightUpr">Ownership<i class="careers-info-tip"></i></div>
<div class="rightBtm"><?php echo $result['type'] ?><strong class="blockHeading"></strong> </div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="display-table vtop">
<div class="display-cell leftBlk">
<img src="https://static.careers360.mobi/images/frontend/desktop/institute.svg" alt="Institute" width="45">
</div>
<div class="display-cell rightBlk">
<div class="rightUpr">Type of Board</div>
<div class="rightBtm"><strong class="blockHeading"><?php echo $result['board'] ?></strong></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="display-table vtop">
<div class="display-cell leftBlk">
<img src="https://static.careers360.mobi/images/frontend/desktop/gender_coed.svg" alt="Coed" width="45">
</div>
<div class="display-cell rightBlk">
<div class="rightUpr">Genders Accepted</div>
<div class="rightBtm"><strong class="blockHeading"><?php echo $result['gender'] ?></strong> </div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<ul class="baseUl">
<li>Estd. Year: <strong><?php echo $result['establish']?></strong></li>
<li>Campus Size: <strong><?php echo $result['campus']?> Acres </strong></li>
<li>Total Faculty: <strong><?php echo $result['teachers']?></strong></li>
<li>Total Student Enrollments: <strong><?php echo $result['students']?></strong></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div id="post-181" class="post-181 post type-post status-publish format-standard has-post-thumbnail hentry category-schools">
<div class="p20">
<div id="overview">
<div class="row">
<div class="col-md-4">
<h4>Overview</h4>
<p><?php echo $result['overview'] ?></p>
</div>
<?php
$id=$result['cms_fk'];
$q="SELECT * FROM points WHERE pid='$id' ";
$d=mysqli_query($conn,$q);
$t=mysqli_num_rows($d);
if($t!=0)
{
while($r=mysqli_fetch_assoc($d))
{
$records = array();
$records[]=$r;
$myDataRawArray = [$r['teacher_welfare'],$r['competance_of_faculty'],$r['acd_reputation'],$r['co_curi_edu'],$r['sports'],$r['life_skill'],$r['individual_attention'],$r['mgm_quality'],$r['parental_involve'],$r['infrastructure'],$r['internationalism'],$r['special_needs'],$r['value_for_money'],$r['comm_service'],$r['research']];
$y=json_encode($myDataRawArray);
//array_push($z, $y);
}
}
?>
<div class="col-md-8">
<canvas id="barChart" class="cach" style="margin:50px;"></canvas>
</div>
</div>
</div>
<div id="academics">
<h4>Academics</h4>
<p><?php echo $result['academics'] ?></p>
</div>
<div id="admission">
<h4>Admission</h4>
<p><?php echo $result['admission'] ?></p>
</div>
<div id="achievements">
<h4>Achievement</h4>
<p><?php echo $result['uniques'] ?></p>
</div>
<div id="photo-gallery">
<h4>Photo Galary</h4>
<ul class="image-gallery">
<?php
$ddn=stripcslashes($qn);
$files = glob("spadmin/media/$ddn/*.*");
for ($i = 0; $i < count($files); $i++)
{
$image = $files[$i];
echo '<li><img src="' . $image . '" alt="Random image" class="img1"/></li>';
}
?>
</ul>
<div class="clear"></div>
<div class="embed-container">
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<?php
}
}
else
{
header('location:about_school.php');
}
}
?>
<?php include('footer.php'); ?>
<script>
$(document).ready(function(){
$.ajax({
beforeSend: function() {
console.log("Making AJAX request");
},
//cache: false,
url:"<?php echo basename($_SERVER['PHP_SELF']);?>",
//dataType: 'json',
//console.log(myDataRawArray);
success: function(res) {
var intermediate_data = <?php echo json_encode($y)?>;
//console.log(intermediate_data);
var graphLabels = ['Teacher Welfare','Competance of Faculty','Academic Reputation','Co-Curicular Education','Sports','Life Skills','Individual Attention to Students','Leadership/Management Quality','Parental Involvement','Infrastructure Provision','Internationalism','Special Needs Education','Value for Money','Community Service','Research Based Education'];
var graphData = eval(intermediate_data);
//console.log(graphData);
console.log("Before draw");
//Make a call to the function to draw the bar graph
drawGraph(graphLabels, graphData);
console.log("After draw");
},
complete: function() {
console.log("AJAX request done");
},
error: function() {
console.log("Error occurred during AJAX request")
}
});
});
function drawGraph(Labels, Data){
console.log(Data);
var chid="barChart";
var ctx= document.getElementById(chid);
if(ctx.getContext)
{
var ctxB= ctx.getContext('2d');
var myBarChart = new Chart(ctxB, {
type: 'horizontalBar',
data: {
labels: Labels,
datasets: [{
label: 'points',
data: Data,
backgroundColor:'#0318CF',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
steps: 10,
stepValue: 5,
max: 100
}
}]
}
}
});
}
}
</script>
</body>
</html>