diff options
author | simo <simo> | 2005-06-08 01:07:55 +0000 |
---|---|---|
committer | simo <simo> | 2005-06-08 01:07:55 +0000 |
commit | 6adf639a341b8954e911fce2d2bd3e7443a1426c (patch) | |
tree | 5e4c0d686db1569ec4c64784e0be5f05c4b68d22 /web/lib | |
parent | 9c004010e3251d8d1b4f7430db22d3d721623577 (diff) | |
download | aurweb-6adf639a341b8954e911fce2d2bd3e7443a1426c.tar.xz |
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.
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/pkgfuncs.inc | 15 |
1 files changed, 14 insertions, 1 deletions
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 "<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"; |