/** * Shows the statistics page. */ public function Show() { // Get the needed objects. // fetch and show page header global $dontUseWikiDb, $session; BootstrapSkin::displayInternalHeader(); if ($this->requiresWikiDatabase() && $dontUseWikiDb == 1) { // wiki database unavailable, don't show stats page BootstrapSkin::displayAlertBox("This statistics page is currently unavailable.", "alert-error", "Database unavailable", true, false); BootstrapSkin::displayInternalFooter(); die; } // wiki database available OR stats page doesn't need wiki database // check protection level if ($this->isProtected()) { // protected, check accesslevel. $sessionuser = isset($_SESSION['user']) ? $_SESSION['user'] : ""; if (!($session->hasright($sessionuser, "Admin") || $session->hasright($sessionuser, "User"))) { // not authed showlogin(); BootstrapSkin::displayInternalFooter(); die; } } // not protected or access allowed echo '<div class="page-header"><h1>' . $this->getPageTitle() . '</h1></div>'; if ($this->requiresSimpleHtmlEnvironment()) { echo '<div class="row-fluid"><div class="span12">'; BootstrapSkin::pushTagStack("</div>"); BootstrapSkin::pushTagStack("</div>"); } echo $this->execute(); // Display the footer of the interface. BootstrapSkin::displayInternalFooter(); }
/** * Shows the statistics page. */ public function Show() { // Get the needed objects. // fetch and show page header global $dontUseWikiDb; BootstrapSkin::displayInternalHeader(); if ($this->requiresWikiDatabase() && $dontUseWikiDb == 1) { // wiki database unavailable, don't show stats page BootstrapSkin::displayAlertBox("This statistics page is currently unavailable.", "alert-error", "Database unavailable", true, false); BootstrapSkin::displayInternalFooter(); die; } // wiki database available OR stats page doesn't need wiki database // check protection level if ($this->isProtected()) { if (User::getCurrent()->isCommunityUser()) { showlogin(); BootstrapSkin::displayInternalFooter(); die; } $session = new session(); $session->checksecurity(); } // not protected or access allowed echo '<div class="page-header"><h1>' . $this->getPageTitle() . '</h1></div>'; if ($this->requiresSimpleHtmlEnvironment()) { echo '<div class="row-fluid"><div class="span12">'; BootstrapSkin::pushTagStack("</div>"); BootstrapSkin::pushTagStack("</div>"); } echo $this->execute(); // Display the footer of the interface. BootstrapSkin::displayInternalFooter(); }
$sessionuser = $_SESSION['user']; } else { $sessionuser = ""; } BootstrapSkin::displayInternalHeader(); // protect against logged out users if (User::getCurrent()->isCommunityUser()) { showlogin(); BootstrapSkin::displayInternalFooter(); die; } ///////////////// Page code $smarty->display("search/header.tpl"); BootstrapSkin::pushTagStack("</div>"); // span12 BootstrapSkin::pushTagStack("</div>"); // row if (isset($_GET['term']) && isset($_GET['type'])) { $term = $_GET['term']; if ($term == "" || $term == "%") { BootstrapSkin::displayAlertBox("No search term entered.", "alert-error", "", false); $smarty->display("search/searchform.tpl"); BootstrapSkin::displayInternalFooter(); die; } if ($_GET['type'] == "email") { if ($term == "@") { BootstrapSkin::displayAlertBox("The search term '@' is not valid for email address searches!"); $smarty->display("search/searchform.tpl"); BootstrapSkin::displayInternalFooter(); die;