-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
112 lines (82 loc) · 3.71 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
/* ==========================================================================*\
|| ######################################################################## ||
|| # MMInc PHP # ||
|| # Project: FishingNumbers # ||
|| # $Id: $ # ||
|| # $Date: $ # ||
|| # $Author: $ # ||
|| # $Rev: $ # ||
|| # -------------------------------------------------------------------- # ||
|| # @Copyright (C) 2010 - Cameron Barr, Magnetic Merchandising Inc. # ||
|| # @license GNU/GPL http://www.gnu.org/copyleft/gpl.html # ||
|| # -------------------------------------------------------------------- # ||
|| # http://www.magneticmerchandising.com info@magneticmerchandising.com # ||
|| ||
|| # -------------------------------------------------------------------- # ||
|| ######################################################################## ||
\*========================================================================== */
// #### load required javascript ###############################################
$jsinclude = array(
'functions',
'ajax',
'inline',
'cron',
'jquery',
'modal',
'autocomplete',
'tabfx'
);
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);
define('LOCATION', 'cms');
define('CMSDIR', dirname(__FILE__) . '/cms/');
if (!defined('JPATH_BASE'))
define('JPATH_BASE', CMSDIR);
require_once('./functions/config.php');
if (file_exists(dirname(__FILE__) . '/defines.php')) {
include_once dirname(__FILE__) . '/defines.php';
}
require_once JPATH_BASE . '/includes/framework.php';
// #### require backend ########################################################
// save the ilance session
$session_cache = $_SESSION;
$k = session_id();
// set the joomla template always to iLance initially. SHould be available for change after.
JRequest::setVar('template', 'ilance');
// get the application
$cms = JFactory::getApplication('site', array('session' => true));
session_id($k);
// Initialise the application.
// This method calls JFactory::getUser which starts a session for the app if none exists
$cms->initialise();
$_SESSION = array_merge($_SESSION, $session_cache);
jimport('joomla.plugin.helper');
jimport('joomla.language.helper');
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
// get the iLance session back in there.
// Route the application.
$cms->route();
// Mark afterRoute in the profiler.
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
// Dispatch the application.
$cms->dispatch();
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$_SESSION = array_merge($_SESSION, $session_cache);
// Mark afterDispatch in the profiler.
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
// Render the application.
$cms->render();
JDEBUG ? $_PROFILER->mark('afterRender') : null;
// Mark afterRender in the profiler.
JDEBUG ? $_PROFILER->mark('afterRender') : null;
// Return the response.
ob_start();
echo $cms;
$cmsout = ob_get_clean();
$pprint_array = array('cmsout', 'login_include', 'headinclude', 'onload', 'area_title', 'page_title', 'site_name', 'https_server', 'http_server', 'lanceads_header', 'lanceads_footer');
$ilance->template->fetch('main', '/../cms.html');
$ilance->template->parse_hash('main', array('ilpage' => $ilpage));
$ilance->template->parse_if_blocks('main');
$ilance->template->pprint('main', $pprint_array);
exit();