$error = $election->validateStep1(false); $info['purpose'] = $_POST['purpose']; $info['detail'] = $_POST['detail']; $info['choices'] = (int) $_POST['choices']; $info['year'] = (int) $_POST['year']; $info['month'] = $_POST['month']; $info['day'] = $_POST['day']; $info['length'] = (int) $_POST['length']; $info['minimum'] = (int) $_POST['minimum']; $info['maximum'] = (int) $_POST['maximum']; $info['eligiblevoters'] = (int) $_POST['eligiblevoters']; if ($error) { require PEARWEB_TEMPLATEDIR . '/election/new-step1.tpl.php'; exit; } $info = $election->setupChoices($election_id, $info); require PEARWEB_TEMPLATEDIR . '/election/new-step2.tpl.php'; exit; case '3': $error = $election->validateStep1(false); $info['purpose'] = $_POST['purpose']; $info['detail'] = $_POST['detail']; $info['choices'] = (int) $_POST['choices']; $info['year'] = (int) $_POST['year']; $info['month'] = $_POST['month']; $info['day'] = $_POST['day']; $info['length'] = (int) $_POST['length']; $info['minimum'] = (int) $_POST['minimum']; $info['maximum'] = (int) $_POST['maximum']; $info['eligiblevoters'] = (int) $_POST['eligiblevoters']; if ($error) {