diff --git a/htdocs/public/bplc/bplc.php b/htdocs/public/bplc/bplc.php index 988a931b0d4..eeb138dfb94 100644 --- a/htdocs/public/bplc/bplc.php +++ b/htdocs/public/bplc/bplc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2009 Laurent Destailleur * * 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 @@ -17,16 +18,23 @@ */ /** + * \ingroup banque * \brief Gestion du retour du systeme de Cyberpaiement - * Cette page est appellee par le serveur de la BPLC lors de l'utilisation - * au systeme RSTS + * Cette page est appellee par le serveur de la BPLC lors de + * l'utilisation au systeme RSTS. * \version $Id$ */ -require("../../main.inc.php"); +require("../../master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/public/bplc/retourbplc.class.php"); require_once(DOL_DOCUMENT_ROOT."/don.class.php"); +// Define lang object automatically using browser language +$langs->setDefaultLang('auto'); + +// Security check +if (empty($conf->banque->enabled)) accessforbidden('',1,1,1); + $retbplc = new Retourbplc($db); @@ -65,14 +73,14 @@ if($return) * Validation de la commande * */ - + $don = new Don($db); $don_id = strstr($retbplc->ref_commande, 0, strlen($retbplc->ref_commande) -2); // 5 correspond au paiement en ligne voir table llx_c_paiement - $don->set_paye($don_id, 5); + $don->set_paye($don_id, 5); } diff --git a/htdocs/public/bplc/merci_code.php b/htdocs/public/bplc/merci_code.php index 1c3e383003e..17d8c6b58de 100644 --- a/htdocs/public/bplc/merci_code.php +++ b/htdocs/public/bplc/merci_code.php @@ -17,13 +17,26 @@ */ /** - * \version $Id$ + * \file htdocs/public/bplc/merci_code.php + * \ingroup banque + * \brief File to offer a way to make a payment by BPLC + * \version $Id$ */ +require("../../master.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/public/bplc/retourbplc.class.php"); +require_once(DOL_DOCUMENT_ROOT."/don.class.php"); + +// Define lang object automatically using browser language +$langs->setDefaultLang('auto'); + +// Security check +if (empty($conf->banque->enabled)) accessforbidden('',1,1,1); + + if ($conf->don->onlinepayment) { - - require(DOL_DOCUMENT_ROOT."../../cyberpaiement.class.php"); + require(DOL_DOCUMENT_ROOT."public/bplc/cyberpaiement.class.php"); $cyberp = new Cyberpaiement($conf); diff --git a/htdocs/public/bplc/testretour.php b/htdocs/public/bplc/testretour.php index 67175f74b65..1de9dab051b 100644 --- a/htdocs/public/bplc/testretour.php +++ b/htdocs/public/bplc/testretour.php @@ -17,9 +17,20 @@ */ /** - * \version $Id$ + * \file htdocs/public/bplc/testretour.php + * \ingroup banque + * \brief Page to test the back link page bplc.php + * \version $Id$ */ +require("../../master.inc.php"); + +// Define lang object automatically using browser language +$langs->setDefaultLang('auto'); + +// Security check +if (empty($conf->banque->enabled)) accessforbidden('',1,1,1); + ?>
diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 8f8afa97325..fef3258a815 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -20,7 +20,7 @@ /** * \file htdocs/public/demo/index.php * \ingroup core - * \brief File to access demo + * \brief Entry page to access demo * \author Laurent Destailleur * \version $Id$ */ @@ -34,11 +34,8 @@ $langs->load("main"); $langs->load("other"); // Security check -if (! empty($conf->global->MAIN_DEMO)) -{ - accessforbidden('Constant MAIN_DEMO must be defined in Home->Setup->Misc to enable the demo entry page',1,1,1); - exit; -} +if (empty($conf->global->MAIN_DEMO)) accessforbidden('Constant MAIN_DEMO must be defined in Home->Setup->Misc to enable the demo entry page',1,1,1); + $demoprofiles=array( array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 7b161ed6ff2..a0213586ef7 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -17,16 +17,29 @@ */ /** - * \version $Id$ + * \file htdocs/public/donations/donateurs_code.php + * \ingroup donation + * \brief Page to list donators + * \version $Id$ */ require("../../master.inc.php"); require_once(DOL_DOCUMENT_ROOT ."/don.class.php"); +// Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Security check +if (empty($conf->don->enabled)) accessforbidden('',1,1,1); + + $langs->load("donations"); + +/* + * View + */ + $sql = "SELECT ".$db->pdate("d.datedon")." as datedon, d.nom, d.prenom, d.amount, d.public, d.societe"; $sql .= " FROM ".MAIN_DB_PREFIX."don as d"; $sql .= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; diff --git a/htdocs/public/donations/therm.php b/htdocs/public/donations/therm.php index 56caa6def8d..d5156255f78 100644 --- a/htdocs/public/donations/therm.php +++ b/htdocs/public/donations/therm.php @@ -18,22 +18,27 @@ */ /** - \file htdocs/public/donations/therm.php - \ingroup donation - \brief Screen with thermometer - \version $Id$ -*/ + * \file htdocs/public/donations/therm.php + * \ingroup donation + * \brief Screen with thermometer + * \version $Id$ + */ require("../../master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/images.lib.php"); require_once(DOL_DOCUMENT_ROOT."/don.class.php"); +// Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Security check +if (empty($conf->don->enabled)) accessforbidden('',1,1,1); + + /* -* View -*/ + * View + */ $dontherm = new Don($db); $intentValue = $dontherm->sum_donations(1); diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 788d512fa8c..45921f0e364 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -34,6 +34,9 @@ require_once(DOL_DOCUMENT_ROOT."/html.form.class.php"); // Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Security check +if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1); + // Load translation files $langs->load("main"); $langs->load("members"); diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 5689f241d3e..2e098befe43 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2007-2008 Laurent Destailleur + * Copyright (C) 2007-2009 Laurent Destailleur * * 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 @@ -20,7 +20,8 @@ /** * \file htdocs/public/members/priv_fiche.php - * \brief Fichier de gestion de la popup de selection de date eldy + * \ingroup adherent + * \brief Fichier de gestion de la popup de selection de date eldy * \version $Id$ */ @@ -29,8 +30,13 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php"); +// Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Security check +if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1); + + $langs->load("main"); $langs->load("members"); $langs->load("companies"); diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index d818bf4c7cb..f6d8fe829ea 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * * 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 @@ -19,15 +19,21 @@ */ /** - \file htdocs/public/members/priv_liste.php - \brief File sample to list members - \version $Id$ -*/ + * \file htdocs/public/members/priv_liste.php + * \ingroup adherent + * \brief File sample to list members + * \version $Id$ + */ require("../../master.inc.php"); +// Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Security check +if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1); + + $langs->load("main"); $langs->load("members"); $langs->load("companies"); diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 7ca1663c10d..7dbcee11985 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -19,8 +19,8 @@ */ /** - * \file htdocs/public/paybox/index.php - * \ingroup core + * \file htdocs/public/paybox/newpayment.php + * \ingroup paybox * \brief File to offer a way to make a payment for a particular Dolibarr entity * \author Laurent Destailleur * \version $Id$ @@ -57,6 +57,9 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langcode=(empty($_GET["lang"])?'auto':$_GET["lang"]); $langs->setDefaultLang($langcode); +// Security check +if (empty($conf->paybox->enabled)) accessforbidden('',1,1,1); + $langs->load("main"); $langs->load("other"); $langs->load("paybox"); diff --git a/htdocs/public/paybox/paymentko.php b/htdocs/public/paybox/paymentko.php index 10e24f3d876..e4936d5f819 100644 --- a/htdocs/public/paybox/paymentko.php +++ b/htdocs/public/paybox/paymentko.php @@ -19,7 +19,7 @@ /** * \file htdocs/public/paybox/paymentok.php - * \ingroup core + * \ingroup paybox * \brief File to offer a way to make a payment for a particular Dolibarr entity * \author Laurent Destailleur * \version $Id$ @@ -32,6 +32,9 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); $langcode=(empty($_GET["lang"])?'auto':$_GET["lang"]); $langs->setDefaultLang($langcode); +// Security check +if (empty($conf->paybox->enabled)) accessforbidden('',1,1,1); + $langs->load("main"); $langs->load("other"); $langs->load("paybox"); diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index 10e24f3d876..2ceb00000de 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -19,7 +19,7 @@ /** * \file htdocs/public/paybox/paymentok.php - * \ingroup core + * \ingroup paybox * \brief File to offer a way to make a payment for a particular Dolibarr entity * \author Laurent Destailleur * \version $Id$ @@ -32,6 +32,9 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); $langcode=(empty($_GET["lang"])?'auto':$_GET["lang"]); $langs->setDefaultLang($langcode); +// Security check +if (empty($conf->paybox->enabled)) accessforbidden('',1,1,1); + $langs->load("main"); $langs->load("other"); $langs->load("paybox"); @@ -41,7 +44,6 @@ $langs->load("companies"); - /* * Actions */