Example #1
0
    }
    if ($display == "slab") {
        $mptabattr["slabtable"] = "yes";
        $mptabattr["showwhich"] = "allpossible";
        $mptabattr["sortby"] = "party_slab";
        $mptabattr["favourvote"] = $divattr["aye_majority"] >= 0 ? "aye" : "no";
        // or no
        $mptabattr["numcolumns"] = 11;
        $mptabattr["tooltips"] = "walterzorn";
        $mptabattr["headings"] = "";
        $tableclass = "rvotes";
    } else {
        $tableclass = "votes";
    }
    print "<table class=\"{$tableclass}\" id=\"votetable\">\n";
    mp_table($mptabattr);
    print "</table>\n";
}
if ($dismode["listsimilardivisions"]) {
    # comment out lazy evaluation that is done to completion in a separate job.
    #fill_division_distances($db, $db2, $divattr["house"], $divattr);
    $divtabattr = array("showwhich" => 'everyvote', "headings" => 'columns', "sortby" => 'closeness', "limitby" => $dismode["listsimilardivisions"] == 'short' ? "10" : "", "divclose" => $divattr, "display_house" => $divattr["house"]);
    if ($dismode["listsimilardivisions"] == "thisparliament") {
        $divtabattr["parldatelimit"] = $parliaments[$divattr["parliament"]];
    }
    #print "<h2><a name=\"simdiv\">Similar Divisions</a></h2>";
    print "<p>Divisions where the " . ($divattr["house"] == "lords" ? "Lords" : "MPs") . "\n                voted in a similar way to the\n                division on this page.  Click 'details...' to see which\n                votes differ between the two divisions.</p>";
    print "<table class=\"votes\">\n";
    print "</tr>";
    division_table($db, $divtabattr);
    print "</table>\n";
Example #2
0
                $mpprop = $lmpprop;
            }
        }
    }
    $mptabattr = array("listtype" => 'mpdistance', 'mpfriend' => $mpprop, 'house' => $mpprop['house'], 'headings' => 'yes');
    if ($dismode["possfriends"] == "some") {
        $mptabattr["limit"] = 5;
    }
    print "<h2><a name=\"friends\">";
    if ($dismode["possfriends"] == "all") {
        print "All ";
    }
    print "Possible Friends";
    if ($dismode["possfriends"] != "all") {
        print " (<a href=\"{$thispage}&display=allfriends\">more...</a>)";
    }
    print "</a></h2>";
    print "<p>Shows which " . $mpprop['housenounplural'] . " voted most similarly to this one in the ";
    print pretty_parliament_and_party($mpprop['enteredhouse'], $mpprop['party'], $mpprop['enteredreason'], $mpprop['leftreason']);
    print ". This is measured from 0% agreement (never voted the same) to 100% (always\n\t\t    voted the same).  Only votes that both " . $mpprop['housenounplural'] . " attended are\n\t\t    counted.  This may reveal relationships between " . $mpprop['housenounplural'] . " that were\n\t\t    previously unsuspected.  Or it may be nonsense.";
    print "<table class=\"mps\">\n";
    $same_voters = mp_table($mptabattr);
    print "</table>\n";
    if ($same_voters) {
        print "({$same_voters} MPs voted exactly the same as this one)\n";
    }
    # do only one table if it's a show all case
    # if ($dismode["possfriends"] == "all")
    #    break;
}
pw_footer();