Esempio n. 1
0
} else {
    if (isset($_SERVER['HTTPS']) || !$faqconfig->get('main.useSslForLogins')) {
        $tpl->processTemplate('loginBox', array('writeLoginPath' => $_SERVER['PHP_SELF'] . '?action=login', 'login' => $PMF_LANG['ad_auth_ok'], 'username' => $PMF_LANG['ad_auth_user'], 'password' => $PMF_LANG['ad_auth_passwd'], 'msgRegisterUser' => $faqconfig->get('main.enableRewriteRules') ? '<a href="' . $systemUri . 'register.html">' . $PMF_LANG['msgRegisterUser'] . '</a>' : '<a href="' . $_SERVER['PHP_SELF'] . '?' . $sids . 'action=register">' . $PMF_LANG['msgRegisterUser'] . '</a>', 'msgLoginFailed' => $error));
    } else {
        $tpl->processTemplate('loginBox', array('secureloginurl' => sprintf('https://%s%s', $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']), 'securelogintext' => $PMF_LANG['msgSecureSwitch']));
    }
}
$tpl->includeTemplate('loginBox', 'index');
$toptenParams = $faq->getTopTen();
if (!isset($toptenParams['error'])) {
    $tpl->processBlock('rightBox', 'toptenList', array('toptenUrl' => $toptenParams['url'], 'toptenTitle' => $toptenParams['title'], 'toptenVisits' => $toptenParams['visits']));
} else {
    $tpl->processBlock('rightBox', 'toptenListError', array('errorMsgTopTen' => $toptenParams['error']));
}
$latestEntriesParams = $faq->getLatest();
if (!isset($latestEntriesParams['error'])) {
    $tpl->processBlock('rightBox', 'latestEntriesList', array('latestEntriesUrl' => $latestEntriesParams['url'], 'latestEntriesTitle' => $latestEntriesParams['title'], 'latestEntriesDate' => $latestEntriesParams['date']));
} else {
    $tpl->processBlock('rightBox', 'latestEntriesListError', array('errorMsgLatest' => $latestEntriesParams['error']));
}
$tpl->processTemplate('rightBox', array('writeTopTenHeader' => $PMF_LANG['msgTopTen'], 'writeNewestHeader' => $PMF_LANG['msgLatestArticles'], 'writeTagCloudHeader' => $PMF_LANG['msg_tags'], 'writeTags' => $oTag->printHTMLTagsCloud(), 'msgAllCatArticles' => $PMF_LANG['msgAllCatArticles'], 'allCatArticles' => $faq->showAllRecordsWoPaging($cat)));
$tpl->includeTemplate('rightBox', 'index');
//
// Include requested PHP file
//
require_once $inc_php;
$tpl->printTemplate();
//
// Disconnect from database
//
$db->dbclose();