diff --git a/htdocs/includes/boxes/box_boutique_livre.php b/htdocs/includes/boxes/box_boutique_livre.php index 383f182391c..a6eaa20c770 100644 --- a/htdocs/includes/boxes/box_boutique_livre.php +++ b/htdocs/includes/boxes/box_boutique_livre.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,6 +21,12 @@ * */ +/** + \file htdocs/includes/boxes/box_boutique_livre.php + \ingroup boutique + \brief Module de génération de l'affichage de la box boutique livres +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Les 20 derniers ouvrages"); @@ -40,9 +47,10 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_book', 'text' => $objp->title, 'url' => DOL_URL_ROOT."/boutique/livre/fiche.php?id=".$objp->rowid); diff --git a/htdocs/includes/boxes/box_clients.php b/htdocs/includes/boxes/box_clients.php index 4a611e89404..03bebef84b1 100644 --- a/htdocs/includes/boxes/box_clients.php +++ b/htdocs/includes/boxes/box_clients.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,6 +21,12 @@ * */ +/** + \file htdocs/includes/boxes/box_clients.php + \ingroup societes + \brief Module de génération de l'affichage de la box clients +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Les 5 derniers clients enregistrés"); @@ -44,9 +51,10 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_company', 'text' => stripslashes($objp->nom), 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp); diff --git a/htdocs/includes/boxes/box_commandes.php b/htdocs/includes/boxes/box_commandes.php index 2b14a237167..cbdeb4207e8 100644 --- a/htdocs/includes/boxes/box_commandes.php +++ b/htdocs/includes/boxes/box_commandes.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2005 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 @@ -20,6 +20,13 @@ * $Source$ * */ + +/** + \file htdocs/includes/boxes/box_commandes.php + \ingroup commande + \brief Module de génération de l'affichage de la box commandes +*/ + if ($user->rights->commande->lire) { @@ -47,10 +54,11 @@ if ($user->rights->commande->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', - 'text' => img_file()." ".$objp->ref, + 'logo' => 'object_order', + 'text' => $objp->ref, 'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid); $info_box_contents[$i][1] = array('align' => 'left', diff --git a/htdocs/includes/boxes/box_external_rss.php b/htdocs/includes/boxes/box_external_rss.php index f16bab46f10..453c7b52a8c 100644 --- a/htdocs/includes/boxes/box_external_rss.php +++ b/htdocs/includes/boxes/box_external_rss.php @@ -1,6 +1,7 @@ - * Copyright (C) 2003 Éric Seigne +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2003 Éric Seigne + * Copyright (C) 2004-2005 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 @@ -21,8 +22,8 @@ * */ -/*! - \file htdocs/includes/boxes/box_external_rss +/** + \file htdocs/includes/boxes/box_external_rss.php \ingroup external_rss \brief Fichier de gestion d'une box pour le module external_rss \version $Revision$ @@ -30,9 +31,6 @@ require_once("includes/magpierss/rss_fetch.inc"); -//rq erics: -// A changer si on a plus d'un site syndiqué ? je n'ai pas encore tout -// compris aux boxes, sorry ! for($site = 0; $site < 1; $site++) { $info_box_head = array(); $info_box_head[] = array('text' => "Les 5 dernières infos du site " . @constant("EXTERNAL_RSS_TITLE_". $site)); @@ -42,11 +40,15 @@ for($site = 0; $site < 1; $site++) { $item = $rss->items[$i]; $href = $item['link']; $title = utf8_decode(urldecode($item['title'])); + $title=ereg_replace("([[:alnum:]])\?([[:alnum:]])","\\1'\\2",$title); // Gère problème des apostrophes mal codée/décodée par utf8 + $title=ereg_replace("^\s+","",$title); // Supprime espaces de début $info_box_contents["$href"]="$title"; $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_rss', 'text' => $title, 'url' => $href); } new infoBox($info_box_head, $info_box_contents); } + ?> diff --git a/htdocs/includes/boxes/box_factures.php b/htdocs/includes/boxes/box_factures.php index b0417096a8c..a38750d494a 100644 --- a/htdocs/includes/boxes/box_factures.php +++ b/htdocs/includes/boxes/box_factures.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2005 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 @@ -21,6 +21,12 @@ * */ +/** + \file htdocs/includes/boxes/box_factures.php + \ingroup factures + \brief Module de génération de l'affichage de la box factures +*/ + if ($user->rights->facture->lire) { @@ -48,10 +54,11 @@ if ($user->rights->facture->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', - 'text' => img_file()." ".$objp->facnumber, + 'logo' => 'object_bill', + 'text' => $objp->facnumber, 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); $info_box_contents[$i][1] = array('align' => 'left', diff --git a/htdocs/includes/boxes/box_factures_fourn.php b/htdocs/includes/boxes/box_factures_fourn.php index 61dee817363..cf0ce3d2854 100644 --- a/htdocs/includes/boxes/box_factures_fourn.php +++ b/htdocs/includes/boxes/box_factures_fourn.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2005 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 @@ -21,6 +21,14 @@ * */ +/** + \file htdocs/includes/boxes/box_factures_fourn.php + \ingroup fournisseur + \brief Fichier de gestion d'une box des factures fournisseurs + \version $Revision$ +*/ + + if ($user->rights->facture->lire) { @@ -48,11 +56,12 @@ if ($user->rights->facture->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_bill', 'text' => $objp->facnumber, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); $info_box_contents[$i][1] = array('align' => 'left', 'text' => $objp->nom, diff --git a/htdocs/includes/boxes/box_factures_fourn_imp.php b/htdocs/includes/boxes/box_factures_fourn_imp.php index c8011ce9823..a9eb41b0ac2 100644 --- a/htdocs/includes/boxes/box_factures_fourn_imp.php +++ b/htdocs/includes/boxes/box_factures_fourn_imp.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2005 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 @@ -19,6 +19,14 @@ * $Source$ * */ + +/** + \file htdocs/includes/boxes/box_factures_fourn_imp.php + \ingroup fournisseur + \brief Fichier de gestion d'une box des factures fournisseurs impayees + \version $Revision$ +*/ + if ($user->rights->facture->lire) { $nbtoshow=5; @@ -46,11 +54,12 @@ if ($user->rights->facture->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_product', 'text' => $objp->facnumber, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); $info_box_contents[$i][1] = array('align' => 'left', 'text' => $objp->nom, diff --git a/htdocs/includes/boxes/box_factures_imp.php b/htdocs/includes/boxes/box_factures_imp.php index b11d69778e7..c8c61cbf1c7 100644 --- a/htdocs/includes/boxes/box_factures_imp.php +++ b/htdocs/includes/boxes/box_factures_imp.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2005 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 @@ -20,6 +20,13 @@ * $Source$ * */ + +/** + \file htdocs/includes/boxes/box_factures_imp.php + \ingroup factures + \brief Module de génération de l'affichage de la box factures impayees +*/ + if ($user->rights->facture->lire) { $nbtoshow=5; @@ -47,9 +54,10 @@ if ($user->rights->facture->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_bill', 'text' => $objp->facnumber, 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); diff --git a/htdocs/includes/boxes/box_fournisseurs.php b/htdocs/includes/boxes/box_fournisseurs.php index 1f1450c3891..0f878325a35 100644 --- a/htdocs/includes/boxes/box_fournisseurs.php +++ b/htdocs/includes/boxes/box_fournisseurs.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2005 Destailleur Laurent * * 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 @@ -20,6 +20,12 @@ * */ +/** + \file htdocs/includes/boxes/box_fournisseurs.php + \ingroup fournisseurs + \brief Module de génération de l'affichage de la box fournisseurs +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Les 5 derniers fournisseurs enregistrés"); @@ -44,9 +50,10 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_company', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp); diff --git a/htdocs/includes/boxes/box_osc_client.php b/htdocs/includes/boxes/box_osc_client.php index f89421834fe..20062769caf 100644 --- a/htdocs/includes/boxes/box_osc_client.php +++ b/htdocs/includes/boxes/box_osc_client.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,6 +21,12 @@ * */ +/*! + \file htdocs/includes/boxes/box_osc_client.php + \ingroup osc + \brief Module de génération de l'affichage de la box osc client +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Clients"); @@ -37,11 +44,12 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'center', + 'logo' => 'object_product', 'text' => $objp->cus, - 'url' => "/boutique/client/"); + 'url' => DOL_URL_ROOT."/boutique/client/index.php"); $i++; } } diff --git a/htdocs/includes/boxes/box_produits.php b/htdocs/includes/boxes/box_produits.php index 0cee755aacf..e46e03d0dc9 100644 --- a/htdocs/includes/boxes/box_produits.php +++ b/htdocs/includes/boxes/box_produits.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2005 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 @@ -20,6 +20,13 @@ * $Source$ * */ + +/** + \file htdocs/includes/boxes/box_produits.php + \ingroup produits,services + \brief Module de génération de l'affichage de la box produits +*/ + if ($user->rights->produit->lire) { $info_box_head = array(); @@ -40,9 +47,10 @@ if ($user->rights->produit->lire) $i = 0; while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_product', 'text' => $objp->label, 'url' => DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); diff --git a/htdocs/includes/boxes/box_propales.php b/htdocs/includes/boxes/box_propales.php index e8fb36da44b..b0371cc9869 100644 --- a/htdocs/includes/boxes/box_propales.php +++ b/htdocs/includes/boxes/box_propales.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -19,6 +20,13 @@ * $Source$ * */ + +/** + \file htdocs/includes/boxes/box_propales.php + \ingroup propales + \brief Module de génération de l'affichage de la box propales +*/ + if ($user->rights->propale->lire) { @@ -46,9 +54,10 @@ if ($user->rights->propale->lire) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_bill', 'text' => $objp->ref, 'url' => DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->rowid); diff --git a/htdocs/includes/boxes/box_prospect.php b/htdocs/includes/boxes/box_prospect.php index d3a951547a4..4b4f3f89976 100644 --- a/htdocs/includes/boxes/box_prospect.php +++ b/htdocs/includes/boxes/box_prospect.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,13 +21,19 @@ * */ +/** + \file htdocs/includes/boxes/box_prospect.php + \ingroup commercial + \brief Module de génération de l'affichage de la box prospect +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Les 5 derniers prospects enregistrés"); $info_box_contents = array(); $sql = "SELECT s.nom,s.idp"; -$sql .= " FROM llx_societe as s WHERE s.client = 2"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s WHERE s.client = 2"; if ($user->societe_id > 0) { $sql .= " AND s.idp = $user->societe_id"; @@ -44,9 +51,10 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_company', 'text' => stripslashes($objp->nom), 'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?id=".$objp->idp); diff --git a/htdocs/includes/boxes/box_services_vendus.php b/htdocs/includes/boxes/box_services_vendus.php index bca93fa3498..899db6d0fde 100644 --- a/htdocs/includes/boxes/box_services_vendus.php +++ b/htdocs/includes/boxes/box_services_vendus.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,6 +21,12 @@ * */ +/** + \file htdocs/includes/boxes/box_services_vendus.php + \ingroup produits,services + \brief Module de génération de l'affichage de la box services_vendus +*/ + $info_box_head = array(); $info_box_head[] = array('text' => "Les 5 derniers produits/services contractés"); @@ -47,9 +54,10 @@ if ($result) while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($result); $info_box_contents[$i][0] = array('align' => 'left', + 'logo' => 'object_product', 'text' => $objp->nom, 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);