-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
366 lines (320 loc) · 11.8 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
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<?php
require_once realpath(__DIR__ . '/.') . "/vendor/autoload.php";
require_once __DIR__ . "/html_tag_helpers.php";
// Setup some additional prefixes for DBpedia
\EasyRdf\RdfNamespace::set('dbc', 'http://dbpedia.org/resource/Category:');
\EasyRdf\RdfNamespace::set('dbo', 'http://dbpedia.org/ontology/');
\EasyRdf\RdfNamespace::set('dbpedia', 'http://dbpedia.org/property/');
\EasyRdf\RdfNamespace::set('dbr', 'http://dbpedia.org/resource/');
\EasyRdf\RdfNamespace::set('gold', 'http://purl.org/linguistics/gold/');
\EasyRdf\RdfNamespace::set('dbp', 'http://dbpedia.org/property/');
$sparql = new \EasyRdf\Sparql\Client('http://dbpedia.org/sparql');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, width=device-width" />
<title></title>
<meta name="description" content="" />
<link rel="stylesheet" href="./public/css/global.css" />
<link rel="stylesheet" href="./public/css/home-page.css" />
<link rel="stylesheet" href="./public/css/output.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.2.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" />
</head>
<body>
<div class="homepage-div">
<div class="navigation-bar-div2">
<div class="innernavbar-div2">
<button class="logo-button1" id="logoButton">
<img class="logo-icon8" alt="" src="public/logo.svg" />
<div class="unisearch-div5">
<span class="uni-span1">Uni</span><span class="search-span2">Search</span>
</div>
<img class="logo-icon9" alt="" src="public/logo4.svg" />
</button>
<div class="menu-right-div2">
<div class="menu-right-div2">
<div class="menu-right-div2">
<div class="activelink-div1">
<div class="search-around-the-world2 ">
Search Around The World
</div>
<div class="rectangle-div5"></div>
</div>
<div class="search-in-indonesia2" id="searchInIndonesia">
Search in Indonesia
</div>
</div>
<div class="menu-div2">
<img class="vector-icon6" alt="" src="public/vector.svg" /><img class="vector-icon6" alt="" src="public/vector1.svg" /><img class="vector-icon6" alt="" src="public/vector1.svg" />
</div>
</div>
<button class="button-variant1" id="buttonVariant">
<div class="button-div2">Search</div>
</button>
</div>
</div>
</div>
<div class="hero-div1">
<div class="herosection-div1">
<div class="herocta-div1">
<div class="copywriting-div1">
<div class="rectangle-div6"></div>
<div class="rectangle-div7"></div>
<b class=" discover-your-favourite-univer1 ">Discover Your Favourite University</b>
<div class="lets-help-you-to-know-more-ab1 text-white">
Let’s Help You To Know More About Your Favourite University
</div>
</div>
<!-- Search -->
<form method="GET" class="searchform">
<div class="frame-div11">
<div class="frame-div12">
<div class="frame-div13">
<div class="search-div3">
<img class="search-icon3" alt="" src="public/search3.svg" />
</div>
<div class="seach-your-favourite-universit1">
<input name="country" placeholder="Search Country" class="focus:outline-none w-[100%]" type="text">
</div>
</div>
<button class="buttonsearch1" id="buttonSearch">
<div class="search-div4">
<img class="search-icon4" alt="" src="public/search2.svg" />
</div>
</button>
</div>
</div>
</form>
</div>
<img class="woman-image-icon1" alt="" src="public/pict.png" />
</div>
</div>
<?php
$result="";
if (isset($_GET['country'])) {
$getCountry = $_GET['country'];
$getCountry = str_replace(' ', '_', ucwords($getCountry));
$result = $sparql->query(
'SELECT DISTINCT ?country ?nama ?univ WHERE {' .
' ?univ rdf:type dbo:University;' .
' dbo:abstract ?desc ;' .
' dbp:name ?nama.' .
' ?univ dbp:country dbr:' . $getCountry . ' .' .
' dbr:' . $getCountry . ' dbp:commonName ?country .' .
'FILTER langMatches (lang(?desc),"EN")' .
'FILTER langMatches (lang(?nama),"EN")' .
'FILTER langMatches (lang(?country),"EN")' .
'} ORDER BY ?nama '
);
}
?>
<?php
if($result):
?>
<div class="my-5 w-[80%] m-auto">
<table id="example" class="table table-striped text-[25px] " style="width:100%">
<thead>
<tr>
<td>No</td>
<td>Name</td>
<td>Country</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<?php
$id = 1;
foreach ($result as $row) :
if ($row->nama != "") :
?>
<tr class="p-2">
<td><?= $id ?></td>
<td><?= $row->nama ?></td>
<td><?= $row->country ?></td>
<td>
<form method="POST" action="./details.php">
<input type="hidden" name="nama_univ" value="<?=$row->univ?>" />
<input type="hidden" name="nama_negara" value="<?=$row->country?>" />
<button class="bg-green-500 p-2 rounded-lg text-white text-lg"> ACTION</button>
</form>
</td>
</tr>
<?php $id++; ?>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
<tfoot>
<tr>
<td>No</td>
<td>Name</td>
<td>Country</td>
<td>Action</td>
</tr>
</tfoot>
</table>
</div>
<?php endif; ?>
<div class="brands-div1">
<div class="logo-div2">
<img class="logo-icon8" alt="" src="public/logo5.svg" />
<div class="unisearch-div6">UniSearch</div>
<img class="logo-icon9" alt="" src="public/logo11.svg" />
</div>
</div>
<?php
///////
$all_univ=$sparql->query(
'SELECT DISTINCT (COUNT(*) AS ?res) WHERE {' .
' ?univ rdf:type dbo:University .' .
' ?univ dbo:abstract ?desc .' .
' ?univ dbp:country ?country .' .
' ?univ dbp:name ?nama .' .
'FILTER langMatches (lang(?desc),"EN")' .
'FILTER langMatches (lang(?nama),"EN")' .
'}'
);
foreach($all_univ as $res)
{
$all_univ=$res->res;
}
////////////////////
$indo_univ = $sparql->query(
'SELECT DISTINCT (COUNT(*) AS ?res) WHERE {' .
' ?univ rdf:type dbo:University .' .
' ?univ dbo:abstract ?desc .' .
' ?univ dbp:name ?nama .' .
' ?univ dbp:country dbr:Indonesia .' .
' dbr:Indonesia dbp:commonName ?country .' .
'FILTER langMatches (lang(?desc),"EN")' .
'FILTER langMatches (lang(?nama),"EN")' .
'FILTER langMatches (lang(?country),"EN")' .
'}'
);
foreach($indo_univ as $res)
{
$indo_univ=$res->res;
}
?>
<div class="totaluniversity-div1">
<div class="inner-div3">
<div class="how-many-data-do-we-have-in-un1">
How many data do we have in UniSearch?
</div>
<div class="count-div1">
<div class="dataworld-div1">
<b class="b2"><?=$all_univ ?></b>
<div class="universities-data-around-the1">
Universities’ Data Around The World
</div>
</div>
<div class="dataworld-div1">
<b class="b2"><?=$indo_univ?></b>
<div class="universities-data-around-the1">
Universities’ Data in Indonesia
</div>
</div>
</div>
</div>
</div>
<div class="footer-div2">
<div class="innernavbar-div2">
<button class="brandname-button">
<div class="unisearch-div7">UniSearch</div>
<img class="logo-icon12" alt="" src="public/logo7.svg" />
</button>
<div class="links-div5">
<div class="about-div2">
<div class="about-us-div2">About Us</div>
<div class="search-around-the-world2">
Kelompok 3 Web Semantik
</div>
<div class="search-around-the-world2">Contact Us</div>
</div>
<div class="about-div2">
<div class="about-us-div2">Quick Links</div>
<a class="search-university-around-the-w2">Search University Around The World </a><a class="search-university-in-indonesia2" href="./public/css/indonesia-univ-page.php" id="searchUniversityIn">Search University in Indonesia</a>
</div>
<div class="more-div4">
<div class="search-around-the-world2">More</div>
<div class="frame-div14">
<div class="search-around-the-world2">
Kenzie Fubrianto | 211402139
</div>
<div class="search-around-the-world2">
Steven Valentino | 211402127
</div>
<div class="search-around-the-world2">
M. Ariyo Syahraza | 211402055
</div>
<div class="search-around-the-world2">
Nadya Zahra | 211402019
</div>
<div class="search-around-the-world2">
Raihan Jamilah R. Hasibuan | 211402022
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var logoButton = document.getElementById("logoButton");
if (logoButton) {
logoButton.addEventListener("click", function() {
var anchor = document.querySelector("[data-scroll-to='heroContainer']");
if (anchor) {
anchor.scrollIntoView({
block: "start",
behavior: "smooth"
});
}
});
}
var searchInIndonesia = document.getElementById("searchInIndonesia");
if (searchInIndonesia) {
searchInIndonesia.addEventListener("click", function(e) {
window.location.href = "./indonesia-univ-page.php";
});
}
var buttonVariant = document.getElementById("buttonVariant");
if (buttonVariant) {
buttonVariant.addEventListener("click", function() {
var anchor = document.querySelector(
"[data-scroll-to='heroSectionContainer']"
);
if (anchor) {
anchor.scrollIntoView({
block: "start",
behavior: "smooth"
});
}
});
}
var buttonSearch = document.getElementById("buttonSearch");
if (buttonSearch) {
buttonSearch.addEventListener("click", function(e) {
window.location.href = "/";
});
}
var searchUniversityIn = document.getElementById("searchUniversityIn");
if (searchUniversityIn) {
searchUniversityIn.addEventListener("click", function(e) {
window.location.href = "./indonesia-univ-page.php";
});
}
</script>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.min.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable();
});
</script>
</body>
</html>