[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: fiche.php,v 1.7 2005/10/19 05:12:49 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/param/comptes/fiche.php,v $ 21 */ 22 23 24 /** 25 \file htdocs/compta/param/comptes/fiche.php 26 \ingroup compta 27 \brief Page de la fiche des comptes comptables 28 \version $Revision: 1.7 $ 29 */ 30 31 require ("./pre.inc.php"); 32 33 $mesg = ''; 34 35 if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer) 36 { 37 $compte = new ComptaCompte($db); 38 39 $compte->numero = $_POST["numero"]; 40 $compte->intitule = $_POST["intitule"]; 41 42 $e_compte = $compte; 43 44 $res = $compte->create($user); 45 46 if ($res == 0) 47 { 48 Header("Location: liste.php"); 49 } 50 else 51 { 52 if ($res == -3) 53 { 54 $_error = 1; 55 $_GET["action"] = "create"; 56 $_GET["type"] = $_POST["type"]; 57 } 58 if ($res == -4) 59 { 60 $_error = 2; 61 $_GET["action"] = "create"; 62 $_GET["type"] = $_POST["type"]; 63 } 64 } 65 } 66 67 llxHeader("","Nouveau compte"); 68 69 /* 70 * Création d'un compte 71 * 72 */ 73 if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer) 74 { 75 $html = new Form($db); 76 $nbligne=0; 77 78 print_fiche_titre($langs->trans("NewAccount")); 79 80 print '<form action="fiche.php" method="post">'; 81 print '<input type="hidden" name="action" value="add">'; 82 print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n"; 83 84 print '<table class="border" width="100%">'; 85 print '<tr>'; 86 print '<td>'.$langs->trans("AccountNumber").'</td><td><input name="numero" size="20" value="'.$compte->numero.'">'; 87 if ($_error == 1) 88 { 89 print "Ce numéro de compte existe déjà"; 90 } 91 if ($_error == 2) 92 { 93 print "Valeur(s) manquante(s)"; 94 } 95 print '</td></tr>'; 96 print '<tr><td>'.$langs->trans("Label").'</td><td><input name="intitule" size="40" value="'.$compte->intitule.'"></td></tr>'; 97 98 print '<tr><td> </td><td><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>'; 99 print '</table>'; 100 print '</form>'; 101 } 102 103 $db->close(); 104 105 llxFooter('$Date: 2005/10/19 05:12:49 $ - $Revision: 1.7 $'); 106 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |