Exemple #1
0
        $nvCms = $rs::connect($nvBoot, $nvDb, $nvUser, $nvGroup, $nvDept);
        if ($nvBoot->fetch_entry("breadcrumb", 1) == "ajax" || $nvBoot->fetch_entry("breadcrumb", 1) == "debug" && ($nvBoot->fetch_entry("breadcrumb", 2) == "xcache" || $nvBoot->fetch_entry("breadcrumb", 2) == "info" || $nvBoot->fetch_entry("breadcrumb", 2) == "database")) {
            $rs = $nvBoot->test_include("template", $nvVar->fetch_entry("ajax")[0]);
        } else {
            $nvBoot->compress("css", $nvVar->fetch_entry("cssprivate"), "private");
            $nvBoot->compress("js", $nvVar->fetch_entry("jsprivate"), "private");
            $rs = $nvBoot->test_include("template", $nvVar->fetch_entry("template")[0]);
        }
        if ($rs) {
            if ($nvBoot->fetch_entry("breadcrumb", 1) != "ajax" && $nvBoot->fetch_entry("breadcrumb", 1) != "debug") {
                $nvBoot->delete_cache();
                $nvBoot->set_entry("cached", false);
            }
            $nvType = \nvoy\site\Type::connect($nvDb, $nvBoot, $nvVar->fetch_entry("front")[0]);
            $nvField = \nvoy\site\Field::connect($nvDb, $nvGroup, $nvBoot);
            $nvPage = \nvoy\site\Page::connect($nvDb, $nvVar->fetch_entry("front")[0], $nvField, $nvBoot);
            $nvBlock = \nvoy\site\Block::connect($nvDb, $nvBoot, $nvPage, false);
            $nvHtml = \nvoy\site\Html5::connect($nvBoot, $nvVar, false);
            ob_start();
            include $rs;
            $rs = ob_get_clean();
            $rs = preg_replace("/\\s+/", " ", $rs);
            $rs = str_replace(array("[format:newline]", "[format:tab]"), array("\n", "\t"), $rs);
            ob_start();
            $nvBoot->header(array("OK" => true));
            echo $rs;
            ob_end_flush();
        }
        die;
    }
}
Exemple #2
0
 if ($rs == '/' . $nvBoot->fetch_entry('uri')) {
     $nvPage->clear();
     $nvPage->find(array("NID" => $nvVar->fetch_entry('404')[0], "USER" => $nvUser->fetch_entry("type"), "FIELDS" => true));
     $rs = $nvPage->fetch_array();
     if (isset($rs)) {
         $r = array_keys($rs);
         $page = $rs[array_shift($r)];
         $type = $nvType->fetch_by_tid($page["tid"]);
         $nvDept = \nvoy\site\Dept::connect($nvBoot, $nvDb, $nvUser);
         $nvBlock = \nvoy\site\Block::connect($nvDb, $nvBoot, $nvPage, $page);
         $blocks = $nvBlock->fetch_id($page["tid"], $nvUser->fetch_entry("type"));
         $rs = $nvBoot->test_include("template", $type["template"]);
         if ($rs) {
             $nvBoot->compress("css", $nvVar->fetch_entry("csspublic"), "public");
             $nvBoot->compress("js", $nvVar->fetch_entry("jspublic"), "public");
             $nvHtml = \nvoy\site\Html5::connect($nvBoot, $nvVar, $page);
             $nvIc = \nvoy\site\ImageCache::connect($nvDb, $nvBoot);
             ob_start();
             include $rs;
             $rs = ob_get_clean();
             $rs = preg_replace("/\\s+/", " ", $rs);
             $rs = str_replace(array("[format:newline]", "[format:tab]"), array("\n", "\t"), $rs);
             ob_start();
             $nvBoot->header(array("404" => true));
             echo $rs;
             ob_end_flush();
         }
         die;
     }
 } else {
     /* redirect found for non cms page, so head to it */