$action = 'new'; } } if ($action == 'remove' && $id > 0 && $_GET["lineid"] > 0 && $user->rights->banque->cheque) { $object->id = $id; $result = $object->removeCheck($_GET["lineid"]); if ($result === 0) { header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $object->id); exit; } else { setEventMessage($object->error, 'errors'); } } if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->cheque) { $object->id = $id; $result = $object->delete(); if ($result == 0) { header("Location: index.php"); exit; } else { setEventMessage($paiement->error, 'errors'); } } if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->cheque) { $result = $object->fetch($id); $result = $object->validate($user); if ($result >= 0) { // Define output language $outputlangs = $langs; $newlang = ''; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) {
} if ($action == 'remove' && $_GET["id"] > 0 && $_GET["lineid"] > 0 && $user->rights->banque->cheque) { $remisecheque = new RemiseCheque($db); $remisecheque->id = $_GET["id"]; $result = $remisecheque->removeCheck($_GET["lineid"]); if ($result === 0) { Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $remisecheque->id); exit; } else { $mesg = '<div class="error">' . $paiement->error . '</div>'; } } if ($action == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' && $user->rights->banque->cheque) { $remisecheque = new RemiseCheque($db); $remisecheque->id = $_GET["id"]; $result = $remisecheque->delete(); if ($result == 0) { Header("Location: index.php"); exit; } else { $mesg = '<div class="error">' . $paiement->error . '</div>'; } } if ($action == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' && $user->rights->banque->cheque) { $remisecheque = new RemiseCheque($db); $result = $remisecheque->fetch($_GET["id"]); $result = $remisecheque->validate($user); if ($result >= 0) { // Define output language $outputlangs = $langs; $newlang = '';