public function renderMainTemplate($_AUIEO_PATH_INFO = false, $isWorkplace = false, $tplHTMLFile = null) { if (method_exists($this, "render")) { $this->render(); } $_AUIEO_FUNCTION_FILE = $_AUIEO_PATH_INFO["filename"]; if (!is_null($tplHTMLFile)) { $this->templateHTMLFile = $tplHTMLFile; $_AUIEO_TEMPLATE_DIR_PATH = $_AUIEO_PATH_INFO["dirname"] . "/"; } else { $_AUIEO_TEMPLATE_DIR_PATH = $_AUIEO_PATH_INFO["dirname"] . "/"; } if ($isWorkplace !== false) { $_AUIEO_TEMPLATE_DIR_PATH = $workplacePath = ClsNaanalApplication::__getWorkplacePath(); } if (!file_exists($_AUIEO_TEMPLATE_DIR_PATH . $_AUIEO_FUNCTION_FILE . ".php") && !file_exists($_AUIEO_TEMPLATE_DIR_PATH . $_AUIEO_FUNCTION_FILE . ".html") && !file_exists($_AUIEO_TEMPLATE_DIR_PATH . $_AUIEO_FUNCTION_FILE . ".htm")) { $_AUIEO_FUNCTION_FILE = "default"; } return $this->renderTemplate($_AUIEO_TEMPLATE_DIR_PATH, $_AUIEO_FUNCTION_FILE); }
public static function getAbsModulePath($module, $action = "create") { $modulePath = self::__renderModulePath($module); $controller = self::getControllerName($module); $wrapper = self::getWrapperName($module); if ($module == "install") { if (!ClsNaanalApplication::isFrameworkInstalled()) { return "{$modulePath}install/"; } if (!isApplicationInstalled()) { return "{$modulePath}install/"; } } $workplacePath = ClsNaanalApplication::__getWorkplacePath(); if (file_exists("{$modulePath}{$module}")) { $modulePath = "{$modulePath}{$module}/"; } else { if (file_exists(AUIEO_FRAMEWORK_PATH . "{$modulePath}{$module}")) { $modulePath = AUIEO_FRAMEWORK_PATH . "{$modulePath}{$module}/"; } else { if (file_exists("{$workplacePath}{$module}.php") || file_exists("{$workplacePath}{$module}_{$action}.php") || file_exists("{$workplacePath}{$controller}.php") || file_exists("{$workplacePath}{$wrapper}.php")) { $modulePath = $workplacePath; } else { $modulePath = false; } } } return $modulePath; }