mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Trad: Traduction du nom des boites
This commit is contained in:
parent
1bdf8e9c7e
commit
80c8beb61f
|
|
@ -20,9 +20,10 @@
|
|||
* $Source$
|
||||
*/
|
||||
|
||||
/** \file htdocs/admin/boxes.php
|
||||
\brief Page d'administration/configuration des boites
|
||||
\version $Revision$
|
||||
/**
|
||||
\file htdocs/admin/boxes.php
|
||||
\brief Page d'administration/configuration des boites
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
|
@ -30,12 +31,12 @@ require("./pre.inc.php");
|
|||
$langs->load("admin");
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
accessforbidden();
|
||||
|
||||
|
||||
// Définition des positions possibles pour les boites
|
||||
$pos_array = array(0); // Positions possibles pour une boite (0,1,2,...)
|
||||
$pos_name = array($langs->trans("Home")); // Nom des position 0=Homepage, 1=...
|
||||
$pos_name = array($langs->trans("Home")); // Nom des positions 0=Homepage, 1=...
|
||||
$boxes = array();
|
||||
|
||||
|
||||
|
|
@ -49,24 +50,24 @@ print "<br>".$langs->trans("BoxesDesc")."<br>\n";
|
|||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
if ($_POST["action"] == 'add')
|
||||
{
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes WHERE box_id=".$_POST["boxid"]." AND position=".$_POST["pos"];
|
||||
$result = $db->query($sql);
|
||||
|
||||
$num = $db->num_rows();
|
||||
if ($num == 0) {
|
||||
// Si la boite n'est pas deja active
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position) values (".$_POST["boxid"].",".$_POST["pos"].");";
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes WHERE box_id=".$_POST["boxid"]." AND position=".$_POST["pos"];
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
if ($num == 0) {
|
||||
// Si la boite n'est pas deja active
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position) values (".$_POST["boxid"].",".$_POST["pos"].");";
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["rowid"];
|
||||
$result = $db->query($sql);
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["rowid"];
|
||||
$result = $db->query($sql);
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'switch')
|
||||
|
|
@ -81,7 +82,7 @@ if ($_GET["action"] == 'switch')
|
|||
$objfrom = $db->fetch_object($resultfrom);
|
||||
} else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
$sql="SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["switchto"];
|
||||
$resultto = $db->query($sql);
|
||||
|
|
@ -90,7 +91,7 @@ if ($_GET["action"] == 'switch')
|
|||
$objto = $db->fetch_object($resultto);
|
||||
} else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
if ($objfrom && $objto) {
|
||||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order=".$objto->box_order." WHERE rowid=".$_GET["switchfrom"];
|
||||
|
|
@ -99,7 +100,7 @@ if ($_GET["action"] == 'switch')
|
|||
$sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order=".$objfrom->box_order." WHERE rowid=".$_GET["switchto"];
|
||||
$resultupdateto = $db->query($sql);
|
||||
if (! $resultupdateto) { dolibarr_print_error($db); }
|
||||
}
|
||||
}
|
||||
|
||||
if ($resultupdatefrom && $resultupdateto)
|
||||
{
|
||||
|
|
@ -115,7 +116,6 @@ if ($_GET["action"] == 'switch')
|
|||
/*
|
||||
* Recherche des boites actives par position possible
|
||||
* On stocke les boites actives par $boxes[position][id_boite]=1
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT b.rowid, b.box_id, b.position, b.box_order, d.name";
|
||||
|
|
@ -124,18 +124,18 @@ $sql .= " where b.box_id = d.rowid";
|
|||
$sql .= " ORDER by position, box_order";
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$decalage=0;
|
||||
$decalage=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
$obj = $db->fetch_object($result);
|
||||
$boxes[$obj->position][$obj->box_id]=1;
|
||||
$i++;
|
||||
|
||||
|
||||
// On renumérote l'ordre des boites si l'une d'elle est à 0 (Ne doit arriver que sur des anciennes versions)
|
||||
if ($obj->box_order==0) $decalage++;
|
||||
if ($decalage) {
|
||||
|
|
@ -150,14 +150,13 @@ if ($result)
|
|||
|
||||
/*
|
||||
* Boites disponibles
|
||||
*
|
||||
*/
|
||||
print "<br>\n";
|
||||
print_titre($langs->trans("BoxesAvailable"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Boxe").'</td>';
|
||||
print '<td>'.$langs->trans("Box").'</td>';
|
||||
print '<td>'.$langs->trans("SourceFile").'</td>';
|
||||
print '<td align="center" width="180">'.$langs->trans("ActivateOn").'</td>';
|
||||
print '<td align="center" width="80"> </td>';
|
||||
|
|
@ -167,24 +166,29 @@ $sql = "SELECT rowid, name, file FROM ".MAIN_DB_PREFIX."boxes_def";
|
|||
$result = $db->query($sql);
|
||||
$var=True;
|
||||
|
||||
if ($result)
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$html=new Form($db);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
// Boucle sur toutes les boites
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print '<form action="boxes.php" method="POST">';
|
||||
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td><td>' . $obj->file . '</td>';
|
||||
|
||||
// Pour chaque position possible, on affiche un lien
|
||||
$module=eregi_replace('.php$','',$obj->file);
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
|
||||
$box=new $module();
|
||||
|
||||
print '<form action="boxes.php" method="POST">';
|
||||
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td><td>' . $obj->file . '</td>';
|
||||
|
||||
// Pour chaque position possible, on affiche un lien
|
||||
// d'activation si boite non deja active pour cette position
|
||||
print '<td align="center">';
|
||||
$html=new Form($db);
|
||||
print $html->select_array("pos",$pos_name);
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="boxid" value="'.$obj->rowid.'">';
|
||||
|
|
@ -195,7 +199,7 @@ if ($result)
|
|||
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
|
@ -210,59 +214,63 @@ print_titre($langs->trans("BoxesActivated"));
|
|||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Boxe").'</td>';
|
||||
print '<td>'.$langs->trans("Box").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center" width="180">'.$langs->trans("ActiveOn").'</td>';
|
||||
print '<td align="center" width="60" colspan="2">'.$langs->trans("Position").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT b.rowid, b.box_id, b.position, d.name";
|
||||
$sql = "SELECT b.rowid, b.box_id, b.position, d.name, d.file";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as d";
|
||||
$sql .= " where b.box_id = d.rowid";
|
||||
$sql .= " ORDER by position, box_order";
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
$box_order=1;
|
||||
$foundrupture=1;
|
||||
|
||||
// On lit avec un coup d'avance
|
||||
$obj = $db->fetch_object($result);
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
while ($obj && $i < $num)
|
||||
$box_order=1;
|
||||
$foundrupture=1;
|
||||
|
||||
// On lit avec un coup d'avance
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
while ($obj && $i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
$objnext = $db->fetch_object($result);
|
||||
$var = ! $var;
|
||||
$objnext = $db->fetch_object($result);
|
||||
|
||||
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center">' . $pos_name[$obj->position] . '</td>';
|
||||
$hasnext=true;
|
||||
$hasprevious=true;
|
||||
if ($foundrupture) { $hasprevious=false; $foundrupture=0; }
|
||||
if (! $objnext || $obj->position != $objnext->position) { $hasnext=false; $foundrupture=1; }
|
||||
print '<td align="center" width="10">'.$box_order.'</td>';
|
||||
print '<td align="center" width="50">';
|
||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$obj->rowid.'&switchto='.$objnext->rowid.'">'.img_down().'</a> ':'');
|
||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$obj->rowid.'&switchto='.$objprevious->rowid.'">'.img_up().'</a>':'');
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="boxes.php?rowid='.$obj->rowid.'&action=delete">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$module=eregi_replace('.php$','',$obj->file);
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
|
||||
$box=new $module();
|
||||
|
||||
$box_order++;
|
||||
|
||||
if (! $foundrupture) $objprevious = $obj;
|
||||
else $box_order=1;
|
||||
$obj=$objnext;
|
||||
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center">' . $pos_name[$obj->position] . '</td>';
|
||||
$hasnext=true;
|
||||
$hasprevious=true;
|
||||
if ($foundrupture) { $hasprevious=false; $foundrupture=0; }
|
||||
if (! $objnext || $obj->position != $objnext->position) { $hasnext=false; $foundrupture=1; }
|
||||
print '<td align="center" width="10">'.$box_order.'</td>';
|
||||
print '<td align="center" width="50">';
|
||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$obj->rowid.'&switchto='.$objnext->rowid.'">'.img_down().'</a> ':'');
|
||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$obj->rowid.'&switchto='.$objprevious->rowid.'">'.img_up().'</a>':'');
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="boxes.php?rowid='.$obj->rowid.'&action=delete">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
$box_order++;
|
||||
|
||||
if (! $foundrupture) $objprevious = $obj;
|
||||
else $box_order=1;
|
||||
$obj=$objnext;
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
|
|
|
|||
|
|
@ -28,17 +28,38 @@
|
|||
*/
|
||||
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_boutique_livre extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastbooks";
|
||||
var $boximg="book";
|
||||
var $boxlabel;
|
||||
var $depends = array("boutique");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_boutique_livre()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastBooks");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max derniers ouvrages");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,17 +27,38 @@
|
|||
\brief Module de génération de l'affichage de la box clients
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_clients extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastcustomers";
|
||||
var $boximg="company";
|
||||
var $boxlabel;
|
||||
var $depends = array("societe");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_clients()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastCustomers");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max derniers clients enregistrés");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,21 +27,43 @@
|
|||
\brief Module de génération de l'affichage de la box commandes
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_commandes extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastcustomerorders";
|
||||
var $boximg="order";
|
||||
var $boxlabel;
|
||||
var $depends = array("commercial");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_commandes()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastCustomerOrders");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$this->info_box_head = array('text' => "Les $max dernières commandes");
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max dernières commandes clients");
|
||||
|
||||
$sql = "SELECT s.nom,s.idp,p.ref,".$db->pdate("p.date_commande")." as dp,p.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as p WHERE p.fk_soc = s.idp";
|
||||
|
|
|
|||
|
|
@ -29,21 +29,43 @@
|
|||
\version $Revision$
|
||||
*/
|
||||
|
||||
require_once("./includes/magpierss/rss_fetch.inc");
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/magpierss/rss_fetch.inc");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_external_rss extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastrssinfos";
|
||||
var $boximg="rss";
|
||||
var $boxlabel;
|
||||
var $depends = array();
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_external_rss()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastRssInfos");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
for($site = 0; $site < 1; $site++) {
|
||||
$this->info_box_head = array('text' => "Les $max dernières infos du site " . @constant("EXTERNAL_RSS_TITLE_". $site));
|
||||
|
||||
$rss = fetch_rss( @constant("EXTERNAL_RSS_URLRSS_" . $site) );
|
||||
for($i = 0; $i < $max ; $i++){
|
||||
$item = $rss->items[$i];
|
||||
|
|
|
|||
|
|
@ -27,20 +27,42 @@
|
|||
\brief Module de génération de l'affichage de la box factures
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_factures extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastcustomerbills";
|
||||
var $boximg="bill";
|
||||
var $boxlabel;
|
||||
var $depends = array("facture");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_factures()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastCustomerBills");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max dernières factures clients enregistrées");
|
||||
|
||||
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
|
||||
|
|
|
|||
|
|
@ -28,17 +28,38 @@
|
|||
\version $Revision$
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_factures_fourn extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastsupplierbills";
|
||||
var $boximg="bill";
|
||||
var $boxlabel;
|
||||
var $depends = array("facture","fournisseur");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_factures_fourn()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastSupplierBills");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max dernières factures fournisseurs enregistrées");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,20 +27,42 @@
|
|||
\version $Revision$
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_factures_fourn_imp extends ModeleBoxes {
|
||||
|
||||
var $boxcode="oldestunpayedsupplierbills";
|
||||
var $boximg="bill";
|
||||
var $boxlabel;
|
||||
var $depends = array("facture","fournisseur");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_factures_fourn_imp()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxOldesUnpayedSupplierBills");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max plus anciennes factures fournisseurs impayées");
|
||||
|
||||
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
|
||||
|
|
|
|||
|
|
@ -27,17 +27,39 @@
|
|||
\brief Module de génération de l'affichage de la box factures impayees
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_factures_imp extends ModeleBoxes {
|
||||
|
||||
var $boxcode="oldestunpayedcustomerbills";
|
||||
var $boximg="bill";
|
||||
var $boxlabel;
|
||||
var $depends = array("facture");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_factures_imp()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxOldestUnpayedCustomerBills");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max plus anciennes factures clients impayées");
|
||||
|
||||
|
|
|
|||
|
|
@ -26,17 +26,38 @@
|
|||
\brief Module de génération de l'affichage de la box fournisseurs
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_fournisseurs extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastsuppliers";
|
||||
var $boximg="company";
|
||||
var $boxlabel;
|
||||
var $depends = array("fournisseur");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_fournisseurs()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastSuppliers");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max5 derniers fournisseurs enregistrés");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,17 +27,38 @@
|
|||
\brief Module de génération de l'affichage de la box osc client
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_osc_clients extends ModeleBoxes {
|
||||
|
||||
var $boxcode="nbofcustomers";
|
||||
var $boximg="company";
|
||||
var $boxlabel;
|
||||
var $depends = array("boutique");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_osc_clients()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxNbOfCustomers");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Nombre de client");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,17 +27,39 @@
|
|||
\brief Module de génération de l'affichage de la box produits
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_produits extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastproducts";
|
||||
var $boximg="product";
|
||||
var $boxlabel;
|
||||
var $depends = array("produit");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_produits()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastProducts");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max derniers produits/services enregistrés");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,20 +27,42 @@
|
|||
\brief Module de génération de l'affichage de la box propales
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_propales extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastpropals";
|
||||
var $boximg="propal";
|
||||
var $boxlabel;
|
||||
var $depends = array("propale");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_propales()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastProposals");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
|
||||
if ($user->rights->propale->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max dernières propositions");
|
||||
|
||||
$sql = "SELECT s.nom,s.idp,p.ref,".$db->pdate("p.datep")." as dp,p.rowid";
|
||||
|
|
|
|||
|
|
@ -28,17 +28,38 @@
|
|||
*/
|
||||
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_prospect extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastprospects";
|
||||
var $boximg="company";
|
||||
var $boxlabel;
|
||||
var $depends = array("commercial");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_prospect()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastProspects");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max derniers prospects enregistrés");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,17 +27,38 @@
|
|||
\brief Module de génération de l'affichage de la box services_vendus
|
||||
*/
|
||||
|
||||
include_once("./includes/boxes/modules_boxes.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
|
||||
|
||||
class box_services_vendus extends ModeleBoxes {
|
||||
|
||||
var $boxcode="lastproductsincontract";
|
||||
var $boximg="product";
|
||||
var $boxlabel;
|
||||
var $depends = array("produit");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
*/
|
||||
function box_services_vendus()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastProductsInContract");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge les données en mémoire pour affichage ultérieur
|
||||
* \param $max Nombre maximum d'enregistrements à charger
|
||||
*/
|
||||
function loadBox($max=5)
|
||||
{
|
||||
global $user, $langs, $db;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->info_box_head = array('text' => "Les $max derniers produits/services contractés");
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ for ($ii=0, $ni=sizeof($boxes); $ii<$ni; $ii++)
|
|||
print '<td valign="top" width="50%">';
|
||||
|
||||
// Affichage boite ii
|
||||
include_once("./includes/boxes/".$boxes[$ii].".php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$boxes[$ii].".php");
|
||||
$box=new $boxes[$ii]();
|
||||
$box->loadBox();
|
||||
$box->showBox();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user