diff --git a/htdocs/ajaxbox.php b/htdocs/ajaxbox.php index ed573b6189b..b62b7cce8a5 100644 --- a/htdocs/ajaxbox.php +++ b/htdocs/ajaxbox.php @@ -15,17 +15,21 @@ * 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$ - * $Source$ */ /** \file htdocs/ajaxbox.php \brief Fichier de reponse sur evenement Ajax deplacement boxes - \version $Revision$ + \version $Id$ */ +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require('master.inc.php'); require_once(DOL_DOCUMENT_ROOT."/boxes.php"); diff --git a/htdocs/document.php b/htdocs/document.php index ebb7a73b844..5ba7813e100 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -17,21 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ - * - * $Id$ */ /** \file htdocs/document.php - \brief Wrapper permettant le téléchargement de fichier de données Dolibarr + \brief Wrapper to allow download of data files + \version $Id$ \remarks L'appel est document.php?file=pathrelatifdufichier&modulepart=repfichierconcerne - \version $Revision$ */ -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); - $original_file = urldecode($_GET["file"]); $modulepart = urldecode($_GET["modulepart"]); $type = isset($_GET["type"]) ? urldecode($_GET["type"]) : ''; @@ -40,6 +34,9 @@ $type = isset($_GET["type"]) ? urldecode($_GET["type"]) : ''; $needmasteronly=false; if ($modulepart == 'webcal') $needmasteronly=true; +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + // Load master or main if ($needmasteronly) { @@ -48,6 +45,10 @@ if ($needmasteronly) } else { + if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); + if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); + if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + // Pour autre que companylogo, on charge environnement + info issus de logon comme le user require("./main.inc.php"); // master.inc.php is included in main.inc.php @@ -62,7 +63,7 @@ $action = $_GET["action"]; $original_file = urldecode($_GET["file"]); $modulepart = urldecode($_GET["modulepart"]); $urlsource = urldecode($_GET["urlsource"]); -// Défini type (attachment=1 pour forcer popup 'enregistrer sous') +// D�fini type (attachment=1 pour forcer popup 'enregistrer sous') $type = urldecode($_GET["type"]); $attachment = true; if (eregi('\.sql$',$original_file)) { $type='text/plain'; $attachment = true; } @@ -76,7 +77,7 @@ if (eregi('\.tiff$',$original_file)) { $type='image/tiff'; $attachment = true; if (eregi('\.vcs$',$original_file)) { $type='text/calendar'; $attachment = true; } if (eregi('\.ics$',$original_file)) { $type='text/calendar'; $attachment = true; } -// Suppression de la chaine de caractère ../ dans $original_file +// Suppression de la chaine de caract�re ../ dans $original_file $original_file = str_replace("../","/", "$original_file"); // find the subdirectory name as the reference $refname=basename(dirname($original_file)."/"); @@ -85,7 +86,7 @@ $accessallowed=0; $sqlprotectagainstexternals=''; if ($modulepart) { - // On fait une vérification des droits et on définit le répertoire concern + // On fait une v�rification des droits et on d�finit le r�pertoire concern // Wrapping pour les factures if ($modulepart == 'facture') @@ -319,17 +320,17 @@ if ($modulepart) if ($modulepart == 'export') { // Aucun test necessaire car on force le rep de doanwload sur - // le rep export qui est propre à l'utilisateur + // le rep export qui est propre � l'utilisateur $accessallowed=1; $original_file=$conf->export->dir_temp.'/'.$user->id.'/'.$original_file; $sqlprotectagainstexternals = ''; } - // Wrapping pour l'éditeur wysiwyg + // Wrapping pour l'�diteur wysiwyg if ($modulepart == 'editor') { // Aucun test necessaire car on force le rep de download sur - // le rep export qui est propre à l'utilisateur + // le rep export qui est propre � l'utilisateur $accessallowed=1; $original_file=$conf->fckeditor->dir_output.'/'.$original_file; $sqlprotectagainstexternals = ''; @@ -371,14 +372,14 @@ if ($user->societe_id > 0) } // Security: -// Limite accès si droits non corrects +// Limite acc�s si droits non corrects if (! $accessallowed) { accessforbidden(); } // Security: -// On interdit les remontées de repertoire ainsi que les pipe dans +// On interdit les remont�es de repertoire ainsi que les pipe dans // les noms de fichiers. if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file)) { @@ -430,12 +431,12 @@ else } - // Les drois sont ok et fichier trouvé, on l'envoie + // Les drois sont ok et fichier trouv�, on l'envoie if ($type) header('Content-type: '.$type); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); - // Ajout directives pour résoudre bug IE + // Ajout directives pour r�soudre bug IE header('Cache-Control: Public, must-revalidate'); header('Pragma: public'); diff --git a/htdocs/lib/antispamimage.php b/htdocs/lib/antispamimage.php index 3123e070572..b67a0d9e287 100644 --- a/htdocs/lib/antispamimage.php +++ b/htdocs/lib/antispamimage.php @@ -15,23 +15,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ - * - * $Id$ */ /** \file htdocs/lib/antispamimage.php \brief Return antispam image - \version $Revision$ + \version $Id$ */ if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require_once("../master.inc.php"); require_once DOL_DOCUMENT_ROOT.'/../external-libs/Artichow/Artichow.cfg.php'; require_once ARTICHOW."/AntiSpam.class.php"; diff --git a/htdocs/lib/datepicker.php b/htdocs/lib/datepicker.php index 58ad5210e12..c05a606bea3 100644 --- a/htdocs/lib/datepicker.php +++ b/htdocs/lib/datepicker.php @@ -19,23 +19,22 @@ * 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/datepicker.php \brief Fichier de gestion de la popup de selection de date eldy - \version $Revision$ + \version $Id$ */ if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require_once("../master.inc.php"); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index acab84d91b6..dd281606657 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2007 Regis Houssin @@ -19,14 +19,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/main.inc.php - \brief Fichier de formatage generique des ecrans Dolibarr - \version $Revision$ + \file htdocs/main.inc.php + \ingroup core + \brief Fichier de formatage generique des ecrans Dolibarr + \version $Id$ */ // Pour le tuning optionnel. Activer si la variable d'environnement DOL_TUNING est positionnee. @@ -38,6 +37,7 @@ if (! empty($_SERVER['DOL_TUNING'])) $micro_start_time=((float)$usec + (float)$sec); } + // Forcage du parametrage PHP magic_quotes_gpc et nettoyage des parametres // (Sinon il faudrait a chaque POST, conditionner // la lecture de variable par stripslashes selon etat de get_magic_quotes). @@ -84,6 +84,9 @@ foreach ($_POST as $key => $val) // Fin filtre des GET et POST +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require_once("master.inc.php"); // Chargement des includes complementaire de presentation diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 5e6e5617e69..69c351248be 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -21,14 +21,12 @@ * 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/master.inc.php - \brief Fichier de preparation de l'environnement Dolibarr - \version $Revision$ + \brief Prepare Dolibarr environment + \version $Id$ */ define('DOL_VERSION','2.4-dev'); diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 411e8702fe2..334f9e91a3c 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -14,16 +14,17 @@ * 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/user/passwordforgotten.php \brief Page demande nouveau mot de passe - \version $Revision$ + \version $Id$ */ +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require("../master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index e6e417eb64c..c92ec32676d 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -17,21 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ - * - * $Id$ */ /** \file htdocs/viewimage.php \brief Wrapper permettant l'affichage de fichiers images Dolibarr \remarks L'appel est viewimage.php?file=pathrelatifdufichier&modulepart=repfichierconcerne - \version $Revision$ + \version $Id$ */ -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); - $original_file = urldecode($_GET["file"]); $modulepart = urldecode($_GET["modulepart"]); $type = isset($_GET["type"]) ? urldecode($_GET["type"]) : ''; @@ -40,6 +34,9 @@ $type = isset($_GET["type"]) ? urldecode($_GET["type"]) : ''; $needmasteronly=false; if ($modulepart == 'companylogo') $needmasteronly=true; +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + // Load master or main if ($needmasteronly) { @@ -48,6 +45,10 @@ if ($needmasteronly) } else { + if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); + if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); + if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + // Pour autre que companylogo, on charge environnement + info issus de logon comme le user require("./main.inc.php"); // master.inc.php is included in main.inc.php @@ -67,7 +68,7 @@ $original_file = eregi_replace('\.\.','',$original_file); $accessallowed=0; if ($modulepart) { - // On fait une vérification des droits et on définit le répertoire concerné + // On fait une v�rification des droits et on d�finit le r�pertoire concern� // Wrapping pour les photo utilisateurs if ($modulepart == 'companylogo') @@ -279,14 +280,14 @@ if ($modulepart) } // Security: -// Limite accès si droits non corrects +// Limite acc�s si droits non corrects if (! $accessallowed) { accessforbidden(); } // Security: -// On interdit les remontées de repertoire ainsi que les pipe dans +// On interdit les remont�es de repertoire ainsi que les pipe dans // les noms de fichiers. if (eregi('\.\.',$original_file) || eregi('[<>|]',$original_file)) { @@ -335,7 +336,7 @@ else exit; } - // Les drois sont ok et fichier trouvé + // Les drois sont ok et fichier trouv� if ($type) { header('Content-type: '.$type); diff --git a/htdocs/webcal/webcalexport.php b/htdocs/webcal/webcalexport.php index a391455f470..42e8d7bd76a 100644 --- a/htdocs/webcal/webcalexport.php +++ b/htdocs/webcal/webcalexport.php @@ -14,16 +14,17 @@ * 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/webcal/webcalexport.php \ingroup webcalendar \brief Page export webcalendar - \version $Revision$ + \version $Id$ */ +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require("../master.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php'); diff --git a/htdocs/webservices/client.php b/htdocs/webservices/client.php index 5387db0c970..d06b6ca3c5a 100644 --- a/htdocs/webservices/client.php +++ b/htdocs/webservices/client.php @@ -14,17 +14,17 @@ * 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$ - * $Source$ */ /** \file htdocs/webservices/client.php \brief Page demo client appel WebServices Dolibarr - \version $Revision$ + \version $Id$ */ +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require_once("../master.inc.php"); require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP diff --git a/htdocs/webservices/server.php b/htdocs/webservices/server.php index 673f0b9b688..4bf21de8a97 100644 --- a/htdocs/webservices/server.php +++ b/htdocs/webservices/server.php @@ -14,17 +14,17 @@ * 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$ - * $Source$ */ /** \file htdocs/webservices/server.php - \brief Fichier point entrée des WebServices Dolibarr - \version $Revision$ + \brief Fichier point entree des WebServices Dolibarr + \version $Id$ */ +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); + require_once("../master.inc.php"); require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP @@ -42,13 +42,13 @@ $server->wsdl->schemaTargetNamespace=$ns; // Register methods available for clients /* $server->register('getVersions', -array(), // Tableau parametres entrée +array(), // Tableau parametres entr�e array('result' => 'xsd:array'), // Tableau parametres sortie $ns); */ $server->register('getVersions', -// Tableau parametres entrée +// Tableau parametres entr�e array(), // Tableau parametres sortie array('dolibarr'=>'xsd:string','mysql'=>'xsd:string','apache'=>'xsd:string'),