forked from Wavyzz/dolibarr
Removed PHP warnings with E_ALL level
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -37,19 +37,22 @@ $langs->load("other");
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($_POST["action"] == 'setlevel')
|
if (! empty($_POST["action"]) && $_POST["action"] == 'setlevel')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db,"SYSLOG_LEVEL",$_POST["level"]);
|
dolibarr_set_const($db,"SYSLOG_LEVEL",$_POST["level"]);
|
||||||
dolibarr_syslog("admin/syslog: level ".$_POST["level"]);
|
dolibarr_syslog("admin/syslog: level ".$_POST["level"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'set')
|
if (! empty($_POST["action"]) && $_POST["action"] == 'set')
|
||||||
{
|
{
|
||||||
$optionlogoutput=$_POST["optionlogoutput"];
|
$optionlogoutput=$_POST["optionlogoutput"];
|
||||||
if ($optionlogoutput == "syslog")
|
if ($optionlogoutput == "syslog")
|
||||||
{
|
{
|
||||||
if (defined($_POST["facility"]))
|
if (defined($_POST["facility"]))
|
||||||
{
|
{
|
||||||
|
// Only LOG_USER supported on Windows
|
||||||
|
if (! empty($_SERVER["WINDIR"])) $_POST["facility"]='LOG_USER';
|
||||||
|
|
||||||
dolibarr_del_const($db,"SYSLOG_FILE");
|
dolibarr_del_const($db,"SYSLOG_FILE");
|
||||||
dolibarr_set_const($db,"SYSLOG_FACILITY",$_POST["facility"]);
|
dolibarr_set_const($db,"SYSLOG_FACILITY",$_POST["facility"]);
|
||||||
dolibarr_syslog("admin/syslog: facility ".$_POST["facility"]);
|
dolibarr_syslog("admin/syslog: facility ".$_POST["facility"]);
|
||||||
@@ -110,11 +113,13 @@ print '<td align="right"><input type="submit" class="button" value="'.$langs->tr
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var]."><td width=\"140\"><input type=\"radio\" name=\"optionlogoutput\" value=\"syslog\" ".($syslogfacility?" checked":"")."> ".$langs->trans("SyslogSyslog")."</td>";
|
print "<tr ".$bc[$var]."><td width=\"140\"><input ".$bc[$var]." type=\"radio\" name=\"optionlogoutput\" value=\"syslog\" ".($syslogfacility?" checked":"")."> ".$langs->trans("SyslogSyslog")."</td>";
|
||||||
print '<td colspan="2">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" value="'.$defaultsyslogfacility.'"></td></tr>';
|
print '<td colspan="2">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" value="'.$defaultsyslogfacility.'">';
|
||||||
|
print ' '.img_info('Only LOG_USER supported on Windows');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var]."><td width=\"140\"><input type=\"radio\" name=\"optionlogoutput\" value=\"file\"".($syslogfile?" checked":"")."> ".$langs->trans("SyslogSimpleFile")."</td>";
|
print "<tr ".$bc[$var]."><td width=\"140\"><input ".$bc[$var]." type=\"radio\" name=\"optionlogoutput\" value=\"file\"".($syslogfile?" checked":"")."> ".$langs->trans("SyslogSimpleFile")."</td>";
|
||||||
print '<td colspan="2">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" size="60" value="'.$defaultsyslogfile.'"></td></tr>';
|
print '<td colspan="2">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" size="60" value="'.$defaultsyslogfile.'"></td></tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -53,7 +53,6 @@ class Events // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
* \param DB Database handler
|
* \param DB Database handler
|
||||||
@@ -76,7 +75,6 @@ class Events // extends CommonObject
|
|||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->id=trim($this->id);
|
$this->id=trim($this->id);
|
||||||
$this->fk_action=trim($this->fk_action);
|
|
||||||
$this->description=trim($this->description);
|
$this->description=trim($this->description);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ class FormAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la liste d<EFBFBD>roulante des menus disponibles (eldy_backoffice, ...)
|
* \brief Retourne la liste deroulante des menus disponibles (eldy_backoffice, ...)
|
||||||
* \param selected Menu pr<EFBFBD>-s<EFBFBD>lectionn<EFBFBD>e
|
* \param selected Menu pre-selectionnee
|
||||||
* \param htmlname Nom de la zone select
|
* \param htmlname Nom de la zone select
|
||||||
* \param dirmenu Rep<EFBFBD>rtoire <EFBFBD> scanner
|
* \param dirmenu Repertoire a scanner
|
||||||
*/
|
*/
|
||||||
function select_menu($selected='',$htmlname,$dirmenu)
|
function select_menu($selected='',$htmlname,$dirmenu)
|
||||||
{
|
{
|
||||||
@@ -133,7 +133,7 @@ class FormAdmin
|
|||||||
{
|
{
|
||||||
$tab=split('_',$key);
|
$tab=split('_',$key);
|
||||||
$newprefix=$tab[0];
|
$newprefix=$tab[0];
|
||||||
if ($conf->browser->firefox && $newprefix != $oldprefix)
|
if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators
|
||||||
{
|
{
|
||||||
// Affiche titre
|
// Affiche titre
|
||||||
print '<option value="-1" disabled="disabled">';
|
print '<option value="-1" disabled="disabled">';
|
||||||
@@ -143,7 +143,7 @@ class FormAdmin
|
|||||||
print '</option>';
|
print '</option>';
|
||||||
$oldprefix=$newprefix;
|
$oldprefix=$newprefix;
|
||||||
}
|
}
|
||||||
print $val."\n";
|
print $val."\n"; // Show menu entry
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -72,7 +72,7 @@ class MenuLeft {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// On va le chercher en session si non d<>fini par le lien
|
// On va le chercher en session si non d<>fini par le lien
|
||||||
$mainmenu=$_SESSION["mainmenu"];
|
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["leftmenu"]))
|
if (isset($_GET["leftmenu"]))
|
||||||
@@ -789,7 +789,7 @@ class MenuLeft {
|
|||||||
if ($mainmenu == 'tools')
|
if ($mainmenu == 'tools')
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($conf->mailing->enabled)
|
if (! empty($conf->mailing->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
@@ -798,7 +798,7 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->bookmark->enabled)
|
if (! empty($conf->bookmark->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php?leftmenu=bookmarks", $langs->trans("Bookmarks"), 0, $user->rights->bookmark->lire);
|
||||||
@@ -806,7 +806,7 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("List"), 1, $user->rights->bookmark->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->export->enabled)
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("FormatedExport"),0, $user->rights->export->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/exports/index.php?leftmenu=export",$langs->trans("FormatedExport"),0, $user->rights->export->lire);
|
||||||
@@ -814,14 +814,14 @@ class MenuLeft {
|
|||||||
//$newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
|
//$newmenu->add_submenu(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->MAIN_MODULE_IMPORT)
|
if (! empty($conf->global->MAIN_MODULE_IMPORT))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/admin/import/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/admin/import/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->lire);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/admin/import/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->creer);
|
$newmenu->add_submenu(DOL_URL_ROOT."/admin/import/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->creer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->MAIN_MODULE_DOMAIN)
|
if (! empty($conf->global->MAIN_MODULE_DOMAIN))
|
||||||
{
|
{
|
||||||
$langs->load("domains");
|
$langs->load("domains");
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
|
$newmenu->add_submenu(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Juste pour <20>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
// Juste pour <20>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||||
if (! $conf->browser->firefox)
|
if (empty($conf->browser->firefox))
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction"> </div>';
|
print '<div class="tabsAction"> </div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -99,6 +99,7 @@ class Interfaces
|
|||||||
dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
|
||||||
include_once($this->dir."/".$file);
|
include_once($this->dir."/".$file);
|
||||||
$objMod = new $modName($this->db);
|
$objMod = new $modName($this->db);
|
||||||
|
$i=0;
|
||||||
if ($objMod)
|
if ($objMod)
|
||||||
{
|
{
|
||||||
$modules[$i] = $modName;
|
$modules[$i] = $modName;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -328,7 +328,7 @@ function dolibarr_get_const($db, $name)
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj=$db->fetch_object($resql);
|
$obj=$db->fetch_object($resql);
|
||||||
$value=$obj->value;
|
if ($obj) $value=$obj->value;
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,22 +246,16 @@ function dol_syslog($message, $level=LOG_INFO)
|
|||||||
{
|
{
|
||||||
if (function_exists('openlog')) // This function does not exists on some ISP (Ex: Free in France)
|
if (function_exists('openlog')) // This function does not exists on some ISP (Ex: Free in France)
|
||||||
{
|
{
|
||||||
|
$facility = LOG_USER;
|
||||||
|
|
||||||
//define_syslog_variables(); already defined in master.inc.php
|
//define_syslog_variables(); already defined in master.inc.php
|
||||||
if (defined("MAIN_SYSLOG_FACILITY") && MAIN_SYSLOG_FACILITY)
|
if (defined("SYSLOG_FACILITY") && SYSLOG_FACILITY)
|
||||||
{
|
|
||||||
$facility = constant("MAIN_SYSLOG_FACILITY");
|
|
||||||
}
|
|
||||||
elseif (defined("SYSLOG_FACILITY") && SYSLOG_FACILITY)
|
|
||||||
{
|
{
|
||||||
// Exemple: SYSLOG_FACILITY vaut LOG_USER qui vaut 8. On a besoin de 8 dans $facility.
|
// Exemple: SYSLOG_FACILITY vaut LOG_USER qui vaut 8. On a besoin de 8 dans $facility.
|
||||||
$facility = constant("SYSLOG_FACILITY");
|
$facility = constant("SYSLOG_FACILITY");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
openlog("dolibarr", LOG_PID | LOG_PERROR, (int) $facility); // (int) is required to avoid error parameter 3 expected to be long
|
||||||
$facility = LOG_USER;
|
|
||||||
}
|
|
||||||
unset ($facility);
|
|
||||||
openlog("dolibarr", LOG_PID | LOG_PERROR, $facility);
|
|
||||||
|
|
||||||
if (! $level)
|
if (! $level)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -149,8 +149,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
print '<tr><td colspan="3"> </td></tr>'."\n";
|
print '<tr><td colspan="3"> </td></tr>'."\n";
|
||||||
|
|
||||||
// Security graphical code
|
// Security graphical code
|
||||||
$disabled=! $conf->global->MAIN_SECURITY_ENABLECAPTCHA;
|
if (function_exists("imagecreatefrompng") && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
|
||||||
if (function_exists("imagecreatefrompng") && ! $disabled)
|
|
||||||
{
|
{
|
||||||
//print "Info session: ".session_name().session_id();print_r($_SESSION);
|
//print "Info session: ".session_name().session_id();print_r($_SESSION);
|
||||||
print '<tr><td align="left" valign="middle" nowrap="nowrap"> <b>'.$langs->trans("SecurityCode").'</b></td>';
|
print '<tr><td align="left" valign="middle" nowrap="nowrap"> <b>'.$langs->trans("SecurityCode").'</b></td>';
|
||||||
@@ -170,7 +169,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
print '<input type="submit" class="button" value=" '.$langs->trans("Connection").' " tabindex="4" />';
|
print '<input type="submit" class="button" value=" '.$langs->trans("Connection").' " tabindex="4" />';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (! $conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)
|
if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK))
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="3" align="center"><a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">('.$langs->trans("PasswordForgotten").')</a></td></tr>';
|
print '<tr><td colspan="3" align="center"><a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">('.$langs->trans("PasswordForgotten").')</a></td></tr>';
|
||||||
}
|
}
|
||||||
@@ -183,14 +182,14 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Message
|
// Message
|
||||||
if ($_SESSION["dol_loginmesg"])
|
if (! empty($_SESSION["dol_loginmesg"]))
|
||||||
{
|
{
|
||||||
print '<center><table width="60%"><tr><td align="center" class="small"><div class="error">';
|
print '<center><table width="60%"><tr><td align="center" class="small"><div class="error">';
|
||||||
print $_SESSION["dol_loginmesg"];
|
print $_SESSION["dol_loginmesg"];
|
||||||
$_SESSION["dol_loginmesg"]="";
|
$_SESSION["dol_loginmesg"]="";
|
||||||
print '</div></td></tr></table></center>';
|
print '</div></td></tr></table></center>';
|
||||||
}
|
}
|
||||||
if ($conf->global->MAIN_HOME)
|
if (! empty($conf->global->MAIN_HOME))
|
||||||
{
|
{
|
||||||
print '<center><table cellpadding="0" cellspacing="0" border="0" align="center" width="750"><tr><td align="center">';
|
print '<center><table cellpadding="0" cellspacing="0" border="0" align="center" width="750"><tr><td align="center">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@@ -204,7 +203,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<!-- urlfrom in session = '.$_SESSION["urlfrom"].' -->';
|
print '<!-- urlfrom in session = '.(isset($_SESSION["urlfrom"])?$_SESSION["urlfrom"]:'').' -->';
|
||||||
|
|
||||||
// Fin entete html
|
// Fin entete html
|
||||||
print "\n</body>\n</html>";
|
print "\n</body>\n</html>";
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ $sessionname="DOLSESSID_".$dolibarr_main_db_name;
|
|||||||
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT);
|
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) ini_set('session.gc_maxlifetime',$conf->global->MAIN_SESSION_TIMEOUT);
|
||||||
session_name($sessionname);
|
session_name($sessionname);
|
||||||
session_start();
|
session_start();
|
||||||
dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".$_SESSION["dol_login"].", ".ini_get("session.gc_maxlifetime"));
|
dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id().", _SESSION['dol_login']=".(isset($_SESSION["dol_login"])?$_SESSION["dol_login"]:'').", ".ini_get("session.gc_maxlifetime"));
|
||||||
|
|
||||||
// Disable modules (this must be after session_start)
|
// Disable modules (this must be after session_start)
|
||||||
if (! empty($_REQUEST["disablemodules"])) $_SESSION["disablemodules"]=$_REQUEST["disablemodules"];
|
if (! empty($_REQUEST["disablemodules"])) $_SESSION["disablemodules"]=$_REQUEST["disablemodules"];
|
||||||
@@ -206,7 +206,7 @@ if (! isset($_SESSION["dol_login"]))
|
|||||||
// On est pas deja authentifie, on demande le login/mot de passe
|
// On est pas deja authentifie, on demande le login/mot de passe
|
||||||
|
|
||||||
// Verification du code securite graphique
|
// Verification du code securite graphique
|
||||||
if ($test && isset($_POST["username"]) && $conf->global->MAIN_SECURITY_ENABLECAPTCHA)
|
if ($test && isset($_POST["username"]) && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/../external-libs/Artichow/Artichow.cfg.php';
|
require_once DOL_DOCUMENT_ROOT.'/../external-libs/Artichow/Artichow.cfg.php';
|
||||||
require_once ARTICHOW."/AntiSpam.class.php";
|
require_once ARTICHOW."/AntiSpam.class.php";
|
||||||
@@ -380,9 +380,10 @@ else
|
|||||||
// Est-ce une nouvelle session
|
// Est-ce une nouvelle session
|
||||||
if (! isset($_SESSION["dol_login"]))
|
if (! isset($_SESSION["dol_login"]))
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
|
|
||||||
// Nouvelle session pour ce login
|
// Nouvelle session pour ce login
|
||||||
$_SESSION["dol_login"]=$user->login;
|
$_SESSION["dol_login"]=$user->login;
|
||||||
$_SESSION["dol_password"]=$user->pass_crypted;
|
|
||||||
$_SESSION["dol_authmode"]=$conf->authmode;
|
$_SESSION["dol_authmode"]=$conf->authmode;
|
||||||
dolibarr_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
|
dolibarr_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id());
|
||||||
|
|
||||||
@@ -410,7 +411,7 @@ if (! isset($_SESSION["dol_login"]))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Module webcalendar
|
// Module webcalendar
|
||||||
if ($conf->webcal->enabled && $user->webcal_login != "")
|
if (! empty($conf->webcal->enabled) && $user->webcal_login != "")
|
||||||
{
|
{
|
||||||
$domain='';
|
$domain='';
|
||||||
// Extract domain from url (Useless because only cookie on same domain are authorized by browser
|
// Extract domain from url (Useless because only cookie on same domain are authorized by browser
|
||||||
@@ -431,7 +432,7 @@ if (! isset($_SESSION["dol_login"]))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Module Phenix
|
// Module Phenix
|
||||||
if ($conf->phenix->enabled && $user->phenix_login != "" && $conf->phenix->cookie)
|
if (! empty($conf->phenix->enabled) && $user->phenix_login != "" && $conf->phenix->cookie)
|
||||||
{
|
{
|
||||||
// Creation du cookie permettant la connexion automatique, valide jusqu'a la fermeture du browser
|
// Creation du cookie permettant la connexion automatique, valide jusqu'a la fermeture du browser
|
||||||
if (!isset($HTTP_COOKIE_VARS[$conf->phenix->cookie]))
|
if (!isset($HTTP_COOKIE_VARS[$conf->phenix->cookie]))
|
||||||
@@ -1014,7 +1015,7 @@ function llxFooter($foot='',$limitIEbug=1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Juste pour eviter bug IE qui reorganise mal div precedents si celui-ci absent
|
// Juste pour eviter bug IE qui reorganise mal div precedents si celui-ci absent
|
||||||
if ($limitIEbug && ! $conf->browser->firefox) print "\n".'<div class="tabsAction"> </div>'."\n";
|
if ($limitIEbug && empty($conf->browser->firefox)) print "\n".'<div class="tabsAction"> </div>'."\n";
|
||||||
|
|
||||||
// If there is some logs in buffer to show
|
// If there is some logs in buffer to show
|
||||||
if (sizeof($conf->logbuffer))
|
if (sizeof($conf->logbuffer))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -29,7 +29,7 @@ require("./pre.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/product.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/product.class.php');
|
||||||
|
|
||||||
if (!$user->rights->produit->lire)
|
if (!$user->rights->produit->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$staticproduct=new Product($db);
|
$staticproduct=new Product($db);
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ if ($result)
|
|||||||
if ($resultd)
|
if ($resultd)
|
||||||
{
|
{
|
||||||
$objtp = $db->fetch_object($resultd);
|
$objtp = $db->fetch_object($resultd);
|
||||||
if ($objtp->label != '') $objp->label = $objtp->label;
|
if ($objtp && $objtp->label != '') $objp->label = $objtp->label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Auguria SARL <info@auguria.org>
|
* Copyright (C) 2007 Auguria SARL <info@auguria.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -16,17 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/pre.inc.php
|
* \file htdocs/product/pre.inc.php
|
||||||
\ingroup product,service
|
* \ingroup product,service
|
||||||
\brief Fichier gestionnaire du menu gauche des produits et services
|
* \brief Fichier gestionnaire du menu gauche des produits et services
|
||||||
\version $Revision$
|
* \version $Id$
|
||||||
\todo Rodo - Gere les menus depuis les canvas
|
*/
|
||||||
*/
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
|
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
@@ -53,7 +50,7 @@ function llxHeader($head = "", $urlp = "", $title="")
|
|||||||
|
|
||||||
// Produit specifique
|
// Produit specifique
|
||||||
$dir = DOL_DOCUMENT_ROOT . "/product/canvas/";
|
$dir = DOL_DOCUMENT_ROOT . "/product/canvas/";
|
||||||
if(is_dir($dir) && $conf->global->PRODUCT_CANVAS_ABILITY)
|
if(is_dir($dir) && ! empty($conf->global->PRODUCT_CANVAS_ABILITY))
|
||||||
{
|
{
|
||||||
if ($handle = opendir($dir))
|
if ($handle = opendir($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,17 +63,18 @@ class User extends CommonObject
|
|||||||
var $admin;
|
var $admin;
|
||||||
var $login;
|
var $login;
|
||||||
|
|
||||||
//! Mot de passe en clair en memoire
|
//! Clear password in memory
|
||||||
var $pass;
|
var $pass;
|
||||||
//! Mot de passe en clair en base (renseigne si DATABASE_PWD_ENCRYPTED=0)
|
//! Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
|
||||||
var $pass_indatabase;
|
var $pass_indatabase;
|
||||||
//! Mot de passe crypte en base (toujours renseigne)
|
//! Encrypted password in database (always defined)
|
||||||
var $pass_indatabase_crypted;
|
var $pass_indatabase_crypted;
|
||||||
|
|
||||||
var $datec;
|
var $datec;
|
||||||
var $datem;
|
var $datem;
|
||||||
var $societe_id;
|
var $societe_id;
|
||||||
var $fk_member;
|
var $fk_member;
|
||||||
|
|
||||||
var $webcal_login;
|
var $webcal_login;
|
||||||
var $phenix_login;
|
var $phenix_login;
|
||||||
var $phenix_pass;
|
var $phenix_pass;
|
||||||
|
|||||||
Reference in New Issue
Block a user