forked from tydaikho/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tuiyo.php
78 lines (64 loc) · 2.28 KB
/
tuiyo.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
<?php
/**
* ******************************************************************
* TuiyoTableUsers Class/Object for the Tuiyo platform *
* ******************************************************************
* @copyright : 2008 tuiyo Platform *
* @license : http://platform.tuiyo.com/license BSD License *
* @version : Release: $Id$ *
* @link : http://platform.tuiyo.com/ *
* @author : livingstone[at]drstonyhills[dot]com *
* @access : Public *
* @since : 1.0.0 alpha *
* @package : tuiyo *
* ******************************************************************
*/
/**
* no direct access
*/
defined('_JEXEC') || die('Restricted access');
/**
* component path
*/
if(!defined('TUIYO_ADMIN')){
define('TUIYO_ADMIN_PATH' , dirname(__FILE__));
define('TUIYO_PATH' , JPATH_COMPONENT_SITE );
}
/**
* Tuiyo Interface
*/
JRequest::setVar('tmpl' , 'component');
/**
* Main Requires
*/
require_once (TUIYO_PATH.DS.'helpers'.DS.'defines.php' );
require_once (TUIYO_PATH.DS.'helpers'.DS.'loader.php' );
require_once (TUIYO_PATH.DS.'helpers'.DS.'timer.php' );
require_once (TUIYO_PATH.DS.'helpers'.DS.'initiate.php' );
/**
* Initiate the Application Interface
*/
$START =& TuiyoInitiate::start() ;
$DOCU =& $GLOBALS['API']->get('document');
// Require specific controller if requested
require_once TUIYO_ADMIN_PATH.DS.'controllers'.DS.'tuiyo.php';
/**
* Prepare the controllers
**/
$controller = JRequest::getWord('context', '');
$path = TUIYO_ADMIN_PATH.DS.'controllers'.DS.strtolower($controller).'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = 'Tuiyo';
}
// Create the controller
$classname = 'TuiyoController'.ucfirst($controller);
$controller = new $classname( );
// Add some Requirements
$DOCU->startBuild();
$DOCU->addJSDefines();
//Execule the task
$controller->execute( JRequest::getVar( 'do' ) );
// Redirect if set by the controller
$controller->redirect();