[insert_php]
$db = mysql_connect(“206.123.72.209″,”builzio_dad”,”AnmheAnrwe1″);
if(!$db) die(“Error connecting to database.”);
mysql_select_db(“builzio_decisions” ,$db);
$action=$_POST[‘submit’];
$propid=$_POST[‘propid’];
$title=$_POST[‘title’];
$proposal=$_POST[‘proposal’];
$ok2quickreact=$_POST[‘ok2quickreact’];
$ok2consent=$_POST[‘ok2consent’];
[/insert_php]
UP
Which Proposal?
Full Proposal:
// IF FETCHING AN EXISTING PROPOSAL...
if ($action=="Fetch") {
$title=$_POST['title'];
$sql = "SELECT * FROM proposals where title='$title' AND datedone='0000-00-00'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$propid = $row['propid'];
$proposal =$row['proposal'];
$ok2quickreact =$row['ok2quickreact'];
$ok2consent =$row['ok2consent'];
$lastupdated =$row['lastupdated'];
};
[/insert_php]
LAST UPDATED:[insert_php] echo $lastupdated; [/insert_php] CENTRAL
IF ($propid=="") {$display="none";} ELSE {$display="inline";} [/insert_php]
Clarifying Round
$target="clarify"; include('refresh.php'); [/insert_php]
if($action=="Ask") {
$myquestion=$_POST['myquestion'];
$myquestion = str_replace("'","’",$myquestion);
$myquestion = str_replace('"','’',$myquestion);
$sql="INSERT INTO questions (propid,question) VALUES ('$propid','$myquestion')";
$result=mysql_query($sql);
}
[/insert_php]
[insert_php] //
$sql = "SELECT * FROM questions WHERE propid='$propid' ORDER BY qid ASC";
if(! $sql ) { die('Could not find table: ' . mysql_error());}
$result = mysql_query($sql);
if(! $result ) { die('Could not get data: ' . mysql_error());}
while ($row = mysql_fetch_assoc($result)) {
$qid = $row['qid'];
$question = $row['question'];
$answer = $row['answer'];
echo '
‘;
echo ‘Q:
‘;
echo ‘A:
‘;
}
echo ‘
‘;
[/insert_php]
IF (($propid=="" AND $ok2quickreact!="1") OR ($propid!="" AND $ok2quickreact=="1")) {$display="none";} ELSE {$display="inline";} [/insert_php]
include('hiddenvalues.php'); [/insert_php]
IF ($ok2quickreact==0 || $ok2quickreact=="") {$display="none";} ELSE {$display="inline";} [/insert_php]
Quick Reaction Round
$target="quick"; include('refresh.php'); [/insert_php]
//
$sql = "SELECT * FROM reactions WHERE propid='$propid' ORDER BY reactionid ASC";
if(! $sql ) { die('Could not find table: ' . mysql_error());}
$result = mysql_query($sql);
if(! $result ) { die('Could not get data: ' . mysql_error());}
$y=1;
while ($row = mysql_fetch_assoc($result)) {
$reactionid = $row['reactionid'];
$reaction = $row['reaction'];
echo '
‘;
echo $y.’.
‘;
$y++;
}
echo ‘
‘;
[/insert_php]
IF ($ok2consent==1) {$display="none";} ELSE {$display="inline";} [/insert_php]
include('hiddenvalues.php'); [/insert_php]
if($action=="Submit Reaction") {
$myreaction=$_POST['myreaction'];
$myreaction = str_replace("'","’",$myreaction);
$myreaction = str_replace('"','’',$myreaction);
$sql="INSERT INTO reactions (propid,reaction) VALUES ('$propid','$myreaction')";
$result=mysql_query($sql);
}
[/insert_php]
IF ($ok2consent==0 || $ok2consent=="") {$display="none";} ELSE {$display="inline";} [/insert_php]
Consent Round
if($action=="Yes") {
$sql="UPDATE proposals
SET yeas = yeas+1 WHERE propid='$propid'";
$result=mysql_query($sql);
}
if($action=="No") {
$sql="UPDATE proposals
SET nays = nays+1 WHERE propid='$propid'";
$result=mysql_query($sql);
}
[/insert_php]
Is this proposal good-enough-for-now and safe-enough-to-try?
Or, do you have a reasoned objection to this proposal?
(ie. Is there something about it that will prevent you from contributing to our group’s aims?
[insert_php] include(‘hiddenvalues.php’); [/insert_php]
include('displayvalues.php'); // troubleshooting only [/insert_php]