Trad: Traduction du nom des boites
This commit is contained in:
parent
1bdf8e9c7e
commit
80c8beb61f
@ -20,9 +20,10 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file htdocs/admin/boxes.php
|
/**
|
||||||
\brief Page d'administration/configuration des boites
|
\file htdocs/admin/boxes.php
|
||||||
\version $Revision$
|
\brief Page d'administration/configuration des boites
|
||||||
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -30,12 +31,12 @@ require("./pre.inc.php");
|
|||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
// Définition des positions possibles pour les boites
|
// Définition des positions possibles pour les boites
|
||||||
$pos_array = array(0); // Positions possibles pour une boite (0,1,2,...)
|
$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();
|
$boxes = array();
|
||||||
|
|
||||||
|
|
||||||
@ -52,21 +53,21 @@ print "<br>".$langs->trans("BoxesDesc")."<br>\n";
|
|||||||
|
|
||||||
if ($_POST["action"] == 'add')
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes WHERE box_id=".$_POST["boxid"]." AND position=".$_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();
|
|
||||||
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);
|
$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')
|
if ($_GET["action"] == 'delete')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["rowid"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["rowid"];
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'switch')
|
if ($_GET["action"] == 'switch')
|
||||||
@ -115,7 +116,6 @@ if ($_GET["action"] == 'switch')
|
|||||||
/*
|
/*
|
||||||
* Recherche des boites actives par position possible
|
* Recherche des boites actives par position possible
|
||||||
* On stocke les boites actives par $boxes[position][id_boite]=1
|
* 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";
|
$sql = "SELECT b.rowid, b.box_id, b.position, b.box_order, d.name";
|
||||||
@ -126,7 +126,7 @@ $result = $db->query($sql);
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$decalage=0;
|
$decalage=0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -150,14 +150,13 @@ if ($result)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Boites disponibles
|
* Boites disponibles
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print_titre($langs->trans("BoxesAvailable"));
|
print_titre($langs->trans("BoxesAvailable"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
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>'.$langs->trans("SourceFile").'</td>';
|
||||||
print '<td align="center" width="180">'.$langs->trans("ActivateOn").'</td>';
|
print '<td align="center" width="180">'.$langs->trans("ActivateOn").'</td>';
|
||||||
print '<td align="center" width="80"> </td>';
|
print '<td align="center" width="80"> </td>';
|
||||||
@ -169,7 +168,9 @@ $var=True;
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$html=new Form($db);
|
||||||
|
|
||||||
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
// Boucle sur toutes les boites
|
// Boucle sur toutes les boites
|
||||||
@ -178,13 +179,16 @@ if ($result)
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$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 '<form action="boxes.php" method="POST">';
|
||||||
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td><td>' . $obj->file . '</td>';
|
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td><td>' . $obj->file . '</td>';
|
||||||
|
|
||||||
// Pour chaque position possible, on affiche un lien
|
// Pour chaque position possible, on affiche un lien
|
||||||
// d'activation si boite non deja active pour cette position
|
// d'activation si boite non deja active pour cette position
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$html=new Form($db);
|
|
||||||
print $html->select_array("pos",$pos_name);
|
print $html->select_array("pos",$pos_name);
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="boxid" value="'.$obj->rowid.'">';
|
print '<input type="hidden" name="boxid" value="'.$obj->rowid.'">';
|
||||||
@ -210,14 +214,14 @@ print_titre($langs->trans("BoxesActivated"));
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Boxe").'</td>';
|
print '<td>'.$langs->trans("Box").'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td align="center" width="180">'.$langs->trans("ActiveOn").'</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="60" colspan="2">'.$langs->trans("Position").'</td>';
|
||||||
print '<td align="center" width="80">'.$langs->trans("Disable").'</td>';
|
print '<td align="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||||
print "</tr>\n";
|
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 .= " FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as d";
|
||||||
$sql .= " where b.box_id = d.rowid";
|
$sql .= " where b.box_id = d.rowid";
|
||||||
$sql .= " ORDER by position, box_order";
|
$sql .= " ORDER by position, box_order";
|
||||||
@ -225,44 +229,48 @@ $result = $db->query($sql);
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$box_order=1;
|
$box_order=1;
|
||||||
$foundrupture=1;
|
$foundrupture=1;
|
||||||
|
|
||||||
// On lit avec un coup d'avance
|
// On lit avec un coup d'avance
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
while ($obj && $i < $num)
|
while ($obj && $i < $num)
|
||||||
{
|
{
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
$objnext = $db->fetch_object($result);
|
$objnext = $db->fetch_object($result);
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td>';
|
$module=eregi_replace('.php$','',$obj->file);
|
||||||
print '<td> </td>';
|
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
|
||||||
print '<td align="center">' . $pos_name[$obj->position] . '</td>';
|
$box=new $module();
|
||||||
$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";
|
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td>';
|
||||||
$i++;
|
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>';
|
||||||
|
|
||||||
$box_order++;
|
print "</tr>\n";
|
||||||
|
$i++;
|
||||||
|
|
||||||
if (! $foundrupture) $objprevious = $obj;
|
$box_order++;
|
||||||
else $box_order=1;
|
|
||||||
$obj=$objnext;
|
if (! $foundrupture) $objprevious = $obj;
|
||||||
|
else $box_order=1;
|
||||||
|
$obj=$objnext;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($result);
|
$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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max derniers ouvrages");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max derniers clients enregistrés");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
|
||||||
if ($user->rights->commande->lire)
|
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 = "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";
|
$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$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("./includes/magpierss/rss_fetch.inc");
|
include_once(DOL_DOCUMENT_ROOT."/includes/magpierss/rss_fetch.inc");
|
||||||
include_once("./includes/boxes/modules_boxes.php");
|
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||||
|
|
||||||
|
|
||||||
class box_external_rss extends ModeleBoxes {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
for($site = 0; $site < 1; $site++) {
|
for($site = 0; $site < 1; $site++) {
|
||||||
$this->info_box_head = array('text' => "Les $max dernières infos du site " . @constant("EXTERNAL_RSS_TITLE_". $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) );
|
$rss = fetch_rss( @constant("EXTERNAL_RSS_URLRSS_" . $site) );
|
||||||
for($i = 0; $i < $max ; $i++){
|
for($i = 0; $i < $max ; $i++){
|
||||||
$item = $rss->items[$i];
|
$item = $rss->items[$i];
|
||||||
|
|||||||
@ -27,20 +27,42 @@
|
|||||||
\brief Module de génération de l'affichage de la box factures
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max dernières factures clients enregistrées");
|
$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";
|
$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$
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max dernières factures fournisseurs enregistrées");
|
$this->info_box_head = array('text' => "Les $max dernières factures fournisseurs enregistrées");
|
||||||
|
|
||||||
|
|||||||
@ -27,20 +27,42 @@
|
|||||||
\version $Revision$
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max plus anciennes factures fournisseurs impayées");
|
$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";
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max plus anciennes factures clients impayées");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max5 derniers fournisseurs enregistrés");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Nombre de client");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max derniers produits/services enregistrés");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
|
||||||
if ($user->rights->propale->lire)
|
if ($user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max dernières propositions");
|
$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";
|
$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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max derniers prospects enregistrés");
|
$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
|
\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 {
|
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_head = array();
|
||||||
var $info_box_contents = 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)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $user, $langs, $db;
|
||||||
|
$langs->load("boxes");
|
||||||
|
|
||||||
$this->info_box_head = array('text' => "Les $max derniers produits/services contractés");
|
$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%">';
|
print '<td valign="top" width="50%">';
|
||||||
|
|
||||||
// Affichage boite ii
|
// 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=new $boxes[$ii]();
|
||||||
$box->loadBox();
|
$box->loadBox();
|
||||||
$box->showBox();
|
$box->showBox();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user