From 52d6df0f62987597963c775db930b47a76ef23c8 Mon Sep 17 00:00:00 2001 From: simo Date: Sat, 11 Jun 2005 02:55:30 +0000 Subject: Reorganized package details page --- web/lang/en/pkgfuncs_po.inc | 6 ++++ web/lib/pkgfuncs.inc | 87 ++++++++++++++++++++++++++++----------------- 2 files changed, 60 insertions(+), 33 deletions(-) diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc index c2b48ee9..2cc4b6f7 100644 --- a/web/lang/en/pkgfuncs_po.inc +++ b/web/lang/en/pkgfuncs_po.inc @@ -103,4 +103,10 @@ $_t["en"]["Any"] = "Any"; $_t["en"]["Voted"] = "Voted"; +$_t["en"]["No New Comment Notification"] = "No New Comment Notification"; + +$_t["en"]["New Comment Notification"] = "New Comment Notification"; + +$_t["en"]["Comments"] = "Comments"; + ?> \ No newline at end of file diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index b3e51d84..525bc67b 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -384,9 +384,59 @@ function package_details($id=0, $SID="") { print "\n"; print ""; print "\n"; + print "\n"; + print " "; + print "\n"; + print "\n"; + print "\n"; + print " \n"; + print "\n"; + + print "
\n"; - # Display package comments + # Actions Bar + # + if ($SID) { + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "
".__("Actions")."
\n"; + print "\n"; + print "\n"; + # Voting Button + # + $q = "SELECT * FROM PackageVotes WHERE UsersID = ".uid_from_sid($SID); + $q.= " AND PackageID = ".$row["ID"]; + if (!mysql_num_rows(db_query($q, $dbh))) { + print ""; + } else { + print ""; + } + # Comment Nofify Button + # + $q = "SELECT * FROM CommentNotify WHERE UserID = ".uid_from_sid($SID); + $q.= " AND PkgID = ".$row["ID"]; + if (!mysql_num_rows(db_query($q, $dbh))) { + print ""; + } else { + print ""; + } + print "

\n"; + } + + # Comments # + print "\n"; + print "\n"; + print "\n"; + print "\n"; - print "\n"; - print "
".__("Comments")."
"; + + print "\n"; $comments = package_comments($row["ID"]); if (!empty($comments)) { while (list($indx, $carr) = each($comments)) { @@ -431,42 +481,13 @@ function package_details($id=0, $SID="") { print __("Add Comment")."\">"; print "\n"; print " "; - if ($SID) { - print "\n"; - } print "\n"; print "
\n"; - print "\n"; - print "\n"; - # Voting Button - # - $q = "SELECT * FROM PackageVotes WHERE UsersID = ".uid_from_sid($SID); - $q.= " AND PackageID = ".$row["ID"]; - if (!mysql_num_rows(db_query($q, $dbh))) { - print ""; - } else { - print ""; - } - # Comment Nofify Button - # - $q = "SELECT * FROM CommentNotify WHERE UserID = ".uid_from_sid($SID); - $q.= " AND PkgID = ".$row["ID"]; - if (!mysql_num_rows(db_query($q, $dbh))) { - print ""; - } else { - print ""; - } - print "
\n"; - print "\n"; - print "
\n"; + + print "\n"; + } } return; -- cgit v1.2.3-24-g4f1b