forked from Linutux/bastels-PHP-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
51 lines (45 loc) · 1.29 KB
/
Copy pathindex.php
File metadata and controls
51 lines (45 loc) · 1.29 KB
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
<?php
// something by bastelfreak, who knows...
// Erzwingen das Session-Cookies benutzt werden und die SID nicht per URL transportiert wird
ini_set( 'session.use_only_cookies', '1' );
ini_set( 'session.use_trans_sid', '0' );
// Session starten
session_start();
$debug = true;
/* Start - Errorhandling */
if($debug === true){
ini_set("display_errors", "on");
}
else{
ini_set("display_errors", "off");
}
error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
/* End - Errorhandling */
require(dirname(__FILE__)."/int_res/bootstrap.php");
require(rootPathFr.usermanagement);
require(rootPathFr.templateEngine);
$Configuration = new Config;
$Praefix = $Configuration->Site_Praefix;
$Suffix = $Configuration->Site_Suffix;
$Basement = new basement;
if(!isset($_GET["site"]) && !isset($_GET["modul"])){
Header("Location: ?site=welcome");
die();
}
elseif(isset($_GET["site"]) && file_exists($Praefix.$_GET["site"].$Suffix)){
require($Praefix.$_GET['site'].$Suffix);
if(isset($Output) && !empty($Output)){
echo $Output;
}
}
elseif(isset($_GET["modul"])){
// alle variablen noch absichern
if(isset($_GET["page"])){
require("modules/".$_GET['modul']."/php/".$_GET['page'].".php");
}
}
else{
echo "Something is wrong, please contact the admin at webmaster@framework.bastelfreak.de";
}
?>