diff options
author | Jan Dittberner <jandd@cacert.org> | 2017-04-20 20:58:22 +0200 |
---|---|---|
committer | Jan Dittberner <jan@dittberner.info> | 2017-04-22 00:12:38 +0200 |
commit | b6ad5d8ad327066b21bdb690f5a5017f6bed9740 (patch) | |
tree | 6bd3420f4389a684c575aee792271bad64ef0d52 /remind.php | |
parent | dcdd5f715f4800d02b04841054342ea2e44d950e (diff) | |
download | cacert-boardvoting-b6ad5d8ad327066b21bdb690f5a5017f6bed9740.tar.gz cacert-boardvoting-b6ad5d8ad327066b21bdb690f5a5017f6bed9740.tar.xz cacert-boardvoting-b6ad5d8ad327066b21bdb690f5a5017f6bed9740.zip |
Implement reminder job
Diffstat (limited to 'remind.php')
-rwxr-xr-x | remind.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/remind.php b/remind.php deleted file mode 100755 index b3ce74c..0000000 --- a/remind.php +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/php -<? -require_once("database.php"); -$db = new DB(); - -$id = 0; -$page = 1; - -$voters = $db->getStatement('get reminder voters'); -$voters->execute(); - -$outstanding = $db->getStatement('list my unvoted decisions'); -$outstanding->bindParam(':id',$id); -$outstanding->bindParam(':page',$page); - -while ($v = $voters->fetch()) { - $id = $v['id']; - $outstanding->execute(); - $msg =''; - while ($row=$outstanding->fetch()) { - $msg .= ($row['votetype'] ? 'vote ' : 'motion ') . $row['tag'] . ' ' . $row['title'] . "\nDue: " . $row['due'] . "\nhttps://community.cacert.org/board/motions.php?motion=" . $row['tag'] . "\n\n"; - } - if ($msg) { - // form email - $name = $v['name']; - $body = <<<BODY -Dear $name, - -You have not voted in the following CAcert Board vote(s)/motion(s): - -$msg - - -To view all your outstanding motions: https://community.cacert.org/board/motions.php?unvoted=1 - -Kind regards, -the vote system - -BODY; - $db->remind_notify($v['email'],"Outstanding CAcert board votes",$body); - } -} -?> |