$ret .= '<form method="post">'; $ret .= dossier::hidden(); $ret .= $po->form(); $ret .= HtmlInput::hidden('sa', 'po_update'); $ret .= HtmlInput::submit('Correction', 'Correction'); $ret .= sprintf('<input type="button" class="smallbutton" value="Efface" onClick="return confirm_box(\'anchor_del\',\' Voulez-vous vraiment effacer cette activité\',' . 'function () { window.location=\'do.php?ac=' . $_REQUEST['ac'] . '&sa=po_delete&po_id=%s&pa_id=%s&' . $str_dossier . '\'}) ;"', $po->id, $_REQUEST['pa_id']); $ret .= '</form>'; $ret .= '</div>'; $sa = ""; } /** * mise à jour po */ if ($sa == "po_update") { $po = new Anc_Account($cn); $po->get_from_array($_POST); $po->update(); $sa = "pa_detail"; } /** * Efface po */ if ($sa == "po_delete") { $po = new Anc_Account($cn, $_REQUEST['po_id']); $po->delete(); $sa = "pa_detail"; } // show the detail if ($sa == "pa_detail") { $new = new Anc_Plan($cn, $_GET['pa_id']); $wSa = HtmlInput::hidden("sa", "pa_update");