39ed7*/ /* * ToolBox - http://www.smartdrop.com.hk * Copyright (C) SmartDrop Ltd * * == BEGIN LICENSE == * * Note: Removal of this header is a breach of license. * * Licensed under the terms of any of the following licenses at your choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * Created: January 14, 2013 */ include '../_inc/prefixEn.php'; /** * Extract controller & param */ $TB_controller = 'home'; if (isset($_GET['controller']) && !strpos($_GET['controller'], '.php')){ $TB_controller = $_GET['controller']; } if (isset($_GET['param'])) { $TB_param = explode("/", $_GET['param']); } /** * Overwrite example * switch ($TB_controller) { case 'login': $TB_controller = "loginV2"; break; } * */ /** * Load Contronller */ $TB_controllerPath = "../controllers/ctrl_".$TB_controller.".php"; if (!file_exists($TB_controllerPath)){ echo "Error view: ".$TB_controllerPath." not found"; } else { include $TB_controllerPath; } /** * Load View */ $TB_viewPath = "../views/".$TB_view.".php"; if (!file_exists($TB_viewPath)){ echo "Error view: ".$TB_viewPath." not found"; } else { include $TB_viewPath; } ?>