Ajout suppression d'un classement dans une catgorie

This commit is contained in:
Rodolphe Quiedeville 2003-10-21 17:06:53 +00:00
parent 0fba67e996
commit 7bdef948d0

View File

@ -24,6 +24,13 @@ require("./pre.inc.php");
llxHeader();
if ($HTTP_POST_VARS["action"] == 'confirm_delete_categ' && $HTTP_POST_VARS["confirm"] == yes)
{
$sql = "DELETE FROM llx_bank_class WHERE lineid = $rowid AND fk_categ = $cat1";
$db->query($sql);
}
if ($action == 'class')
{
$sql = "DELETE FROM llx_bank_class WHERE lineid = $rowid AND fk_categ = $cat1";
@ -93,6 +100,12 @@ if ($result)
$db->free();
}
if ($action == 'delete_categ')
{
$html = new Form($db);
$html->form_confirm("$PHP_SELF?rowid=$rowid&cat1=$fk_categ","Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ");
}
print_titre("Edition de la ligne");
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print "<TR class=\"liste_titre\">";
@ -213,7 +226,7 @@ print "<p>Class
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print "<TR class=\"liste_titre\">";
print '<td colspan="2">Description</td>';
print '<td colspan="3">Description</td>';
print "</TR>\n";
$sql = "SELECT c.label, c.rowid";
@ -234,6 +247,7 @@ if ($result)
print "<td>$objp->label</td>";
print "<td align=\"center\"><a href=\"budget.php?bid=$objp->rowid\">voir</a></td>";
print "<td align=\"center\"><a href=\"ligne.php?action=delete_categ&amp;rowid=$rowid&amp;fk_categ=$objp->rowid\">Supprimer</a></td>";
print "</tr>";
$i++;