forked from ugwuanyiandy/Website-NACOSS-UNN
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
270 lines (260 loc) · 14.7 KB
/
index.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
<?php
require_once 'class_lib.php';
$news = new NewsFeeds();
$slides = NewsFeeds::getLargeHomePageImages();
$links = NewsFeeds::getSmallHomePageImages();
?>
<!DOCTYPE html>
<!--
Copyright 2015 NACOSS UNN Developers Group (NDG).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<?php require_once 'default_head_tags.php'; ?>
<!-- Page Title -->
<title>NACOSS University of Nigeria, Nsukka</title>
</head>
<body class="metro" style="background-image: url(img/bg.jpg); background-repeat: repeat;">
<div class="container bg-white" id="wrapper">
<?php
require_once './header.php';
?>
<div class="grid fluid nbm">
<div class="row ntm">
<div class="row ntm">
<?php
//Detect browser type
require_once 'detect.php';
if ($browser_t !== "mobile") {
$defaultSlideImage = array("img_url" => "img/defaultSlideImage.jpg", "href" => "#", "caption" => "Networking the world...");
array_push($slides, $defaultSlideImage);
?>
<!--large home page images-->
<div class="bg-dark" >
<div class="carousel">
<div class="bg-transparent no-overflow on-phone no-desktop no-tablet" id="carousel1">
<?php
foreach ($slides as $value) {
?>
<a class="slide image-container" href="<?= $value['href'] ?>">
<img src="<?= HOSTNAME . $value['img_url'] ?>" alt="" class="image"/>
<div class="overlay">
<h2 class="fg-white">
<?= $value['caption'] ?>
</h2>
</div>
</a>
<?php
}
?>
</div>
<div class="bg-transparent no-overflow no-phone" id="carousel2">
<?php
foreach ($slides as $value) {
?>
<a class="slide image-container" href="<?= $value['href'] ?>">
<img src="<?= HOSTNAME . $value['img_url'] ?>" alt="" class="image"/>
<div class="overlay">
<h2 class="fg-white">
<?= $value['caption'] ?>
</h2>
</div>
</a>
<?php
}
?>
<!-- <a class="controls left fg-white"><i class="icon-arrow-left-5"></i></a>
<a class="controls right fg-white"><i class="icon-arrow-right-5"></i></a>-->
</div>
</div>
</div>
<script>
$(function () {
$("#carousel1").carousel({
period: 5000,
duration: 1000,
effect: 'fade',
height: 180,
controls: false,
markers: {
show: true,
type: "default",
position: "bottom-right"
}
});
});
$(function () {
$("#carousel2").carousel({
period: 5000,
duration: 1000,
effect: 'fade',
height: 500,
controls: false,
markers: {
show: true,
type: "default",
position: "bottom-right"
}
});
});
</script>
<?php } ?>
</div>
<div class="row padding10 ntm">
<!--smaller home page images-->
<div class="span9">
<?php
//Add default images
array_push($links, array("href" => "prospectus.php", "caption" => "Prospectus", "img_url" => "img/prospectus.jpg"));
array_push($links, array("href" => "library.php", "caption" => "Visit Library", "img_url" => "img/library-icon.png"));
array_push($links, array("href" => ALUMNI_HOMEPAGE, "caption" => "Our Alumni", "img_url" => "img/alumni.jpg"));
//Dispay
for ($i = 0; $i < count($links); $i++) {
if ($i % 3 === 0) {
if ($i !== 0) {
echo '</div>';
}
echo '<div class="row">';
}
?>
<div class="span4 image-container bg-transparent">
<a href="<?= $links[$i]['href'] ?>">
<img class="image" src="<?= HOSTNAME . $links[$i]['img_url'] ?>" alt=""/>
</a>
<div class="overlay-fluid"><?= $links[$i]['caption'] ?></div>
</div>
<?php
}
echo '</div>';
?>
</div>
<div class="span3">
<div class="row">
<div class="image-container bg-orange span3" >
<a href="news.php">
<img class="image" src="img/social10.png" alt=""/>
</a>
<div class="overlay-fluid"><a class="fg-white" href="news.php">News and Events</a></div>
</div>
<div class="image-container bg-green span3" >
<a href="faq.php">
<img class="image" src="img/question3.png" alt=""/>
</a>
<div class="overlay-fluid"><a class="fg-white" href="faq.php">Get Help</a></div>
</div>
<div class="image-container bg-lightRed span3">
<a href="login.php?s=2">
<img class="image" src="img/locked59.png" alt=""/>
</a>
<div class="overlay-fluid"><a class="fg-white" href="login.php?s=2">Register</a></div>
</div>
<div class="image-container bg-blue span3">
<a href="contact.php">
<img class="image" src="img/telephone1.png" alt=""/>
</a>
<div class="overlay-fluid"><a class="fg-white" href="contact.php">Contact</a></div>
</div>
</div>
<div class="row ntm">
<h4 class="padding5 bg-NACOSS-UNN fg-white">Latest Stories</h4>
<?php
$allNews = $news->getAllNews();
if (!empty($allNews)) {
$length = min(array(5, count($allNews)));
for ($index = 0; $index < $length; $index++) {
?>
<div class="row ntm">
<a href="news_post.php?id=<?= $allNews[$index]['id'] ?>" class="span12">
<span class="fg-dark span1">•</span>
<span class="fg-lightBlue fg-hover-dark span11">
<?= $allNews[$index]['title'] ?>
</span>
</a>
</div>
<?php
}
?>
<br/>
<?php
} else {
?>
<div class="">
<span class="fg-lightBlue">No latest stories</span>
</div>
<?php
}
?>
<h4 class="padding5 bg-NACOSS-UNN fg-white">Top Stories</h4>
<?php
$topNews = $news->getTopNews();
if (!empty($topNews)) {
foreach ($topNews as $value) {
?>
<div class="row ntm">
<a href="news_post.php?id=<?= $value['id'] ?>" class="span12">
<span class="fg-dark span1">• </span>
<span class="fg-lightBlue fg-hover-dark span11">
<?= $value['title'] ?>
</span>
</a>
</div>
<?php
}
} else {
?>
<div class="">
<span class="fg-lightBlue">No top stories</span>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="bg-grayLighter">
<div class="padding5">
<div class="row ntm">
<small class="span1" style="padding-top: 15px">Sponsors</small>
<div class="span11">
<div class="row ntm">
<div class="span2">
<a href="http://unn.edu.ng" target="_blank">
<img src="img/sponsors/UNN_Logo.png" alt="" style="height: 50px; width: 50px"/>
</a>
</div>
<div class="span2">
<a href="http://ncs.org.ng" target="_blank">
<img src="img/sponsors/ncs.jpg" alt="" style="height: 50px; width: 50px"/>
</a>
</div>
<div class="span2">
<a href="http://www.ispon.org/" target="_blank">
<img src="img/sponsors/ispon.jpg" alt="" style="height: 50px; width: 50px"/>
</a>
</div>
<div class="span2">
<a href="http://cpn.gov.ng/" target="_blank">
<img src="img/sponsors/cpn.jpg" alt="" style="height: 50px; width: 50px"/>
</a>
</div>
</div>
</div>
</div>
</div>
<br/>
</div>
</div>
<?php require_once './footer.php'; ?>
</div>
</body>
</html>