/
index.php
executable file
·53 lines (48 loc) · 1.38 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
50
51
52
53
<?php
/**
* @author HANCHYGUY
* @author hanchyguy@yahoo.com
* @copyright 2011
* @license It can be used in any of your project at free of cost without removing this very comments
* */
//require('system/functions.php');
//header('location: '.'admin-itech/');
error_reporting(1);
include_once 'system/config.php';
//forceRedirect(BASE_ADMIN_URL);
$myDb = new PDODatabase();
//getSiteLink('','');
if (!isset($_SESSION['page_id'])) {
$_SESSION['page_id'] = 1;
}
if ($_GET) {
//var_dump($_GET);
} else {
$_SESSION['page_id'] = 1;
}
if (!isset($_SESSION['lang_type'])) {
$_SESSION['lang_type'] = '';
}
#FrontEnd Modules and their templates. If no template is defined default template is taken. It can be referred as Controllers of Joomla
$arrFrontModules = array('Contact', 'Pages');
$arrFrontTemplate = array(
'Home' => 'mainTemplate.inc',
'Contact' => 'mainTemplate.inc',
'Pages' => 'pagesTemplate.inc'
);
//var_dump($_GET);
$strModule = getREQUEST('module');
//
//
if (!in_array($strModule, $arrFrontModules))
$strModule = 'Home';
//echo $strModule;die();
$strTemplate = array_key_exists($strModule, $arrFrontTemplate) ? $arrFrontTemplate[$strModule] : $arrFrontTemplate['Home'];
//echo $strTemplate;die();
ob_start();
include(TPL . $strTemplate);
//echo $strModule;die();
$strContent = ob_get_contents();
ob_end_clean();
echo $strContent;
?>