echo '<strong>', $speakername, '</strong></a> <small>'; $desc = ''; if (isset($speaker['office'])) { $desc = $speaker['office'][0]['pretty']; #if (strpos($desc, 'PPS')!==false) $desc .= '; '; $desc .= '; '; } # Try always showing constituency/party too #if (!$desc || strpos($desc, 'PPS')!==false) { if ($speaker['house'] == 1 && $speaker['party'] != 'Speaker' && $speaker['party'] != 'Deputy Speaker' && $speaker['constituency']) { $desc .= $speaker['constituency']; if ($speaker['party']) $desc .= ', '; } if (get_http_var('wordcolours')) { $desc .= '<span style="color: '.party_to_colour($speaker['party']).'">'; } $desc .= htmlentities($speaker['party']); if (get_http_var('wordcolours')) { $desc .= '</span>'; } #} //print $desc if ($desc) print "($desc)"; // show the question number (Scottish Written Answers only) if ($data['info']['major'] == 8 && preg_match('#\d{4}-\d\d-\d\d\.(.*?)\.q#', $row['gid'], $m)) { # Scottish Wrans only print " | Question $m[1]"; }
<?php $c = -1; foreach ($unique_parties as $party) { print "<tr>"; $c++; if ($party == "Your MP") { $display_party = $mpattr['name'] . " ex-MP<br>(" . $parties[$mpattr['party']] . ")"; } else { $display_party = $parties[$party]; } print '<td class="partyheadings" id="partyname' . $c . '">' . $display_party . '</td>'; if ($party == "Your MP") { $col = party_to_colour($mpattr['party']); } else { $col = party_to_colour($party); } print '<td><div id="party' . $c . '" style="width:0px; height:40px; ; background: ' . $col . '; "></div></td>'; print "</tr>"; } ?> </table> </div> <!-- <tr style="height:110px; vertical-align:bottom;"> --> <!-- <td id="recview">Public Whip recommends you vote <center><span id="partychoice">YYY</span></center> as it matches your political opinion by <span id="partychoicepercent">ZZ%</span>. -->