From d1ab91671b9c5faec788178d540ac3430683288e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Mar 2010 22:11:11 +0000 Subject: [PATCH] Remove pre.inc.php --- htdocs/contact/exportimport.php | 32 ++++++++-------- htdocs/contact/fiche.php | 2 +- htdocs/contact/index.php | 5 ++- htdocs/contact/info.php | 4 +- htdocs/contact/ldap.php | 4 +- htdocs/contact/perso.php | 14 +++---- htdocs/contact/pre.inc.php | 65 --------------------------------- htdocs/contact/vcard.php | 14 +++---- 8 files changed, 38 insertions(+), 102 deletions(-) delete mode 100644 htdocs/contact/pre.inc.php diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index 957a70f05e1..cdcfc53b990 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2010 Laurent Destailleur * Copyright (C) 2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -18,13 +18,13 @@ */ /** - \file htdocs/contact/exportimport.php - \ingroup societe - \brief Onglet exports-imports d'un contact - \version $Id$ -*/ + * \file htdocs/contact/exportimport.php + * \ingroup societe + * \brief Onglet exports-imports d'un contact + * \version $Id$ + */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); @@ -37,10 +37,10 @@ $result = restrictedArea($user, 'contact', $contactid, 'socpeople'); /* -* View -*/ + * View + */ -llxHeader(); +llxHeader('',$langs->trans("Contact"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); $form = new Form($db); @@ -70,16 +70,16 @@ print ''.$langs->trans("Firstname").''.$con // Company if ($contact->socid > 0) { - $objsoc = new Societe($db); - $objsoc->fetch($contact->socid); + $objsoc = new Societe($db); + $objsoc->fetch($contact->socid); - print ''.$langs->trans("Company").''.$objsoc->getNomUrl(1).''; + print ''.$langs->trans("Company").''.$objsoc->getNomUrl(1).''; } else { - print ''.$langs->trans("Company").''; - print $langs->trans("ContactNotLinkedToCompany"); - print ''; + print ''.$langs->trans("Company").''; + print $langs->trans("ContactNotLinkedToCompany"); + print ''; } // Civility diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index b01f3f419c2..76dbdc2441e 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -27,7 +27,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 06cf6904a82..34655861011 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -26,8 +26,9 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); +require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); $langs->load("companies"); $langs->load("suppliers"); diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index fb047afcf70..2e027136cec 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 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 @@ -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."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index a51ace0631a..d95f228753d 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2010 Laurent Destailleur * Copyright (C) 2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ * \version $Id$ */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 6bce12f2824..39925e32b54 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 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 @@ -18,13 +18,13 @@ */ /** - \file htdocs/contact/perso.php - \ingroup societe - \brief Onglet informations personnelles d'un contact - \version $Id$ -*/ + * \file htdocs/contact/perso.php + * \ingroup societe + * \brief Onglet informations personnelles d'un contact + * \version $Id$ + */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); diff --git a/htdocs/contact/pre.inc.php b/htdocs/contact/pre.inc.php deleted file mode 100644 index 757471d0356..00000000000 --- a/htdocs/contact/pre.inc.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Copyright (C) 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/contact/pre.inc.php - \brief File to manage left menu for contact area - \version $Id$ -*/ -require("../main.inc.php"); - - - -function llxHeader($head = '', $title='', $help_url='') -{ - global $langs, $user, $conf; - - $langs->load("companies"); - $langs->load("commercial"); - - top_menu($head,$title); - - $menu = new Menu(); - - if ($user->rights->societe->contact->lire) - { - $menu->add(DOL_URL_ROOT."/contact/index.php", $langs->trans("Contacts")); - } - if ($user->rights->societe->contact->creer) - { - $menu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?action=create", $langs->trans("NewContact")); - } - if ($user->rights->societe->contact->lire) - { - $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire); - $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire); - $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire); - $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire); - - $menu->add(DOL_URL_ROOT."/contact/index.php?view=recent", $langs->trans("LastContacts")); - $menu->add(DOL_URL_ROOT."/contact/index.php?view=phone", $langs->trans("Phones")); - $menu->add(DOL_URL_ROOT."/contact/index.php?view=mail", $langs->trans("EMails")); - - $menu->add(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts")); - } - - left_menu($menu->liste, $help_url); -} - -?> diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 1a094373a38..4437da36bc5 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2010 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 @@ -18,13 +18,13 @@ */ /** - \file htdocs/contact/vcard.php - \ingroup societe - \brief Onglet vcard d'un contact - \version $Id$ -*/ + * \file htdocs/contact/vcard.php + * \ingroup societe + * \brief Onglet vcard d'un contact + * \version $Id$ + */ -require("./pre.inc.php"); +require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/societe.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/vcard/vcard.class.php");