Fix: Corrections pour register_globals=off
Doc: Documentation doxygen
This commit is contained in:
parent
84f9b9a1f2
commit
9b31642804
@ -20,6 +20,14 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file htdocs/compta/bank/categ.php
|
||||||
|
\ingroup compta
|
||||||
|
\brief Page ajout de catégories banaires
|
||||||
|
\version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
$user->getrights('compta');
|
$user->getrights('compta');
|
||||||
@ -29,33 +37,34 @@ if (!$user->admin && !$user->rights->compta->bank)
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
if ($action == 'add')
|
|
||||||
|
/*
|
||||||
|
* Actions ajout catégorie
|
||||||
|
*/
|
||||||
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
if ($credit > 0)
|
if ($_POST["label"]) {
|
||||||
{
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')";
|
||||||
$amount = $credit ;
|
$result = $db->query($sql);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$amount = - $debit ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('$label')";
|
if (!$result)
|
||||||
$result = $db->query($sql);
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
if (!$result)
|
}
|
||||||
{
|
|
||||||
print $db->error();
|
|
||||||
print "<p>$sql";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print_titre("Catégories");
|
|
||||||
|
/*
|
||||||
|
* Affichage liste des catégories
|
||||||
|
*/
|
||||||
|
|
||||||
|
print_titre($langs->trans("Categories"));
|
||||||
print '<form method="post" action="categ.php">';
|
print '<form method="post" action="categ.php">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="2">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>Num</td><td colspan="2">'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td><td colspan="2">'.$langs->trans("Label").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ ORDER BY label";
|
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ ORDER BY label";
|
||||||
@ -79,7 +88,12 @@ if ($result)
|
|||||||
}
|
}
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
print "<tr>";
|
|
||||||
|
/*
|
||||||
|
* Affichage ligne ajout de catégorie
|
||||||
|
*/
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
print "<td> </td><td><input name=\"label\" type=\"text\" size=45></td>";
|
print "<td> </td><td><input name=\"label\" type=\"text\" size=45></td>";
|
||||||
print "<td align=\"center\"><input type=\"submit\" value=\"".$langs->trans("Add")."\"</td></tr>";
|
print "<td align=\"center\"><input type=\"submit\" value=\"".$langs->trans("Add")."\"</td></tr>";
|
||||||
print "</table></form>";
|
print "</table></form>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user