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.
This commit is contained in:
simo 2005-06-08 01:07:55 +00:00
parent 9c004010e3
commit 6adf639a34
18 changed files with 188 additions and 15 deletions

View file

@ -434,6 +434,8 @@ function package_details($id=0, $SID="") {
print "<td><form action='/packages.php' method='post'>\n";
print "<input type='hidden' name='IDs[".$row["ID"]."]' value='1'>\n";
print "<input type='hidden' name='ID' value='".$row["ID"]."'>\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 "<input type='submit' class='button' name='do_UnVote'";
print " value='".__("Un-Vote")."'>";
}
print "</form></td>\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 "<input type='submit' class='button' name='do_Notify'";
print " value='".__("Notify")."'>";
} else {
print "<input type='submit' class='button' name='do_UnNotify'";
print " value='".__("UnNotify")."'>";
}
print "</form></td>\n";
}
print "</tr>\n";