This commit is contained in:
Laurent Destailleur 2009-07-29 23:10:15 +00:00
parent 4e8b96e405
commit 12f6752631
3 changed files with 27 additions and 29 deletions

View File

@ -18,17 +18,16 @@
*/ */
/** /**
\file htdocs/cactioncomm.class.php * \file htdocs/cactioncomm.class.php
\ingroup commercial * \ingroup commercial
\brief Fichier de la classe des types d'actions commerciales * \brief Fichier de la classe des types d'actions commerciales
\version $Id$ * \version $Id$
*/ */
/** \class CActioncomm /** \class CActionComm
\brief Classe permettant la gestion des diff<EFBFBD>rents types d'actions commerciales * \brief Class to manage different types of events
*/ */
class CActionComm { class CActionComm {
var $db; var $db;
@ -40,9 +39,9 @@ class CActionComm {
var $active; var $active;
var $error; var $error;
var $type_actions=array(); var $type_actions=array();
/** /**
* \brief Constructeur * \brief Constructeur
@ -60,25 +59,25 @@ class CActionComm {
*/ */
function fetch($id) function fetch($id)
{ {
$sql = "SELECT id, code, type, libelle, active"; $sql = "SELECT id, code, type, libelle, active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
if (is_numeric($id)) $sql.= " WHERE id=".$id; if (is_numeric($id)) $sql.= " WHERE id=".$id;
else $sql.= " WHERE code='".$id."'"; else $sql.= " WHERE code='".$id."'";
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
if ($this->db->num_rows($resql)) if ($this->db->num_rows($resql))
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $obj->id; $this->id = $obj->id;
$this->code = $obj->code; $this->code = $obj->code;
$this->type = $obj->type; $this->type = $obj->type;
$this->libelle = $obj->libelle; $this->libelle = $obj->libelle;
$this->active = $obj->active; $this->active = $obj->active;
return 1; return 1;
} }
else else
@ -104,17 +103,17 @@ class CActionComm {
{ {
global $langs,$conf; global $langs,$conf;
$langs->load("commercial"); $langs->load("commercial");
$repid = array(); $repid = array();
$repcode = array(); $repcode = array();
$sql = "SELECT id, code, libelle, module"; $sql = "SELECT id, code, libelle, module";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
if ($active != '') if ($active != '')
{ {
$sql.=" WHERE active=".$active; $sql.=" WHERE active=".$active;
} }
dol_syslog("CActionComm::liste_array sql=".$sql); dol_syslog("CActionComm::liste_array sql=".$sql);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
@ -152,7 +151,7 @@ class CActionComm {
} }
} }
/** /**
* \brief Renvoie le nom sous forme d'un libelle traduit d'un type d'action * \brief Renvoie le nom sous forme d'un libelle traduit d'un type d'action
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
@ -168,5 +167,5 @@ class CActionComm {
if ($transcode != "Action".$this->code) return $transcode; if ($transcode != "Action".$this->code) return $transcode;
} }
} }
?> ?>

View File

@ -17,24 +17,23 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/** \defgroup import Module Iimport /** \defgroup import Module import
\brief Module generique pour realiser des imports de donnees en base * \brief Module to make generic import of data into dolibarr database
\version $Id$ * \version $Id$
*/ */
/** /**
\file htdocs/includes/modules/modImport.class.php * \file htdocs/includes/modules/modImport.class.php
\ingroup import * \ingroup import
\brief Fichier de description et activation du module Import * \brief Fichier de description et activation du module Import
*/ */
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
/** \class modImport /** \class modImport
\brief Classe de description et activation du module Import * \brief Classe de description et activation du module Import
*/ */
class modImport extends DolibarrModules class modImport extends DolibarrModules
{ {

View File

@ -482,8 +482,8 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='',$encodeto
* YYYYMMDDHHMMSS * YYYYMMDDHHMMSS
* DD/MM/YY or DD/MM/YYYY (this format should not be used anymore) * DD/MM/YY or DD/MM/YYYY (this format should not be used anymore)
* DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore) * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore)
* \return date Date * 19700101020000 -> 7200
* \example 19700101020000 -> 7200 * \return date Date
*/ */
function dol_stringtotime($string) function dol_stringtotime($string)
{ {