* * 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: groupe.php,v 1.1 2005/07/23 13:31:59 rodolphe Exp $ * $Source: /srv/cvs/sources/dolibarr/dolibarr/htdocs/energie/Attic/groupe.php,v $ * */ /** \file htdocs/energie/groupe.php \ingroup energie \brief Fiche groupe \version $Revision: 1.1 $ */ require("./pre.inc.php"); /* * */ if ($_POST["action"] == 'add') { $groupe = new EnergieGroupe($db, $user); if ( $groupe->create($_POST["libelle"]) == 0) { Header("Location: groupe.php?id=".$groupe->id); } else { Header("Location: groupe.php?action=create"); } } /* * */ llxHeader($langs, '',$langs->trans("Groupe"),"Groupe"); /********************************************************************* * * Mode creation * * ************************************************************************/ if ($_GET["action"] == 'create') { $head[0][0] = DOL_URL_ROOT.'/energie/groupe.php?action=create'; $head[0][1] = "Nouveau groupe"; $h++; $a = 0; dolibarr_fiche_head($head, $a, $soc->nom); $html = new Form($db); print '
'; print ''; print ''; print ""; print ''; print ''; print ''; print "
Libellé

"; print ''; } else /* *************************************************************************** */ /* */ /* Mode vue */ /* */ /* *************************************************************************** */ { if ($_GET["id"] > 0) { $groupe = new EnergieGroupe($db, $user); if ( $groupe->fetch($_GET["id"]) == 0) { $head[0][0] = DOL_URL_ROOT.'/energie/groupe.php?id='.$commande->id; $head[0][1] = "Groupe"; $h++; $a = 0; dolibarr_fiche_head($head, $a, $soc->nom); print ''; print ""; print '"; print "
".$langs->trans("Groupe")."'; print $groupe->libelle; print "

"; /* * */ print ''; print ''; print '
'; $file = "groupe.day.".$groupe->id.".png"; print ''; print ''; $file = "groupe.week.".$groupe->id.".png"; print ''; print '
'; $file = "groupe.month.".$groupe->id.".png"; print ''; print ''; $file = "groupe.year.".$groupe->id.".png"; print ''; print '

'; print ''; print "
\n"; } else { /* Commande non trouvée */ print "Groupe inexistant"; } } else { print "Groupe inexistant"; } } $db->close(); llxFooter("Dernière modification $Date: 2005/07/23 13:31:59 $ révision $Revision: 1.1 $"); ?>