Location: PHPKode > projects > DIY Blog > diy-blog/backend.php
<?php

/**
 * Includes classes required by the backend application and runs the backend Controller.
 * Handles all HTTP requests for backend. Base backend URL should be rewritten to be handled by this file.
 * @package	diy-blog
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

require("common.php");

define("APP_DIR", MAIN_DIR."backend/");
define("APP_CONTR_DIR", APP_DIR."controller/");
define("APP_VIEW_DIR", APP_DIR."view/");

require(APP_VIEW_DIR."notFound/NotFoundView.class.php");
require(APP_VIEW_DIR."error/ErrorView.class.php");
require(APP_VIEW_DIR."forbidden/ForbiddenView.class.php");
require(APP_VIEW_DIR."admin/AdminView.class.php");
require(APP_VIEW_DIR."files/FilesView.class.php");
require(APP_VIEW_DIR."comments/CommentsView.class.php");
require(APP_VIEW_DIR."pageList/PageListView.class.php");
require(APP_VIEW_DIR."pageCreate/CreatePageView.class.php");
require(APP_VIEW_DIR."pageEdit/EditPageView.class.php");
require(APP_VIEW_DIR."postList/PostListView.class.php");
require(APP_VIEW_DIR."postCreate/CreatePostView.class.php");
require(APP_VIEW_DIR."postEdit/EditPostView.class.php");
require(APP_VIEW_DIR."userList/UserListView.class.php");
require(APP_VIEW_DIR."userEdit/EditUserView.class.php");
require(APP_VIEW_DIR."userCreate/CreateUserView.class.php");

require(MAIN_DIR."frontend/controller/FrontEndMapping.class.php");

function __autoload($classname)
{
	if (file_exists(MAIN_DIR."view/".$classname.".class.php")) require(MAIN_DIR."view/".$classname.".class.php");

	if (file_exists(APP_CONTR_DIR.$classname.".class.php")) require(APP_CONTR_DIR.$classname.".class.php");
	if (file_exists(APP_CONTR_DIR."forms/".$classname.".class.php")) require(APP_CONTR_DIR."forms/".$classname.".class.php");
	if (file_exists(APP_CONTR_DIR."exceptions/".$classname.".class.php")) require(APP_CONTR_DIR."exceptions/".$classname.".class.php");
	if (file_exists(APP_VIEW_DIR.$classname.".class.php")) require(APP_VIEW_DIR.$classname.".class.php");

	if (file_exists(MODEL_DIR.$classname.".php")) require(MODEL_DIR.$classname.".php");

	DIYFrameworkLoader::__autoload($classname, "lib/diy-framework/classes/diy-framework/");
}

BackEndController::getInstance()->process(Request::getInstance(), Response::getInstance(), BackEndMapping::getInstance());

?>
Return current item: DIY Blog