$this_page = 'spdebate'; $args = array('gid' => get_http_var('gid')); $LIST = new SPLIST(); $result = $LIST->display('gid', $args); // If it is a redirect, change URL if (is_string($result)) { $URL = new URL('spdebate'); $URL->insert(array('gid' => $result)); header('Location: http://' . DOMAIN . $URL->generate('none')); exit; } if ($LIST->htype() == '12' || $LIST->htype() == '13') { $PAGE->stripe_start('side', 'comments'); $COMMENTLIST = new COMMENTLIST(); $args['user_id'] = get_http_var('u'); $args['epobject_id'] = $LIST->epobject_id(); $COMMENTLIST->display('ep', $args); $PAGE->stripe_end(); $PAGE->stripe_start('side', 'addcomment'); $commendata = array('epobject_id' => $LIST->epobject_id(), 'gid' => get_http_var('gid'), 'return_page' => $this_page); $PAGE->comment_form($commendata); if ($THEUSER->isloggedin()) { $sidebar = array(array('type' => 'include', 'content' => 'comment')); $PAGE->stripe_end($sidebar); } else { $PAGE->stripe_end(); } } } else { $this_page = "spdebatesfront"; $PAGE->page_start();