. */ include("./include/include.php"); require_once(FILESYSTEMROOTPATH."jc/include/classes/DefaultLayout.php"); require_once(FILESYSTEMROOTPATH."include/list/ListPager.php"); $layout = new DefaultLayout("JC_MANAGE", "./jc/"); $layout->init(); if (isset($_GET['eid'])){ $eid = $_GET['eid']; }else{ $layout->redirect('elections1.php'); } $election = $GLOBALS['ClassFactory']->getElectionsService()->load($eid); $bService = $GLOBALS['ClassFactory']->getBallotsService(); $candidates = $GLOBALS['ClassFactory']->getCandidatesService()->loadbyElection($eid); $data = $bService->loadByElection($eid); $layout->echoln(''); $counter = 1; $previous = ''; foreach($data as $ballot){ $layout->echoln(''); $previous = $ballot['ticket']; } $layout->echoln('
All Ballots: '.$election->getPosition().'
'); if($previous!=$ballot['ticket']){ $layout->echoln($counter.''.$ballot['ticket']); $counter++; }else{ $layout->echoln(''); } $layout->echoln(''); $cid = $ballot['candidate_id']; if($cid>0){ $layout->echoln($candidates[$cid]['name'].' '.$candidates[$cid]['surname']); } $layout->echoln('
'); $layout->page_footer(); ?>