-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·34 lines (29 loc) · 886 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
<?php
$url=$_SERVER['REQUEST_URI'];
//starting a secured session
session_start();
error_reporting(E_ERROR | E_PARSE);
include("config/connection.php");
include("includes/functions.php");
$mysqli=db_connect();
//breaking the url to many parts
$break=explode("/", $url);
//broken useful parts starts from the array position $start
$start=START;
$uurl=""; //universal/global use purpose url
$i=$start;
while($i<count($break))
{
$uurl=$break[$i]."/";
$i++;
}
$GLOBALS['url']=$uurl;
/*------------------------------------Operations are started from here----------------------------------------*/
$option=$break[$start];
if(($option!="")&&(is_dir("modules/".$option))) $module="modules/".$option;
else
{
please_go('home');
}
include($module."/".$option.".php");
?>