Fix: remove pre.inc.php

This commit is contained in:
Regis Houssin 2010-03-22 14:40:04 +00:00
parent 352a87afae
commit da437acd5d
19 changed files with 39 additions and 186 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,12 +19,12 @@
*/
/**
\file htdocs/product/stats/index.php
\brief Page accueil statistiques produits
\version $Id$
*/
* \file htdocs/product/stats/index.php
* \brief Page accueil statistiques produits
* \version $Id$
s*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
// Security check
@ -117,8 +117,8 @@ if ($conf->service->enabled)
$sql = "SELECT count(*)";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
$sql.= " WHERE p.envente = 0";
if (!$user->rights->produit->voir) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)';
if (!$user->rights->service->voir) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)';
if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)';
if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)';
$sql.= " AND p.fk_product_type = '1'";
$sql.= " AND p.entity = ".$conf->entity;

View File

@ -1,102 +0,0 @@
<?php
/* Copyright (C) 2001-2004 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/product/stats/pre.inc.php
\ingroup product,service
\brief Fichier gestionnaire du menu gauche des statistiques de produits et services
\version $Id$
*/
require("../../main.inc.php");
function llxHeader($head = "", $urlp = "", $title="")
{
global $user, $conf, $langs;
$langs->load("products");
top_menu($head, $title);
$menu = new Menu();
// Products
if ($conf->produit->enabled)
{
$menu->add(DOL_URL_ROOT."/product/index.php?type=0", $langs->trans("Products"));
$menu->add_submenu(DOL_URL_ROOT."/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."/product/fiche.php?action=create&amp;type=0", $langs->trans("NewProduct"));
}
}
// Services
if ($conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/index.php?type=1", $langs->trans("Services"));
$menu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=1", $langs->trans("List"));
if ($user->societe_id == 0 && ($user->rights->produit->creer || $user->rights->service->creer))
{
$menu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&amp;type=1", $langs->trans("NewService"));
}
}
if ($conf->boutique->enabled)
{
$menu->add(DOL_URL_ROOT."/product/osc-liste.php", "Osc");
$menu->add_submenu(DOL_URL_ROOT."/product/osc-liste.php?reqstock=epuise", "Produits Epuis<69>s");
$menu->add(DOL_URL_ROOT."/product/osc-reviews.php", "Critiques");
$menu->add_submenu(DOL_URL_ROOT."/product/osc-productsbyreviews.php", "Meilleurs produits");
$menu->add(DOL_URL_ROOT."/product/album/", "Albums");
$menu->add(DOL_URL_ROOT."/product/groupart/", "Groupes/Artistes");
$menu->add(DOL_URL_ROOT."/product/categorie/", $langs->trans("Categories"));
}
if ($conf->fournisseur->enabled) {
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
$menu->add(DOL_URL_ROOT."/product/stats/", $langs->trans("Statistics"));
if ($conf->propal->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/product/popuprop.php", $langs->trans("Popularity"));
}
if ($conf->stock->enabled)
{
$menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
}
if ($conf->categorie->enabled)
{
$menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories"));
}
left_menu($menu->liste);
}
?>

View File

@ -26,7 +26,7 @@
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");

View File

@ -24,7 +24,8 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/stock.lib.php");
$langs->load("products");

View File

@ -26,10 +26,11 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/stock.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
$langs->load("products");
$langs->load("stocks");

View File

@ -27,8 +27,8 @@
* \version $Revision$
*/
require_once("./pre.inc.php");
require_once("./entrepot.class.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
$langs->load("stocks");

View File

@ -23,7 +23,8 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/stock.lib.php");

View File

@ -19,14 +19,14 @@
*/
/**
\file htdocs/product/stock/liste.php
\ingroup stock
\brief Page liste des stocks
\version $Id$
*/
* \file htdocs/product/stock/liste.php
* \ingroup stock
* \brief Page liste des stocks
* \version $Id$
*/
require("./pre.inc.php");
require_once("./entrepot.class.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
$langs->load("stocks");

View File

@ -25,11 +25,11 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/stock.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
$langs->load("products");

View File

@ -1,50 +0,0 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 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/product/stock/pre.inc.php
* \ingroup stock
* \brief Fichier gestionnaire du menu gauche de stocks
* \version $Id$
*/
require("../../main.inc.php");
require("./entrepot.class.php");
function llxHeader($head="", $title="", $help_url="")
{
global $langs,$conf,$user;
top_menu($head, $title);
$langs->load("stocks");
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
$menu->add_submenu(DOL_URL_ROOT."/product/stock/fiche.php?action=create", $langs->trans("MenuNewWarehouse"));
$menu->add_submenu(DOL_URL_ROOT."/product/stock/liste.php", $langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/product/stock/valo.php", $langs->trans("EnhancedValue"));
$menu->add_submenu(DOL_URL_ROOT."/product/reassort.php?type=0", $langs->trans("Restock"));
$menu->add(DOL_URL_ROOT."/product/stock/mouvement.php", $langs->trans("Movements"));
left_menu($menu->liste, $help_url);
}
?>

View File

@ -27,9 +27,10 @@
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/html.formproduct.class.php");
$langs->load("products");

View File

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

View File

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