Example #1
0
<? require("blocks/scripts.php"); ?>
<title>Официальный сайт клана Пламя - <? echo $page->title; ?></title>
</head>
<body>
	<div id="wrapper">
    	<? require("blocks/header.php"); ?>
        <div id="body">
        	<? require("blocks/left.php"); ?>
            <? require("blocks/right.php"); ?>
            <div id="content">
				<? require("blocks/menu.php"); ?>
                <div id="contentText">
                   <?php 
if (empty($cat) && empty($id)) {
    try {
        $category->printCategories($categories);
    } catch (DataException $e) {
        die(require "blocks/errorTemplate.php");
    }
} else {
    if (!empty($cat) && empty($id)) {
        echo "<div id='navigation'><p><a href='catalog.php'>Каталог</a> \\ " . $page->title . "</p></div>";
        switch ($item->dataCount) {
            case 0:
                echo "<div id='noData'><p>Заметок в данной категории не обнаружено</p></div>";
                break;
            default:
                $item->printData($items);
                $item->printPages($pageData[0], $pageData[1], "catalog.php?cat=" . $item->cat . "&page=");
                break;
        }
Example #2
0
    $inc_php = $action . ".php";
    $writeLangAdress = $_SERVER['PHP_SELF'] . "?" . str_replace("&", "&amp;", $_SERVER["QUERY_STRING"]);
} else {
    if (isset($solution_id) && is_numeric($solution_id)) {
        // show the record with the solution ID
        $inc_tpl = 'template/artikel.tpl';
        $inc_php = 'artikel.php';
    } else {
        $inc_tpl = "template/main.tpl";
        $inc_php = "main.php";
    }
    $writeLangAdress = $_SERVER['PHP_SELF'] . "?" . $sids;
}
// load templates
$tpl = new phpmyfaqTemplate(array("index" => 'template/index.tpl', "writeContent" => $inc_tpl));
$main_template_vars = array("title" => $PMF_CONF["title"] . $title, "header" => $PMF_CONF["title"], "metaDescription" => $PMF_CONF["metaDescription"], "metaKeywords" => $PMF_CONF["metaKeywords"] . $keywords, "metaPublisher" => $PMF_CONF["metaPublisher"], "metaLanguage" => $PMF_LANG["metaLanguage"], "metaCharset" => $PMF_LANG["metaCharset"], "dir" => $PMF_LANG["dir"], "msgCategory" => $PMF_LANG["msgCategory"], "showCategories" => $tree->printCategories($cat), "searchBox" => $PMF_LANG["msgSearch"], "languageBox" => $PMF_LANG["msgLangaugeSubmit"], "writeLangAdress" => $writeLangAdress, "switchLanguages" => selectLanguages($LANGCODE), "userOnline" => userOnline() . $PMF_LANG["msgUserOnline"], 'writeTopTenHeader' => $PMF_LANG['msgTopTen'], 'writeTopTenRow' => generateTopTen($LANGCODE), 'writeNewestHeader' => $PMF_LANG['msgLatestArticles'], 'writeNewestRow' => generateFiveNewest($LANGCODE), 'copyright' => 'Etelegate.net');
if (isset($PMF_CONF["mod_rewrite"]) && $PMF_CONF["mod_rewrite"] == "TRUE") {
    $links_template_vars = array("faqHome" => $_SERVER['PHP_SELF'], "msgSearch" => '<a href="search.html">' . $PMF_LANG['msgAdvancedSearch'] . '</a>', "msgAddContent" => '<a href="addcontent.html">' . $PMF_LANG["msgAddContent"] . '</a>', "msgQuestion" => '<a href="ask.html">' . $PMF_LANG["msgQuestion"] . '</a>', "msgOpenQuestions" => '<a href="open.html">' . $PMF_LANG["msgOpenQuestions"] . '</a>', "msgHelp" => '<a href="help.html">' . $PMF_LANG["msgHelp"] . '</a>', "msgContact" => '<a href="contact.html">' . $PMF_LANG["msgContact"] . '</a>', "backToHome" => '<a href="index.html">' . $PMF_LANG["msgHome"] . '</a>', "allCategories" => '<a href="showcat.html">' . $PMF_LANG["msgShowAllCategories"] . '</a>', "writeSendAdress" => 'search.html', 'showSitemap' => '<a href="sitemap-A_' . $lang . '.html">' . $PMF_LANG['msgSitemap'] . '</a>');
} else {
    $links_template_vars = array("faqHome" => $_SERVER['PHP_SELF'], "msgSearch" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=search">' . $PMF_LANG['msgAdvancedSearch'] . '</a>', "msgAddContent" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=add">' . $PMF_LANG["msgAddContent"] . '</a>', "msgQuestion" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=ask">' . $PMF_LANG["msgQuestion"] . '</a>', "msgOpenQuestions" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=open">' . $PMF_LANG["msgOpenQuestions"] . '</a>', "msgHelp" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=help">' . $PMF_LANG["msgHelp"] . '</a>', "msgContact" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=contact">' . $PMF_LANG["msgContact"] . '</a>', "allCategories" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=show">' . $PMF_LANG["msgShowAllCategories"] . '</a>', "backToHome" => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . '">' . $PMF_LANG["msgHome"] . '</a>', "writeSendAdress" => $_SERVER['PHP_SELF'] . "?" . $sids . "action=search", 'showSitemap' => '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=sitemap">' . $PMF_LANG['msgSitemap'] . '</a>');
}
if (DEBUG) {
    $debug_template_vars = array('debugMessages' => '<p>DEBUG INFORMATION:<br />' . $db->sqllog() . '</p>');
} else {
    // send headers and print template
    @header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    @header("Cache-Control: no-store, no-cache, must-revalidate");
    @header("Cache-Control: post-check=0, pre-check=0", false);
    @header("Pragma: no-cache");
    @header("Content-type: text/html; charset=" . $PMF_LANG["metaCharset"]);