Suppression de fichiers inutiles
This commit is contained in:
parent
12f5ae8fbc
commit
471c09402f
@ -1,257 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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 Categorie {
|
||||
var $db ;
|
||||
|
||||
var $id ;
|
||||
var $parent_id ;
|
||||
var $oscid ;
|
||||
var $ref;
|
||||
var $titre;
|
||||
var $description;
|
||||
var $price ;
|
||||
var $status ;
|
||||
|
||||
function Categorie($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function create($user) {
|
||||
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
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_array()
|
||||
{
|
||||
$cl = array();
|
||||
|
||||
$sql = "SELECT c.categories_id, cd.categories_name ";
|
||||
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
||||
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
||||
$sql .= " AND c.parent_id = 0 ORDER BY cd.categories_name";
|
||||
|
||||
if ( $this->db->query($sql) )
|
||||
{
|
||||
$num = $this->db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object( $i);
|
||||
|
||||
$cl[$objp->categories_id] = $objp->categories_name;
|
||||
|
||||
$var=!$var;
|
||||
$pc = array();
|
||||
$pc = $this->printc($objp->categories_id, 1);
|
||||
foreach($pc as $key => $value)
|
||||
{
|
||||
$cl[$key] = $value;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $cl;
|
||||
}
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function printc($id, $level)
|
||||
{
|
||||
$cr = array();
|
||||
$cat = new Categorie($this->db);
|
||||
$cat->fetch($id);
|
||||
|
||||
for ($i = 0 ; $i < $level ; $i++)
|
||||
{
|
||||
$prefix .= " ";
|
||||
}
|
||||
|
||||
$cr[$cat->id] = $cat->name;
|
||||
|
||||
$childs = array();
|
||||
$childs = $cat->liste_childs_array();
|
||||
|
||||
if (sizeof($childs))
|
||||
{
|
||||
foreach($childs as $key => $value)
|
||||
{
|
||||
$pc = array();
|
||||
$pc = $this->printc($key,$level+1);
|
||||
foreach($pc as $key => $value)
|
||||
{
|
||||
$cr[$key] = $prefix . $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $cr;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function liste_childs_array()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
$sql = "SELECT c.categories_id, cd.categories_name";
|
||||
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
||||
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
||||
$sql .= " AND c.parent_id = " . $this->id;
|
||||
$sql .= " ORDER BY cd.categories_name";
|
||||
|
||||
$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->categories_id] = $obj->categories_name;
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
return $ga;
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->db->error();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."album ";
|
||||
$sql .= " SET title = '" . trim($this->titre) ."'";
|
||||
$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 c.categories_id, cd.categories_name, c.parent_id";
|
||||
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
||||
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
||||
$sql .= " AND c.categories_id = $id";
|
||||
$result = $this->db->query($sql) ;
|
||||
|
||||
if ( $result ) {
|
||||
$result = $this->db->fetch_array();
|
||||
|
||||
$this->id = $result["categories_id"];
|
||||
$this->parent_id = $result["parent_id"];
|
||||
$this->name = $result["categories_name"];
|
||||
$this->titre = $result["title"];
|
||||
$this->description = $result["description"];
|
||||
$this->oscid = $result["osc_id"];
|
||||
}
|
||||
$this->db->free();
|
||||
|
||||
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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
@ -1,196 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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");
|
||||
|
||||
// \todo Par qui est appelé ce fichier ?
|
||||
|
||||
// Régis : ce répertoire catégorie et ses fichiers était pour OSCommerce
|
||||
// à mon avis ils ne sont plus utilisés
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($action == 'add') {
|
||||
$album = new Album($db);
|
||||
|
||||
$album->titre = $titre;
|
||||
$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->description = $desc;
|
||||
|
||||
$album->update($id, $user);
|
||||
}
|
||||
|
||||
if ($action == 'updateosc') {
|
||||
$album = new Album($db);
|
||||
$result = $album->fetch($id);
|
||||
|
||||
$album->updateosc($user);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
if ($action == 'create')
|
||||
{
|
||||
|
||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||
|
||||
print '<div class="titre">Nouvel album</div><br>';
|
||||
|
||||
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("Ref").'</td><td><input name="ref" size="20" value=""></td></tr>';
|
||||
print '<td>Titre</td><td><input name="titre" size="40" value=""></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Price").'</td><TD><input name="price" size="10" value=""></td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
print '<textarea name="desc" rows="8" cols="50">';
|
||||
print "</textarea></td></tr>";
|
||||
print '<tr><td> </td><td><input type="submit" value="Créer"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($id)
|
||||
{
|
||||
|
||||
$album = new Album($db);
|
||||
$result = $album->fetch($id);
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
print '<div class="titre">Fiche Album : '.$album->titre.'</div><br>';
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="3">';
|
||||
print '<tr><td>'.$langs->trans("Ref").'</td><td>'.$album->ref.'</td><tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$album->status.'</td><tr>';
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td>'.$album->titre.'</td><tr>';
|
||||
print '<tr><td>'.$langs->trans("Price").'</td><td>'.price($album->price).'</td><tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td valign="top">'.nl2br($album->description).'</td>';
|
||||
|
||||
$gas = $album->liste_groupart();
|
||||
print '<td valign="top">Artiste/Groupe</td><td><ul>';
|
||||
foreach ($gas as $key => $value)
|
||||
{
|
||||
print '<li><a href="../groupart/fiche.php?id='.$key.'">'.$value."</a></li>";
|
||||
}
|
||||
print "</ul></td></tr>\n";
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<hr><div class="titre">Edition de la fiche Album : '.$album->titre.'</div><br>';
|
||||
|
||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="3">';
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("Ref").'</td><td><input name="ref" size="20" value="'.$album->ref.'"></td></tr>';
|
||||
print '<td>'.$langs->trans("Label").'</td><td><input name="titre" size="40" value="'.$album->titre.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Price").'</td><td><input name="price" size="10" value="'.$album->price.'"></td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
print '<textarea name="desc" rows="8" cols="50">';
|
||||
print $album->description;
|
||||
print "</textarea></td></tr>";
|
||||
print '<tr><td> </td><td><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$htmls = new Form($db);
|
||||
$ga = new Groupart($db);
|
||||
|
||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"addga\">";
|
||||
|
||||
foreach ($gas as $key => $value)
|
||||
{
|
||||
print '<tr><td>Artiste/Groupe</td>';
|
||||
print '<td><a href="../groupart/fiche.php?id='.$key.'">'.$value."</td></tr>\n";
|
||||
}
|
||||
|
||||
print "<tr><td>Artiste/Groupe</td><td>";
|
||||
$htmls->select_array("ga", $ga->liste_array());
|
||||
print "</td></tr>";
|
||||
print '<tr><td> </td><td><input type="submit" value="'.$langs->trans("Add").'"></td></tr>';
|
||||
print "</form>";
|
||||
print '</table>';
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error";
|
||||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
print '<br><table width="100%" border="1" cellspacing="0" cellpadding="3">';
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
|
||||
print '<td width="20%" align="center">[<a href="fiche.php?action=updateosc&id='.$id.'">Update Osc</a>]</td>';
|
||||
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td width="20%" align="center">[<a href="fiche.php?action=edit&id='.$id.'">'.$langs->trans("Edit").'</a>]</td>';
|
||||
}
|
||||
print '<td width="20%" align="center">-</td>';
|
||||
print '</table><br>';
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
@ -1,209 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 ($id)
|
||||
{
|
||||
$title = title_url($id, $db);
|
||||
|
||||
print_barre_liste($title, $page, "index.php");
|
||||
|
||||
$sql = "SELECT products_id FROM ".OSC_DB_NAME.".products_to_categories WHERE categories_id = $id";
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$numprod = $db->num_rows();
|
||||
$i = 0;
|
||||
$wc = "(";
|
||||
while ($i < $numprod)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$wc .= $objp->products_id;
|
||||
if ($i < $numprod -1)
|
||||
{
|
||||
$wc .= ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$wc .=")";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
// print $wc ;
|
||||
|
||||
if ($numprod)
|
||||
{
|
||||
|
||||
$sql = "SELECT l.rowid, l.title, l.oscid, l.ref, l.status FROM ".MAIN_DB_PREFIX."livre as l";
|
||||
$sql .= " WHERE l.oscid in $wc";
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\"><td>".$langs->trans("Ref")."</td>";
|
||||
print_liste_field_titre("Titre","index.php", "l.title");
|
||||
print '<td colspan="3"> </td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->ref.'</a></TD>';
|
||||
print '<td width="70%"><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->title.'</a></TD>';
|
||||
|
||||
if ($objp->status == 1)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green.png" border="0"></a></td>';
|
||||
print '<td align="center">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red_light.png" border="0"></a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green_light.png" border="0"></a></td>';
|
||||
print '<td align="center">';
|
||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red.png" border="0"></a></td>';
|
||||
}
|
||||
|
||||
print '<td align="right">';
|
||||
print '<a href="'.OSC_CATALOG_URL.'product_info.php?products_id='.$objp->oscid.'">Fiche en ligne</a></TD>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Aucun produits dans cette catégorie";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
print_barre_liste("Liste des catégories", $page, "index.php");
|
||||
|
||||
$sql = "SELECT c.categories_id, cd.categories_name ";
|
||||
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
||||
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
||||
$sql .= " AND c.parent_id = 0";
|
||||
$sql .= " ORDER BY cd.categories_name ASC ";
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre("Titre","index.php", "a.title");
|
||||
print "<td> </td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
|
||||
printc($objp->categories_id,$db, 0);
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function printc($id, $db, $level)
|
||||
{
|
||||
|
||||
$cat = new Categorie($db);
|
||||
$cat->fetch($id);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
for ($i = 0 ; $i < $level ; $i++)
|
||||
{
|
||||
print " |--";
|
||||
}
|
||||
|
||||
print '<a href="index.php?id='.$cat->id.'">'.$cat->name."</a></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$childs = array();
|
||||
$childs = $cat->liste_childs_array();
|
||||
if (sizeof($childs))
|
||||
{
|
||||
foreach($childs as $key => $value)
|
||||
{
|
||||
printc($key,$db, $level+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function title_url($id, $db)
|
||||
{
|
||||
|
||||
$cat = new Categorie($db);
|
||||
$cat->fetch($id);
|
||||
|
||||
$title = $title . '<a href="index.php?id='.$cat->id.'">'. $cat->name ."</a>";
|
||||
|
||||
|
||||
if (sizeof($cat->parent_id))
|
||||
{
|
||||
$title = title_url($cat->parent_id, $db) . " / ".$title;
|
||||
}
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,84 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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("../../main.inc.php");
|
||||
require("../groupart/groupart.class.php");
|
||||
require("../categorie/categorie.class.php");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $user, $conf;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
if ($conf->boutique->livre->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/boutique/livre/", "Livres");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/boutique/livre/fiche.php?&action=create","Nouvel ouvrage");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/boutique/auteur/", "Auteurs");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/boutique/auteur/fiche.php?&action=create","Nouvel auteur");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/boutique/editeur/", "Editeurs");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/boutique/editeur/fiche.php?&action=create","Nouvel éditeur");
|
||||
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/categorie/", "Catégories");
|
||||
|
||||
if ($conf->boutique->album->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/product/album/", "Albums");
|
||||
|
||||
$menu->add_submenu("../osc-liste.php", "Osc");
|
||||
$menu->add_submenu("../osc-liste.php?reqstock=epuise", "Produits Epuisés");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/product/album/fiche.php?&action=create","Nouvel album");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/groupart/", "Artistes/Groupes");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/product/groupart/fiche.php?&action=create","Nouvel Artiste/Groupe");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/concert/", "Concerts");
|
||||
|
||||
$menu->add_submenu("/product/concert/fiche.php?&action=create","Nouveau concert");
|
||||
|
||||
$menu->add("../osc-reviews.php", "Critiques");
|
||||
|
||||
$menu->add_submenu("../osc-productsbyreviews.php", "Meilleurs produits");
|
||||
}
|
||||
|
||||
left_menu($menu->liste);
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
}
|
||||
?>
|
||||
@ -65,21 +65,6 @@ function llxHeader($head = "", $urlp = "", $title="")
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->boutique->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/product/osc-liste.php", "Osc");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/product/osc-liste.php?reqstock=epuise", "Produits Epuisés");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/osc-reviews.php", $langs->trans("Criticals"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/product/osc-productsbyreviews.php", "Meilleurs produits");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/album/", "Albums");
|
||||
$menu->add(DOL_URL_ROOT."/product/groupart/", "Groupes/Artistes");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/categorie/", $langs->trans("Categories"));
|
||||
}
|
||||
|
||||
if ($conf->fournisseur->enabled) {
|
||||
$langs->load("suppliers");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_album
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
osc_id integer NOT NULL,
|
||||
tms timestamp,
|
||||
ref varchar(12),
|
||||
title varchar(64),
|
||||
annee smallint(64),
|
||||
description text,
|
||||
collectif tinyint,
|
||||
fk_user_author integer
|
||||
)type=innodb;
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_album_to_groupart
|
||||
(
|
||||
fk_album integer NOT NULL,
|
||||
fk_groupart integer NOT NULL,
|
||||
|
||||
unique key(fk_album, fk_groupart)
|
||||
)type=innodb;
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_concert
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
date_concert datetime NOT NULL,
|
||||
description text,
|
||||
collectif tinyint DEFAULT 0 NOT NULL,
|
||||
fk_groupart integer,
|
||||
fk_lieu_concert integer,
|
||||
fk_user_author integer
|
||||
)type=innodb;
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_groupart
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
osc_id integer NOT NULL,
|
||||
tms timestamp,
|
||||
nom varchar(64),
|
||||
groupart enum("artiste","groupe") NOT NULL,
|
||||
description text NOT NULL,
|
||||
fk_user_author integer
|
||||
)type=innodb;
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
-- Generated from dolibarr_mysql2pgsql
|
||||
-- (c) 2004, PostgreSQL Inc.
|
||||
-- (c) 2005, Laurent Destailleur.
|
||||
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_album
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"osc_id" integer NOT NULL,
|
||||
"tms" timestamp,
|
||||
"ref" varchar(12),
|
||||
"title" varchar(64),
|
||||
"annee" int2,
|
||||
"description" text,
|
||||
"collectif" smallint,
|
||||
"fk_user_author" integer
|
||||
);
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
-- Generated from dolibarr_mysql2pgsql
|
||||
-- (c) 2004, PostgreSQL Inc.
|
||||
-- (c) 2005, Laurent Destailleur.
|
||||
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
create table llx_album_to_groupart
|
||||
(
|
||||
"fk_album" integer NOT NULL,
|
||||
"fk_groupart" integer NOT NULL,
|
||||
UNIQUE(fk_album, fk_groupart)
|
||||
);
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
-- Generated from dolibarr_mysql2pgsql
|
||||
-- (c) 2004, PostgreSQL Inc.
|
||||
-- (c) 2005, Laurent Destailleur.
|
||||
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_concert
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"tms" timestamp,
|
||||
"date_concert" timestamp,
|
||||
"description" text,
|
||||
"collectif" smallint DEFAULT 0 NOT NULL,
|
||||
"fk_groupart" integer,
|
||||
"fk_lieu_concert" integer,
|
||||
"fk_user_author" integer
|
||||
);
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
-- Generated from dolibarr_mysql2pgsql
|
||||
-- (c) 2004, PostgreSQL Inc.
|
||||
-- (c) 2005, Laurent Destailleur.
|
||||
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_groupart
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"osc_id" integer NOT NULL,
|
||||
"tms" timestamp,
|
||||
"nom" varchar(64),
|
||||
"groupart" varchar(7) CHECK (groupart IN ('artiste','groupe')) NOT NULL,
|
||||
"description" text NOT NULL,
|
||||
"fk_user_author" integer
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user