a valid Document ID */ function getSubmitSuccessPage($iDocumentID){ global $default; $sMessage = "Your submission has been successful."; $sToRender .= "$sMessage

graphicsUrl/widgets/back.gif\" border=\"0\" />"; return $sToRender; } /** * Renders the heading for the page * * @param $sHeading -> text heading for the page */ function renderHeading($sHeading) { global $default; $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sColor = $default->siteMap->getSectionColour($sSectionName, "th"); $sToRender = "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "
$sHeading
\n"; return $sToRender; } /** * Renders the path for the document * * @param $fDocumentID -> a valid document ID */ function renderDocumentPath($iDocumentID) { global $default; $oDocument = & Document::get($iDocumentID); $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; $sDocumentPath .= "rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . ""; return "
$sDocumentPath
\n"; } /** * Display the ADD COMMENT page * * @param $fDocumentID -> a valid Document ID * @param $sSubject -> a Subject text * @param $sBody -> a Body text */ function getAddComment($fDocumentID, $sSubject, $sBody, $iCommentID, $fNewComment = null) { global $default; $sHeading = "Add a Comment"; $sToRender .= renderHeading($sHeading); $sToRender .= renderDocumentPath($fDocumentID); $sToRender .= "\n"; $sToRender .= ""; if($fNewComment>0){ // If user is creating a new comment $sToRender .= "\n"; }else { // If the user is replying to a comment $sToRender .= "\n"; } $sToRender .= "
\n"; $sToRender .= "
graphicsUrl/widgets/submit.gif\">graphicsUrl/widgets/cancel.gif\" border=0 >
graphicsUrl/widgets/cancel.gif\" border=0 >
Subject\n"; $sToRender .= "
Body
\n"; return $sToRender; } /** * Display the comment: Body text included * Prints out 1 comment * User needs to call this function many times to list all comments * * @param $sCommentBody -> Some body text * @param $iComment Subject -> Some subject text * @param $dDate -> Date comment was created * @param $iDocumentID -> a valid document ID * @param $sUserName -> Name of creator of comment */ function getCommentBody($sCommentBody, $sCommentSubject,$dDate,$iDocumentID, $sUserName) { global $default; $sHeading = "Document Comment"; $sToRender .= renderHeading($sHeading); $sToRender .= renderDocumentPath($iDocumentID); $sToRender .= "
 Author: $sUserName"; $sToRender .= ""; $sToRender .= ""; $sToRender .= ""; $sToRender .= "
Subject: $sCommentSubjectDate: $dDate

$sCommentBody
"; return $sToRender; } ?>