1 |
<?php |
<?php |
2 |
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
3 |
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> |
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> |
4 |
* |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
22 |
*/ |
*/ |
23 |
|
|
24 |
/*! |
/*! |
25 |
\file htdocs/compta/bank/categ.php |
\file htdocs/compta/bank/categ.php |
26 |
\ingroup compta |
\ingroup compta |
27 |
\brief Page ajout de catégories banaires |
\brief Page ajout de catégories bancaires |
28 |
\version $Revision$ |
\version $Revision$ |
29 |
*/ |
*/ |
30 |
|
|
31 |
require("./pre.inc.php"); |
require("./pre.inc.php"); |
32 |
|
|
33 |
$user->getrights('compta'); |
if (!$user->rights->banque->configurer) |
|
|
|
|
if (!$user->admin && !$user->rights->banque->configurer) |
|
34 |
accessforbidden(); |
accessforbidden(); |
35 |
|
|
36 |
llxHeader(); |
llxHeader(); |
41 |
*/ |
*/ |
42 |
if ($_POST["action"] == 'add') |
if ($_POST["action"] == 'add') |
43 |
{ |
{ |
44 |
if ($_POST["label"]) { |
if ($_POST["label"]) |
45 |
|
{ |
46 |
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')"; |
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')"; |
47 |
$result = $db->query($sql); |
$result = $db->query($sql); |
48 |
|
|
49 |
if (!$result) |
if (!$result) |
50 |
{ |
{ |
51 |
dolibarr_print_error($db); |
dolibarr_print_error($db); |
52 |
} |
} |
53 |
} |
} |
54 |
} |
} |
55 |
|
|
|
|
|
56 |
/* |
/* |
57 |
* Affichage liste des catégories |
* Affichage liste des catégories |
58 |
*/ |
*/ |