-
Notifications
You must be signed in to change notification settings - Fork 1
/
view_ch.php
55 lines (46 loc) · 1.76 KB
/
view_ch.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
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#This code provided by:
#Andreas Hadiyono (andre.hadiyono@gmail.com)
#Gunadarma University
require_once './config/application.php';
$path = ltrim($_SERVER['REQUEST_URI'], '/'); // Trim leading slash(es)
$temp_path = explode($REQUEST_CH, $path);
$elements = explode('/', $temp_path[1]); // Split path on slashes
$data = array_filter($elements);
//echo "masuk";
if (count($data) == 0) // No path elements means home
include "./index.php";
else
//untuk main menu
switch ($data[1]) { // Pop off first item and switch
case 'view':
include "view/view_ch.php";
break;
case 'detail':
$id = $purifier->purify($data[2]);
include "view/detail_ch.php";
break;
case 'report':
$KODE = $data[3];
if ($data[2] == "dashboard_report") {
$keyword = $purifier->purify($data[3]);
$status = $purifier->purify($data[4]);
$universitas = $purifier->purify($data[5]);
$country = $purifier->purify($data[6]);
$periode_belajar_start = $purifier->purify($data[7]);
$periode_belajar_end = $purifier->purify($data[8]);
include "./view/dashboard_report.php";
} else {
include "./view/report-view-ch.php";
}
break;
default:
header('HTTP/1.1 404 Not Found');
include "view/404.php";
}
?>