mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Fix: Enregistrement en base date < 1940
New: Ajout permission "modifier ses propres infos adhrents"
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,7 +29,7 @@
|
||||
\author Laurent Destailleur
|
||||
\author Sebastien Di Cintio
|
||||
\author Benoit Mortier
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
|
||||
@@ -491,26 +489,26 @@ class Adherent extends CommonObject
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql.= " prenom = ".($this->prenom?"'".addslashes($this->prenom)."'":"null");
|
||||
$sql.= ",nom=" .($this->nom?"'".addslashes($this->nom)."'":"null");
|
||||
$sql.= ",login=" .($this->login?"'".addslashes($this->login)."'":"null");
|
||||
$sql.= ",societe=" .($this->societe?"'".addslashes($this->societe)."'":"null");
|
||||
$sql.= ",adresse=" .($this->adresse?"'".addslashes($this->adresse)."'":"null");
|
||||
$sql.= ",cp=" .($this->cp?"'".addslashes($this->cp)."'":"null");
|
||||
$sql.= ",ville=" .($this->ville?"'".addslashes($this->ville)."'":"null");
|
||||
$sql.= ",pays=" ."'".$this->pays_id."'";
|
||||
$sql.= ",email=" ."'".$this->email."'";
|
||||
$sql.= ",phone=" .($this->phone?"'".addslashes($this->phone)."'":"null");
|
||||
$sql.= ",phone_perso=" .($this->phone_perso?"'".addslashes($this->phone_perso)."'":"null");
|
||||
$sql.= ",phone_mobile=" .($this->phone_mobile?"'".addslashes($this->phone_mobile)."'":"null");
|
||||
$sql.= ",note=" .($this->commentaire?"'".addslashes($this->commentaire)."'":"null");
|
||||
$sql.= ",photo=" .($this->photo?"'".$this->photo."'":"null");
|
||||
$sql.= ",public=" ."'".$this->public."'";
|
||||
$sql.= ",statut=" .$this->statut;
|
||||
$sql.= ",fk_adherent_type=".$this->typeid;
|
||||
$sql.= ",morphy=" ."'".$this->morphy."'";
|
||||
$sql.= ",naiss=" .($this->naiss?"'".$this->db->idate($this->naiss)."'":"null");
|
||||
if ($this->datefin) $sql.= ",datefin='".$this->db->idate($this->datefin)."'"; // Ne doit etre modifie que par effacement cotisation
|
||||
if ($this->datevalid) $sql.= ",datevalid='".$this->db->idate($this->datevalid)."'"; // Ne doit etre modifie que par validation adherent
|
||||
$sql.= ", nom=" .($this->nom?"'".addslashes($this->nom)."'":"null");
|
||||
$sql.= ", login=" .($this->login?"'".addslashes($this->login)."'":"null");
|
||||
$sql.= ", societe=" .($this->societe?"'".addslashes($this->societe)."'":"null");
|
||||
$sql.= ", adresse=" .($this->adresse?"'".addslashes($this->adresse)."'":"null");
|
||||
$sql.= ", cp=" .($this->cp?"'".addslashes($this->cp)."'":"null");
|
||||
$sql.= ", ville=" .($this->ville?"'".addslashes($this->ville)."'":"null");
|
||||
$sql.= ", pays=" ."'".$this->pays_id."'";
|
||||
$sql.= ", email=" ."'".$this->email."'";
|
||||
$sql.= ", phone=" .($this->phone?"'".addslashes($this->phone)."'":"null");
|
||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".addslashes($this->phone_perso)."'":"null");
|
||||
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".addslashes($this->phone_mobile)."'":"null");
|
||||
$sql.= ", note=" .($this->commentaire?"'".addslashes($this->commentaire)."'":"null");
|
||||
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
|
||||
$sql.= ", public=" ."'".$this->public."'";
|
||||
$sql.= ", statut=" .$this->statut;
|
||||
$sql.= ", fk_adherent_type=".$this->typeid;
|
||||
$sql.= ", morphy=" ."'".$this->morphy."'";
|
||||
$sql.= ", naiss=" .($this->naiss?"'".$this->db->idate($this->naiss)."'":"null");
|
||||
if ($this->datefin) $sql.= ", datefin='".$this->db->idate($this->datefin)."'"; // Ne doit etre modifie que par effacement cotisation
|
||||
if ($this->datevalid) $sql.= ", datevalid='".$this->db->idate($this->datevalid)."'"; // Ne doit etre modifie que par validation adherent
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dolibarr_syslog("Adherent::update sql=".$sql);
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/adherents/fiche.php
|
||||
\ingroup adherent
|
||||
\brief Page d'ajout, edition, suppression d'une fiche adherent
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@@ -109,97 +107,103 @@ if ($_POST["action"] == 'confirm_sendinfo' && $_POST["confirm"] == 'yes')
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->creer && $_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||
if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||
{
|
||||
$datenaiss='';
|
||||
if (isset($_POST["naissday"]) && $_POST["naissday"]
|
||||
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"]
|
||||
&& isset($_POST["naissyear"]) && $_POST["naissyear"])
|
||||
{
|
||||
$datenaiss=dolibarr_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
|
||||
}
|
||||
|
||||
// Charge objet actuel
|
||||
$result=$adh->fetch($_POST["rowid"]);
|
||||
if ($result > 0)
|
||||
|
||||
// If change (allowed on all members) or (allowed on myself and i am edited memeber)
|
||||
if ($user->rights->adherent->creer || ($user->rights->adherent->self->creer && $adh->user_id == $user->id))
|
||||
{
|
||||
// Modifie valeures
|
||||
$adh->prenom = $_POST["prenom"];
|
||||
$adh->nom = $_POST["nom"];
|
||||
$adh->fullname = trim($adh->prenom.' '.$adh->nom);
|
||||
$adh->login = $_POST["login"];
|
||||
$adh->pass = $_POST["pass"];
|
||||
|
||||
$adh->societe = $_POST["societe"];
|
||||
$adh->adresse = $_POST["adresse"];
|
||||
$adh->cp = $_POST["cp"];
|
||||
$adh->ville = $_POST["ville"];
|
||||
$adh->pays_id = $_POST["pays"];
|
||||
|
||||
$adh->phone = $_POST["phone"];
|
||||
$adh->phone_perso = $_POST["phone_perso"];
|
||||
$adh->phone_mobile= $_POST["phone_mobile"];
|
||||
$adh->email = $_POST["email"];
|
||||
$adh->naiss = $datenaiss;
|
||||
|
||||
$adh->typeid = $_POST["type"];
|
||||
$adh->commentaire = $_POST["comment"];
|
||||
$adh->morphy = $_POST["morphy"];
|
||||
|
||||
$adh->amount = $_POST["amount"];
|
||||
|
||||
// recuperation du statut et public
|
||||
$adh->statut = $_POST["statut"];
|
||||
$adh->public = $_POST["public"];
|
||||
|
||||
foreach($_POST as $key => $value)
|
||||
$datenaiss='';
|
||||
if (isset($_POST["naissday"]) && $_POST["naissday"]
|
||||
&& isset($_POST["naissmonth"]) && $_POST["naissmonth"]
|
||||
&& isset($_POST["naissyear"]) && $_POST["naissyear"])
|
||||
{
|
||||
if (ereg("^options_",$key))
|
||||
{
|
||||
//escape values from POST, at least with addslashes, to avoid obvious SQL injections
|
||||
//(array_options is directly input in the DB in adherent.class.php::update())
|
||||
$adh->array_options[$key]=addslashes($_POST[$key]);
|
||||
}
|
||||
$datenaiss=dolibarr_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
|
||||
}
|
||||
//print $_POST["naissmonth"].", ".$_POST["naissday"].", ".$_POST["naissyear"]." ".$datenaiss." ".adodb_strftime('%Y-%m-%d %H:%M:%S',$datenaiss);
|
||||
|
||||
$result=$adh->update($user,0);
|
||||
if ($result >= 0 && ! sizeof($adh->errors))
|
||||
// Charge objet actuel
|
||||
if ($result > 0)
|
||||
{
|
||||
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
|
||||
// Modifie valeures
|
||||
$adh->prenom = $_POST["prenom"];
|
||||
$adh->nom = $_POST["nom"];
|
||||
$adh->fullname = trim($adh->prenom.' '.$adh->nom);
|
||||
$adh->login = $_POST["login"];
|
||||
$adh->pass = $_POST["pass"];
|
||||
|
||||
$adh->societe = $_POST["societe"];
|
||||
$adh->adresse = $_POST["adresse"];
|
||||
$adh->cp = $_POST["cp"];
|
||||
$adh->ville = $_POST["ville"];
|
||||
$adh->pays_id = $_POST["pays"];
|
||||
|
||||
$adh->phone = $_POST["phone"];
|
||||
$adh->phone_perso = $_POST["phone_perso"];
|
||||
$adh->phone_mobile= $_POST["phone_mobile"];
|
||||
$adh->email = $_POST["email"];
|
||||
$adh->naiss = $datenaiss;
|
||||
|
||||
$adh->typeid = $_POST["type"];
|
||||
$adh->commentaire = $_POST["comment"];
|
||||
$adh->morphy = $_POST["morphy"];
|
||||
|
||||
$adh->amount = $_POST["amount"];
|
||||
|
||||
// recuperation du statut et public
|
||||
$adh->statut = $_POST["statut"];
|
||||
$adh->public = $_POST["public"];
|
||||
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
// If photo is provided
|
||||
if (! is_dir($conf->adherent->dir_output))
|
||||
if (ereg("^options_",$key))
|
||||
{
|
||||
create_exdir($conf->adherent->dir_output);
|
||||
//escape values from POST, at least with addslashes, to avoid obvious SQL injections
|
||||
//(array_options is directly input in the DB in adherent.class.php::update())
|
||||
$adh->array_options[$key]=addslashes($_POST[$key]);
|
||||
}
|
||||
if (is_dir($conf->adherent->dir_output))
|
||||
}
|
||||
|
||||
$result=$adh->update($user,0);
|
||||
if ($result >= 0 && ! sizeof($adh->errors))
|
||||
{
|
||||
if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name']))
|
||||
{
|
||||
$newfile=$conf->adherent->dir_output . "/" . $adh->id . ".jpg";
|
||||
if (! doliMoveFileUpload($_FILES['photo']['tmp_name'],$newfile))
|
||||
// If photo is provided
|
||||
if (! is_dir($conf->adherent->dir_output))
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
create_exdir($conf->adherent->dir_output);
|
||||
}
|
||||
if (is_dir($conf->adherent->dir_output))
|
||||
{
|
||||
$newfile=$conf->adherent->dir_output . "/" . $adh->id . ".jpg";
|
||||
if (! doliMoveFileUpload($_FILES['photo']['tmp_name'],$newfile))
|
||||
{
|
||||
$message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Header("Location: fiche.php?rowid=".$adh->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($adh->error)
|
||||
{
|
||||
$errmsg=$adh->error;
|
||||
Header("Location: fiche.php?rowid=".$adh->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($adh->errors as $error)
|
||||
if ($adh->error)
|
||||
{
|
||||
if ($errmsg) $errmsg.='<br>';
|
||||
$errmsg.=$error;
|
||||
$errmsg=$adh->error;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($adh->errors as $error)
|
||||
{
|
||||
if ($errmsg) $errmsg.='<br>';
|
||||
$errmsg.=$error;
|
||||
}
|
||||
}
|
||||
$action='';
|
||||
}
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -539,6 +543,7 @@ if ($action == 'edit')
|
||||
$adho->fetch_optionals();
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($adh->typeid);
|
||||
|
||||
|
||||
/*
|
||||
@@ -598,7 +603,15 @@ if ($action == 'edit')
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'*</td><td>';
|
||||
$htmls->select_array("type", $adht->liste_array(), $adh->typeid);
|
||||
if ($user->rights->adherent->creer) // If $user->rights->adherent->self->creer, we do not allow.
|
||||
{
|
||||
$htmls->select_array("type", $adht->liste_array(), $adh->typeid);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $adht->getNomUrl(1);
|
||||
print '<input type="hidden" name="type" value="'.$adh->typeid.'">';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
// Physique-Moral
|
||||
@@ -965,56 +978,77 @@ if ($rowid && $action != 'edit')
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($user->rights->adherent->creer)
|
||||
if ($user->rights->adherent->creer || ($user->rights->adherent->self->creer && $adh->user_id == $user->id))
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=edit\">".$langs->trans("Modify")."</a>";
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->creer)
|
||||
else
|
||||
{
|
||||
// Valider
|
||||
if ($adh->statut == -1)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Validate")."</a>\n";
|
||||
}
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("Modify")."</font>";
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->creer)
|
||||
// Valider
|
||||
if ($adh->statut == -1)
|
||||
{
|
||||
// Reactiver
|
||||
if ($adh->statut == 0)
|
||||
{
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Validate")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("Validate")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
// Reactiver
|
||||
if ($adh->statut == 0)
|
||||
{
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=valid\">".$langs->trans("Reenable")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("Reenable")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->creer)
|
||||
// Envoi fiche par mail
|
||||
if ($adh->statut >= 1 && $adh->email)
|
||||
{
|
||||
// Envoi fiche par mail
|
||||
if ($adh->statut >= 1 && $adh->email)
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$adh->id&action=sendinfo\">".$langs->trans("SendCardByMail")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("SendCardByMail")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->adherent->supprimer)
|
||||
// Resilier
|
||||
if ($adh->statut >= 1)
|
||||
{
|
||||
// Resilier
|
||||
if ($adh->statut >= 1)
|
||||
{
|
||||
if ($user->rights->adherent->supprimer)
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"fiche.php?rowid=$rowid&action=resign\">".$langs->trans("Resiliate")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("Resiliate")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
// Barre d'actions
|
||||
if ($user->rights->user->user->creer)
|
||||
if (! $user->societe_id && ! $adh->user_id)
|
||||
{
|
||||
if (! $user->societe_id)
|
||||
if ($user->rights->user->user->creer)
|
||||
{
|
||||
if (! $adh->user_id)
|
||||
{
|
||||
print '<a class="butAction" href="fiche.php?rowid='.$adh->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
print '<a class="butAction" href="fiche.php?rowid='.$adh->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("CreateDolibarrLogin")."</font>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1023,6 +1057,10 @@ if ($rowid && $action != 'edit')
|
||||
{
|
||||
print "<a class=\"butActionDelete\" href=\"fiche.php?rowid=$adh->id&action=delete\">".$langs->trans("Delete")."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<font class=\"butActionRefused\" href=\"#\">".$langs->trans("Delete")."</font>";
|
||||
}
|
||||
|
||||
// Action SPIP
|
||||
if ($conf->global->ADHERENT_USE_SPIP)
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,6 +29,7 @@
|
||||
\file htdocs/includes/modules/modAdherent.class.php
|
||||
\ingroup adherent
|
||||
\brief Fichier de description et activation du module adherents
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
@@ -130,11 +129,19 @@ class modAdherent extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 72;
|
||||
$this->rights[$r][1] = 'Creer/modifier les adherents';
|
||||
$this->rights[$r][1] = 'Creer/modifier tous les adherents';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 73;
|
||||
$this->rights[$r][1] = 'Creer/modifier ses propres infos adherents';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'self';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 74;
|
||||
$this->rights[$r][1] = 'Supprimer les adherents';
|
||||
|
||||
@@ -94,7 +94,7 @@ class modUser extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 252;
|
||||
$this->rights[$r][1] = 'Cr<EFBFBD>er/modifier les autres utilisateurs, les groupes et leurs permissions';
|
||||
$this->rights[$r][1] = 'Creer/modifier les autres utilisateurs, les groupes et leurs permissions';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'user';
|
||||
@@ -110,7 +110,7 @@ class modUser extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 254;
|
||||
$this->rights[$r][1] = 'Supprimer ou d<EFBFBD>sactiver les autres utilisateurs';
|
||||
$this->rights[$r][1] = 'Supprimer ou desactiver les autres utilisateurs';
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'user';
|
||||
@@ -118,7 +118,7 @@ class modUser extends DolibarrModules
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 255;
|
||||
$this->rights[$r][1] = 'Cr<EFBFBD>er/modifier ses propres infos utilisateur';
|
||||
$this->rights[$r][1] = 'Creer/modifier ses propres infos utilisateur';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'self';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2007 Simon Desee <simon@dedisoft.com>
|
||||
*
|
||||
@@ -17,21 +17,24 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/databases/mssql.lib.php
|
||||
\brief Fichier de la classe permettant de g<>rer une base mssql
|
||||
\file htdocs/lib/databases/mssql.lib.php
|
||||
\brief Fichier de la classe permettant de g<>rer une base mssql
|
||||
\version $Id$
|
||||
*/
|
||||
// Pour compatibilit<69> lors de l'upgrade
|
||||
if (! defined('DOL_DOCUMENT_ROOT'))
|
||||
{
|
||||
define('DOL_DOCUMENT_ROOT', '../..');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\class DoliDb
|
||||
\brief Classe de gestion de la database de dolibarr
|
||||
\class DoliDb
|
||||
\brief Classe de gestion de la database de dolibarr
|
||||
*/
|
||||
|
||||
class DoliDb
|
||||
{
|
||||
//! Handler de base
|
||||
@@ -514,7 +517,7 @@ class DoliDb
|
||||
function idate($param)
|
||||
{
|
||||
//return "dbo.from_unixtime(".$param.")";
|
||||
return strftime("%d/%m/%Y %H:%M:%S",$param);
|
||||
return adodb_strftime("%d/%m/%Y %H:%M:%S",$param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001 Fabien Seisen <seisen@linuxfr.org>
|
||||
* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
@@ -18,21 +18,25 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/databases/mysql.lib.php
|
||||
\brief Fichier de la classe permettant de g<>rer une base mysql
|
||||
\file htdocs/lib/databases/mysql.lib.php
|
||||
\brief Fichier de la classe permettant de g<>rer une base mysql
|
||||
\version $Id$
|
||||
*/
|
||||
// Pour compatibilit<69> lors de l'upgrade
|
||||
if (! defined('DOL_DOCUMENT_ROOT'))
|
||||
{
|
||||
define('DOL_DOCUMENT_ROOT', '../..');
|
||||
}
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
||||
|
||||
|
||||
/**
|
||||
\class DoliDb
|
||||
\brief Classe de gestion de la database de dolibarr
|
||||
\class DoliDb
|
||||
\brief Classe de gestion de la database de dolibarr
|
||||
*/
|
||||
|
||||
class DoliDb
|
||||
{
|
||||
//! Handler de base
|
||||
@@ -534,7 +538,7 @@ class DoliDb
|
||||
*/
|
||||
function idate($param)
|
||||
{
|
||||
return strftime("%Y%m%d%H%M%S",$param);
|
||||
return adodb_strftime("%Y%m%d%H%M%S",$param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001 Fabien Seisen <seisen@linuxfr.org>
|
||||
* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
@@ -18,21 +18,25 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/databases/mysqli.lib.php
|
||||
\brief Fichier de la classe permettant de g<>rer une base mysql
|
||||
\version $Id$
|
||||
*/
|
||||
// Pour compatibilit<69> lors de l'upgrade
|
||||
if (! defined('DOL_DOCUMENT_ROOT'))
|
||||
{
|
||||
define('DOL_DOCUMENT_ROOT', '../..');
|
||||
}
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
||||
|
||||
|
||||
/**
|
||||
\class DoliDb
|
||||
\brief Classe permettant de g<>r<EFBFBD>r la database de dolibarr
|
||||
*/
|
||||
|
||||
class DoliDb
|
||||
{
|
||||
//! Handler de base
|
||||
@@ -549,7 +553,7 @@ class DoliDb
|
||||
*/
|
||||
function idate($param)
|
||||
{
|
||||
return strftime("%Y%m%d%H%M%S",$param);
|
||||
return adodb_strftime("%Y%m%d%H%M%S",$param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001 Fabien Seisen <seisen@linuxfr.org>
|
||||
* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
*
|
||||
@@ -18,21 +18,25 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/databases/pgsql.lib.php
|
||||
\brief Fichier de la classe permettant de g<>r<EFBFBD>r une base pgsql
|
||||
\version $Id$
|
||||
*/
|
||||
// Pour compatibilit<69> lors de l'upgrade
|
||||
if (! defined('DOL_DOCUMENT_ROOT'))
|
||||
{
|
||||
define('DOL_DOCUMENT_ROOT', '../..');
|
||||
}
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
|
||||
|
||||
|
||||
/**
|
||||
\class DoliDb
|
||||
\brief Classe permettant de g<>r<EFBFBD>r la database de dolibarr
|
||||
*/
|
||||
|
||||
class DoliDb
|
||||
{
|
||||
var $db; // Handler de base
|
||||
@@ -475,7 +479,7 @@ class DoliDb
|
||||
*/
|
||||
function idate($param)
|
||||
{
|
||||
return strftime("%Y%m%d%H%M%S",$param);
|
||||
return adodb_strftime("%Y%m%d%H%M%S",$param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -560,12 +560,12 @@ function dolibarr_print_date($time,$format='')
|
||||
$smin = $reg[5];
|
||||
$ssec = $reg[6];
|
||||
|
||||
return strftime($format,dolibarr_mktime($shour,$smin,$ssec,$smonth,$sday,$syear));
|
||||
return adodb_strftime($format,dolibarr_mktime($shour,$smin,$ssec,$smonth,$sday,$syear));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Date est un timestamps
|
||||
return strftime($format,$time);
|
||||
return adodb_strftime($format,$time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
|
||||
print '<td colspan="2">'.$fuser->prenom.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user