Exemplo n.º 1
0
 public function index()
 {
     if ($this->message) {
         echo '<p>' . $this->message . '</p>';
     }
     util::form($this);
     echo '<input type="submit" name="action[set]" value="Set" />';
     echo '<br />';
     echo $this->name->render();
     echo $this->date->render();
     echo '<br />';
     echo '<table>';
     $total = 0;
     foreach ($this->entry as $i => $entry) {
         echo '<tr>';
         echo '<td>';
         $entry['acc_id']->render();
         echo '</td>';
         echo '<td>';
         $entry['amount']->render();
         echo '</td>';
         $total += (double) $entry['amount']->value();
         echo '<td><input type="submit" name="action[remove][' . $i . ']" value="Remove" /></td>';
         echo '</tr>';
     }
     echo '<tr><td>Total</td><td>' . sprintf('%1.2f', $this->total) . '</td><td></td></tr>';
     echo '</table>';
     echo '<input type="submit" name="action[add]" value="Add Entry" />';
     echo '<br />';
     echo '<input type="submit" name="action[commit]" value="Commit" />';
     echo '<input type="submit" name="action[cancel]" value="Cancel" />';
     echo '</form>';
 }
Exemplo n.º 2
0
 public function in()
 {
     echo $this->message;
     util::form($this);
     $this->name->render();
     $this->pass->render();
     echo '<input type="submit" value="submit" />';
     echo '</form>';
 }
Exemplo n.º 3
0
 public function index()
 {
     util::form($this);
     $this->acc_id->render();
     $this->name->render();
     echo '<input type="submit" name="action[save]" value="Save" />';
     echo '<input type="submit" name="action[cancel]" value="Cancel" />';
     echo '</form>';
 }