* 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$ * */ require("./pre.inc.php"); llxHeader(); if ($action == 'add') { $concert = new Concert($db); $concert->groupartid = $_POST["ga"]; $concert->lieuid = $_POST["lc"]; $concert->date = $db->idate(mktime(12, 0 , 0, $remonth, $reday, $reyear)); $concert->description = $desc; $id = $concert->create($user); } if ($action == 'update') { $concert = new Concert($db); $concert->groupartid = $_POST["ga"]; $concert->lieuid = $_POST["lc"]; $concert->date = $db->idate(mktime(12, 0 , 0, $remonth, $reday, $reyear)); $concert->description = $desc; $concert->update($id, $user); } if ($action == 'updateosc') { $concert = new Concert($db); $result = $concert->fetch($id); $concert->updateosc($user); } /* * * */ if ($action == 'create') { print "
\n"; print ""; print '
Nouveau concert

'; $htmls = new Form($db); print ''; $ga = new Groupart($db); print ""; print "'; $lc = new LieuConcert($db); print "'; print ''; print '
Date"; print_date_select(); print "
Lieu"; $htmls->select_array("ga", $ga->liste_array()); print '
Lieu"; $htmls->select_array("lc", $lc->liste()); print 'Nouveau lieu
 
'; print '
'; } else { if ($id) { $concert = new Concert($db); $result = $concert->fetch($id); $groupart = new Groupart($db); $result = $groupart->fetch($concert->groupartid); $lieuconcert = new LieuConcert($db); $result = $lieuconcert->fetch($concert->lieuid); if ( $result ) { print '
Fiche Concert : '.$concert->titre.'

'; print ''; print ""; print "\n"; print '"; print '"; print '"; print "
Date".strftime("%A %d %B %Y",$concert->date)."
Artiste/Groupe'.$groupart->nom_url."
Lieu'.$lieuconcert->nom_url."
'.$langs->trans("Description").''.nl2br($concert->description)."
"; } if ($action == 'edit') { print '
Edition de la fiche Concert : '.$concert->titre.'

'; print "
\n"; print ""; print ''; print ""; print ''; print ''; print ''; print '"; print ''; print '
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'.$langs->trans("Price").'
'.$langs->trans("Description").''; print '
'; } } else { print "Error"; } } /* ************************************************************************** */ /* */ /* Barre d'action */ /* */ /* ************************************************************************** */ print '
'; print ''; print ''; print ''; if ($action == 'create') { print ''; } else { print ''; } print ''; print '
-[Update Osc]--['.$langs->trans("Edit").']-

'; $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>