.
*/
include("./include/include.php");
require_once(FILESYSTEMROOTPATH."jc/include/classes/DefaultLayout.php");
require_once(FILESYSTEMROOTPATH."include/list/ListPager.php");
$layout = new DefaultLayout(Access::BOARD, "./jc/");
$layout->init();
$layout->echoln('Back
');
if (isset($_GET['proposal_id'])){
$pid = $_GET['proposal_id'];
$type = 'proposal';
$pService = $GLOBALS['ClassFactory']->getProposalsService();
$proposal = $pService->load($pid);
$title = $proposal->getTitle();
}
elseif (isset($_GET['rollcall_id'])){
$pid = $_GET['rollcall_id'];
$type = 'rollcall';
$rmService = $GLOBALS['ClassFactory']->getRollcallsService();
$rm = $rmService->load($pid);
$title = $rm->getTitle();
}
$dService =$GLOBALS['ClassFactory']->getDelegatesService();
$votesService = $GLOBALS['ClassFactory']->getVotesService();
$me = $dService->load($_SESSION['sess_uid']);
$bodyCode = $me->getBodyCode();
$body = $dService->getBodyName($bodyCode);
$max_votes = $votesService->getLocal_votes($bodyCode);
$layout->echoln(''.$body['BodyName'].' ('.$max_votes.' votes)');
$data = $votesService->getMyLocalVotes($pid,$type,$bodyCode);
$pager = new ListPager($title);
$pager->addColumn(new TextColumn('uid', 'Username'));
$pager->addColumn(new TextColumn('vote2','Vote'));
$layout->echoln($pager->display($data));
$layout->page_footer();
?>