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 .= "| $sHeading |
\n";
$sToRender .= "
\n";
$sToRender .= "
\n";
$sToRender .= "
\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 "\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";
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 .= "| Subject: | $sCommentSubject | ";
$sToRender .= "Date: $dDate |
$sCommentBody | ";
$sToRender .= "
";
return $sToRender;
}
?>