summaryrefslogtreecommitdiff
path: root/motions.php
diff options
context:
space:
mode:
authorcommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>2009-05-29 08:06:52 +0000
committercommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>2009-05-29 08:06:52 +0000
commit9ac3298bf43024f1669f15ee55f6528f8e1b029e (patch)
tree3aef2427f190b022f48dee746e93ac5f6905c0a1 /motions.php
parent1d33c70c0e791bed95138a2d6f2d1f901642ba5e (diff)
downloadcacert-boardvoting-9ac3298bf43024f1669f15ee55f6528f8e1b029e.tar.gz
cacert-boardvoting-9ac3298bf43024f1669f15ee55f6528f8e1b029e.tar.xz
cacert-boardvoting-9ac3298bf43024f1669f15ee55f6528f8e1b029e.zip
add show outstanding votes option for board members
git-svn-id: http://svn.cacert.cl/Software/Voting/vote@47 d4452222-2f33-11de-9270-010000000000
Diffstat (limited to 'motions.php')
-rw-r--r--motions.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/motions.php b/motions.php
index 2f56af4..f4ebdac 100644
--- a/motions.php
+++ b/motions.php
@@ -3,9 +3,10 @@
$db = new DB();
$db->closeVotes();
$page = is_numeric($_REQUEST['page'])?$_REQUEST['page']:1;
+ $user = $db->auth();
if ($_REQUEST['withdrawl'] && $_REQUEST['confirm'] && $_REQUEST['id']) {
- if (!($user = $db->auth())) {
+ if (!$user) {
header("HTTP/1.0 302 Redirect");
header("Location: denied.php");
exit();
@@ -44,6 +45,9 @@ BODY;
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
+ <?php
+ if ($user) echo '<a href="?unvoted=1">Show my outstanding votes</a><br/>';
+ ?>
<table class="list">
<tr>
<th>Status</th>
@@ -55,8 +59,14 @@ BODY;
$stmt = $db->getStatement("list decision");
$stmt->execute(array($_REQUEST['motion']));
} else {
- $stmt = $db->getStatement("list decisions");
- $stmt->execute(array($page));
+ if ($user && $_REQUEST['unvoted']) {
+ $stmt = $db->getStatement("list my unvoted decisions");
+ $stmt->bindParam(":id",$user['id']);
+ } else {
+ $stmt = $db->getStatement("list decisions");
+ }
+ $stmt->bindParam(":page",$page);
+ $stmt->execute();
}
$items = 0;
$id = -1;