/[dolibarr]/dolibarr/htdocs/compta/bank/categ.php
ViewVC logotype

Diff of /dolibarr/htdocs/compta/bank/categ.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by hregis, Wed Jul 27 15:54:59 2005 UTC revision 1.16 by rodolphe, Wed Jul 27 15:59:44 2005 UTC
# Line 1  Line 1 
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
# Line 22  Line 22 
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();
# Line 43  llxHeader(); Line 41  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   */   */

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26