* Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * */ /*! \file htdocs/product/fiche.php \ingroup product \brief Page de la fiche produit \version $Revision$ */ require("./pre.inc.php"); $mesg = ''; if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer) { $compte = new ComptaCompte($db); $compte->numero = $_POST["numero"]; $compte->intitule = $_POST["intitule"]; $e_compte = $compte; $res = $compte->create($user); if ($res == 0) { Header("Location: liste.php"); } else { if ($res == -3) { $_error = 1; $_GET["action"] = "create"; $_GET["type"] = $_POST["type"]; } if ($res == -4) { $_error = 2; $_GET["action"] = "create"; $_GET["type"] = $_POST["type"]; } } } llxHeader("","Comptes Généraux"); /* * Création d'un compte * */ if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer) { $html = new Form($db); $nbligne=0; print_fiche_titre('Comptes Généraux'); print '
'; print ''; print ''."\n"; print ''; print ''; print ''; print ''; print ''; print '
Numéro de compte'; if ($_error == 1) { print "Ce numéro de compte existe déjà"; } if ($_error == 2) { print "Valeur(s) manquante(s)"; } print '
Intitulé
 
'; print '
'; } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>