-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
49 lines (48 loc) · 1.27 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
<?php
require_once("loadall.php");
?>
<?php define("SYSPATH",dirname(__FILE__));?>
<div style="" >
<?php
if(!isset($_GET) || count($_GET)==0){
PageHelper::render("home.php");
}else{
if(isset($_GET['page']) && isset($_GET['mod'])){
$page = trim($_GET['page']);
$module = trim($_GET['mod']);
if(count($_GET)>=2){
if(isset($_GET['page']) && isset($module) && trim($page)!='' && trim($module)!=''){
$pg = PageHelper::render($module.DIRECTORY_SEPARATOR.$page.".php");
if(!$pg){
if($module=="Student"){
if(isset($_SESSION['student'])){
PageHelper::render("./Student/nav.php");
}
PageHelper::render("404.php");
}else{
PageHelper::render("home.php");
}
}else{
if(!PageHelper::render($module.DIRECTORY_SEPARATOR.$page.".php")){
PageHelper::render("home.php");
}else{
PageHelper::render($module.DIRECTORY_SEPARATOR.$page.".php");
}
}
}else{
PageHelper::render("home.php");
}
}
}
else{
PageHelper::render("home.php");
}
}
?>
<?php
/*
* Using 10 to denote doesnt exist
*
*/
?>
</div>