} else { $args['sort'] = "regexp_replace"; $GLOSSARY = new GLOSSARY($args); } $LIST = new DEBATELIST(); $args['mobile'] = 1; $result = $LIST->display('gid', $args); // If it is a redirect, change URL if (is_string($result)) { $URL = new URL('debates'); $URL->insert(array('id' => $result)); header('Location: http://' . DOMAIN . $URL->generate('none'), true, 301); exit; } // We show trackbacks on this page. $args = array('epobject_id' => $LIST->epobject_id()); # $TRACKBACK = new TRACKBACK; # $TRACKBACK->display('epobject_id', $args); } elseif (get_http_var('y') != '') { // Show a calendar for a particular year's debates. $this_page = 'debatesyear'; $year = is_numeric(get_http_var('y')) ? get_http_var('y') : date('Y'); $pagetitle = $DATA->page_metadata($this_page, 'title'); $DATA->set_page_metadata($this_page, 'title', $pagetitle . ' ' . $year); $PAGE->page_start_mobile(); $PAGE->stripe_start(); $args = array('year' => $year); $LIST = new DEBATELIST(); $args['mobile'] = 1; $LIST->display('calendar', $args); /*
// If it is a redirect, change URL if (is_string($result)) { $URL = new URL('debate'); $URL->insert(array('id' => $result)); header('Location: http://' . DOMAIN . $URL->generate('none'), true, 301); exit; } // 12 is speech // 13 is procedural - see http://parl.stand.org.uk/cgi-bin/moin.cgi/DataSchema if ($DEBATELIST->htype() == '12' || $DEBATELIST->htype() == '13') { $PAGE->stripe_start('side', 'comments'); // Display all comments for this ep object. $COMMENTLIST = new COMMENTLIST(); $args['user_id'] = get_http_var('u'); // For highlighting their comments. $args['epobject_id'] = $DEBATELIST->epobject_id(); $COMMENTLIST->display('ep', $args); $PAGE->stripe_end(); $PAGE->stripe_start('side', 'addcomment'); $commendata = array('epobject_id' => $DEBATELIST->epobject_id(), 'gid' => get_http_var('id'), 'return_page' => $this_page); $PAGE->comment_form($commendata); // We'll be needing that epobject_id for the trackbacks too... // Display comment-adding help if user is logged in. if ($THEUSER->isloggedin()) { $sidebar = array(array('type' => 'include', 'content' => 'comment')); $PAGE->stripe_end($sidebar); } else { $PAGE->stripe_end(); } # $TRACKBACK = new TRACKBACK; # $TRACKBACK->display('epobject_id', $commendata);