diff --git a/htdocs/product/album/album.class.php b/htdocs/product/album/album.class.php
deleted file mode 100644
index 9edc7f82525..00000000000
--- a/htdocs/product/album/album.class.php
+++ /dev/null
@@ -1,324 +0,0 @@
-
- *
- * 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$
- *
- */
-
-class Album {
- var $db ;
-
- var $id ;
- var $oscid ;
- var $ref;
- var $annee;
- var $titre;
- var $description;
- var $price ;
- var $status ;
-
- function Album($DB, $id=0) {
- $this->db = $DB;
- $this->id = $id ;
- }
- /*
- *
- *
- *
- */
- function create($user) {
-
- if (strlen($this->annee))
- {
- $this->annee = 0;
- }
-
- $sql = "INSERT INTO ".OSC_DB_NAME.".products (products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) ";
- $sql .= "VALUES ('', '', 'Array', '', null, '', '0', '0', '8', now())";
-
- if ($this->db->query($sql) )
- {
- $idosc = $this->db->last_insert_id(OSC_DB_NAME.".products");
-
- $sql = "INSERT INTO ".OSC_DB_NAME.".products_to_categories (products_id, categories_id) VALUES ($idosc, 0)";
-
- if ($this->db->query($sql) )
- {
-
- $sql = "INSERT INTO ".OSC_DB_NAME.".products_description (products_name, products_description, products_url, products_id, language_id) VALUES ('".trim($this->titre)."', '".trim($this->description)."', '', $idosc, '1')";
-
- if ($this->db->query($sql) )
- {
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."album (osc_id, fk_user_author) VALUES ($idosc, ".$user->id.")";
-
- if ($this->db->query($sql) )
- {
- $id = $this->db->last_insert_id(MAIN_DB_PREFIX."album");
-
- if ( $this->update($id, $user) )
- {
- return $id;
- }
- }
- else
- {
- print $this->db->error() . ' in ' . $sql;
- }
-
- }
- else
- {
- print $this->db->error() . ' in ' . $sql;
- }
-
- }
- else
- {
- print $this->db->error() . ' in ' . $sql;
- }
-
- }
- else
- {
- print $this->db->error() . ' in ' . $sql;
- }
-
- }
-
- /*
- *
- *
- *
- */
- function linkga($id, $gaid)
- {
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."album_to_groupart (fk_album, fk_groupart) VALUES ($id, $gaid)";
-
- if ( $this->db->query($sql) ) {
- return 1;
- } else {
- print $this->db->error() . ' in ' . $sql;
- }
- }
- /*
- *
- *
- */
- function liste_groupart()
- {
- $ga = array();
-
- $sql = "SELECT g.rowid, g.nom FROM ".MAIN_DB_PREFIX."groupart as g, ".MAIN_DB_PREFIX."album_to_groupart as l";
- $sql .= " WHERE g.rowid = l.fk_groupart AND l.fk_album = ".$this->id;
- $sql .= " ORDER BY g.nom";
-
- $result=$this->db->query($sql);
- if ($result)
- {
- $nump = $this->db->num_rows($result);
-
- if ($nump)
- {
- $i = 0;
- while ($i < $nump)
- {
- $obj = $this->db->fetch_object($result);
-
- $ga[$obj->rowid] = $obj->nom;
- $i++;
- }
- $this->db->free($result);
- }
- return $ga;
- }
- else
- {
- print $this->db->error();
- return -1;
- }
- }
- /*
- *
- *
- *
- */
- function updateosc()
- {
-
- $sql = "UPDATE ".OSC_DB_NAME.".products_description ";
-
- $sql .= " SET products_name = '".$this->titre."'";
-
- $desc .= '
Info supplémentaires';
- $ga = array();
- $ga = $this->liste_groupart();
- if (sizeof($ga) == 1)
- {
- foreach ($ga as $key => $value)
- {
- $gaid = $key;
- }
-
-
- $groupart = new Groupart($this->db);
- $result = $groupart->fetch($gaid);
-
- if ( $result )
- {
-
- $desc = $groupart->nom."
";
-
- $desc .= addslashes($this->description);
-
- $desc .= "
Autres albums : ";
-
- $gas = $groupart->liste_albums();
- $i = 0;
- $sizegas = sizeof($gas) - 1;
- foreach ($gas as $key => $value)
- {
- if ($key <> $this->id)
- {
-
- $otha = new Album($this->db);
- $otha->fetch($key);
-
- $desc .= ''.$value."";
- $i++;
- if ($sizegas > $i)
- {
- $desc .= ", ";
- }
- }
- }
- }
- }
-
-
- $sql .= ", products_description = '$desc'";
-
- $sql .= " WHERE products_id = " . $this->oscid;
-
- if ( $this->db->query($sql) ) {
- return 1;
- } else {
- print $this->db->error() . ' in ' . $sql;
- }
- }
- /*
- *
- *
- *
- */
- function update($id, $user)
- {
-
- if (strlen($this->annee)==0)
- {
- $this->annee = 0;
- }
-
- $sql = "UPDATE ".MAIN_DB_PREFIX."album ";
- $sql .= " SET title = '" . trim($this->titre) ."'";
- $sql .= ", ref = '" . trim(strtoupper($this->ref)) ."'";
- $sql .= ", annee = " . $this->annee ;
- $sql .= ",description = '" . trim($this->description) ."'";
-
- $sql .= " WHERE rowid = " . $id;
-
- if ( $this->db->query($sql) ) {
- return 1;
- } else {
- print $this->db->error() . ' in ' . $sql;
- }
- }
- /*
- *
- *
- *
- */
- function fetch ($id) {
-
- $sql = "SELECT rowid, ref, annee, osc_id, title, description FROM ".MAIN_DB_PREFIX."album WHERE rowid = $id";
-
- $result = $this->db->query($sql) ;
-
- if ( $result )
- {
- $result = $this->db->fetch_array();
-
- $this->id = $result["rowid"];
- $this->ref = $result["ref"];
- $this->annee = $result["annee"];
- $this->titre = $result["title"];
- $this->description = $result["description"];
- $this->oscid = $result["osc_id"];
-
- $this->db->free();
-
-
- $sql = "SELECT products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added";
- $sql .= " FROM ".OSC_DB_NAME.".products WHERE products_id = " . $this->oscid;
-
- $result = $this->db->query($sql) ;
-
- if ( $result )
- {
- $result = $this->db->fetch_array();
-
- $this->status = $result["products_status"];
- $this->price = $result["products_price"];
-
- $this->db->free();
- }
- else
- {
- print $this->db->error();
- }
- }
- else
- {
- print $this->db->error();
- }
-
- return $result;
- }
-
-
- /*
- *
- *
- */
- function delete($user) {
-
- $sql = "DELETE FROM ".OSC_DB_NAME.".products WHERE products_id = $idosc ";
-
- $sql = "DELETE FROM ".OSC_DB_NAME.".products_to_categories WHERE products_id = $idosc";
-
- $sql = "DELETE FROM ".OSC_DB_NAME.".products_description WHERE products_id = $idosc";
-
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."album WHERE rowid = $id";
-
-
- }
-
-
-}
-?>
diff --git a/htdocs/product/album/fiche.php b/htdocs/product/album/fiche.php
deleted file mode 100644
index 7f24022ce06..00000000000
--- a/htdocs/product/album/fiche.php
+++ /dev/null
@@ -1,214 +0,0 @@
-
- * 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') {
- $album = new Album($db);
-
- $album->titre = $titre;
- $album->ref = $ref;
- $album->annee = $annee;
- $album->description = $desc;
-
- $id = $album->create($user);
-}
-
-if ($action == 'addga') {
- $album = new Album($db);
-
- $album->linkga($id, $ga);
-}
-
-
-if ($action == 'update') {
- $album = new Album($db);
-
- $album->titre = $titre;
- $album->ref = $ref;
- $album->annee = $annee;
- $album->description = $desc;
-
- $album->update($id, $user);
-}
-
-if ($action == 'updateosc') {
- $album = new Album($db);
- $result = $album->fetch($id);
-
- $album->updateosc($user);
-}
-
-/*
- *
- *
- */
-if ($action == 'create')
-{
-
- print "';
-
-
-}
-else
-{
- if ($id)
- {
-
- $album = new Album($db);
- $result = $album->fetch($id);
-
- if ( $result )
- {
-
- $gas = $album->liste_groupart();
-
-
- print_fiche_titre('Fiche Album : '.$album->titre);
-
- print '';
- print "";
- print '| '.$langs->trans("Ref").' | '.$album->ref.' | ';
- print ''.$langs->trans("Description").' |
';
-
- print '| '.$langs->trans("Status")." | $album->status | \n";
- print ''.nl2br($album->description)." | ";
- print "
| Titre | $album->titre |
\n";
- print "| Annee | $album->annee |
\n";
- print '| '.$langs->trans("Price").' | '.price($album->price).' |
';
-
- print 'Artiste/Groupe | ';
- foreach ($gas as $key => $value)
- {
- print ''.$value." ";
- }
- print " | \n";
-
- print "
";
-
-
- if ($action == 'edit')
- {
- print_fiche_titre('Edition de la fiche Album : '.$album->titre);
-
- print "