mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: parametre de config des repertoires dans les proprietes de la classe du module
avec un rpertoire parent en fonction de l'entit
This commit is contained in:
parent
2356abb5c4
commit
13e9ff24a7
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -58,7 +59,7 @@ llxHeader();
|
|||
|
||||
$sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat as datec";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
||||
$sql.= " WHERE 1=1";
|
||||
$sql.= " WHERE m.entity = ".$conf->entity;
|
||||
if ($sref) $sql.= " AND m.rowid = '".$sref."'";
|
||||
if ($sall) $sql.= " AND (m.titre like '%".$sall."%' OR m.sujet like '%".$sall."%' OR m.body like '%".$sall."%')";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -81,7 +82,7 @@ class Mailing extends CommonObject
|
|||
*/
|
||||
function create($user)
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
|
@ -95,8 +96,8 @@ class Mailing extends CommonObject
|
|||
}
|
||||
|
||||
$sql = "INSERT INTO ".$this->db_table;
|
||||
$sql .= " (date_creat, fk_user_creat)";
|
||||
$sql .= " VALUES (".$this->db->idate(mktime()).", ".$user->id.")";
|
||||
$sql .= " (date_creat, fk_user_creat, entity)";
|
||||
$sql .= " VALUES (".$this->db->idate(mktime()).", ".$user->id.", ".$conf->entity.")";
|
||||
|
||||
if (! $this->titre)
|
||||
{
|
||||
|
|
@ -368,8 +369,8 @@ class Mailing extends CommonObject
|
|||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libell<EFBFBD> du statut d'un mailing (brouillon, valid<EFBFBD>e, ...
|
||||
* \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long
|
||||
* \brief Retourne le libelle du statut d'un mailing (brouillon, validee, ...
|
||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
||||
* \return string Libelle
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
|
|
@ -378,10 +379,10 @@ class Mailing extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libell<EFBFBD> d'un statut donn<EFBFBD>
|
||||
* \brief Renvoi le libelle d'un statut donn<EFBFBD>
|
||||
* \param statut Id statut
|
||||
* \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
|
||||
* \return string Libell<EFBFBD> du statut
|
||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||
* \return string Libelle du statut
|
||||
*/
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -155,9 +155,6 @@ class Conf
|
|||
$this->webcal->enabled=defined('MAIN_MODULE_WEBCALENDAR')?MAIN_MODULE_WEBCALENDAR:0;
|
||||
$this->propal->enabled=defined("MAIN_MODULE_PROPALE")?MAIN_MODULE_PROPALE:0;
|
||||
|
||||
// Module externalrss
|
||||
$this->externalrss->dir_temp=DOL_DATA_ROOT."/rss/temp";
|
||||
|
||||
// Sous module bons d'expedition
|
||||
$this->expedition_bon->enabled=defined("MAIN_SUBMODULE_EXPEDITION")?MAIN_SUBMODULE_EXPEDITION:0;
|
||||
|
||||
|
|
@ -170,11 +167,10 @@ class Conf
|
|||
// Module taxes et charges sociales
|
||||
$this->tax->dir_output=DOL_DATA_ROOT."/taxes";
|
||||
$this->tax->dir_temp =DOL_DATA_ROOT."/taxes/temp";
|
||||
|
||||
|
||||
// Module ficheinter
|
||||
$this->fichinter->dir_output=DOL_DATA_ROOT."/ficheinter";
|
||||
$this->fichinter->dir_temp =DOL_DATA_ROOT."/ficheinter/temp";
|
||||
if (defined('FICHEINTER_OUTPUTDIR') && FICHEINTER_OUTPUTDIR) { $this->fichinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
if (defined('FICHEINTER_OUTPUTDIR') && FICHEINTER_OUTPUTDIR) { $this->ficheinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
|
||||
// Module produit
|
||||
$this->produit->MultiPricesEnabled=defined("PRODUIT_MULTIPRICES")?PRODUIT_MULTIPRICES:0;
|
||||
|
||||
|
|
@ -224,18 +220,7 @@ class Conf
|
|||
// Module actions
|
||||
$this->actions->dir_output=DOL_DATA_ROOT."/action";
|
||||
$this->actions->dir_temp =DOL_DATA_ROOT."/action/temp";
|
||||
// Module export
|
||||
$this->export->dir_output=DOL_DATA_ROOT."/export";
|
||||
$this->export->dir_temp =DOL_DATA_ROOT."/export/temp";
|
||||
// Module import
|
||||
$this->import->dir_output=DOL_DATA_ROOT."/import";
|
||||
$this->import->dir_temp =DOL_DATA_ROOT."/import/temp";
|
||||
// Module ldap
|
||||
$this->ldap->dir_temp=DOL_DATA_ROOT."/ldap/temp";
|
||||
// Module FCKeditor
|
||||
$this->fckeditor->dir_output=DOL_DATA_ROOT."/fckeditor";
|
||||
// Module emailing
|
||||
$this->mailings->dir_temp=DOL_DATA_ROOT."/mailings/temp";
|
||||
|
||||
// Module oscommerce 1
|
||||
$this->boutique->livre->enabled=defined("BOUTIQUE_LIVRE")?BOUTIQUE_LIVRE:0;
|
||||
$this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ if ($modulepart)
|
|||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->fichinter->dir_output.'/'.$original_file;
|
||||
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ if ($_GET["id"] > 0) {
|
|||
* Documents
|
||||
*/
|
||||
$fichinterref = sanitizeFileName($fichinter->ref);
|
||||
$dir_output = $conf->fichinter->dir_output . "/";
|
||||
$dir_output = $conf->ficheinter->dir_output . "/";
|
||||
$filepath = $dir_output . $fichinterref . "/";
|
||||
$file = $filepath . $fichinterref . ".pdf";
|
||||
$filedetail = $filepath . $fichinterref . "-detail.pdf";
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ $pagenext = $page + 1;
|
|||
$object = new Fichinter($db);
|
||||
$object->fetch($_GET["id"]);
|
||||
|
||||
$upload_dir = $conf->fichinter->dir_output.'/'.sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->ficheinter->dir_output.'/'.sanitizeFileName($object->ref);
|
||||
$modulepart='fichinter';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -903,7 +903,7 @@ elseif ($_GET["id"] > 0)
|
|||
* Built documents
|
||||
*/
|
||||
$filename=sanitizeFileName($fichinter->ref);
|
||||
$filedir=$conf->fichinter->dir_output . "/".$fichinter->ref;
|
||||
$filedir=$conf->ficheinter->dir_output . "/".$fichinter->ref;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$fichinter->id;
|
||||
$genallowed=$user->rights->ficheinter->creer;
|
||||
$delallowed=$user->rights->ficheinter->supprimer;
|
||||
|
|
|
|||
|
|
@ -480,10 +480,10 @@ class Fichinter extends CommonObject
|
|||
|
||||
// Remove directory with files
|
||||
$fichinterref = sanitizeFileName($this->ref);
|
||||
if ($conf->fichinter->dir_output)
|
||||
if ($conf->ficheinter->dir_output)
|
||||
{
|
||||
$dir = $conf->fichinter->dir_output . "/" . $fichinterref ;
|
||||
$file = $conf->fichinter->dir_output . "/" . $fichinterref . "/" . $fichinterref . ".pdf";
|
||||
$dir = $conf->ficheinter->dir_output . "/" . $fichinterref ;
|
||||
$file = $conf->ficheinter->dir_output . "/" . $fichinterref . "/" . $fichinterref . ".pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
fichinter_delete_preview($this->db, $this->id, $this->ref);
|
||||
|
|
|
|||
|
|
@ -238,10 +238,10 @@ function fichinter_delete_preview($db, $fichinterid, $fichinterref='')
|
|||
$fichinterref = $fichinter->ref;
|
||||
}
|
||||
|
||||
if ($conf->fichinter->dir_output)
|
||||
if ($conf->ficheinter->dir_output)
|
||||
{
|
||||
$fichinterref = sanitizeFileName($fichinterref);
|
||||
$dir = $conf->fichinter->dir_output . "/" . $fichinterref ;
|
||||
$dir = $conf->ficheinter->dir_output . "/" . $fichinterref ;
|
||||
$file = $dir . "/" . $fichinterref . ".pdf.png";
|
||||
$multiple = $file . ".";
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if ($conf->fichinter->dir_output)
|
||||
if ($conf->ficheinter->dir_output)
|
||||
{
|
||||
// If $fichinter is id instead of object
|
||||
if (! is_object($fichinter))
|
||||
|
|
@ -109,7 +109,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||
}
|
||||
|
||||
$fichref = sanitizeFileName($fichinter->ref);
|
||||
$dir = $conf->fichinter->dir_output;
|
||||
$dir = $conf->ficheinter->dir_output;
|
||||
if (! eregi('specimen',$fichref)) $dir.= "/" . $fichref;
|
||||
$file = $dir . "/" . $fichref . ".pdf";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -24,40 +25,40 @@ include_once DOL_DOCUMENT_ROOT.'/includes/modules/mailings/modules_mailings.php'
|
|||
*/
|
||||
class mailing_kiwi extends MailingTargets
|
||||
{
|
||||
// CHANGE THIS: Put here a name not already used
|
||||
var $name='ContactsCategories';
|
||||
// CHANGE THIS: Put here a description of your selector module.
|
||||
// This label is used if no translation found for key MailingModuleDescXXX where XXX=name is found
|
||||
var $desc="Third parties (by categories)";
|
||||
// CHANGE THIS: Put here a name not already used
|
||||
var $name='ContactsCategories';
|
||||
// CHANGE THIS: Put here a description of your selector module.
|
||||
// This label is used if no translation found for key MailingModuleDescXXX where XXX=name is found
|
||||
var $desc="Third parties (by categories)";
|
||||
// CHANGE THIS: Set to 1 if selector is available for admin users only
|
||||
var $require_admin=0;
|
||||
var $require_admin=0;
|
||||
|
||||
var $require_module=array("categorie");
|
||||
var $picto='company';
|
||||
var $db;
|
||||
var $require_module=array("categorie");
|
||||
var $picto='company';
|
||||
var $db;
|
||||
|
||||
|
||||
// CHANGE THIS: Constructor name must be called mailing_xxx with xxx=name of your selector
|
||||
function mailing_categories($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
// CHANGE THIS: Constructor name must be called mailing_xxx with xxx=name of your selector
|
||||
function mailing_categories($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief This is the main function that returns the array of emails
|
||||
* \param mailing_id Id of mailing. No need to use it.
|
||||
* \param filterarray If you used the formFilter function. Empty otherwise.
|
||||
* \return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $langs;
|
||||
/**
|
||||
* \brief This is the main function that returns the array of emails
|
||||
* \param mailing_id Id of mailing. No need to use it.
|
||||
* \param filterarray If you used the formFilter function. Empty otherwise.
|
||||
* \return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$cibles = array();
|
||||
|
||||
// CHANGE THIS
|
||||
// Select the contacts from category
|
||||
$cibles = array();
|
||||
|
||||
// CHANGE THIS
|
||||
// Select the contacts from category
|
||||
$sql = "SELECT s.rowid as id, s.email as email, s.nom as name, null as fk_contact, null as firstname,";
|
||||
if ($_POST['filter']) $sql.= " llx_categorie.label as label";
|
||||
else $sql.=" null as label";
|
||||
|
|
@ -65,26 +66,27 @@ class mailing_kiwi extends MailingTargets
|
|||
if ($_POST['filter']) $sql.= " LEFT JOIN llx_categorie_societe ON llx_categorie_societe.fk_societe=s.rowid";
|
||||
if ($_POST['filter']) $sql.= " LEFT JOIN llx_categorie ON llx_categorie.rowid = llx_categorie_societe.fk_categorie";
|
||||
$sql.= " WHERE s.email != ''";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
if ($_POST['filter']) $sql.= " AND llx_categorie.rowid='".$_POST['filter']."'";
|
||||
$sql.= " ORDER BY s.email";
|
||||
$sql.= " ORDER BY s.email";
|
||||
|
||||
// Stocke destinataires dans cibles
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
// Stocke destinataires dans cibles
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found");
|
||||
|
||||
$old = '';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($old <> $obj->email)
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found");
|
||||
|
||||
$old = '';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($old <> $obj->email)
|
||||
{
|
||||
$cibles[$j] = array(
|
||||
$cibles[$j] = array(
|
||||
'email' => $obj->email,
|
||||
'fk_contact' => $obj->fk_contact,
|
||||
'name' => $obj->name,
|
||||
|
|
@ -92,23 +94,22 @@ class mailing_kiwi extends MailingTargets
|
|||
'other' => ($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
|
||||
'url' => $this->url($obj->id)
|
||||
);
|
||||
$old = $obj->email;
|
||||
$j++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$old = $obj->email;
|
||||
$j++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog($this->db->error());
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return parent::add_to_target($mailing_id, $cibles);
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog($this->db->error());
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return parent::add_to_target($mailing_id, $cibles);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -136,9 +137,10 @@ class mailing_kiwi extends MailingTargets
|
|||
*/
|
||||
function getNbOfRecipients()
|
||||
{
|
||||
$sql = "SELECT count(distinct(s.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE s.email != ''";
|
||||
$sql = "SELECT count(distinct(s.email)) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE s.email != ''";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
|
|
@ -152,7 +154,7 @@ class mailing_kiwi extends MailingTargets
|
|||
*/
|
||||
function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$s='';
|
||||
$s.='<select name="filter" class="flat">';
|
||||
|
|
@ -162,6 +164,7 @@ class mailing_kiwi extends MailingTargets
|
|||
$sql = "SELECT rowid, label, type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " WHERE visible > 0 AND type > 0";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* \file htdocs/includes/modules/mailings/peche.modules.php
|
||||
* \ingroup mailing
|
||||
* \brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer la liste de destinataires Peche
|
||||
* \brief Fichier de la classe permettant de generer la liste de destinataires Peche
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
|
@ -30,13 +30,13 @@ require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
|||
|
||||
/**
|
||||
* \class mailing_pomme
|
||||
* \brief Classe permettant de g<EFBFBD>n<EFBFBD>rer la liste des destinataires Pomme
|
||||
* \brief Classe permettant de generer la liste des destinataires Peche
|
||||
*/
|
||||
|
||||
class mailing_peche extends MailingTargets
|
||||
{
|
||||
var $name='EmailsFromFile'; // Identifiant du module mailing
|
||||
var $desc='EMails issus d\'un fichier'; // Libell<EFBFBD> utilis<69> si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
var $desc='EMails issus d\'un fichier'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=1; // Module mailing actif pour user admin ou non
|
||||
var $picto='generic';
|
||||
|
|
@ -100,7 +100,7 @@ class mailing_peche extends MailingTargets
|
|||
|
||||
/**
|
||||
* \brief Ajoute destinataires dans table des cibles
|
||||
* \param mailing_id Id du mailing concern<EFBFBD>
|
||||
* \param mailing_id Id du mailing concerne
|
||||
* \param filterarray Requete sql de selection des destinataires
|
||||
* \return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
|
|
@ -110,7 +110,7 @@ class mailing_peche extends MailingTargets
|
|||
|
||||
$cibles = array();
|
||||
|
||||
$upload_dir=$conf->mailings->dir_temp;
|
||||
$upload_dir=$conf->mailing->dir_temp;
|
||||
|
||||
// Save file
|
||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -35,28 +36,37 @@ include_once DOL_DOCUMENT_ROOT.'/includes/modules/mailings/modules_mailings.php'
|
|||
|
||||
class mailing_poire extends MailingTargets
|
||||
{
|
||||
var $name='ContactCompanies'; // Identifiant du module mailing
|
||||
var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; // Libellé utilisé si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
var $require_module=array("commercial"); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
var $picto='contact';
|
||||
var $name='ContactCompanies'; // Identifiant du module mailing
|
||||
var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; // Libellé utilisé si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
var $require_module=array("commercial"); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
var $picto='contact';
|
||||
|
||||
var $db;
|
||||
var $db;
|
||||
|
||||
|
||||
function mailing_poire($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
function mailing_poire($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
|
||||
|
||||
function getSqlArrayForStats()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("commercial");
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("commercial");
|
||||
|
||||
$statssql=array();
|
||||
$statssql[0]="SELECT '".$langs->trans("NbOfCompaniesContacts")."' as label, count(distinct(c.email)) as nb FROM ".MAIN_DB_PREFIX."socpeople as c, ".MAIN_DB_PREFIX."societe as s WHERE s.rowid = c.fk_soc AND s.client = 1 AND c.email != ''";
|
||||
$statssql=array();
|
||||
$statssql[0] = "SELECT '".$langs->trans("NbOfCompaniesContacts")."' as label";
|
||||
$statssql[0].= ", count(distinct(c.email)) as nb";
|
||||
$statssql[0].= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$statssql[0].= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$statssql[0].= " WHERE s.rowid = c.fk_soc";
|
||||
$statssql[0].= " AND s.entity = ".$conf->entity;
|
||||
$statssql[0].= " AND c.entity = ".$conf->entity;
|
||||
$statssql[0].= " AND s.client = 1";
|
||||
$statssql[0].= " AND c.email != ''";
|
||||
|
||||
return $statssql;
|
||||
}
|
||||
|
|
@ -70,15 +80,19 @@ class mailing_poire extends MailingTargets
|
|||
*/
|
||||
function getNbOfRecipients()
|
||||
{
|
||||
$sql = "SELECT count(distinct(c.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE s.rowid = c.fk_soc";
|
||||
$sql .= " AND c.email != ''";
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT count(distinct(c.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE s.rowid = c.fk_soc";
|
||||
$sql .= " AND c.entity = ".$conf->entity;
|
||||
$sql .= " AND s.entity = ".$conf->entity;
|
||||
$sql .= " AND c.email != ''";
|
||||
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
return parent::getNbOfRecipients($sql);
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
return parent::getNbOfRecipients($sql);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -143,7 +157,7 @@ class mailing_poire extends MailingTargets
|
|||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$cibles = array();
|
||||
|
||||
|
|
@ -174,6 +188,8 @@ class mailing_poire extends MailingTargets
|
|||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE s.rowid = c.fk_soc";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND c.email != ''";
|
||||
foreach($filtersarray as $key)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -34,30 +35,34 @@ include_once DOL_DOCUMENT_ROOT.'/includes/modules/mailings/modules_mailings.php'
|
|||
|
||||
class mailing_pomme extends MailingTargets
|
||||
{
|
||||
var $name='DolibarrUsers'; // Identifiant du module mailing
|
||||
var $desc='Utilisateurs de Dolibarr avec emails'; // Libellé utilisé si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=1; // Module mailing actif pour user admin ou non
|
||||
var $picto='user';
|
||||
var $name='DolibarrUsers'; // Identifiant du module mailing
|
||||
var $desc='Utilisateurs de Dolibarr avec emails'; // Libellé utilisé si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=1; // Module mailing actif pour user admin ou non
|
||||
var $picto='user';
|
||||
|
||||
var $db;
|
||||
var $db;
|
||||
|
||||
|
||||
function mailing_pomme($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
function mailing_pomme($DB)
|
||||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
|
||||
|
||||
function getSqlArrayForStats()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("users");
|
||||
|
||||
$statssql=array();
|
||||
$sql = "SELECT '".$langs->trans("DolibarrUsers")."' as label, count(distinct(email)) as nb FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$statssql[0]=$sql;
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("users");
|
||||
|
||||
$statssql=array();
|
||||
$sql = "SELECT '".$langs->trans("DolibarrUsers")."' as label";
|
||||
$sql.= ", count(distinct(u.email)) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql.= " AND u.entity IN (0,".$conf->entity.")";
|
||||
$statssql[0]=$sql;
|
||||
|
||||
return $statssql;
|
||||
}
|
||||
|
|
@ -71,13 +76,16 @@ class mailing_pomme extends MailingTargets
|
|||
*/
|
||||
function getNbOfRecipients()
|
||||
{
|
||||
$sql = "SELECT count(distinct(u.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT count(distinct(u.email)) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql.= " AND u.entity IN (0,".$conf->entity.")";
|
||||
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
return parent::getNbOfRecipients($sql);
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
return parent::getNbOfRecipients($sql);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,6 +97,7 @@ class mailing_pomme extends MailingTargets
|
|||
function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$langs->load("users");
|
||||
|
||||
$s='';
|
||||
|
|
@ -118,7 +127,7 @@ class mailing_pomme extends MailingTargets
|
|||
*/
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$cibles = array();
|
||||
|
||||
|
|
@ -127,6 +136,7 @@ class mailing_pomme extends MailingTargets
|
|||
$sql.= " u.name as name, u.firstname as firstname, u.login, u.office_phone";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql.= " AND u.entity IN (0,".$conf->entity.")";
|
||||
foreach($filtersarray as $key)
|
||||
{
|
||||
if ($key == '1') $sql.= " AND u.statut=1";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -67,13 +68,13 @@ class modExpedition extends DolibarrModules
|
|||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/expedition/temp";
|
||||
$r++
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "bon_expedition";
|
||||
$this->dirs[$r][1] = "/expedition/sending";
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "bon_expedition_temp";
|
||||
$this->dirs[$r][1] = "/expedition/sending/temp";
|
||||
$r++
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "bon_livraison";
|
||||
$this->dirs[$r][1] = "/expedition/receipt";
|
||||
$r++;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
*/
|
||||
|
||||
/** \defgroup export Module export
|
||||
* \brief Module g<EFBFBD>n<EFBFBD>rique pour r<EFBFBD>aliser des exports de donn<EFBFBD>es en base
|
||||
* \brief Module generique pour realiser des exports de donnees en base
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
|
@ -55,13 +56,21 @@ class modExport extends DolibarrModules
|
|||
$this->special = 0;
|
||||
$this->picto='';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/export";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/export/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array();
|
||||
|
||||
// D<>pendances
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(4,2,0);
|
||||
|
|
|
|||
|
|
@ -53,14 +53,22 @@ class modExternalRss extends DolibarrModules
|
|||
$this->family = "technic";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = eregi_replace('^mod','',get_class($this));
|
||||
$this->description = "Ajout de files d'informations RSS dans les <EFBFBD>crans Dolibarr";
|
||||
$this->description = "Ajout de files d'informations RSS dans les ecrans Dolibarr";
|
||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 1;
|
||||
$this->picto='rss';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/rss";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/rss/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("external_rss.php");
|
||||
|
|
@ -74,10 +82,6 @@ class modExternalRss extends DolibarrModules
|
|||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Repertoires
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->externalrss->dir_temp;
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
// Les boites sont ajoutees lors de la configuration des flux
|
||||
|
|
@ -93,12 +97,15 @@ class modExternalRss extends DolibarrModules
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = array();
|
||||
|
||||
// Recherche configuration de boites
|
||||
$this->boxes=array();
|
||||
$sql="select name, value from ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE name like 'EXTERNAL_RSS_TITLE_%'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -56,13 +56,25 @@ class modFckeditor extends DolibarrModules
|
|||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 2;
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/fckeditor";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/fckeditor/temp";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "images";
|
||||
$this->dirs[$r][1] = "/fckeditor/images";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("fckeditor.php");
|
||||
|
||||
// D<>pendances
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
|
||||
|
|
@ -85,9 +97,6 @@ class modFckeditor extends DolibarrModules
|
|||
{
|
||||
global $conf;
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = $conf->fckeditor->dir_images;
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
|
|
|
|||
|
|
@ -65,8 +65,16 @@ class modFicheinter extends DolibarrModules
|
|||
$this->special = 0;
|
||||
$this->picto = "intervention";
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/ficheinter";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/ficheinter/temp";
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array("modSociete","modCommercial");
|
||||
|
|
@ -158,9 +166,6 @@ class modFicheinter extends DolibarrModules
|
|||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = $conf->facture->dir_output;
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','ficheinter',".$conf->entity.")",
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class modFournisseur extends DolibarrModules
|
|||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/fournisseur/temp";
|
||||
|
||||
$r++
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "commande";
|
||||
$this->dirs[$r][1] = "/fournisseur/commande";
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class modFournisseur extends DolibarrModules
|
|||
$this->dirs[$r][0] = "commande_temp";
|
||||
$this->dirs[$r][1] = "/fournisseur/commande/temp";
|
||||
|
||||
$r++
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "facture";
|
||||
$this->dirs[$r][1] = "/fournisseur/facture";
|
||||
|
||||
|
|
|
|||
|
|
@ -56,8 +56,16 @@ class modImport extends DolibarrModules
|
|||
$this->special = 0;
|
||||
$this->picto='';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/import";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/import/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array();
|
||||
|
|
|
|||
|
|
@ -58,8 +58,16 @@ class modLabel extends DolibarrModules
|
|||
$this->special = 2;
|
||||
$this->picto='label';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/label";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/label/temp";
|
||||
|
||||
// Dependancies
|
||||
$this->depends = array();
|
||||
|
|
|
|||
|
|
@ -56,8 +56,16 @@ class modLdap extends DolibarrModules
|
|||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 1;
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/ldap";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/ldap/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("ldap.php");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -57,10 +58,18 @@ class modMailing extends DolibarrModules
|
|||
$this->special = 0;
|
||||
$this->picto='email';
|
||||
|
||||
// Dir
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/mailings";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/mailings/temp";
|
||||
|
||||
// D<>pendances
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("mails");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -132,7 +132,7 @@ if ($modulepart)
|
|||
{
|
||||
$accessallowed=1;
|
||||
}
|
||||
$original_file=$conf->fichinter->dir_output.'/'.$original_file;
|
||||
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les images des stats propales
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ ALTER TABLE llx_bank_account ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER
|
|||
ALTER TABLE llx_document_model ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER nom;
|
||||
ALTER TABLE llx_menu ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER menu_handler;
|
||||
ALTER TABLE llx_ecm_directories ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER label;
|
||||
ALTER TABLE llx_mailing ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER titre;
|
||||
ALTER TABLE llx_categorie ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER label;
|
||||
|
||||
ALTER TABLE llx_rights_def DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_user_param DROP INDEX fk_user;
|
||||
|
|
@ -31,6 +33,7 @@ ALTER TABLE llx_entrepot DROP INDEX label;
|
|||
ALTER TABLE llx_bank_account DROP INDEX uk_bank_account_label;
|
||||
ALTER TABLE llx_document_model DROP INDEX uk_document_model;
|
||||
ALTER TABLE llx_menu DROP INDEX idx_menu_uk_menu;
|
||||
ALTER TABLE llx_categorie DROP INDEX uk_categorie_ref;
|
||||
|
||||
ALTER TABLE llx_rights_def ADD PRIMARY KEY (id, entity);
|
||||
ALTER TABLE llx_user_param ADD UNIQUE INDEX uk_user_param (fk_user,param,entity);
|
||||
|
|
@ -40,4 +43,5 @@ ALTER TABLE llx_product ADD UNIQUE INDEX uk_product_ref (ref, entity);
|
|||
ALTER TABLE llx_entrepot ADD UNIQUE INDEX uk_entrepot_label (label, entity);
|
||||
ALTER TABLE llx_bank_account ADD UNIQUE INDEX uk_bank_account_label (label, entity);
|
||||
ALTER TABLE llx_document_model ADD UNIQUE INDEX uk_document_model (nom, type, entity);
|
||||
ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, url, entity);
|
||||
ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, url, entity);
|
||||
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label, type, entity);
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -18,6 +19,6 @@
|
|||
-- $Id$
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label,type);
|
||||
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label,type,entity);
|
||||
|
||||
ALTER TABLE llx_categorie ADD INDEX idx_categorie_type (type);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
-- Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -23,11 +23,12 @@
|
|||
create table llx_categorie
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
label VARCHAR(255), -- category name
|
||||
label varchar(255), -- category name
|
||||
type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer)
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
description text, -- description of the category
|
||||
fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only)
|
||||
visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
|
||||
type tinyint DEFAULT 1 NOT NULL -- category type (product, supplier, customer)
|
||||
visible tinyint DEFAULT 1 NOT NULL -- determine if the products are visible or not
|
||||
)type=innodb;
|
||||
|
||||
--
|
||||
|
|
@ -36,4 +37,12 @@ create table llx_categorie
|
|||
-- 0 : product
|
||||
-- 1 : supplier
|
||||
-- 2 : customer
|
||||
--
|
||||
|
||||
--
|
||||
-- List of codes for the field entity
|
||||
--
|
||||
-- 1 : first company category type
|
||||
-- 2 : second company category type
|
||||
-- 3 : etc...
|
||||
--
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -27,28 +28,30 @@
|
|||
create table llx_mailing
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
statut smallint DEFAULT 0, --
|
||||
|
||||
titre varchar(60), -- company name
|
||||
sujet varchar(60), -- company name
|
||||
titre varchar(60), -- Ref of mailing
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
sujet varchar(60), -- Sujet of mailing
|
||||
body text,
|
||||
cible varchar(60),
|
||||
|
||||
nbemail integer,
|
||||
|
||||
email_from varchar(160), -- company name
|
||||
email_replyto varchar(160), -- company name
|
||||
email_errorsto varchar(160), -- company name
|
||||
|
||||
email_from varchar(160), -- Email address of sender
|
||||
email_replyto varchar(160), -- Email address for reply
|
||||
email_errorsto varchar(160), -- Email addresse for errors
|
||||
date_creat datetime, -- creation date
|
||||
date_valid datetime, --
|
||||
date_appro datetime, --
|
||||
date_envoi datetime, -- date d'envoi
|
||||
|
||||
fk_user_creat integer, -- utilisateur qui a créé l'info
|
||||
fk_user_valid integer, -- utilisateur qui a créé l'info
|
||||
fk_user_appro integer -- utilisateur qui a créé l'info
|
||||
|
||||
)type=innodb;
|
||||
|
||||
--
|
||||
-- List of codes for the field entity
|
||||
--
|
||||
-- 1 : first company mailing
|
||||
-- 2 : second company mailing
|
||||
-- 3 : etc...
|
||||
--
|
||||
Loading…
Reference in New Issue
Block a user