forked from templaza/tz_guestbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtz_guestbook.php
45 lines (30 loc) · 1.28 KB
/
tz_guestbook.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
<?php
/*------------------------------------------------------------------------
# TZ Guestbook Extension
# ------------------------------------------------------------------------
# author TuNguyenTemPlaza
# copyright Copyright (C) 2012 templaza.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.templaza.com
# Technical Support: Forum - http://templaza.com/Forum
-------------------------------------------------------------------------*/
defined('_JEXEC') or die;
$option = JRequest::getCmd('option');
$view =JRequest::getCmd('view','guestbook');
$controllerName = $view;
$task = JRequest::getVar('task');
$controlletPath=JPATH_COMPONENT.DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$controllerName.'.php';
if(file_exists($controlletPath)){
require_once($controlletPath);
}
else{
echo"not exist path";
}
$controllerClass='Tz_guestbookController'.ucfirst($controllerName);
if(class_exists($controllerClass))
$controller=new $controllerClass;
else
echo "not exist class";
$controller->execute(JRequest::getVar('task'));
$controller->redirect();
?>