diff options
Diffstat (limited to 'motions.php')
-rw-r--r-- | motions.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/motions.php b/motions.php index bbf1825..a4df212 100644 --- a/motions.php +++ b/motions.php @@ -18,8 +18,13 @@ <th>Actions</th> </tr> <?php - $stmt = $db->getStatement("list decisions"); - $stmt->execute(array($page)); + if ($_REQUEST['id']) { + $stmt = $db->getStatement("list decision"); + $stmt->execute(array($_REQUEST['id'])); + } else { + $stmt = $db->getStatement("list decisions"); + $stmt->execute(array($page)); + } $items = 0; while ($row = $stmt->fetch()) { $items++; @@ -34,7 +39,7 @@ ?> </td> <td> - <i><?php echo $row['tag'] ?></i><br/> + <i><a href="motions.php?id=<?php echo $row['tag'].'">'.$row['tag']; ?></a></i><br/> <b><?php echo $row['title']; ?></b><br/> <pre><?php echo $row['content']; ?></pre> <br/> @@ -52,10 +57,12 @@ while ($vrow = $vstmt->fetch()) { echo "<i>".$vrow['name']." ".$state[$vrow['vote']+1]."</i><br/>"; } + } else { + echo '<i><a href="motions.php?id='.$row['tag'].'&showvotes=1">Show Votes</a></i><br/>'; } ?> - </td><?php - ?><td class="actions"> + </td> + <td class="actions"> <?php if ($row['status'] == 0) { ?> |