$id = get_http_var('id'); $bill_id = null; if ($bill && $session) { $db = new ParlDB(); $q = $db->query('select id,standingprefix from bills where title="' . mysql_real_escape_string($bill) . '" and session = "' . mysql_real_escape_string($session) . '"'); if ($q->rows()) { $bill_id = $q->field(0, 'id'); $standingprefix = $q->field(0, 'standingprefix'); } } $committee = new StandingCommittee($session, $bill); if ($bill_id && !$id) { $this_page = 'pbc_bill'; $args = array('id' => $bill_id, 'title' => $bill, 'session' => $session); $committee->display('bill', $args); } elseif ($bill_id && $id) { $this_page = 'pbc_clause'; $args = array('gid' => $standingprefix . $id, 's' => get_http_var('s'), 'member_id' => get_http_var('m'), 'glossarise' => 1, 'sort' => 'regexp_replace', 'bill_id' => $bill_id, 'bill_title' => $bill, 'bill_session' => $session); $GLOSSARY = new GLOSSARY($args); # Why a global? if (preg_match('/speaker:(\\d+)/', get_http_var('s'), $mmm)) { $args['person_id'] = $mmm[1]; } $result = $committee->display('gid', $args); /* This section below is shared between here and everywhere else - factor it out! */ if ($committee->htype() == '12' || $committee->htype() == '13') { $PAGE->stripe_start('side', 'comments'); $COMMENTLIST = new COMMENTLIST(); $args['user_id'] = get_http_var('u'); $args['epobject_id'] = $committee->epobject_id();
<? if (count($last_dates[6])) { ?> <dt><a href="<?php echo $last_dates[6]['listurl']; ?> ">Public Bill committees</a> <small><?php echo format_date($last_dates[6]['hdate'], LONGERDATEFORMAT); ?> </small> </dt> <dd>Previously called Standing Committees, these study proposed legislation (bills) in detail, debating each clause and sending amendments to the Commons. <h3>Latest Public Bill Committee meetings</h3> <?php $COMMITTEE->display('recent_pbc_debates', array('num' => 5)); $MOREURL = new URL('pbcfront'); ?> <p align="right"><strong><a href="<?php echo $MOREURL->generate(); ?> ">See more Public Bill committees</a></strong></p> <? } ?> </div> <div class="welcome_col2"> <div class="campaign"> <p> What’s up next: <span class="chev"><span class="hide">-</span></span>