<?php /* Include base classes ------------------------------*/ require_once MAIN_DIR . "/classes/class.subloader" . FILE_EXT; $SubLoader = new SubLoader(MAIN_DIR . "/classes"); $SubLoader->RunIncludes(); /* PHPZevelop setup ------------------------------*/ $PHPZevelop = new PHPZevelop(); require_once ROOT_DIR . "/config" . FILE_EXT; /* Set Local directory (should be a slash '/' followed by the containing directory/ies with no trailing slash) ------------------------------*/ define("LOCAL_DIR", "/" . rtrim(ltrim(substr($_SERVER["PHP_SELF"], 0, strlen($_SERVER["PHP_SELF"]) - strlen("index" . FILE_EXT) - 1), "/"), "/")); /* Get page path (should be the path after LOCAL_DIR with no trailing slash and query string removed) ------------------------------*/ $inter = explode("?", rtrim(ltrim(substr($_SERVER["REQUEST_URI"], strlen(LOCAL_DIR)), "/"), "/")); $PHPZevelop->CFG->PagePath = array_shift($inter); unset($inter); /* Check if current path is a MultiSite ------------------------------*/ $PHPZevelop->CFG->IsMultiSite = false; if (isset($PHPZevelop->CFG->MultiSite) && count($PHPZevelop->CFG->MultiSite) > 0) { foreach ($PHPZevelop->CFG->MultiSite as $alias => $directory) { if (is_numeric($alias)) { $alias = $directory; } $alias = ltrim($alias, "/"); if (strtok($PHPZevelop->CFG->PagePath, "/") == $alias || substr(strrchr(LOCAL_DIR, "/"), 1) == $alias) { $PHPZevelop->CFG->PagePath = substr($PHPZevelop->CFG->PagePath, strlen($alias)); $PHPZevelop->CFG->Site = $directory;
<?php /* Include all classes ------------------------------*/ $SubLoader = new SubLoader($PHPZevelop->CFG->SiteDirRoot); $SubLoader->RunIncludes(array("classes")); extract($SubLoader->DefinedVariables);
<?php /* Include all classes ------------------------------*/ $SubLoader = new SubLoader($PHPZevelop->CFG->SiteDirRoot); $SubLoader->RunIncludes(array("../common", "classes")); extract($SubLoader->DefinedVariables);
<?php /* Include all classes ------------------------------*/ $SubLoader = new SubLoader($PHPZevelop->CFG->SiteDirRoot); $SubLoader->RunIncludes(array("../common/", "classes", "functions")); extract($SubLoader->DefinedVariables); // Early instantiate if (file_exists($PHPZevelop->CFG->SiteDirRoot . "/instantiate" . FILE_EXT)) { require_once $PHPZevelop->CFG->SiteDirRoot . "/instantiate" . FILE_EXT; } // Logout if restricted if ($PHPZevelop->CFG->PagePath != "/login" && isset($Administrator) && !$Administrator->LoggedIn()) { $PHPZevelop->Location("login"); } // Find Tables $TablesReal = array(); $Tables = array(); $TableInformation = array(); foreach ($DB->Query("SELECT * FROM information_schema.tables t WHERE t.table_schema='" . $DatabaseName . "'") as $Item) { if (isset($Item["TABLE_NAME"])) { $TablesReal[] = $Item["TABLE_NAME"]; $Tables[$Item["TABLE_NAME"]] = str_replace("_", " ", ucfirst($Item["TABLE_NAME"])); $TableInformation[$Item["TABLE_NAME"]] = array(); foreach ($Item as $K => $V) { $TableInformation[$Item["TABLE_NAME"]][strtolower($K)] = $V; } } } $TableOptions = array(); foreach ($TablesReal as $Table) {