break; } $json = $line["content"]; $json_decoded = json_decode($json); echo "<ul class='nav nav-tabs' role='tablist'>\n"; $aux_class = " class='active'"; foreach ($json_decoded->views as $tab) { $title = htmlspecialchars($tab->title); echo "<li{$aux_class}><a href='#{$tab->id}' role='tab' data-toggle='tab'>{$title}</a></li>\n"; $aux_class = ""; } echo "</ul>\n<div class='tab-content'>\n"; $aux_class = " active"; foreach ($json_decoded->views as $tab) { echo "<div class='tab-pane{$aux_class}' id='{$tab->id}''><br>\n"; DrawPageSection($tab->elements); echo "</div>\n"; $aux_class = ""; } echo "</div>\n"; break; case "modal": if ($line["element-type"] != "modal") { ModuleLoadError("modal", $id); break; } $json = $line["settings"]; $json_decoded = json_decode($json); $title = htmlspecialchars($line["displayname"]); $content = $line["content"]; $id2 = $id . "Label";
} } elseif ($type == "404") { Show404Error(); } elseif ($type == "blog") { //main constructors are in blog-engine.php LoadModule("blog-page", "display", $page); } echo "<br>"; //spacing needed for proper footer display //draw footer reading from JSON descriptor file $json = file_get_contents("core/footer-structure.json"); $json_decoded = json_decode($json); //print footer from JSON structure, contents in DB if ($json_decoded->type == "footer") { echo "<div class='footer'>\n <div class='container'>\n <p class='text-muted'>"; DrawPageSection($json_decoded->elements); echo "</p></div></div>"; } else { ModuleLoadError("footer", "file_load_error"); } //load JS scripts echo "<script src='assets/js/jquery-1.11.2.min.js'></script>"; $scripts = array_unique(array_filter(explode(",", $GLOBALS["addjs_assets"]))); foreach ($scripts as $script) { if ($script != "") { echo "<script src='assets/js/{$script}'></script>\n"; } } echo "<script src='assets/js/bootstrap.min.js'></script>\n"; if ($config->navbar_hover) { echo "<script src='assets/js/bootstrap-hover-dropdown.min.js'></script>\n";