echo $hid->input("ac", $request_ac); echo '<hr>'; echo HtmlInput::submit('Accepter', 'Accepter'); echo '</form>'; // if $_REQUEST[sa] == del delete the predefined operation if ($request_sa == 'del') { $op = new Pre_operation($cn); $op->od_id = $_REQUEST['od_id']; $op->delete(); $request_sa = 'jrn'; } // if $_REQUEST[sa] == jrn show the predefined operation for this // ledger if ($request_sa == 'jrn') { $op = new Pre_operation($cn); $op->set_jrn($get_jrn); $is_ods = $cn->get_value("select count(*)\n\t\tfrom jrn_def where\n\t\t\tjrn_def_id=\$1\n\t\t\tand jrn_def_type='ODS'", array($get_jrn)); $op->od_direct = $is_ods > 0 ? 't' : 'f'; $array = $op->get_list_ledger(); if (empty($array) == true) { echo _("Aucun enregistrement"); return; } echo '<table>'; $count = 0; foreach ($array as $row) { if ($count % 2 == 0) { echo '<tr class="odd">'; } else { echo '<tr class="even">'; }