$a->get_from_array($_POST); $a->save(); echo $a->show(); echo '</div>'; return; } if (isset($_GET['new'])) { //show the form for entering a new Anc_Operation //------------------------------------------ $a = new Anc_Group_Operation($cn); $wSubmit = new IHidden("p_action", "ca_od"); $wSubmit->table = 0; echo '<div class="redcontent" >'; echo '<form method="post">'; echo dossier::hidden(); echo $wSubmit->input(); echo $a->form(); echo HtmlInput::submit("save", _("Sauver")); echo '</form>'; echo '<div class="info">'; echo _('Débit') . ' = <span id="totalDeb"></span>'; echo _('Crédit') . ' = <span id="totalCred"></span>'; echo _('Difference') . ' = <span id="totalDiff"></span> </div> '; echo '</div>'; return; } ?> <div class="redcontent">
static function test_me() { $dossier = dossier::id(); $cn = new Database($dossier); if (isset($_POST['go'])) { $b = new Anc_Group_Operation($cn); $b->get_from_array($_POST); return; } $a = new Anc_Group_Operation($cn); echo '<form method="post">'; echo $a->form(); echo dossier::hidden(); echo '<input type="submit" name="go">'; echo '</form>'; }