pearweb_election
[ class tree: pearweb_election ] [ index: pearweb_election ] [ all elements ]

Source for file new-step3.tpl.php

Documentation is available at new-step3.tpl.php

  1. <?php
  2. response_header('Election :: ' ucfirst($new));
  3. ?>
  4. <h1>Confirm Election Details [Step 3]</h1>
  5. <?php
  6. if ($error{
  7.     foreach ($error as $err{
  8.         echo '<div class="errors">' htmlspecialchars($err'</div>';
  9.     }
  10. }
  11. ?>
  12. <form name="newelection" action="/election/<?php echo $new ?>.php" method="post">
  13. <input type="hidden" name="step" value="4" />
  14. <?php if ($new == 'edit')?>
  15. <input type="hidden" name="election_id" value="<?php echo $election_id ?>" />
  16. <?php endif; // if ($new == 'edit'): ?>
  17. <input type="hidden" name="choices" value="<?php echo $info['choices'?>" />
  18.  <table>
  19.  <?php for ($i = 1; $i <= $info['choices']$i++)?>
  20.   <tr>
  21.    <th class="form-label_left">Choice #<?php echo $i ?></th>
  22.    <td class="form-input">
  23.     Summary:<br />
  24.     <input type="hidden" name="summary<?php echo $i ?>" value="<?php echo htmlspecialchars($info['summary' $i]?>" />
  25.     <?php echo htmlspecialchars($info['summary' $i]?><br />
  26.     Link to more info:<br />
  27.     <input type="hidden" name="summary_link<?php echo $i ?>" value="<?php echo htmlspecialchars($info['summary_link' $i]?>" />
  28.     <a href="<?php echo htmlspecialchars($info['summary_link' $i]?>"><?php echo htmlspecialchars($info['summary_link' $i]?></a>
  29.    </td>
  30.   </tr>
  31.  <?php endfor; // for ($i = 1; $i < $info['choices']; $i++): ?>
  32.   <tr>
  33.    <th class="form-label_left">Eligible Voters</th>
  34.    <td class="form-input">
  35.     <input type="hidden" name="eligiblevoters" value="<?php echo $info['eligiblevoters'?>" />
  36.     <?php if ($info['eligiblevoters'== 1{
  37.         echo 'PEAR Developers';
  38. else {
  39.         echo 'General PHP Public';
  40. ?>
  41.    </td>
  42.   </tr>
  43.   <tr>
  44.    <th class="form-label_left">Election Purpose</th>
  45.    <td class="form-input">
  46.     <input type="hidden" name="purpose" value="<?php echo htmlspecialchars($info['purpose'])?>" />
  47.     <?php echo htmlspecialchars($info['purpose']?>
  48.    </td>
  49.   </tr>
  50.   <tr>
  51.    <th class="form-label_left">Election detail</th>
  52.    <td class="form-input">
  53.     <input type="hidden" name="detail" value="<?php echo htmlspecialchars($info['detail'])?>" />
  54.     <?php echo htmlspecialchars($info['detail']?>
  55.    </td>
  56.   </tr>
  57.   <tr>
  58.    <th class="form-label_left">Election start date</th>
  59.    <td class="form-input">
  60.     <input type="hidden" name="year" value="<?php echo date('Y'strtotime($info['year'])) ?>" />
  61.     <input type="hidden" name="month" value="<?php echo date('m'strtotime($info['year''-' $info['month''-' $info['day'])) ?>" />
  62.     <input type="hidden" name="day" value="<?php echo date('d',
  63.         strtotime($info['year''-' $info['month''-' $info['day']))?>" />
  64.     <?php echo $info['year''-' $info['month''-' $info['day'?>
  65.    </td>
  66.   </tr>
  67.   <tr>
  68.    <th class="form-label_left">Length of election in days</th>
  69.    <td class="form-input">
  70.     <input type="hidden" name="length" value="<?php echo $info['length'?>" />
  71.     <?php echo $info['length']?>
  72.    </td>
  73.   </tr>
  74.   <tr>
  75.    <th class="form-label_left">Minimum votes needed</th>
  76.    <td class="form-input">
  77.     <input type="hidden" name="minimum" value="<?php echo $info['minimum'?>" />
  78.     <?php echo $info['minimum'?>
  79.    </td>
  80.   </tr>
  81.   <tr>
  82.    <th class="form-label_left">Maximum votes allowed</th>
  83.    <td class="form-input">
  84.     <input type="hidden" name="maximum" value="<?php echo $info['maximum'?>" />
  85.     <?php echo $info['maximum'?>
  86.    </td>
  87.   </tr>
  88.  </table>
  89.  <input type="submit" name="newelection" value="Save Election" /><input type="submit" name="cancel" value="Cancel" />
  90. </form>
  91. <?php response_footer();

Documentation generated on Mon, 11 Mar 2019 15:34:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.