if ($vote == "tellaye") { $vote = "aye"; } if ($vote == "tellno") { $vote = "no"; } if ($vote) { $votewithmajority = $vote == ($row["aye_majority"] >= 0 ? "aye" : "no") ? "majority" : "minority"; } else { $votewithmajority = "novote"; } $style = " style=\"background-color: " . ($votewithmajority == "majority" ? "#9f9" : ($votewithmajority == "minority" ? "#f99" : "#fee")) . "\""; // add some colour for now print "<li class=\"{$votewithmajority}\"{$style}>"; print "(" . $row["divisiondate"] . ")\n"; $actiontext = $row["text_body"] ? extract_action_text_from_wiki_text($row["text_body"]) : array("title" => $row["division_name"]); $action = $actiontext[$vote]; //print_r($actiontext); if ($action) { print "voted " . $action; } else { if ($vote) { print "voted <em>{$vote}</em> on <i>" . $actiontext["title"] . "</i>"; } else { print ($vote ? "voted {$vote}" : "did not vote") . " on \"" . $actiontext["title"] . "\""; } } // could include info if it was a rebel vote print "(<a href=\"{$divhref}\">details...</a>)"; print "</li>\n"; }
print "The <b>".($house=="lords"?"Not-Contents":"Noes")."</b> had a Majority of ".(-$ayenodiff)." (".$row["noes"]." to ".$row["ayes"].")"; else print "The vote was a <b>tie</b> (".$row["ayes"]." to ".$row["noes"].")"; print " with ".$row["tellers"]." tellers"; if ($row['both'] != 0) print " and ".$row["boths"]." voting both"; print ", making a turnout of " . ($row["noes"] + $row["ayes"] + $row["tellers"] + $row["boths"]); print ". "; if ($ayenodiff == 0) print " <b>This means the Speaker will cast his vote in favour of the Government.</b>"; #print " Aye majority=".$divattr["aye_majority"]."."; print "</p>\n"; */ # cross-over case listing vote of single MP if ($votertype == "mp") { $actiontext = extract_action_text_from_wiki_text($motion_data['text_body']); //print "<pre>"; //print_r($actiontext); //print "</pre>"; print "<p class=\"mpondivision\"><a href=\"mp.php?" . $voter['mpanchor'] . "\">" . $voter['name'] . ($house == "lords" ? "</a>" : " MP, " . $voter['constituency'] . "</a>"); if ($actiontext[$vote]) { print " voted <em>" . $actiontext[$vote] . "</em>"; } else { if (($vote == 'aye' || $vote == 'tellaye' || $vote == 'no' || $vote == 'tellno') && $ayenodiff != 0) { if (($vote == 'aye' || $vote == 'tellaye') == $ayenodiff >= 0) { print " voted <em>with the majority</em>"; } else { print " voted <em>in the minority</em>"; } if ($vote == 'aye') { print $house == "lords" ? " (Content)." : " (Aye).";