-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (46 loc) · 926 Bytes
/
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
<?php
require 'config.php';
$api = new Jadwal();
if (isset($_GET) == TRUE) {
if(!$_GET['api']){
$err['success'] = 0;
$err['message'] = "Mana API nya bangsat";
echo json_encode($err);
exit();
}
if($_GET['api'] == "Mz19Dmsdo21ka10"){
//Menampilkan data Static
if($_GET['show']){
$show = strtolower(strval($_GET['show']));
if($show == "jadwal"){
if($_GET['hari']){
if($_GET['jam']){
$hari = $api->dayEngToInd($_GET['hari']);
}
exit();
}
echo json_encode($api->jadwal());
exit();
}
if($show == "guru"){
echo json_encode($api->guru());
exit();
}
if($show == "pr"){
echo json_encode($api->pr());
exit();
}
if($show = "ulg"){
echo json_encode($api->ulg());
exit();
}
}
}
$err['success'] = 0;
$err['message'] = "API lu salah goblok";
echo json_encode($err);
exit();
}
$row['error'] = "Lu kesini tanpa minta API makdujya gomana";
echo json_encode($row);
?>