';
- if ($user->rights->adherent->creer)
+ if ($user->rights->adherent->creer || ($user->rights->adherent->self->creer && $adh->user_id == $user->id))
{
print "".$langs->trans("Modify")."";
}
-
- if ($user->rights->adherent->creer)
+ else
{
- // Valider
- if ($adh->statut == -1)
- {
- print "".$langs->trans("Validate")."\n";
- }
+ print "".$langs->trans("Modify")."";
}
- if ($user->rights->adherent->creer)
+ // Valider
+ if ($adh->statut == -1)
{
- // Reactiver
- if ($adh->statut == 0)
- {
+ if ($user->rights->adherent->creer)
+ {
+ print "".$langs->trans("Validate")."\n";
+ }
+ else
+ {
+ print "".$langs->trans("Validate")."";
+ }
+ }
+
+ // Reactiver
+ if ($adh->statut == 0)
+ {
+ if ($user->rights->adherent->creer)
+ {
print "".$langs->trans("Reenable")."\n";
}
+ else
+ {
+ print "".$langs->trans("Reenable")."";
+ }
}
- 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 "id&action=sendinfo\">".$langs->trans("SendCardByMail")."\n";
}
+ else
+ {
+ print "".$langs->trans("SendCardByMail")."";
+ }
}
- if ($user->rights->adherent->supprimer)
+ // Resilier
+ if ($adh->statut >= 1)
{
- // Resilier
- if ($adh->statut >= 1)
- {
+ if ($user->rights->adherent->supprimer)
+ {
print "".$langs->trans("Resiliate")."\n";
}
+ else
+ {
+ print "".$langs->trans("Resiliate")."";
+ }
}
// 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 ''.$langs->trans("CreateDolibarrLogin").'';
- }
+ print ''.$langs->trans("CreateDolibarrLogin").'';
+ }
+ else
+ {
+ print "".$langs->trans("CreateDolibarrLogin")."";
}
}
@@ -1023,6 +1057,10 @@ if ($rowid && $action != 'edit')
{
print "id&action=delete\">".$langs->trans("Delete")."\n";
}
+ else
+ {
+ print "".$langs->trans("Delete")."";
+ }
// Action SPIP
if ($conf->global->ADHERENT_USE_SPIP)
diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php
index 36a69836818..bfb97fb52ef 100644
--- a/htdocs/includes/modules/modAdherent.class.php
+++ b/htdocs/includes/modules/modAdherent.class.php
@@ -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';
diff --git a/htdocs/includes/modules/modUser.class.php b/htdocs/includes/modules/modUser.class.php
index 1b65f33f7f6..b68ee1c94d5 100644
--- a/htdocs/includes/modules/modUser.class.php
+++ b/htdocs/includes/modules/modUser.class.php
@@ -94,7 +94,7 @@ class modUser extends DolibarrModules
$r++;
$this->rights[$r][0] = 252;
- $this->rights[$r][1] = 'Cr�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�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�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';
diff --git a/htdocs/lib/databases/mssql.lib.php b/htdocs/lib/databases/mssql.lib.php
index c502f8fb556..472ebdc6ff3 100644
--- a/htdocs/lib/databases/mssql.lib.php
+++ b/htdocs/lib/databases/mssql.lib.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2007 Laurent Destailleur
+ * Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2005-2007 Regis Houssin
* Copyright (C) 2007 Simon Desee
*
@@ -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é 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);
}
diff --git a/htdocs/lib/databases/mysql.lib.php b/htdocs/lib/databases/mysql.lib.php
index c54d17090a8..7b1f7a9df5c 100644
--- a/htdocs/lib/databases/mysql.lib.php
+++ b/htdocs/lib/databases/mysql.lib.php
@@ -1,7 +1,7 @@
* Copyright (C) 2002-2007 Rodolphe Quiedeville
- * Copyright (C) 2004-2006 Laurent Destailleur
+ * Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2006 Andre Cianfarani
* Copyright (C) 2005-2007 Regis Houssin
*
@@ -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é 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);
}
diff --git a/htdocs/lib/databases/mysqli.lib.php b/htdocs/lib/databases/mysqli.lib.php
index f4828400c26..3f5b631f9a4 100644
--- a/htdocs/lib/databases/mysqli.lib.php
+++ b/htdocs/lib/databases/mysqli.lib.php
@@ -1,7 +1,7 @@
* Copyright (C) 2002-2005 Rodolphe Quiedeville
- * Copyright (C) 2004-2007 Laurent Destailleur
+ * Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2006 Andre Cianfarani
* Copyright (C) 2005-2007 Regis Houssin
*
@@ -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é 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é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);
}
diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php
index 4711bb52663..3460b8513c7 100644
--- a/htdocs/lib/databases/pgsql.lib.php
+++ b/htdocs/lib/databases/pgsql.lib.php
@@ -1,7 +1,7 @@
* Copyright (C) 2002-2005 Rodolphe Quiedeville
- * Copyright (C) 2004-2007 Laurent Destailleur
+ * Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2004 Sebastien Di Cintio
* Copyright (C) 2004 Benoit Mortier
*
@@ -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ér une base pgsql
+ \version $Id$
*/
+// Pour compatibilité 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é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);
}
diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php
index 994004f362e..378718c5b5e 100644
--- a/htdocs/lib/functions.inc.php
+++ b/htdocs/lib/functions.inc.php
@@ -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);
}
}
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index 4aa4cad90c6..cd73693ddd0 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -202,6 +202,7 @@ print '