$id = $user[$_SERVER['PHP_AUTH_USER']]['id']; if (OS_WINDOWS) { $sReferrer = $_SERVER['HTTP_USER_AGENT']; // Check if this is IE 6 if (strstr($sReferrer, 'MSIE 6.0')) { header('Content-Type: application/rss+xml; charset=utf-8;'); header('Content-Disposition: inline; filename="rss.xml"'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); } } if (KTUtil::arrayGet($_REQUEST, 'docId')) { // if a docId parameter is passed // get document id from http request object $iDocumentId = KTUtil::arrayGet($_REQUEST, 'docId'); if (KTrss::validateDocumentPermissions($id, $iDocumentId)) { // if document passes validation check // get document info $aDocumentInfo[] = KTrss::getOneDocument($iDocumentId, $id); if ($aDocumentInfo) { // create rss xml for document $documentFeed = KTrss::arrayToXML($aDocumentInfo); } else { // create rss xml for the error $error = KTrss::errorToXML(_kt('This document has returned a empty response')); } } else { // create rss xml for error $error = KTrss::errorToXML(_kt('You are either not authorised to view details on this document or it does not exist.' . ' Please visit http://' . $_SERVER['HTTP_HOST'] . '/' . $GLOBALS['KTRootUrl'] . '/ to browse for a valid document.')); } if (isset($error)) {