コード例 #1
0
$latestEntriesParams = $faq->getLatest();
if (!isset($latestEntriesParams['error'])) {
    $tpl->parseBlock('rightBox', 'latestEntriesList', array('latestEntriesUrl' => $latestEntriesParams['url'], 'latestEntriesTitle' => $latestEntriesParams['title'], 'latestEntriesDate' => $latestEntriesParams['date']));
} else {
    $tpl->parseBlock('rightBox', 'latestEntriesListError', array('errorMsgLatest' => $latestEntriesParams['error']));
}
if ('artikel' == $action || 'show' == $action || is_numeric($solutionId)) {
    // We need some Links from social networks
    $faqServices = new PMF_Services($faqConfig);
    $faqServices->setCategoryId($cat);
    $faqServices->setFaqId($id);
    $faqServices->setLanguage($lang);
    $faqServices->setQuestion($faq->getRecordTitle($id));
    $faqHelper = new PMF_Helper_Faq($faqConfig);
    $faqHelper->setSsl(isset($_SERVER['HTTPS']) && is_null($_SERVER['HTTPS']) ? false : true);
    $tpl->parseBlock('rightBox', 'socialLinks', array('baseHref' => $faqSystem->getSystemUri($faqConfig), 'writeDiggMsgTag' => 'Digg it!', 'writeFacebookMsgTag' => 'Share on Facebook', 'writeTwitterMsgTag' => 'Share on Twitter', 'writePDFTag' => $PMF_LANG['msgPDF'], 'writePrintMsgTag' => $PMF_LANG['msgPrintArticle'], 'writeSend2FriendMsgTag' => $PMF_LANG['msgSend2Friend'], 'link_digg' => $faqServices->getDiggLink(), 'link_facebook' => $faqServices->getShareOnFacebookLink(), 'link_twitter' => $faqServices->getShareOnTwitterLink(), 'link_email' => $faqServices->getSuggestLink(), 'link_pdf' => $faqServices->getPdfLink(), 'facebookLikeButton' => $faqHelper->renderFacebookLikeButton($faqServices->getLink())));
}
$tpl->parse('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->merge('rightBox', 'index');
//
// Include requested PHP file
//
require_once $includePhp;
//
// Send headers and print template
//
$httpHeader = new PMF_Helper_Http();
$httpHeader->setContentType('text/html');
$httpHeader->addHeader();
if (!DEBUG) {
    ob_start('ob_gzhandler');
コード例 #2
0
ファイル: index.php プロジェクト: Ravikumarsreerama/faq
$latestEntriesParams = $faq->getLatest();
if (!isset($latestEntriesParams['error'])) {
    $tpl->parseBlock('rightBox', 'latestEntriesList', array('latestEntriesUrl' => $latestEntriesParams['url'], 'latestEntriesTitle' => $latestEntriesParams['title'], 'latestEntriesPreview' => $latestEntriesParams['preview'], 'latestEntriesDate' => $latestEntriesParams['date']));
} else {
    $tpl->parseBlock('rightBox', 'latestEntriesListError', array('errorMsgLatest' => $latestEntriesParams['error']));
}
if ('artikel' == $action || 'show' == $action || is_numeric($solutionId)) {
    // We need some Links from social networks
    $faqServices = new PMF_Services($faqConfig);
    $faqServices->setCategoryId($cat);
    $faqServices->setFaqId($id);
    $faqServices->setLanguage($lang);
    $faqServices->setQuestion($faq->getRecordTitle($id));
    $faqHelper = new PMF_Helper_Faq($faqConfig);
    $faqHelper->setSsl(isset($_SERVER['HTTPS']) && is_null($_SERVER['HTTPS']) ? false : true);
    $tpl->parseBlock('rightBox', 'socialLinks', array('writePDFTag' => $PMF_LANG['msgPDF'], 'writePrintMsgTag' => $PMF_LANG['msgPrintArticle'], 'writeSend2FriendMsgTag' => $PMF_LANG['msgSend2Friend'], 'shareOnFacebook' => $faqHelper->renderFacebookShareLink($faqServices->getShareOnFacebookLink()), 'shareOnTwitter' => $faqHelper->renderTwitterShareLink($faqServices->getShareOnTwitterLink()), 'link_email' => $faqServices->getSuggestLink(), 'link_pdf' => $faqServices->getPdfLink(), 'facebookLikeButton' => $faqHelper->renderFacebookLikeButton($faqServices->getLink())));
}
$tpl->parse('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)));
if (DEBUG) {
    $tpl->parseBlock('index', 'debugMode', array('debugExceptions' => implode('<br>', $pmfExeptions), 'debugQueries' => $faqConfig->getDb()->log()));
}
//
// Get main template, set main variables
//
$tpl->parse('index', array_merge($tplMainPage, $tplNavigation));
$tpl->merge('rightBox', 'index');
//
// Include requested PHP file
//
require_once $includePhp;
//
コード例 #3
0
ファイル: index.php プロジェクト: atlcurling/tkt
$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']));
}
if ('artikel' == $action || 'show' == $action || is_numeric($solutionId)) {
    // We need some Links from social networks
    $faqServices = new PMF_Services();
    $faqServices->setCategoryId($cat);
    $faqServices->setFaqId($id);
    $faqServices->setLanguage($lang);
    $faqServices->setQuestion($faq->getRecordTitle($id));
    $faqHelper = PMF_Helper_Faq::getInstance();
    $faqHelper->setSsl(isset($_SERVER['HTTPS']) && is_null($_SERVER['HTTPS']) ? false : true);
    $tpl->processBlock('rightBox', 'socialLinks', array('writeDiggMsgTag' => 'Digg it!', 'writeFacebookMsgTag' => 'Share on Facebook', 'writeTwitterMsgTag' => 'Share on Twitter', 'writeDeliciousMsgTag' => 'Bookmark this on Delicious', 'writePDFTag' => $PMF_LANG['msgPDF'], 'writePrintMsgTag' => $PMF_LANG['msgPrintArticle'], 'writeSend2FriendMsgTag' => $PMF_LANG['msgSend2Friend'], 'link_digg' => $faqServices->getDiggLink(), 'link_facebook' => $faqServices->getShareOnFacebookLink(), 'link_twitter' => $faqServices->getShareOnTwitterLink(), 'link_delicious' => $faqServices->getBookmarkOnDeliciousLink(), 'link_email' => $faqServices->getSuggestLink(), 'link_pdf' => $faqServices->getPdfLink(), 'facebookLikeButton' => $faqHelper->renderFacebookLikeButton($faqServices->getLink())));
}
$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 $includePhp;
//
// Send headers and print template
//
header("Expires: Thu, 07 Apr 1977 14:47: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");