@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <li> |
| 2 | 2 | <?= $description ?> |
| 3 | - <?php if ( $show_link ) { ?> |
|
| 3 | + <?php if ($show_link) { ?> |
|
| 4 | 4 | <a class="vote-description__source" href="<?= $link ?>">Show votes</a> |
| 5 | 5 | <?php if (isset($key_vote)) { ?> |
| 6 | 6 | <a class="vote-description__evidence" href="<?= $link ?>"><?= $key_vote['summary'] ?></a> |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | echo '<?xml version="1.0" encoding="iso-8859-1"?>'; |
| 30 | 30 | |
| 31 | - ?> |
|
| 31 | + ?> |
|
| 32 | 32 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
| 33 | 33 | <svg width="1000" height="500" viewBox="0 0 1000 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" font-family="Droid Sans, Trebuchet"> |
| 34 | 34 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | <text font-size="24" font-weight="normal" fill="#000000"> |
| 54 | 54 | <?php foreach ($lines as $j=>$line) { ?> |
| 55 | 55 | <tspan x="40" y="<?= $stance_y + $stance_padding_top + $stance_baseline_offset + ($stance_lineheight * $j) ?>"><?php |
| 56 | - if (strpos($line, '*') !== False) { |
|
| 56 | + if (strpos($line, '*') !== false) { |
|
| 57 | 57 | echo preg_replace( |
| 58 | 58 | '#(?:^|[*])([^\r\n *][^*\n]*[^\r\n *])(?:$|[*])#i', |
| 59 | 59 | $tspan_bold_open . '$1' . $tspan_bold_close, |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $stances = array(); |
| 4 | 4 | |
| 5 | 5 | foreach ($segment['votes']->positions as $key_vote) { |
| 6 | - if ( $key_vote['has_strong'] || $key_vote['position'] == 'has never voted on' ) { |
|
| 6 | + if ($key_vote['has_strong'] || $key_vote['position'] == 'has never voted on') { |
|
| 7 | 7 | $stance = strip_tags($key_vote['desc'], '<b>'); |
| 8 | 8 | $stance = ucfirst($stance); |
| 9 | 9 | $stance = preg_replace('#</?b>#i', '*', $stance); |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | - <?php if ( $featured['featured'] ) { ?> |
|
| 1 | + <?php if ($featured['featured']) { ?> |
|
| 2 | 2 | <h2>In the news</h2> |
| 3 | - <?php if ( isset($featured['headline']) ) { ?> |
|
| 3 | + <?php if (isset($featured['headline'])) { ?> |
|
| 4 | 4 | <h3 class="in-the-news__topic"><a href="<?= $featured['list_url'] ?>"><?= $featured['headline'] ?></a></h3> |
| 5 | - <?php if ( isset($featured['context']) ) { ?> |
|
| 5 | + <?php if (isset($featured['context'])) { ?> |
|
| 6 | 6 | <p class="in-the-news__context"><?= $featured['context'] ?></p> |
| 7 | 7 | <?php } ?> |
| 8 | 8 | <?php } ?> |
@@ -15,21 +15,21 @@ discard block |
||
| 15 | 15 | <p class="meta excerpt__category"><a href="<?= $featured['more_url'] ?>"><?= $featured['desc'] ?></a></p> |
| 16 | 16 | <p class="excerpt__statement"> |
| 17 | 17 | <q> |
| 18 | - <?php if ( $featured['child']['speaker'] ) { ?> |
|
| 18 | + <?php if ($featured['child']['speaker']) { ?> |
|
| 19 | 19 | <a href="<?= $featured['child']['speaker']['url'] ?>"><?= $featured['child']['speaker']['name'] ?></a> : |
| 20 | 20 | <?php } ?> |
| 21 | 21 | <?= trim_characters($featured['child']['body'], 0, 200) ?> |
| 22 | 22 | </q> |
| 23 | 23 | </p> |
| 24 | 24 | </div> |
| 25 | - <?php if ( count($featured['related']) ) { ?> |
|
| 25 | + <?php if (count($featured['related'])) { ?> |
|
| 26 | 26 | <div class="in-the-news__key-events"> |
| 27 | 27 | <!-- No maximum, but less than 4 looks best --> |
| 28 | 28 | <ul class="key-events__list"> |
| 29 | 29 | <li> |
| 30 | 30 | <h4>Key events</h4> |
| 31 | 31 | </li> |
| 32 | - <?php foreach ( $featured['related'] as $related ) { ?> |
|
| 32 | + <?php foreach ($featured['related'] as $related) { ?> |
|
| 33 | 33 | <li> |
| 34 | 34 | <a href="<?= $related['list_url'] ?>"><?= $related['parent']['body'] ?></a> |
| 35 | 35 | <p class="meta"><?= format_date($related['hdate'], SHORTDATEFORMAT) ?></p> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <div class="business-section__primary"> |
| 2 | 2 | <ul class="business-list"> |
| 3 | - <?php foreach ( $data as $item ) { ?> |
|
| 3 | + <?php foreach ($data as $item) { ?> |
|
| 4 | 4 | <li> |
| 5 | 5 | <?php include '_business_list_item.php'; ?> |
| 6 | 6 | </li> |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | foreach ( $years as $year => $months ) { ?> |
| 25 | 25 | <div class="calendar-year"> |
| 26 | 26 | <?php foreach ($months as $month => $dates) { |
| 27 | - include '_calendar.php'; |
|
| 27 | + include '_calendar.php'; |
|
| 28 | 28 | } ?> |
| 29 | 29 | </div> |
| 30 | 30 | <?php } |
@@ -8,20 +8,20 @@ |
||
| 8 | 8 | </div> |
| 9 | 9 | <div class="business-section__solo"> |
| 10 | 10 | <div class="calendar__controls"> |
| 11 | - <?php if ( isset( $prev ) ) { ?> |
|
| 11 | + <?php if (isset($prev)) { ?> |
|
| 12 | 12 | <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">← <?= $prev['title'] ?></a> |
| 13 | 13 | <?php } else { ?> |
| 14 | 14 | <span class="calendar__controls__previous"></span> |
| 15 | 15 | <?php } ?> |
| 16 | 16 | <span class="calendar__controls__current"><?= $year ?></span> |
| 17 | - <?php if ( isset( $next ) ) { ?> |
|
| 17 | + <?php if (isset($next)) { ?> |
|
| 18 | 18 | <a href="<?= $next['url'] ?>" class="calendar__controls__next"><?= $next['title'] ?> →</a> |
| 19 | 19 | <?php } else { ?> |
| 20 | 20 | <span class="calendar__controls__next"></span> |
| 21 | 21 | <?php } ?> |
| 22 | 22 | </div> |
| 23 | - <?php if ( isset($years) ) { |
|
| 24 | - foreach ( $years as $year => $months ) { ?> |
|
| 23 | + <?php if (isset($years)) { |
|
| 24 | + foreach ($years as $year => $months) { ?> |
|
| 25 | 25 | <div class="calendar-year"> |
| 26 | 26 | <?php foreach ($months as $month => $dates) { |
| 27 | 27 | include '_calendar.php'; |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| 36 | 36 | |
| 37 | - <?php $search_title = "Search $title"; include '_search.php'; ?> |
|
| 37 | + <?php $search_title = "search $title"; include '_search.php'; ?> |
|
| 38 | 38 | |
| 39 | 39 | </div> |
@@ -22,14 +22,14 @@ |
||
| 22 | 22 | |
| 23 | 23 | <div class="business-section__primary"> |
| 24 | 24 | <ul class="business-list"> |
| 25 | - <?php foreach ( $content['data'] as $date => $bills ) { ?> |
|
| 25 | + <?php foreach ($content['data'] as $date => $bills) { ?> |
|
| 26 | 26 | <li> |
| 27 | 27 | <span class="business-list__title"> |
| 28 | 28 | <h3> |
| 29 | 29 | <?= $date ?> |
| 30 | 30 | </h3> |
| 31 | 31 | </span> |
| 32 | - <?php foreach ( $bills as $bill ) { ?> |
|
| 32 | + <?php foreach ($bills as $bill) { ?> |
|
| 33 | 33 | <p> |
| 34 | 34 | <a href="<?= $bill['url'] ?>" class="business-list__title"> |
| 35 | 35 | <?= $bill['bill'] ?> – <?= $bill['sitting'] ?> |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | foreach ( $calendar as $year => $months ) { |
| 3 | 3 | foreach ($months as $month => $dates) { |
| 4 | - include '_calendar.php'; |
|
| 4 | + include '_calendar.php'; |
|
| 5 | 5 | } |
| 6 | 6 | } ?> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | - foreach ( $calendar as $year => $months ) { |
|
| 2 | + foreach ($calendar as $year => $months) { |
|
| 3 | 3 | foreach ($months as $month => $dates) { |
| 4 | 4 | include '_calendar.php'; |
| 5 | 5 | } |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | </div> |
| 33 | 33 | </div> |
| 34 | 34 | <?php } else { |
| 35 | - $section = false; include '_section_content.php'; |
|
| 36 | - } ?> |
|
| 35 | + $section = false; include '_section_content.php'; |
|
| 36 | + } ?> |
|
| 37 | 37 | |
| 38 | 38 | </div> |
| 39 | 39 | |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | </div> |
| 20 | 20 | <div class="full-page"> |
| 21 | 21 | |
| 22 | - <?php if ( count($data['rows']) == 0 ) { ?> |
|
| 22 | + <?php if (count($data['rows']) == 0) { ?> |
|
| 23 | 23 | <div class="debate-speech"> |
| 24 | 24 | <div class="full-page__row"> |
| 25 | 25 | <div class="full-page__unit"> |
| 26 | - <?php if ( $col_country == 'SCOTLAND' || $col_country == 'NORTHERN IRELAND' ) { ?> |
|
| 26 | + <?php if ($col_country == 'SCOTLAND' || $col_country == 'NORTHERN IRELAND') { ?> |
|
| 27 | 27 | We only have information about columns for debates in the House of Commons and the House of Lords. |
| 28 | 28 | <?php } else { ?> |
| 29 | 29 | We can't find anything in column <?= $column ?> on <?= $debate_day_human ?>. |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($dayOfWeek < 0) { |
| 42 | 42 | $dayOfWeek = 6; |
| 43 | 43 | } |
| 44 | - ?> |
|
| 44 | + ?> |
|
| 45 | 45 | <?php } |
| 46 | 46 | if (!isset($years)) { ?> |
| 47 | 47 | <div class="calendar__controls"> |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } else { |
| 128 | 128 | $day_section = $section; |
| 129 | 129 | if ($section == 'sp') { |
| 130 | - $day_section = 'spdebates'; |
|
| 130 | + $day_section = 'spdebates'; |
|
| 131 | 131 | } |
| 132 | 132 | $urls[$day_section . 'day']->insert(array('d'=>$date)); |
| 133 | 133 | print "<a href=\"" . $urls[$day_section . 'day']->generate() . "\">$currentDay</a></td>"; |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <div class="calendar"> |
| 2 | - <?php if(isset($month)){ |
|
| 3 | - $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun'); |
|
| 2 | + <?php if (isset($month)) { |
|
| 3 | + $daysOfWeek = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'); |
|
| 4 | 4 | |
| 5 | 5 | // What is the first day of the month in question? |
| 6 | - $firstDayOfMonth = mktime(0,0,0,$month,1,$year); |
|
| 6 | + $firstDayOfMonth = mktime(0, 0, 0, $month, 1, $year); |
|
| 7 | 7 | |
| 8 | 8 | // How many days does this month contain? |
| 9 | - $numberDays = date('t',$firstDayOfMonth); |
|
| 9 | + $numberDays = date('t', $firstDayOfMonth); |
|
| 10 | 10 | |
| 11 | 11 | // Retrieve some information about the first day of the |
| 12 | 12 | // month in question. |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if (isset($info['onday'])) { |
| 19 | 19 | // 'onday' is like 'yyyy-mm-dd'. |
| 20 | 20 | $datebits = explode('-', $info['onday']); |
| 21 | - if (count($datebits)>2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
| 21 | + if (count($datebits) > 2 && $datebits[0] == $year && $datebits[1] == $month) { |
|
| 22 | 22 | $toDay = $datebits[2]; |
| 23 | 23 | } else { |
| 24 | 24 | $toDay = ''; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | <?php } |
| 46 | 46 | if (!isset($years)) { ?> |
| 47 | 47 | <div class="calendar__controls"> |
| 48 | - <?php if ( isset($prev) ) { ?> |
|
| 48 | + <?php if (isset($prev)) { ?> |
|
| 49 | 49 | <a href="<?= $prev['url'] ?>" class="calendar__controls__previous">←</a> |
| 50 | 50 | <?php } else { ?> |
| 51 | 51 | <span class="calendar__controls__previous"> </span> |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <span class="calendar__controls__current"> |
| 54 | 54 | <?= $monthName ?> <?= $year ?> |
| 55 | 55 | </span> |
| 56 | - <?php if ( isset($next) ) { ?> |
|
| 56 | + <?php if (isset($next)) { ?> |
|
| 57 | 57 | <a href="<?= $next['url'] ?>" class="calendar__controls__next">→</a> |
| 58 | 58 | <?php } else { ?> |
| 59 | 59 | <span class="calendar__controls__next"> </span> |
@@ -106,11 +106,11 @@ discard block |
||
| 106 | 106 | // sittings - e.g. WH is only Tuesday-Thursday |
| 107 | 107 | if ($currentDay == $toDay) { |
| 108 | 108 | print '<td class="on"'; |
| 109 | - if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
| 109 | + if ($recess[0] && $recess[0] != 1) print ' title="' . $recess[0] . '"'; |
|
| 110 | 110 | print '>'; |
| 111 | 111 | } elseif ($recess[0]) { |
| 112 | 112 | print '<td class="no"'; |
| 113 | - if ($recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
| 113 | + if ($recess[0] != 1) print ' title="' . $recess[0] . '"'; |
|
| 114 | 114 | print '>'; |
| 115 | 115 | } else { |
| 116 | 116 | print '<td>'; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | // Is the $currentDay a member of $dates? If so, |
| 120 | 120 | // the day should be linked. |
| 121 | - if (in_array($currentDay,$dates)) { |
|
| 121 | + if (in_array($currentDay, $dates)) { |
|
| 122 | 122 | |
| 123 | 123 | $date = sprintf("%04d-%02d-%02d", $year, $month, $currentDay); |
| 124 | 124 | |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | </tr> |
| 157 | 157 | </tbody> |
| 158 | 158 | </table> |
| 159 | - <?php if(!isset($years)){ ?> |
|
| 159 | + <?php if (!isset($years)) { ?> |
|
| 160 | 160 | <div class="calendar__footer"> |
| 161 | 161 | <?php |
| 162 | 162 | $y = $urls['day']; |
| 163 | 163 | $y->reset(); |
| 164 | - $y->insert(array( 'y' => $year )); |
|
| 164 | + $y->insert(array('y' => $year)); |
|
| 165 | 165 | $url = $y->generate(); |
| 166 | 166 | ?> |
| 167 | 167 | <a href="<?= $url ?>">See all of <?= $year ?></a> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <div class="calendar"> |
| 2 | - <?php if(isset($month)){ |
|
| 2 | + <?php if(isset($month)) { |
|
| 3 | 3 | $daysOfWeek = array('Mon','Tue','Wed','Thu','Fri','Sat','Sun'); |
| 4 | 4 | |
| 5 | 5 | // What is the first day of the month in question? |
@@ -106,11 +106,15 @@ discard block |
||
| 106 | 106 | // sittings - e.g. WH is only Tuesday-Thursday |
| 107 | 107 | if ($currentDay == $toDay) { |
| 108 | 108 | print '<td class="on"'; |
| 109 | - if ($recess[0] && $recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
| 109 | + if ($recess[0] && $recess[0]!=1) { |
|
| 110 | + print ' title="'.$recess[0].'"'; |
|
| 111 | + } |
|
| 110 | 112 | print '>'; |
| 111 | 113 | } elseif ($recess[0]) { |
| 112 | 114 | print '<td class="no"'; |
| 113 | - if ($recess[0]!=1) print ' title="'.$recess[0].'"'; |
|
| 115 | + if ($recess[0]!=1) { |
|
| 116 | + print ' title="'.$recess[0].'"'; |
|
| 117 | + } |
|
| 114 | 118 | print '>'; |
| 115 | 119 | } else { |
| 116 | 120 | print '<td>'; |