From 6adf639a341b8954e911fce2d2bd3e7443a1426c Mon Sep 17 00:00:00 2001 From: simo Date: Wed, 8 Jun 2005 01:07:55 +0000 Subject: SQL CHANGES: New table CommentNotify with fields: PkgID UserID This implements emailing comment notifications, including a user option to enable/disable it on the package page. It uses php's mail() function to do it and sends to everyone on the notify list as BCC. This needs some more testing before public consumption. --- web/lib/pkgfuncs.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'web/lib') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 16da5b9..451467f 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -434,6 +434,8 @@ function package_details($id=0, $SID="") { 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))) { @@ -443,7 +445,18 @@ function package_details($id=0, $SID="") { print ""; } - print "
\n"; + # 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"; -- cgit v1.2.3-70-g09d2