From a6fea98782bfc2e1f3de6cbafbb0461c541fa634 Mon Sep 17 00:00:00 2001 From: Mark Lipscombe Date: Sun, 2 Aug 2009 11:27:28 +0000 Subject: [PATCH] Remove ability to modify motions. git-svn-id: http://svn.cacert.cl/Software/Voting/vote@69 d4452222-2f33-11de-9270-010000000000 --- motion.php | 130 ++++++++++++++-------------------------------------- motions.php | 1 - 2 files changed, 34 insertions(+), 97 deletions(-) diff --git a/motion.php b/motion.php index 2dec354..536de03 100644 --- a/motion.php +++ b/motion.php @@ -23,91 +23,30 @@ getStatement("update decision"); - $stmt->bindParam(":id",$_POST['motion']); - $stmt->bindParam(":proponent",$user['id']); - $stmt->bindParam(":title",$_POST['title']); - $stmt->bindParam(":content",$_POST['content']); - $stmt->bindParam(":due",$_POST['due']); - $stmt->bindParam(":votetype",$_POST['votetype']); - if ($stmt->execute()) { - ?> - The motion has been proposed!
- Back to motions
-
-
- getStatement("get decision")->execute(array($_POST['motion']))?$db->getStatement("get decision")->fetch():array(); - $name = $user['name']; - $tag = $decision['tag']; - $title = $decision['title']; - $content =$decision['content']; - $due = $decision['due']." UTC"; - $votetype = !$decision['votetype'] ? 'motion' : 'veto'; - $baseurl = "https://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].preg_replace('/motion\.php/','',$_SERVER['REQUEST_URI']); - $voteurl = $baseurl."vote.php?motion=".$decision['id']; - $unvoted = $baseurl."motions.php?unvoted=1"; - $body = <<notify("Re: $tag - $title - modified",$body,$tag); - } else { - ?> - The motion has NOT been proposed!
- Back to motions
- \n",$stmt->errorInfo()); ?>
-
-
- getStatement("create decision"); - $stmt->bindParam(":proponent",$user['id']); - $stmt->bindParam(":title",$_POST['title']); - $stmt->bindParam(":content",$_POST['content']); - $stmt->bindParam(":votetype",$_POST['votetype']); - $stmt->bindParam(":due",$_POST['due']); - if ($stmt->execute()) { - ?> - The motion has been proposed!
- Back to motions
-
-
- getStatement("get new decision")->execute()?$db->getStatement("get new decision")->fetch():array(); - $name = $user['name']; - $tag = $decision['tag']; - $title = $decision['title']; - $content =$decision['content']; - $due = $decision['due']." UTC"; - $votetype = !$decision['votetype'] ? 'motion' : 'veto'; - $baseurl = "https://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].preg_replace('/motion\.php/','',$_SERVER['REQUEST_URI']); - $voteurl = $baseurl."vote.php?motion=".$decision['id']; - $unvoted = $baseurl."motions.php?unvoted=1"; - $body = <<getStatement("create decision"); + $stmt->bindParam(":proponent",$user['id']); + $stmt->bindParam(":title",$_POST['title']); + $stmt->bindParam(":content",$_POST['content']); + $stmt->bindParam(":votetype",$_POST['votetype']); + $stmt->bindParam(":due",$_POST['due']); + if ($stmt->execute()) { + ?> + The motion has been proposed!
+ Back to motions
+
+
+ getStatement("get new decision")->execute()?$db->getStatement("get new decision")->fetch():array(); + $name = $user['name']; + $tag = $decision['tag']; + $title = $decision['title']; + $content =$decision['content']; + $due = $decision['due']." UTC"; + $votetype = !$decision['votetype'] ? 'motion' : 'veto'; + $baseurl = "https://".$_SERVER['HTTP_HOST'].":".$_SERVER['SERVER_PORT'].preg_replace('/motion\.php/','',$_SERVER['REQUEST_URI']); + $voteurl = $baseurl."vote.php?motion=".$decision['id']; + $unvoted = $baseurl."motions.php?unvoted=1"; + $body = <<notify("$tag - $title",$body,$tag,TRUE); - } else { - ?> - The motion has NOT been proposed!
- Back to motions
- \n",$stmt->errorInfo()); ?>
-
-
- notify("$tag - $title",$body,$tag,TRUE); + } else { + ?> + The motion has NOT been proposed!
+ Back to motions
+ \n",$stmt->errorInfo()); ?>
+
+
+ getStatement("get decision"); if ($stmt->execute(array($_REQUEST['motion']))) { diff --git a/motions.php b/motions.php index 533f33a..20b4653 100644 --- a/motions.php +++ b/motions.php @@ -115,7 +115,6 @@ BODY;
  • Abstain
  • Naye
  • Proxy Vote
  • -
  • Modify
  • Withdraw