.
*/
include("./include/include.php");
require_once(FILESYSTEMROOTPATH."jc/include/classes/DefaultLayout.php");
require_once(FILESYSTEMROOTPATH."include/list/ListPager.php");
$layout = new DefaultLayout(Access::VISITOR, "./jc/");
$layout->init();
//get elections_id if set
if (isset($_GET['eid'])){
$election_id = $_GET['eid'];
$elections = $GLOBALS['ClassFactory']->getElectionsService()->load($election_id);
$layout->echoln('
Back to Elections');
//list of candidates
$cService = $GLOBALS['ClassFactory']->getCandidatesService();
$data = $cService->loadByElection($election_id);
$pager = new ListPager($elections->getPosition());
$pager->addColumn(new TextColumn('name', 'Name'));
$pager->addColumn(new TextColumn('surname','Surname'));
$pager->addColumn(new TextColumn('link2','Link'));
$layout->echoln($pager->display($data));
}
$layout->page_footer();
?>