vote notifications

git-svn-id: http://svn.cacert.cl/Software/Voting/vote@55 d4452222-2f33-11de-9270-010000000000
This commit is contained in:
community.cacert.org 2009-06-12 01:41:27 +00:00
parent 553a4dfafa
commit 20b974bff2
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,7 @@
<?php
class DB {
var $board = "cacert-board@lists.cacert.org";
var $notices = "testsympa@lists.cacert.org";
function __construct() {
$this->dbh = new PDO("sqlite:".dirname(__FILE__)."/database.sqlite");
@ -98,6 +99,11 @@ BODY;
mail($this->board, mb_encode_mimeheader($subject,"UTF-8", "B", "\n"),$body,$header."From: Voting System <returns@cacert.org>");
//mail("testsympa@lists.cacert.org",$subject,$body,"From: Voting System <returns@cacert.org>");
}
function vote_notify($subject,$body,$tag)
{
$header = "References: <".$tag.">\r\nIn-reply-to: <".$tag.">\r\n";
mail($this->notices, mb_encode_mimeheader($subject,"UTF-8", "B", "\n"),$body,$header."From: Voting System <returns@cacert.org>");
}
function auth()
{
$stmt = $this->getStatement("get voter");

View file

@ -64,7 +64,7 @@ Kind regards,
the vote system
BODY;
//$db->notify("Re: $tag - $title",$body,$tag);
$db->vote_notify("Re: $tag - $title",$body,$tag);
} else {
?>
<b>Your vote has NOT been registered.</b><br/>