php session_start require_once inc php DB new DB DB- dbConnect Templat

 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
<?php
session_start();
require_once('inc.php');
$DB = new DB();
$DB->dbConnect();
$Template = new Template();
$Forms = new Forms();
$Warning = new Warning();
$Logged = new Logged();
if(!isset($_GET['mod'])){
$_GET['mod'] = 'home';
}
if( $_GET['mod'] !== '404' && !file_exists('C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/new experemental project/modules/'.$_GET['mod'])) $_GET['mod'] = '404';
if (isset($_GET['act'])) $_GET['act'] = htmlspecialchars($_GET['act']);
if(isset($_GET['mod'])) {
$_GET['mod'] = htmlspecialchars($_GET['mod']);
if (isset($_GET['act']) && $_GET['act'] !== ''){
if (!file_exists('C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/new experemental project/modules/'.$_GET['mod'].'/'.$_GET['act'].'.php')){
$_GET['mod'] = '404';
}
}
$Template->ext->assign('inc_file','C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/new experemental project/modules/'.@$_GET['mod'].'/tpl/index.tpl');
require('modules/'.@$_GET['mod'].'/index.php');
}
?>