1<?php
2  /**
3   * This is the HTML template for the doodle table.
4   *
5   * I am utilizing the PHP parser as a templating engine:
6   * doodle_tempalte.php is simply included and evaled from syntax.php
7   * The variable  $template   will be inherited from syntax.php and can be used here.
8   */
9  global $ID;
10
11  $template = $this->template;
12  $c = count($template['choices']);
13?>
14
15<!-- Doodle Plugin -->
16<form action="<?php echo wl() ?>" method="post" name="doodle__form" id="<?php echo $template['formId'] ?>" accept-charset="utf-8" >
17
18<input type="hidden" name="sectok" value="<?php echo getSecurityToken() ?>" />
19<input type="hidden" name="do" value="show" >
20<input type="hidden" name="id" value="<?php echo $ID ?>" >
21<input type="hidden" name="formId" value="<?php echo $template['formId'] ?>" >
22<input type="hidden" name="edit__entry"   value="">
23<input type="hidden" name="delete__entry" value="">
24
25<table class="inline">
26  <tbody>
27    <tr class="row0">
28      <th class="centeralign" colspan="<?php echo ($c+1) ?>">
29        <?php echo $template['title'] ?>
30      </th>
31    </tr>
32    <tr class="row1">
33        <th class="col0"><?php echo $lang['fullname'] ?></th>
34<?php foreach ($template['choices'] as $choice) {  ?>
35        <td class="centeralign"><?php echo $choice ?></td>
36<?php } ?>
37    </tr>
38
39<?php foreach ($template['doodleData'] as $fullname => $userData) { ?>
40    <tr>
41        <td class="rightalign">
42          <?php echo $userData['editLinks'].$fullname.$userData['username'] ?>
43        </td>
44        <?php for ($col = 0; $col < $c; $col++) {
45            echo $userData['choice'][$col];
46        } ?>
47    </tr>
48<?php } ?>
49
50    <!-- Results / sum per column -->
51    <tr>
52        <th class="rightalign"><b><?php echo $template['result'] ?></b></th>
53<?php for ($col = 0; $col < $c; $col++) { ?>
54        <th class="centeralign"><b><?php echo $template['count'][$col] ?></b></th>
55<?php } ?>
56    </tr>
57
58<?php
59    /* Input fields, if allowed. */
60	echo $template['inputTR']
61?>
62
63<?php if (!empty($template['msg'])) { ?>
64    <tr>
65      <td colspan="<?php echo $c+1 ?>">
66        <?php echo $template['msg'] ?>
67      </td>
68    </tr>
69<?php } ?>
70
71  </tbody>
72</table>
73
74</form>
75
76
77
78
79