Source for file new-step1.tpl.php
Documentation is available at new-step1.tpl.php
response_header ('Election :: ' . ucfirst($new));
<h1> <?php echo ucfirst($new) ?> Election [Step 1]</h1>
foreach ($error as $err) {
<form name="newelection" action="/election/ <?php echo $new ?>.php" method="post">
<input type="hidden" name="step" value="2" />
<?php if ($new == 'edit'): ?>
<input type="hidden" name="election_id" value=" <?php echo $election_id ?>" />
<?php endif; // if ($new == 'edit'): ?>
<th class="form-label_left" colspan="2">(All entries are required)</th>
<th class="form-label_left">Eligible Voters</th>
<select name="eligiblevoters">
if ($info['eligiblevoters'] == '1') {
$ev1 = ' selected="true"';
$ev2 = ' selected="true"';
<option value="1" <?php echo $ev1 ?>>PEAR Developers</option>
<option value="2" <?php echo $ev2 ?>>General PHP Public</option>
<th class="form-label_left">Election Purpose (summary)</th>
<input type="text" name="purpose" size="100" maxlength="100" value=" <?php
<th class="form-label_left">Number of items to choose from (items created in step 2)</th>
for ($i = 2; $i <= 20; $i++ ) {
if ($info['choices'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
<th class="form-label_left">Election detail (wiki markup)</th>
<textarea name="detail" rows="20" cols="75"> <?php echo $info['detail'] ?></textarea>
<th class="form-label_left">Election start date <?php if ($new == 'new'): ?>
(must be at least 30 days from now)
<?php endif; // if ($new == 'new') ?>
foreach ($years as $year) {
if ($info['year'] == $year) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $year . '</option>' . "\n";
</select>-<select name="month">
for ($i = 1; $i <= 12; $i++ ) {
if ($info['month'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
</select>-<select name="day">
for ($i = 1; $i <= 31; $i++ ) {
if ($info['day'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
<th class="form-label_left">Length of election in days</th>
for ($i = 1; $i <= 14; $i++ ) {
if ($info['length'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
<th class="form-label_left" colspan="2">
The next two sections relate to the number of items
that a single voter can choose. For most elections, voters
should choose only one (minimum=maximum=1). For some
elections, like QA group, the voter should choose up to 5
developers to populate the QA group (minimum=1,maximum=5), and
<th class="form-label_left">Minimum votes needed</th>
for ($i = 1; $i <= 19; $i++ ) {
if ($info['minimum'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
<th class="form-label_left">Maximum votes allowed</th>
for ($i = 1; $i <= 19; $i++ ) {
if ($info['maximum'] == $i) {
$sel = ' selected="selected"';
echo ' <option' . $sel . '>' . $i . '</option>' . "\n";
<input type="submit" name="newelection" value="Save Election" />
Documentation generated on Mon, 11 Mar 2019 15:34:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|