cvs: pearweb /public_html/pepr pepr-comments-show.php
| From: | Tobias Schlitt | Date: | Wed, 21 Jan 2004 16:09:53 +0000 |
| Subject: | cvs: pearweb /public_html/pepr pepr-comments-show.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-15841@lists.php.net to get a copy of this message | ||
toby Wed Jan 21 11:09:53 2004 EDT
Added files:
/pearweb/public_html/pepr pepr-comments-show.php
Log:
* Proposal comments are viewed here.
http://cvs.php.net/co.php/pearweb/public_html/pepr/pepr-comments-show.php?r=1.1&p=1
Index: pearweb/public_html/pepr/pepr-comments-show.php
+++ pearweb/public_html/pepr/pepr-comments-show.php
<?PHP
require_once 'pepr/pepr.php';
if (empty($_GET['id'])) {
localRedirect("/pepr/pepr-overview.php");
}
response_header("PEPr :: Proposal comments");
$proposal = proposal::get($dbh, $_GET['id']);
if (PEAR::isError($proposal)) {
PEAR::raiseError("Proposal ".$_GET['id']." not found.");
}
$comments = ppComment::getAll($proposal->id, 'package_proposal_comments');
$userInfos = array();
$commentsHTML = "";
if (is_array($comments) && (count($comments) > 0)) {
foreach ($comments as $comment) {
if (empty($userInfos[$comment->user_handle])) {
$userInfos[$comment->user_handle] = user::info($comment->user_handle);
}
$commentsHTML .= "<b>".user_link($comment->user_handle);
$commentsHTML .= " [". date("Y-m-d, H:i", $comment->timestamp)
."]</b><br />";
$commentsHTML .= nl2br($comment->comment)."<br /><br />";
}
} else {
$commentsHTML = "Sorry, there are no comments available.";
}
echo make_link("/pepr/pepr-proposal-show.php?id=".$_GET['id'],
"Back");
$bb = new BorderBox("Proposal comments", "50%", "", 2, true);
$bb->horizHeadRow("Category:", $proposal->pkg_category);
$bb->horizHeadRow("Package:", $proposal->pkg_name);
$bb->horizHeadRow("Proposer:", user_link($proposal->user_handle));
$bb->fullRow($commentsHTML);
$bb->end();
echo make_link("/pepr/pepr-proposal-show.php?id=".$_GET['id'],
"Back");
response_footer();
?>