$thispage = $divattr["divhref"]; if (!$singlemotionpage) { $thispageswap = $divattr2["divhref"]; if ($divattr2["division_date"] != $divattr["division_date"]) { $thispage .= "&date2=" . $divattr2["division_date"]; $thispageswap .= "&date2=" . $divattr["division_date"]; } $thispage .= "&number2=" . $divattr2["division_number"]; $thispageswap .= "&number2=" . $divattr["division_number"]; } $tpdisplay = $display == "summary" ? "" : "&display={$display}"; $tpsort = $sort == "party" ? "" : "&sort={$sort}"; if ($votertype == "dreammp") { $tpsort .= "&dmp={$voter}"; } $second_links = dismodes_to_second_links($thispage, $dismodes, $tpsort, $display); # Display title and second nav links $second_type = "tabs"; pw_header(); # Summary if ($dismode["summarytext"]) { // alternatively this could sum from pw_whip_cache $query = "SELECT sum(vote = 'aye') AS ayes,\n\t\t\t\t\t\t sum(vote = 'no') AS noes,\n\t\t\t\t\t\t sum(vote = 'both') AS boths,\n\t\t\t\t\t\t sum(vote = 'tellaye' or vote = 'tellno') AS tellers\n\t\t\t\t FROM pw_vote WHERE division_id = ?"; $row = $pwpdo->get_single_row($query, array($div_id)); print "<p>"; $ayenodiff = $row["ayes"] - $row["noes"]; /*if ($ayenodiff > 0) print "The <b>".($house=="lords"?"Contents":"Ayes")."</b> had a Majority of ".($ayenodiff)." (".$row["ayes"]." to ".$row["noes"].")"; elseif ($row['ayes'] < $row['noes']) print "The <b>".($house=="lords"?"Not-Contents":"Noes")."</b> had a Majority of ".(-$ayenodiff)." (".$row["noes"]." to ".$row["ayes"].")"; else
$title = "Voting Comparison - " . $mpprop['fullname'] . "<br> to " . $voter2attr["mpprop"]['fullname']; } else { if ($dismode["possfriends"] == "all") { $title = "Friends of " . $mpprop['name'] . " " . $mpprop['housenamesuffix'] . $contitlecomma; } else { if ($voter1attr["bmultiperson"]) { $title = "Voting Record - " . $mpprop['housenounplural'] . " " . $contitlefor; } else { $title = "Voting Record - " . $mpprop['fullname'] . " (" . $mpprop["person"] . ")"; } } } } // now build up the links # make list of links to other display modes $second_links = dismodes_to_second_links($thispage, $dismodes, "", $display); if ($rdismodes_parl) { $second_links2 = $second_links; $second_links = array(); foreach ($rdismodes_parl as $lrdisplay => $val) { $dlink = $thispage . "&parliament={$lrdisplay}&display={$display}"; array_push($second_links, array('href' => $dlink, 'current' => $rdisplay_parliament == $lrdisplay ? "on" : "off", 'text' => $val["lkdescription"])); } } // we apply a date range to the $second_type = "tabs"; pw_header(); # extract the events in this mp's life # the events that have happened in this MP's career if ($dismode["eventsinfo"]) { # generate ministerial events (maybe events for general elections?)