// kb_view_article.php - Display a single knowledge base article
//
// SiT (Support Incident Tracker) - Support call tracking system
// Copyright (C) 2000-2009 Salford Software Ltd. and Contributors
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//
// Authors: Ivan Lucas <ivanlucas[at]users.sourceforge.net>, Tom Gerrard
$permission = 54;
// View KB
require 'core.php';
require APPLICATION_LIBPATH . 'functions.inc.php';
// This page requires authentication
require APPLICATION_LIBPATH . 'auth.inc.php';
$title = $strKnowledgeBaseArticle;
if (!empty($_REQUEST['id'])) {
    $id = cleanvar($_REQUEST['id']);
}
if (!empty($_REQUEST['kbid'])) {
    $id = cleanvar($_REQUEST['kbid']);
}
if (empty($id)) {
    header("Location: kb.php");
    exit;
}
include APPLICATION_INCPATH . 'htmlheader.inc.php';
echo "<h2>" . icon('kb', 32) . " {$strKnowledgeBaseArticle}</h2>";
echo kb_article($id);
include APPLICATION_INCPATH . 'htmlfooter.inc.php';
Beispiel #2
0
<?php

// kbarticle.php - Display a single portal knowledge base article
//
// SiT (Support Incident Tracker) - Support call tracking system
// Copyright (C) 2000-2009 Salford Software Ltd. and Contributors
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//
// Author Kieran Hogg <kieran[at]sitracker.org>
require '..' . DIRECTORY_SEPARATOR . 'core.php';
require APPLICATION_LIBPATH . 'functions.inc.php';
$accesslevel = 'any';
if ($CONFIG['portal_kb_enabled'] !== 'Public') {
    include APPLICATION_LIBPATH . 'portalauth.inc.php';
}
$can_view = FALSE;
if (!empty($_REQUEST['id'])) {
    $id = cleanvar($_REQUEST['id']);
    $can_view = is_kb_article($id, 'public');
}
if (empty($id) or !$can_view) {
    header("Location: kb.php");
    exit;
}
include APPLICATION_INCPATH . 'portalheader.inc.php';
echo "<h2>" . icon('kb', 32) . " {$strKnowledgeBaseArticle}</h2>";
echo kb_article($id, 'external');
echo "<p align='center'><a href='kb.php'>{$strBackToList}</a></p>";
include APPLICATION_INCPATH . 'htmlfooter.inc.php';