Qual: First change to remove pre.inc.php

This commit is contained in:
Regis Houssin 2010-03-01 17:38:35 +00:00
parent 65b2ac3e56
commit bce9879a95
9 changed files with 43 additions and 138 deletions

View File

@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Code identique a /expedition/commande.php
// Code identique a /expedition/shipment.php
/**
* \file htdocs/expedition/fiche.php
@ -27,7 +27,8 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formproduct.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
@ -37,6 +38,7 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php"
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
$langs->load("sendings");
$langs->load("companies");
$langs->load("bills");
$langs->load('deliveries');

View File

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

View File

@ -25,8 +25,10 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
$langs->load("sendings");
$langs->load('companies');
// Security check

View File

@ -1,51 +0,0 @@
<?php
/* Copyright (C) 2003-2005 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/expedition/pre.inc.php
\ingroup expedition
\brief Fichier de gestion du menu gauche du module expedition
\version $Id$
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
$langs->load("orders");
$langs->load("sendings");
function llxHeader($head = "", $title="", $help_url='')
{
global $langs;
top_menu($head, $title);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders"));
$menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings"));
$menu->add_submenu(DOL_URL_ROOT."/expedition/liste.php", $langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/expedition/stats/", $langs->trans("Statistics"));
left_menu($menu->liste, $help_url);
}
?>

View File

@ -26,14 +26,16 @@
* \version $Id$
*/
require("./pre.inc.php");
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php");
if ($conf->produit->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product.class.php");
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
$langs->load('orders');
$langs->load("companies");

View File

@ -19,14 +19,14 @@
*/
/**
\file htdocs/expedition/stats/index.php
\ingroup expedition
\brief Page des stats expeditions
\version $Id$
*/
* \file htdocs/expedition/stats/index.php
* \ingroup expedition
* \brief Page des stats expeditions
* \version $Id$
*/
require("./pre.inc.php");
require("../expedition.class.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
$langs->load("sendings");

View File

@ -18,13 +18,13 @@
*/
/**
\file htdocs/expedition/stats/month.php
\ingroup commande
\brief Page des stats expeditions par mois
\version $Id$
*/
* \file htdocs/expedition/stats/month.php
* \ingroup commande
* \brief Page des stats expeditions par mois
* \version $Id$
*/
require("./pre.inc.php");
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/stats/expeditionstats.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");

View File

@ -1,47 +0,0 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 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 expedition
\brief Fichier gestionnaire du menu gauche des statistiques expedition
\version $Id$
*/
require("../../main.inc.php");
$langs->load("orders");
function llxHeader($head = "", $title="", $urlp = "")
{
global $langs;
top_menu($head, $title);
$menu = new Menu();
$menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders"));
$menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings"));
$menu->add_submenu(DOL_URL_ROOT."/expedition/liste.php", $langs->trans("List"));
$menu->add_submenu(DOL_URL_ROOT."/expedition/stats/", $langs->trans("Statistics"));
left_menu($menu->liste);
}
?>

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* 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
@ -582,32 +582,29 @@ else
if ($user->societe_id == 0)
{
print '<div class="tabsAction">';
if ($delivery->statut == 0 && $user->rights->expedition->livraison->valider && $num_prod > 0)
{
print '<a class="butAction" href="fiche.php?id='.$delivery->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>';
}
// if (! preg_match('/^(valid|delete)/i',$_REQUEST["action"]))
// {
if ($delivery->statut == 0 && $user->rights->expedition->livraison->valider && $num_prod > 0)
if ($user->rights->expedition->livraison->supprimer)
{
if ($conf->expedition_bon->enabled)
{
print '<a class="butAction" href="fiche.php?id='.$delivery->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>';
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&amp;expid='.$delivery->expedition_id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}
if ($user->rights->expedition->livraison->supprimer)
else
{
if ($conf->expedition_bon->enabled)
{
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&amp;expid='.$delivery->expedition_id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}
else
{
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}
// }
}
print '</div>';
}
print "\n";
print "<table width=\"100%\" cellspacing=2><tr><td width=\"50%\" valign=\"top\">";
print '<table width="100%" cellspacing="2"><tr><td width="50%" valign="top">';
/*
* Documents generated