From f8329da895938b455ce5d450140dd3d5cb5aad83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Mar 2010 02:35:08 +0000 Subject: [PATCH] Remove pre.inc.php --- htdocs/comm/action/document.php | 2 +- htdocs/comm/action/fiche.php | 2 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/info.php | 2 +- htdocs/comm/action/listactions.php | 2 +- htdocs/comm/action/pre.inc.php | 71 ------------ htdocs/comm/action/rapport/index.php | 2 +- htdocs/comm/action/rapport/pre.inc.php | 71 ------------ htdocs/comm/addpropal.php | 6 +- htdocs/comm/adresse_livraison.php | 2 +- htdocs/comm/bookmark.php | 3 +- htdocs/comm/clients.php | 2 +- htdocs/comm/contact.php | 2 +- htdocs/comm/fiche.php | 16 +-- htdocs/comm/index.php | 2 +- htdocs/comm/mailing/cibles.php | 2 +- htdocs/comm/mailing/fiche.php | 2 +- htdocs/comm/mailing/index.php | 2 +- htdocs/comm/mailing/info.php | 2 +- htdocs/comm/mailing/liste.php | 2 +- htdocs/comm/mailing/pre.inc.php | 61 ----------- htdocs/comm/multiprix.php | 2 +- htdocs/comm/pre.inc.php | 115 -------------------- htdocs/comm/propal.php | 2 +- htdocs/comm/propal/apercu.php | 4 +- htdocs/comm/propal/contact.php | 2 +- htdocs/comm/propal/document.php | 4 +- htdocs/comm/propal/info.php | 2 +- htdocs/comm/propal/note.php | 2 +- htdocs/comm/propal/pre.inc.php | 107 ------------------ htdocs/comm/propal/stats/index.php | 8 +- htdocs/comm/propal/stats/month.php | 6 +- htdocs/comm/propal/stats/pre.inc.php | 111 ------------------- htdocs/comm/recap-client.php | 2 +- htdocs/comm/remise.php | 2 +- htdocs/comm/remx.php | 2 +- htdocs/commande/apercu.php | 6 +- htdocs/commande/contact.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/commande/fiche.php | 2 +- htdocs/commande/index.php | 2 +- htdocs/commande/info.php | 2 +- htdocs/commande/liste.php | 2 +- htdocs/commande/note.php | 4 +- htdocs/commande/pre.inc.php | 52 --------- htdocs/commande/stats/index.php | 2 +- htdocs/commande/stats/month.php | 8 +- htdocs/commande/stats/pre.inc.php | 51 --------- htdocs/compta/charges/index.php | 2 +- htdocs/compta/charges/pre.inc.php | 15 ++- htdocs/compta/commande/fiche.php | 2 +- htdocs/compta/commande/liste.php | 3 +- htdocs/compta/commande/pre.inc.php | 139 ------------------------ htdocs/compta/deplacement/fiche.php | 2 +- htdocs/compta/deplacement/index.php | 10 +- htdocs/compta/deplacement/note.php | 2 +- htdocs/compta/deplacement/pre.inc.php | 50 --------- htdocs/compta/dons/fiche.php | 2 +- htdocs/compta/dons/index.php | 2 +- htdocs/compta/dons/liste.php | 2 +- htdocs/compta/dons/pre.inc.php | 65 ----------- htdocs/compta/dons/stats.php | 2 +- htdocs/compta/export/index.php | 2 +- htdocs/compta/export/liste.php | 9 +- htdocs/compta/export/pre.inc.php | 64 ----------- htdocs/compta/facture/apercu.php | 4 +- htdocs/compta/facture/contact.php | 2 +- htdocs/compta/facture/document.php | 2 +- htdocs/compta/facture/fiche-rec.php | 2 +- htdocs/compta/facture/impayees.php | 2 +- htdocs/compta/facture/info.php | 2 +- htdocs/compta/facture/note.php | 2 +- htdocs/compta/facture/pre.inc.php | 60 ---------- htdocs/compta/facture/prelevement.php | 6 +- htdocs/compta/facture/stats/index.php | 8 +- htdocs/compta/facture/stats/month.php | 8 +- htdocs/compta/facture/stats/pre.inc.php | 50 --------- htdocs/compta/paiement/avalider.php | 10 +- htdocs/compta/paiement/fiche.php | 2 +- htdocs/compta/paiement/index.php | 5 +- htdocs/compta/paiement/info.php | 2 +- htdocs/compta/paiement/liste.php | 4 +- htdocs/compta/paiement/pre.inc.php | 60 ---------- htdocs/compta/paiement/rapport.php | 2 +- htdocs/compta/param/comptes/fiche.php | 7 +- htdocs/compta/param/comptes/index.php | 9 +- htdocs/compta/param/comptes/liste.php | 20 ++-- htdocs/compta/param/comptes/pre.inc.php | 48 -------- htdocs/compta/param/index.php | 10 +- htdocs/compta/param/pre.inc.php | 46 -------- 90 files changed, 142 insertions(+), 1368 deletions(-) delete mode 100644 htdocs/comm/action/pre.inc.php delete mode 100644 htdocs/comm/action/rapport/pre.inc.php delete mode 100644 htdocs/comm/mailing/pre.inc.php delete mode 100644 htdocs/comm/pre.inc.php delete mode 100644 htdocs/comm/propal/pre.inc.php delete mode 100644 htdocs/comm/propal/stats/pre.inc.php delete mode 100644 htdocs/commande/pre.inc.php delete mode 100644 htdocs/commande/stats/pre.inc.php delete mode 100644 htdocs/compta/commande/pre.inc.php delete mode 100644 htdocs/compta/deplacement/pre.inc.php delete mode 100644 htdocs/compta/dons/pre.inc.php delete mode 100644 htdocs/compta/export/pre.inc.php delete mode 100644 htdocs/compta/facture/pre.inc.php delete mode 100644 htdocs/compta/facture/stats/pre.inc.php delete mode 100644 htdocs/compta/paiement/pre.inc.php delete mode 100644 htdocs/compta/param/comptes/pre.inc.php delete mode 100644 htdocs/compta/param/pre.inc.php diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 7dd98aae349..389d49f7312 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -27,7 +27,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/cactioncomm.class.php"); diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index cb9657eb7c8..40a9e7cdbb6 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/user/user.class.php"); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 574f88c0730..5f32cce8721 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php"); diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 07d9f29ffc5..cf87274a338 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 8448e99af9d..c496bb64435 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php"); diff --git a/htdocs/comm/action/pre.inc.php b/htdocs/comm/action/pre.inc.php deleted file mode 100644 index be1a501ae3f..00000000000 --- a/htdocs/comm/action/pre.inc.php +++ /dev/null @@ -1,71 +0,0 @@ - - * Copyright (C) 2005-2008 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/action/pre.inc.php - \ingroup agenda - \brief Left menu handler for acions area - \version $Id$ -*/ - -require("../../main.inc.php"); - - -function llxHeader($head = '', $title='', $help_url='') -{ - global $conf,$user,$langs; - - top_menu($head, $title); - - $menu = new Menu(); - - // Actions - if ($conf->agenda->enabled) - { - $langs->load("agenda"); - - // Actions - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); - // Calendar - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); - if ($user->rights->agenda->allactions->read) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read); - } - // List - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); - if ($user->rights->agenda->allactions->read) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read); - } - // Reports - $menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); - } - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 34d1aa6b19c..cf49db0fb9b 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); diff --git a/htdocs/comm/action/rapport/pre.inc.php b/htdocs/comm/action/rapport/pre.inc.php deleted file mode 100644 index d5a0a3b6652..00000000000 --- a/htdocs/comm/action/rapport/pre.inc.php +++ /dev/null @@ -1,71 +0,0 @@ - - * Copyright (C) 2005-2008 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/action/rapport/pre.inc.php - \brief Fichier gestionnaire du menu de gauche de la zone rapport des actions - \version $Id$ -*/ - -require("../../../main.inc.php"); - - -function llxHeader($head = "", $urlp = "") -{ - global $conf,$user,$langs; - - top_menu($head); - - $menu = new Menu(); - - - // Actions - if ($conf->agenda->enabled) - { - $langs->load("agenda"); - - // Actions - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); - // Calendar - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); - if ($user->rights->agenda->allactions->read) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read); - } - // List - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); - if ($user->rights->agenda->allactions->read) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read); - } - // Reports - $menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); - } - - left_menu($menu->liste); -} - -?> diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index ab3be489781..4f3af1fb539 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php'); require_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php'); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php'); @@ -99,7 +99,7 @@ if ($_GET["action"] == 'create') print '
'; print ''; print ''; - + if (isset($_GET["origin"]) && $_GET["origin"] != 'project' && isset($_GET["originid"])) { print ''; @@ -202,7 +202,7 @@ if ($_GET["action"] == 'create') { $projectid = 0; if (isset($_GET["origin"]) && $_GET["origin"] == 'project') $projectid = ($_GET["originid"]?$_GET["originid"]:0); - + print ''; print ''.$langs->trans("Project").''; diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php index d20d78bead7..fa5a7ae67e3 100644 --- a/htdocs/comm/adresse_livraison.php +++ b/htdocs/comm/adresse_livraison.php @@ -25,7 +25,7 @@ \version $Id$ */ -require("pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/comm/adresse_livraison.class.php"); diff --git a/htdocs/comm/bookmark.php b/htdocs/comm/bookmark.php index c09d1a4eb22..97ef07178e3 100644 --- a/htdocs/comm/bookmark.php +++ b/htdocs/comm/bookmark.php @@ -23,7 +23,8 @@ */ -require("./pre.inc.php"); +require("../main.inc.php"); + llxHeader(); diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index 0ea19674eb7..3a84a233a19 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php"); // Security check diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 4bcc433416f..31f13302c55 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -25,7 +25,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); $langs->load("companies"); diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 8bd346d6c21..ca276246705 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -29,7 +29,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); @@ -594,35 +594,35 @@ if ($socid > 0) if ($num > 0) { require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php"); - + $projectstatic = new Project($db); - + print ''; print '
'.$langs->trans("LastProjects",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllProjects").' ('.$num.')
'; print ''; - + $var=true; $i = 0 ; while ($i < $num && $i < $MAXLIST) { $obj = $db->fetch_object($result); $projectstatic->fetch($obj->rowid); - + // To verify role of users $userAccess = $projectstatic->restrictedProjectArea($user,1); - + if ($user->rights->projet->lire && $userAccess > 0) { $var = !$var; print ""; - + // Ref print ''.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''; // Label print ''.$obj->title.''; // Date print ''.dol_print_date($obj->do,"day").''; - + print ''; } $i++; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 0913e65e63a..9c6b10cab66 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/client.class.php"); if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 64d35c935a4..634cfc61605 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index e9d1ad7e6bd..b36de39b151 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 8bd2220982a..75fd9e8903e 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); $langs->load("commercial"); diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 5d1dc23f567..078dad44316 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -23,7 +23,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php"); diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php index de79ddb4287..2194b058b78 100644 --- a/htdocs/comm/mailing/liste.php +++ b/htdocs/comm/mailing/liste.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); if (!$user->rights->mailing->lire) accessforbidden(); diff --git a/htdocs/comm/mailing/pre.inc.php b/htdocs/comm/mailing/pre.inc.php deleted file mode 100644 index c12fc7289c1..00000000000 --- a/htdocs/comm/mailing/pre.inc.php +++ /dev/null @@ -1,61 +0,0 @@ - - * Copyright (C) 2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/mailing/pre.inc.php - \ingroup mailing - \brief Fichier de gestion du menu gauche de l'espace mailing - \version $Id$ -*/ - -require("../../main.inc.php"); -require_once DOL_DOCUMENT_ROOT.'/comm/mailing/mailing.class.php'; - -$langs->load("companies"); -$langs->load("mails"); -$langs->load("exports"); - - -function llxHeader($head = "", $title = "", $help_url="") -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - if ($user->rights->mailing->lire) - { - $menu->add(DOL_URL_ROOT."/comm/mailing/index.php", $langs->trans("Mailings")); - } - - if ($user->rights->mailing->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/mailing/fiche.php?action=create", $langs->trans("NewMailing")); - } - - if ($user->rights->mailing->lire) - { - $menu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php", $langs->trans("List")); - } - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index fadc52b3304..f0c8ac77cf3 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); diff --git a/htdocs/comm/pre.inc.php b/htdocs/comm/pre.inc.php deleted file mode 100644 index efca3294bf8..00000000000 --- a/htdocs/comm/pre.inc.php +++ /dev/null @@ -1,115 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/pre.inc.php - \ingroup commercial - \brief Fichier de gestion du menu gauche de l'espace commercial - \version $Id$ - */ -require("../main.inc.php"); - - -function llxHeader($head = '', $title='', $help_url='') -{ - global $user, $conf, $langs; - - $langs->load("companies"); - $langs->load("commercial"); - - top_menu($head, $langs->trans($title)); - - $menu = new Menu(); - - // Clients - $menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=c", $langs->trans("MenuNewCustomer")); - } - - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts")); - - - // Prospects - $menu->add(DOL_URL_ROOT."/comm/prospect/index.php", $langs->trans("Prospects")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=p", $langs->trans("MenuNewProspect")); - } - - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts")); - - - $menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions")); - - // Propal - if ($conf->propal->enabled && $user->rights->propale->lire) - { - $langs->load("propal"); - $menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics")); - } - - if ($conf->contrat->enabled && $user->rights->contrat->lire) - { - $langs->load("contracts"); - $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); - } - - if ($conf->commande->enabled && $user->rights->commande->lire) - { - $langs->load("orders"); - $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); - } - - if ($user->mailing->enabled && $user->rights->mailing->lire) - { - $langs->load("mails"); - $menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings")); - } - - if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) - { - $langs->load("interventions"); - $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); - } - - if (($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire)) - { - $langs->load("products"); - $chaine=""; - if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); } - if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } - if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } - $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); - } - - if ($conf->projet->enabled && $user->rights->projet->lire) - { - $langs->load("projects"); - $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); - } - - left_menu($menu->liste, $help_url); -} -?> diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index cbbf0cc6efb..80a30e8b745 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -28,7 +28,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index bfacc4aae11..4fa3a93ab56 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 �ric Seigne + * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * @@ -26,7 +26,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php'); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php"); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 3303f8073d0..168ce350f90 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require ("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index a7d2c47affe..80a9a4bab55 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -22,11 +22,11 @@ /** * \file htdocs/comm/propal/document.php * \ingroup propale - * \brief Page de gestion des documents attach�es � une proposition commerciale + * \brief Page de gestion des documents attaches a une proposition commerciale * \version $Id$ */ -require('./pre.inc.php'); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 97eed173c5d..6e5ffc08593 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -25,7 +25,7 @@ \version $Id$ */ -require('./pre.inc.php'); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 6a04938cb3d..c5be66a9eb7 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require('./pre.inc.php'); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); diff --git a/htdocs/comm/propal/pre.inc.php b/htdocs/comm/propal/pre.inc.php deleted file mode 100644 index 7aa15fb1331..00000000000 --- a/htdocs/comm/propal/pre.inc.php +++ /dev/null @@ -1,107 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/propal/pre.inc.php - \ingroup propale - \brief Fichier de gestion du menu gauche du module propale - \version $Id$ - */ - -require("../../main.inc.php"); - -function llxHeader($head = "", $urlp = "") { - global $user, $conf, $langs; - - $langs->load("companies"); - - top_menu($head); - - $menu = new Menu(); - - // Clients - $menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=c", $langs->trans("MenuNewCustomer")); - } - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts")); - - // Prospects - $menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=p", $langs->trans("MenuNewProspect")); - } - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts")); - - - $menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions")); - - - if ($conf->propal->enabled && $user->rights->propale->lire) - { - $langs->load("propal"); - $menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics")); - } - - if ($conf->contrat->enabled) - { - $langs->load("contracts"); - $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); - } - - if ($conf->commande->enabled ) - { - $langs->load("orders"); - $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); - } - - if ($conf->ficheinter->enabled) - { - $langs->load("interventions"); - $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); - } - - if ($conf->produit->enabled || $conf->service->enabled) - { - $langs->load("products"); - $chaine=""; - if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); } - if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } - if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } - $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); - } - - if ($conf->projet->enabled ) - { - $langs->load("projects"); - $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); - } - - left_menu($menu->liste); - -} - - -?> diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 197ae969bdc..743865c3452 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -25,14 +25,14 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/stats/propalestats.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); $WIDTH=500; $HEIGHT=200; -// Sécurité accés client +// S�curit� acc�s client if ($user->societe_id > 0) { $action = ''; @@ -46,7 +46,7 @@ $endyear=$year; /* * View */ - + llxHeader(); print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg); @@ -157,7 +157,7 @@ print ''.$langs->trans("NbOfProposals").''; print ''.$langs->trans("AmountTotal").''; print ''.$langs->trans("AmountAverage").''; print ''; - + $oldyear=0; foreach ($data as $val) { diff --git a/htdocs/comm/propal/stats/month.php b/htdocs/comm/propal/stats/month.php index 9979267aa76..f569024cc7f 100644 --- a/htdocs/comm/propal/stats/month.php +++ b/htdocs/comm/propal/stats/month.php @@ -24,7 +24,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/stats/propalestats.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); @@ -32,7 +32,7 @@ $GRAPHWIDTH=500; $GRAPHHEIGHT=200; // Check security access -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -44,7 +44,7 @@ $year = isset($_GET["year"])?$_GET["year"]:date("Y",time()); /* * View */ - + llxHeader(); $dir=$conf->propale->dir_temp; diff --git a/htdocs/comm/propal/stats/pre.inc.php b/htdocs/comm/propal/stats/pre.inc.php deleted file mode 100644 index e52dd99194b..00000000000 --- a/htdocs/comm/propal/stats/pre.inc.php +++ /dev/null @@ -1,111 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/propal/stats/pre.inc.php - \ingroup propale - \brief Fichier de gestion du menu gauche du module propale stats - \version $Id$ - */ - -require("../../../main.inc.php"); - -function llxHeader($head = "", $urlp = "") -{ - global $user, $conf, $langs; - - $langs->load("companies"); - - top_menu($head); - - $menu = new Menu(); - - // Clients - $menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=c", $langs->trans("MenuNewCustomer")); - } - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts")); - - // Prospects - $menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects")); - if ($user->rights->societe->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=p", $langs->trans("MenuNewProspect")); - } - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts")); - - - $menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions")); - - - if ($conf->propal->enabled && $user->rights->propale->lire) - { - $langs->load("propal"); - $menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort")); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics")); - } - - if ($conf->contrat->enabled) - { - $langs->load("contracts"); - $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); - } - - if ($conf->commande->enabled ) - { - $langs->load("orders"); - $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); - } - - if ($user->rights->mailing->lire) - { - $langs->load("mails"); - $menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings")); - } - - if ($conf->ficheinter->enabled) - { - $langs->load("interventions"); - $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); - } - - if ($conf->produit->enabled || $conf->service->enabled) - { - $langs->load("products"); - $chaine=""; - if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); } - if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } - if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); } - $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); - } - - if ($conf->projet->enabled ) - { - $langs->load("projects"); - $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); - } - - left_menu($menu->liste); -} -?> diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 2391c21c782..d5ca2f0cf4b 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 2a041d4f4c8..1beab3676fe 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index bb41973ed13..c58cc820139 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/discount.class.php"); diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 4c6a428829a..fbe1781b2f1 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 �ric Seigne + * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * @@ -22,11 +22,11 @@ /** \file htdocs/commande/apercu.php \ingroup commande - \brief Page de l'onglet aper�u d'une commande + \brief Page de l'onglet apercu d'une commande \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php'); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 16247a9e615..f73c86c045c 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -25,7 +25,7 @@ \version $Id$ */ -require ("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2c331af848c..4a70db5be14 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require('./pre.inc.php'); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php'); require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index c06fc2fdbab..b4d04cfac9d 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -27,7 +27,7 @@ * \version $Id$ */ -require('./pre.inc.php'); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/html.formorder.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/commande/modules_commande.php"); diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index a1e3b124dde..479851b23c4 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT ."/notify.class.php"); diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 85da189a314..5d398dcfd78 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 7960d137855..115f0ab01b8 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -27,7 +27,7 @@ */ -require('./pre.inc.php'); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); $langs->load('orders'); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index a9fec1ba5ad..1890c17c901 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -25,7 +25,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php'); $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; @@ -131,7 +131,7 @@ if ($id > 0 || ! empty($ref)) } print ""; - // Note privée + // Note priv�e if (! $user->societe_id) { print ''.$langs->trans("NotePrivate").' :'; diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php deleted file mode 100644 index 7e7dae2bf41..00000000000 --- a/htdocs/commande/pre.inc.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/commande/pre.inc.php - \ingroup commandes - \brief Gestionnaire du menu commandes - \version $Id$ -*/ - -require("../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); - -$langs->load("orders"); - - -function llxHeader($head = '', $title='', $help_url='') -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); - $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); - $menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); - - if ($conf->expedition->enabled && $user->rights->expedition->lire) - { - $menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings")); - } - - left_menu($menu->liste, $help_url); -} -?> diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 0f94564f081..f0ecad65f2e 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/commande/stats/commandestats.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php index 4f326be916a..7e8e7301124 100644 --- a/htdocs/commande/stats/month.php +++ b/htdocs/commande/stats/month.php @@ -24,7 +24,7 @@ * \brief Page des stats commandes par mois * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/commande/stats/commandestats.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); @@ -33,7 +33,7 @@ $GRAPHWIDTH=500; $GRAPHHEIGHT=200; // Check security access -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -52,12 +52,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"]; llxHeader(); -if ($mode == 'customer') +if ($mode == 'customer') { $title=$langs->trans("OrdersStatistics"); $dir=$conf->commande->dir_temp; } -if ($mode == 'supplier') +if ($mode == 'supplier') { $title=$langs->trans("OrdersStatisticsSuppliers"); $dir=$conf->fournisseur->dir_output.'/commande/temp'; diff --git a/htdocs/commande/stats/pre.inc.php b/htdocs/commande/stats/pre.inc.php deleted file mode 100644 index 2c6ec58e984..00000000000 --- a/htdocs/commande/stats/pre.inc.php +++ /dev/null @@ -1,51 +0,0 @@ - - * Copyright (C) 2004 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/commande/stats/pre.inc.php - \ingroup commandes - \brief Gestionnaire du menu commandes - \version $Id$ -*/ - -require("../../main.inc.php"); - -$langs->load("orders"); - - -function llxHeader($head = "", $title="", $help_url='') -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); - $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); - $menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); - - if ($conf->expedition->enabled) - { - $menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings")); - } - - left_menu($menu->liste, $help_url); -} -?> diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 9d08b58b322..20ad773f6e7 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php"); diff --git a/htdocs/compta/charges/pre.inc.php b/htdocs/compta/charges/pre.inc.php index fb9125ddbe9..f40f0f90015 100644 --- a/htdocs/compta/charges/pre.inc.php +++ b/htdocs/compta/charges/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2003 Rodolphe Quiedeville * Copyright (C) 2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -17,10 +17,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ -/** +/** \file htdocs/compta/charges/pre.inc.php \ingroup tax \brief Fichier gestionnaire du menu charges @@ -34,15 +33,15 @@ function llxHeader($head = '', $title='', $help_url='') global $user, $conf, $langs; $langs->load("compta"); $langs->load("propal"); - + top_menu($head, $title, $target); - + $menu = new Menu(); - + $menu->add("index.php",$langs->trans("Contributions")); - + $menu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions")); - + left_menu($menu->liste); } diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 5c70819f2dc..5d75106d80d 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php"); diff --git a/htdocs/compta/commande/liste.php b/htdocs/compta/commande/liste.php index b268c84bd73..d2bca9ff173 100644 --- a/htdocs/compta/commande/liste.php +++ b/htdocs/compta/commande/liste.php @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -28,7 +27,7 @@ * \version $Revision$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); $langs->load('companies'); diff --git a/htdocs/compta/commande/pre.inc.php b/htdocs/compta/commande/pre.inc.php deleted file mode 100644 index 202e5be1f2b..00000000000 --- a/htdocs/compta/commande/pre.inc.php +++ /dev/null @@ -1,139 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/commande/pre.inc.php - \ingroup compta,commande - \brief Fichier gestionnaire du menu commande de compta -*/ - -require("../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); - -$langs->load("orders"); - - -function llxHeader($head = "", $title="", $help_url='') -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - // Les recettes - - $langs->load("commercial"); - $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers")); - - if ($conf->propal->enabled) - { - $langs->load("propal"); - $menu->add(DOL_URL_ROOT."/compta/propal.php",$langs->trans("Prop")); - } - - if ($conf->contrat->enabled) - { - $langs->load("contracts"); - $menu->add(DOL_URL_ROOT."/contrat/",$langs->trans("Contracts")); - } - - if ($conf->don->enabled) - { - $langs->load("donations"); - $menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations")); - } - - if ($conf->facture->enabled) - { - $langs->load("bills"); - $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid")); - $menu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments")); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php", $langs->trans("Repeatable")); - - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics")); - } - - - if ($conf->commande->enabled && $conf->facture->enabled) - { - $langs->load("orders"); - $menu->add(DOL_URL_ROOT."/compta/commande/liste.php?leftmenu=orders&afacturer=1", $langs->trans("MenuOrdersToBill")); - } - - - // Les d�penses - if ($conf->fournisseur->enabled) - { - $langs->load("suppliers"); - $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); - } - - if ($conf->deplacement->enabled && $user->societe_id == 0) - { - $menu->add(DOL_URL_ROOT."/compta/deplacement/", "D�placement"); - } - - if ($conf->tax->enabled && $conf->compta->tva && $user->societe_id == 0) - { - $menu->add(DOL_URL_ROOT."/compta/tva/index.php",$langs->trans("VAT")); - } - - if ($conf->tax->enabled) - { - $menu->add(DOL_URL_ROOT."/compta/charges/index.php",$langs->trans("Charges")); - } - - - // Vision des recettes-d�penses - if ($conf->banque->enabled && $user->rights->banque->lire) - { - $langs->load("banks"); - $menu->add(DOL_URL_ROOT."/compta/bank/",$langs->trans("Bank")); - } - - $menu->add(DOL_URL_ROOT."/compta/stats/",$langs->trans("Reportings")); - - if ($conf->prelevement->enabled) - { - $menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders")); - } - - if ($conf->compta->enabled) - { - if ($user->rights->compta->ventilation->creer) - { - $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation")); - } - - if ($user->rights->compta->ventilation->parametrer) - { - $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param")); - } - } - - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index d3731e7acbb..8e1f7727deb 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -23,7 +23,7 @@ * \brief Page to show a trip card * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); if ($conf->projet->enabled) { diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 771ea7dba0b..0c3aa464835 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -25,7 +25,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php"); $langs->load("companies"); @@ -61,7 +61,7 @@ $sql.= " d.rowid, d.type, ".$db->pdate("d.dated")." as dd, d.km, "; // Comment $sql.= " u.name, u.firstname"; // Qui $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."deplacement as d"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; $sql.= " WHERE d.fk_user = u.rowid"; $sql.= " AND d.entity = ".$conf->entity; @@ -95,7 +95,7 @@ if ($resql) $soc = new Societe($db); if ($objp->socid) $soc->fetch($objp->socid); - + $var=!$var; print ""; print ''.img_object($langs->trans("ShowTrip"),"trip").' '.$objp->rowid.''; @@ -106,10 +106,10 @@ if ($resql) print ''.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.''; print ''.$objp->km.''; print "\n"; - + $i++; } - + print ""; $db->free($resql); } diff --git a/htdocs/compta/deplacement/note.php b/htdocs/compta/deplacement/note.php index b51adc2442f..9eb848e3b06 100644 --- a/htdocs/compta/deplacement/note.php +++ b/htdocs/compta/deplacement/note.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/deplacement.class.php"); $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; diff --git a/htdocs/compta/deplacement/pre.inc.php b/htdocs/compta/deplacement/pre.inc.php deleted file mode 100644 index 9383069123d..00000000000 --- a/htdocs/compta/deplacement/pre.inc.php +++ /dev/null @@ -1,50 +0,0 @@ - - * Copyright (C) 2004 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/deplacement/pre.inc.php - * \ingroup deplacement - * \brief Fichier gestionnaire du menu deplacement - */ - -require("../../main.inc.php"); -require("./deplacement.class.php"); - -$deplacement_type[0] = "voiture"; -//$deplacement_type[1] = "train"; -//$deplacement_type[2] = "avion"; - -function llxHeader($head = "") { - global $user, $conf, $langs; - - top_menu($head); - - $menu = new Menu(); - - $menu->add("index.php",$langs->trans("Trips")); - $menu->add_submenu("fiche.php?action=create",$langs->trans("NewTrip")); - - left_menu($menu->liste); -} - -?> diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index a9f91dc0458..cc426e89f65 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require_once("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/dons/modules_don.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php"); diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php index cdb991aca87..b92a01c7931 100644 --- a/htdocs/compta/dons/index.php +++ b/htdocs/compta/dons/index.php @@ -24,7 +24,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php"); $langs->load("donations"); diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index f5107a43e57..17b14581b99 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/liste.php @@ -24,7 +24,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php"); $langs->load("companies"); diff --git a/htdocs/compta/dons/pre.inc.php b/htdocs/compta/dons/pre.inc.php deleted file mode 100644 index d5363183868..00000000000 --- a/htdocs/compta/dons/pre.inc.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Copyright (C) 2004-2006 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/dons/pre.inc.php - \ingroup don - \brief Fichier gestionnaire du menu de gauche de l'espace dons - \version $Revision$ -*/ - -require("../../main.inc.php"); - -$langs->load("donations"); -$langs->load("propal"); - -$libelle[0] = $langs->trans("PromisesNotValid"); -$libelle[1] = $langs->trans("PromisesValid"); -$libelle[2] = $langs->trans("DonationsPaid"); -$libelle[3] = $langs->trans("DonationsReceived"); - - -function llxHeader($head = "", $title="", $help_url="") -{ - global $user, $conf, $langs; - - $langs->load("donations"); - - top_menu($head,$title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations")); - $menu->add_submenu(DOL_URL_ROOT."/compta/dons/fiche.php?action=create",$langs->trans("NewDonation")); - $menu->add_submenu(DOL_URL_ROOT."/compta/dons/liste.php",$langs->trans("List")); - $menu->add_submenu(DOL_URL_ROOT."/compta/dons/stats.php",$langs->trans("Statistics")); - - if ($conf->banque->enabled) - { - $langs->load("banks"); - $menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank")); - } - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/compta/dons/stats.php b/htdocs/compta/dons/stats.php index 1d1981f7d2e..539ced23518 100644 --- a/htdocs/compta/dons/stats.php +++ b/htdocs/compta/dons/stats.php @@ -24,7 +24,7 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); $langs->load("donations"); diff --git a/htdocs/compta/export/index.php b/htdocs/compta/export/index.php index 96206f993aa..2ff7f595671 100644 --- a/htdocs/compta/export/index.php +++ b/htdocs/compta/export/index.php @@ -27,7 +27,7 @@ \version $Revision$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once("./ComptaJournalPaiement.class.php"); require_once("./ComptaJournalVente.class.php"); diff --git a/htdocs/compta/export/liste.php b/htdocs/compta/export/liste.php index f25ae417f5e..88566ab2d70 100644 --- a/htdocs/compta/export/liste.php +++ b/htdocs/compta/export/liste.php @@ -16,9 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ - + /** \file htdocs/compta/export/liste.php \ingroup compta @@ -26,15 +25,15 @@ \version $Revision$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); $langs->load("compta"); $dir = $conf->compta->dir_output."/export/"; -// Sécurité accés client -if ($user->societe_id > 0) +// Security check +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; diff --git a/htdocs/compta/export/pre.inc.php b/htdocs/compta/export/pre.inc.php deleted file mode 100644 index a5918c877af..00000000000 --- a/htdocs/compta/export/pre.inc.php +++ /dev/null @@ -1,64 +0,0 @@ - - * Copyright (C) 2004-2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/export/pre.inc.php - \ingroup compta - \brief Fichier gestionnaire du menu export compta -*/ - -require("../../main.inc.php"); - -function llxHeader($head = "", $title="", $help_url='') -{ - global $user, $conf, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - // Les recettes - - $langs->load("bills"); - - $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers")); - - if (!$user->rights->compta->ventilation->creer) - { - $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation")); - } - - $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); - - $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation")); - - $menu->add(DOL_URL_ROOT."/compta/export/",$langs->trans("Export")); - - $menu->add_submenu(DOL_URL_ROOT."/compta/export/index.php?action=export",$langs->trans("New")); - - $menu->add_submenu(DOL_URL_ROOT."/compta/export/liste.php",$langs->trans("List")); - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 6bffea34759..dfa4a982ac2 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -23,11 +23,11 @@ /** \file htdocs/compta/facture/apercu.php \ingroup facture - \brief Page de l'onglet aper�u d'une facture + \brief Page de l'onglet apercu d'une facture \version $Revision$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php"); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index c7a131fd345..70921cd42be 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require ("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT.'/discount.class.php'); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 93a9de130aa..13845429261 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -26,7 +26,7 @@ * \version $Id$ */ -require('./pre.inc.php'); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT.'/discount.class.php'); require_once(DOL_DOCUMENT_ROOT."/lib/invoice.lib.php"); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 00fb8b6b2fe..477544c15eb 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once("./facture-rec.class.php"); require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php"); require_once(DOL_DOCUMENT_ROOT."/product/product.class.php"); diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 9b4c78c0041..1d541bfe532 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -26,7 +26,7 @@ * \version $Revision$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/paiement.class.php"); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 2df9b32a2d0..d5a49ce8089 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT.'/discount.class.php'); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index a807b11c3d9..6bc3110e95f 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); require_once(DOL_DOCUMENT_ROOT.'/discount.class.php'); require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); diff --git a/htdocs/compta/facture/pre.inc.php b/htdocs/compta/facture/pre.inc.php deleted file mode 100644 index ec6bc09ee31..00000000000 --- a/htdocs/compta/facture/pre.inc.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Copyright (C) 2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/facture/pre.inc.php - \ingroup facture - \brief Fichier de gestion du menu gauche du module facture - \version $Revision$ -*/ - -require("../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); - -$langs->load('bills'); - -function llxHeader($head = "", $title="", $help_url='') { - global $user, $conf, $langs; - - $langs->load("companies"); - $langs->load("commercial"); - $langs->load("bills"); - $langs->load("banks"); - $langs->load("propal"); - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers")); - - $langs->load("bills"); - $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid")); - - $menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders")); - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 20a5cc0e6f3..e29bf459e15 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 �ric Seigne + * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2008 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php"); @@ -36,7 +36,7 @@ $langs->load("bills"); $langs->load("banks"); $langs->load("withdrawals"); -// S�curit� acc�s client +// Security check if ($user->societe_id > 0) { $action = ''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index d489dc69d8e..1bae2a7a3e4 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); $WIDTH=500; @@ -51,12 +51,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"]; llxHeader(); -if ($mode == 'customer') +if ($mode == 'customer') { $title=$langs->trans("BillsStatistics"); $dir=$conf->facture->dir_temp; } -if ($mode == 'supplier') +if ($mode == 'supplier') { $title=$langs->trans("BillsStatisticsSuppliers"); $dir=$conf->fournisseur->dir_output.'/facture/temp'; @@ -177,7 +177,7 @@ foreach ($data as $val) print ''; $oldyear=$year; } - + print ''; diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php index 5cff757c251..d46324ac3d6 100644 --- a/htdocs/compta/facture/stats/month.php +++ b/htdocs/compta/facture/stats/month.php @@ -24,14 +24,14 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); $GRAPHWIDTH=500; $GRAPHHEIGHT=200; // Check security access -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -50,12 +50,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"]; llxHeader(); -if ($mode == 'customer') +if ($mode == 'customer') { $title=$langs->trans("BillsStatistics"); $dir=$conf->facture->dir_temp; } -if ($mode == 'supplier') +if ($mode == 'supplier') { $title=$langs->trans("BillsStatisticsSuppliers"); $dir=$conf->fournisseur->dir_output.'/facture/temp'; diff --git a/htdocs/compta/facture/stats/pre.inc.php b/htdocs/compta/facture/stats/pre.inc.php deleted file mode 100644 index ef9df39e583..00000000000 --- a/htdocs/compta/facture/stats/pre.inc.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/facture/stats/pre.inc.php - \ingroup facture - \brief Fichier de gestion du menu gauche des stats facture - \version $Revision$ -*/ - -require("../../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/compta/facture/stats/facturestats.class.php"); - - -function llxHeader($head = "", $urlp = "") -{ - global $langs; - $langs->load("bills"); - $langs->load("propal"); - - top_menu($head); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills")); - - $menu->add("index.php", $langs->trans("Statistics")); - - left_menu($menu->liste); -} -?> diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 8fc80493b45..0c250b26da4 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + /** \file htdocs/compta/paiement/avalider.php \ingroup compta @@ -24,16 +24,16 @@ \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); $langs->load("bills"); -// Sécurité accés client +// Security check if (! $user->rights->facture->lire) accessforbidden(); $socid=0; -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -54,7 +54,7 @@ if (! $sortfield) $sortfield="p.rowid"; if ($page == -1) $page = 0 ; $limit = $conf->liste_limit; $offset = $limit * $page ; - + $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount, p.statut"; $sql .=", c.libelle as paiement_type, p.num_paiement"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c"; diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 24e3cd634b8..3e20e73f921 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -27,7 +27,7 @@ * \version $Id$ */ -require('./pre.inc.php'); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php'); require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php'); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php"); diff --git a/htdocs/compta/paiement/index.php b/htdocs/compta/paiement/index.php index dfc908f8a5b..cfd46d4b0f1 100644 --- a/htdocs/compta/paiement/index.php +++ b/htdocs/compta/paiement/index.php @@ -16,10 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ -require("./pre.inc.php"); + +require("../../main.inc.php"); // Security check if (!$user->admin && $user->societe_id > 0) diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 541bcb934c8..9d950e0dd93 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/paiement.class.php"); diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 3aaa374c595..04410dbc1fd 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -25,7 +25,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php'); require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); @@ -91,7 +91,7 @@ if ($_GET["search_montant"]) if ($_GET["orphelins"]) // Option for debugging purpose only { - // Paiements liés à aucune facture (pour aide au diagnostic) + // Paiements li�s � aucune facture (pour aide au diagnostic) $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount,"; $sql.= " p.statut, p.num_paiement,"; //$sql.= " c.libelle as paiement_type"; diff --git a/htdocs/compta/paiement/pre.inc.php b/htdocs/compta/paiement/pre.inc.php deleted file mode 100644 index 3d822d66d2c..00000000000 --- a/htdocs/compta/paiement/pre.inc.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Copyright (C) 2005 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - * \file htdocs/compta/paiement/pre.inc.php - * \ingroup compta - * \brief Fichier gestionnaire du menu compta paiement - * \version $Id$ - */ - -require("../../main.inc.php"); - -$langs->load("bills"); -$langs->load("compta"); -$langs->load("propal"); - -function llxHeader($head = "", $title="") -{ - - global $conf, $user, $langs; - - $langs->load("bills"); - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add("liste.php",$langs->trans("Payments")); - $menu->add_submenu("liste.php",$langs->trans("List")); - - $menu->add(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("MenuChequeDeposits")); - - $menu->add("rapport.php",$langs->trans("Reportings")); - - $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid")); - - if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) - { - $menu->add_submenu("avalider.php",$langs->trans("MenuToValid")); - } - left_menu($menu->liste); -} -?> diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 27efa83b1bf..f575e9caac4 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); diff --git a/htdocs/compta/param/comptes/fiche.php b/htdocs/compta/param/comptes/fiche.php index b07a6a83b7f..43a9c8aa46f 100644 --- a/htdocs/compta/param/comptes/fiche.php +++ b/htdocs/compta/param/comptes/fiche.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ @@ -28,7 +27,7 @@ \version $Revision$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); $mesg = ''; @@ -67,7 +66,7 @@ if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer) llxHeader("","Nouveau compte"); /* - * Création d'un compte + * Cr�ation d'un compte * */ if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer) @@ -87,7 +86,7 @@ if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametre print ''.$langs->trans("AccountNumber").''; if ($_error == 1) { - print "Ce numéro de compte existe déjà"; + print "Ce num�ro de compte existe d�j�"; } if ($_error == 2) { diff --git a/htdocs/compta/param/comptes/index.php b/htdocs/compta/param/comptes/index.php index 8ba4c14bbaa..864df6824b6 100644 --- a/htdocs/compta/param/comptes/index.php +++ b/htdocs/compta/param/comptes/index.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -27,15 +26,15 @@ \version $Revision$ */ -require("./pre.inc.php"); +require("../../../main.inc.php"); $langs->load("compta"); $langs->load("bills"); /* - * Sécurité accés client + * S�curit� acc�s client */ -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -77,6 +76,6 @@ print ''; print ''; $db->close(); - + llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/param/comptes/liste.php b/htdocs/compta/param/comptes/liste.php index 90507df71c3..12fdbe8d117 100644 --- a/htdocs/compta/param/comptes/liste.php +++ b/htdocs/compta/param/comptes/liste.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -26,7 +25,8 @@ \brief Onglet de gestion de parametrages des ventilations \version $Revision$ */ -require("./pre.inc.php"); + +require("../../../main.inc.php"); llxHeader('','Compta - Liste des comptes'); @@ -52,14 +52,14 @@ $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux as cg"; if (strlen(trim($_GET["search_numero"])) ) { - + $sql .= " WHERE cg.numero LIKE '%".$_GET["search_numero"]."%'"; - + if ( strlen(trim($_GET["search_intitule"]))) - { + { $sql .= " AND cg.intitule LIKE '%".$_GET["search_intitule"]."%'"; } - + } else { @@ -77,8 +77,8 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - - print_barre_liste("Comptes généraux", $page, "liste.php", "", $sortfield, $sortorder, '', $num); + + print_barre_liste("Comptes g�n�raux", $page, "liste.php", "", $sortfield, $sortorder, '', $num); print ''; print ''; @@ -101,7 +101,7 @@ if ($resql) while ($i < min($num,$conf->liste_limit)) { - $obj = $db->fetch_object($resql); + $obj = $db->fetch_object($resql); $var=!$var; print ""; @@ -118,7 +118,7 @@ if ($resql) print "
"; $db->free($resql); } -else +else { dol_print_error($db); } diff --git a/htdocs/compta/param/comptes/pre.inc.php b/htdocs/compta/param/comptes/pre.inc.php deleted file mode 100644 index 05d5f050934..00000000000 --- a/htdocs/compta/param/comptes/pre.inc.php +++ /dev/null @@ -1,48 +0,0 @@ - - * Copyright (C) 2004-2006 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/param/comptes/pre.inc.php - \ingroup compta - \brief Fichier gestionnaire du menu paramétrage de la compta -*/ - -require("../../../main.inc.php"); -require_once DOL_DOCUMENT_ROOT.'/compta/comptacompte.class.php'; - -function llxHeader($head = "", $title="", $help_url='') -{ - global $user, $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param")); - - $menu->add(DOL_URL_ROOT."/compta/param/comptes/",$langs->trans("AccountsGeneral")); - $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("List")); - $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/fiche.php?action=create",$langs->trans("New")); - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/compta/param/index.php b/htdocs/compta/param/index.php index c28b32deda3..589691efd73 100644 --- a/htdocs/compta/param/index.php +++ b/htdocs/compta/param/index.php @@ -20,19 +20,19 @@ /** \file htdocs/compta/param/index.php \ingroup compta - \brief Page acceuil zone paramétrage comptabilité + \brief Page acceuil zone parametrage comptabilite \version $Id$ */ -require("./pre.inc.php"); +require("../../main.inc.php"); $langs->load("compta"); $langs->load("bills"); /* - * Sécurité accés client + * S�curit� acc�s client */ -if ($user->societe_id > 0) +if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; @@ -72,6 +72,6 @@ print ''; print ''; $db->close(); - + llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/param/pre.inc.php b/htdocs/compta/param/pre.inc.php deleted file mode 100644 index 2bc63eea5b6..00000000000 --- a/htdocs/compta/param/pre.inc.php +++ /dev/null @@ -1,46 +0,0 @@ - - * Copyright (C) 2004-2006 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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/compta/param/pre.inc.php - \ingroup compta - \brief Fichier gestionnaire du menu paramétrage de la compta -*/ - -require("../../main.inc.php"); - -function llxHeader($head = "", $title="", $help_url='') -{ - global $langs; - - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param")); - - $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("AccountsGeneral")); - - left_menu($menu->liste, $help_url); -} - -?>