Remove pre.inc.php

This commit is contained in:
Laurent Destailleur 2010-03-27 15:06:19 +00:00
parent 3ef00adb4a
commit 839ceebfc7
47 changed files with 50 additions and 615 deletions

View File

@ -27,7 +27,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("./pre.inc.php"); // We use pre.inc.php to have a dynamic menu
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("./pre.inc.php"); // We use pre.inc.php to have a dynamic menu
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php');

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/fichinter/fichinter.class.php');
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");

View File

@ -24,7 +24,7 @@
* \version $Id$
*/
require ("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");

View File

@ -27,7 +27,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");

View File

@ -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."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php");

View File

@ -25,7 +25,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."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");

View File

@ -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."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");

View File

@ -23,7 +23,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");

View File

@ -1,40 +0,0 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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$
*/
require("../main.inc.php");
$langs->load("interventions");
function llxHeader($head = "", $urlp = "")
{
global $user, $conf, $langs;
top_menu($head);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
$menu->add("index.php", $langs->trans("Interventions"));
left_menu($menu->liste);
}
?>

View File

@ -20,7 +20,7 @@
* $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
// Security check

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require ("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
require_once DOL_DOCUMENT_ROOT."/lib/fourn.lib.php";

View File

@ -26,7 +26,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/includes/modules/supplier_order/modules_commandefournisseur.php');
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fourn.lib.php");

View File

@ -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."/lib/fourn.lib.php");

View File

@ -26,7 +26,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/supplier_order/modules_commandefournisseur.php');

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fourn.lib.php");
$langs->load("orders");

View File

@ -25,7 +25,7 @@
* \version $Revision$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
// Security check

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
$langs->load("orders");

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fourn.lib.php");
$langs->load("orders");

View File

@ -1,69 +0,0 @@
<?PHP
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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/fourn/commande/pre.inc.php
* \ingroup compta
* \brief Fichier gestionnaire du menu commandes fournisseurs
* \version $Id$
*/
require("../../main.inc.php");
$langs->load("orders");
$langs->load("suppliers");
$langs->load("companies");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php");
function llxHeader($head = "", $title = "", $help_url='', $addons='')
{
global $user, $langs;
$langs->load("orders");
top_menu($head, $title);
$menu = new Menu();
if (is_array($addons))
{
$menu->add($addons[0][0], $addons[0][1]);
}
if ($user->societe_id == 0 && $user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
$langs->load("bills");
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
if ($user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/commande/", $langs->trans("Orders"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/commande/liste.php", $langs->trans("List"));
}
left_menu($menu->liste,$help_url);
}
?>

View File

@ -25,14 +25,19 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
$langs->load("companies");
/*
* View
*/
llxHeader();
/*
* Sécurité accés client
* S<EFBFBD>curit<EFBFBD> acc<EFBFBD>s client
*/
if ($user->societe_id > 0)
{

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require ("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');

View File

@ -26,7 +26,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php');
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");

View File

@ -27,7 +27,7 @@
* \version $Id$
*/
require_once('./pre.inc.php');
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php');
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
@ -58,7 +58,7 @@ llxHeader('',$langs->trans("BillsSuppliersUnpaid"));
$facturestatic=new FactureFournisseur($db);
$companystatic=new Societe($db);
/***************************************************************************
* *
* Mode Liste *

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
if (!$user->rights->fournisseur->facture->lire)
accessforbidden();

View File

@ -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.'/lib/fourn.lib.php');

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');
$langs->load('bills');

View File

@ -27,7 +27,7 @@
* \version $Id$
*/
require('./pre.inc.php');
require("../../main.inc.php");
require(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php');
$langs->load('companies');

View File

@ -1,155 +0,0 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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/fourn/facture/pre.inc.php
\ingroup fournisseur,facture
\brief Fichier gestionnaire du menu factures fournisseurs
\version $Id$
*/
require("../../main.inc.php");
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php";
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php";
function llxHeader($head = '', $title = '', $help_url='')
{
global $user, $conf, $langs;
$langs->load("suppliers");
$langs->load("propal");
top_menu($head, $title);
$menu = new Menu();
if ($conf->fournisseur->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
// S<>curit<69> acc<63>s client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
}
if ($conf->societe->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
}
$langs->load("bills");
if ($user->rights->fournisseur->facture->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/impayees.php",$langs->trans("Unpaid"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
$langs->load("orders");
if ($user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
$langs->load("products");
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
$menu = new Menu();
if (is_array($addons))
{
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->fournisseur->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
// S<>curit<69> acc<63>s client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=f",$langs->trans("NewSupplier"));
}
}
if ($conf->societe->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
}
$langs->load("bills");
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
if ($user->rights->fournisseur->facture->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
if ($user->rights->fournisseur->commande->lire)
{
$langs->load("orders");
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
left_menu($menu->liste, $help_url);
}
?>

View File

@ -27,7 +27,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/company.lib.php");

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php');
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php');
require_once(DOL_DOCUMENT_ROOT.'/categories/categorie.class.php');
@ -104,7 +104,7 @@ else
if ($conf->fournisseur->enabled)
{
$langs->load("orders");
$sql = "SELECT cf.rowid, cf.ref, cf.total_ttc";
$sql.= ", s.nom, s.rowid as socid";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf";

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php");
$langs->load("suppliers");

View File

@ -27,8 +27,7 @@
*/
require('./pre.inc.php');
require("../../main.inc.php");
require(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php');

View File

@ -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."/fourn/facture/paiementfourn.class.php");

View File

@ -1,105 +0,0 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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/fourn/paiement/pre.inc.php
\ingroup fournisseur,facture
\brief Fichier gestionnaire du menu paiements factures fournisseurs
\version $Id$
*/
require("../../main.inc.php");
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php";
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php";
function llxHeader($head = "", $title = "", $addons='') {
global $user, $conf, $langs;
$langs->load("suppliers");
$langs->load("propal");
top_menu($head, $title);
$menu = new Menu();
if (is_array($addons))
{
//$menu->add($url, $libelle);
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->fournisseur->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
// S<>curit<69> acc<63>s client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
}
if ($conf->societe->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
}
$langs->load("bills");
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
if ($user->rights->fournisseur->facture->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
$langs->load("orders");
if ($user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
left_menu($menu->liste);
}
?>

View File

@ -1,97 +0,0 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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$
*/
/**
\file htdocs/fourn/pre.inc.php
\ingroup fournisseur,facture
\brief Fichier gestionnaire du menu fournisseurs
*/
require("../main.inc.php");
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php";
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php";
function llxHeader($head = '', $title='', $help_url='')
{
global $user, $conf, $langs;
$langs->load("suppliers");
$langs->load("propal");
top_menu($head, $title);
$menu = new Menu();
if ($conf->fournisseur->enabled && $user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
// S<>curit<69> acc<63>s client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=f",$langs->trans("NewSupplier"));
}
$menu->add_submenu(DOL_URL_ROOT."/fourn/liste.php",$langs->trans("List"));
if ($conf->societe->enabled )
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
$menu->add_submenu(DOL_URL_ROOT."/fourn/stats.php",$langs->trans("Statistics"));
}
$langs->load("bills");
if ($user->societe_id == 0 && $user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
if ($user->societe_id == 0 && $user->rights->fournisseur->facture->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
$langs->load("orders");
if ($user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
if (($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
{
$menu->add(DOL_URL_ROOT."/product/", $langs->trans("Products"));
}
if ($conf->categorie->enabled)
{
$langs->load("categories");
// Cat<61>gories fournisseurs
$menu->add(DOL_URL_ROOT."/categories/index.php?leftmenu=cat&amp;type=1", $langs->trans("SuppliersCategoriesShort"), 0);
}
left_menu($menu->liste, $help_url);
}
?>

View File

@ -25,7 +25,7 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
$langs->load("categories");

View File

@ -23,10 +23,10 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.product.class.php";
if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden();
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel"))

View File

@ -24,8 +24,9 @@
\version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
// Security check
if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden();

View File

@ -25,7 +25,7 @@
\version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");

View File

@ -24,7 +24,7 @@
\version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");

View File

@ -1,103 +0,0 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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/fourn/product/pre.inc.php
\ingroup product,service
\brief Fichier gestionnaire du menu gauche des produits et services fournisseurs
\version $Id$
*/
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php");
require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php");
$langs->load("suppliers");
$langs->load("products");
function llxHeader($head = "", $title="", $help_url='',$addons='')
{
global $db, $user, $conf, $langs;
top_menu($head, $title);
$menu = new Menu();
if (is_array($addons))
{
//$menu->add($url, $libelle);
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->produit->enabled)
{
$menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/product/liste.php?type=0", $langs->trans("List"));
if ($user->societe_id == 0 && ($user->rights->produit->creer || $user->rights->service->creer))
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/product/fiche.php?action=create&amp;type=0", $langs->trans("NewProduct"));
}
}
if ($conf->categorie->enabled)
{
$menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories"));
}
$menu->add('liste.php','Top');
if (isset($_REQUEST['catid']) && $_REQUEST['catid'])
{
$catid = $_REQUEST['catid'];
$c = new Categorie ($db, $catid);
$menu->add('liste.php?catid='.$c->id, $c->label);
$cats = $c->get_filles();
if (sizeof ($cats) > 0)
{
foreach ($cats as $cat)
{
$menu->add_submenu('liste.php?catid='.$cat->id, $cat->label);
}
}
}
else
{
$c = new Categorie ($db);
$cats = $c->get_main_categories();
if (sizeof ($cats) > 0)
{
foreach ($cats as $cat)
{
$menu->add_submenu('liste.php?catid='.$cat->id, $cat->label);
}
}
}
left_menu($menu->liste, $help_url);
}
?>

View File

@ -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");

View File

@ -27,7 +27,7 @@
\version $Revision$
*/
require("./pre.inc.php");
require("../main.inc.php");
$langs->load("suppliers");
$langs->load("orders");

View File

@ -25,7 +25,7 @@
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require("./pre.inc.php"); // We use pre.inc.php to have a dynamic menu
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/treeview.lib.php");

View File

@ -550,7 +550,6 @@ function print_left_eldy_menu($db,$menu_array)
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/prev.php?leftmenu=ca","Pr<EFBFBD>visionnel",2,$user->rights->compta->resultat->lire);
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/comp.php?leftmenu=ca","Transform<EFBFBD>",2,$user->rights->compta->resultat->lire);
}
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/exercices.php?leftmenu=ca",$langs->trans("Evolution"),2,$user->rights->compta->resultat->lire);
*/
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/casoc.php?leftmenu=ca",$langs->trans("ByCompanies"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);
if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/stats/cabyuser.php?leftmenu=ca",$langs->trans("ByUsers"),2,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire);