mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Nettoyage de code redondant. L'appel a getright est inutile car deja dans le main.
This commit is contained in:
parent
9d9f1d34b8
commit
fed065dd7f
53
dev/skeletons/pre.inc.php
Normal file
53
dev/skeletons/pre.inc.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/* Copyright (C) 2008 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/dev/skeletons/pre.inc.php
|
||||
\brief File to manage left menu by default
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
// Include environment and check authentification
|
||||
require ("../../main.inc.php"); // This include must use a relative link to the main.inc.php file
|
||||
|
||||
|
||||
/**
|
||||
\brief Function called by page to show menus (top and left)
|
||||
*/
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
// Create default menu.
|
||||
|
||||
// No code here is required if you already added menu entries in
|
||||
// the module descriptor (recommanded).
|
||||
// If not you must manually add menu entries here (not recommanded).
|
||||
/*
|
||||
$langs->load("mylangfile");
|
||||
$menu->add(DOL_URL_ROOT."/mylink.php", $langs->trans("MyMenuLabel"));
|
||||
}
|
||||
*/
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
?>
|
||||
|
|
@ -25,27 +25,21 @@
|
|||
\author Put author name here
|
||||
\remarks Put here some comments
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/../dev/skeletons/skeleton_class.class.php");
|
||||
|
||||
// Load traductions files
|
||||
// Load traductions files requiredby by page
|
||||
$langs->load("companies");
|
||||
$langs->load("other");
|
||||
|
||||
// Load permissions
|
||||
$user->getrights("commercial");
|
||||
|
||||
// Get parameters
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
$myparam = isset($_GET["myparam"])?$_GET["myparam"]:'';
|
||||
|
||||
// Protection quand utilisateur externe
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
$socid = $user->societe_id;
|
||||
//accessforbidden();
|
||||
}
|
||||
if ($socid == '') accessforbidden();
|
||||
|
||||
|
||||
|
||||
|
|
@ -81,9 +75,9 @@ if ($_REQUEST["action"] == 'add')
|
|||
* Put here all code to build page
|
||||
****************************************************/
|
||||
|
||||
llxHeader();
|
||||
llxHeader('MyPageName');
|
||||
|
||||
$html=new Form($db);
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
// Put here content of your page
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ $langs->load("members");
|
|||
$langs->load("users");
|
||||
$langs->load("mails");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$adho = new AdherentOptions($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||
|
||||
$user->getrights('adherent');
|
||||
$user->getrights('banque');
|
||||
|
||||
$langs->load("members");
|
||||
|
||||
$sortorder=$_GET["sortorder"];
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ $langs->load("bills");
|
|||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
// Defini si peux creer un utilisateur ou gerer groupe sur un utilisateur
|
||||
$canadduser=$user->rights->adherent->creer;
|
||||
// Defini si peux lire/modifier info user ou mot de passe
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ $langs->load("bills");
|
|||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$subscription = new Cotisation($db);
|
||||
$errmsg='';
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ $langs->load("bills");
|
|||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
$user->getrights('adherent');
|
||||
if (!$user->rights->adherent->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ $langs->load("bills");
|
|||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
$user->getrights('adherent');
|
||||
if (!$user->rights->adherent->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
|
||||
|
||||
$user->getrights('commercial');
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("members");
|
||||
$langs->load("ldap");
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
|||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
|
||||
/*
|
||||
* Affiche liste
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT.'/adherents/adherent.class.php');
|
|||
$action=isset($_GET["action"])?$_GET["action"]:(isset($_POST["action"])?$_POST["action"]:"");
|
||||
$id=isset($_GET["id"])?$_GET["id"]:(isset($_POST["id"])?$_POST["id"]:"");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("members");
|
||||
$langs->load("bills");
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
|
|||
|
||||
$langs->load("members");
|
||||
|
||||
$user->getrights('adherent');
|
||||
|
||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/admin/import/dolibarrimport.class.php");
|
|||
|
||||
$langs->load("exports");
|
||||
|
||||
$user->getrights();
|
||||
|
||||
if (! $user->societe_id == 0)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
require ("../../main.inc.php");
|
||||
$user->getrights();
|
||||
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -29,8 +28,6 @@
|
|||
|
||||
require "./pre.inc.php";
|
||||
|
||||
$user->getrights('categorie');
|
||||
|
||||
$langs->load("categories");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
require "./pre.inc.php";
|
||||
|
||||
$user->getrights();
|
||||
|
||||
if (!$user->rights->categorie->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ require "../main.inc.php";
|
|||
require_once DOL_DOCUMENT_ROOT."/categories/categorie.class.php";
|
||||
|
||||
$langs->load("categories");
|
||||
$user->getrights("categorie");
|
||||
|
||||
function llxHeader ($head = "", $urlp = "", $title="")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ if ($_REQUEST['id'] == "")
|
|||
$type=$_GET['type'];
|
||||
|
||||
// Securite
|
||||
$user->getrights('categorie');
|
||||
if (! $user->rights->categorie->lire)
|
||||
{
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -42,11 +42,6 @@ $langs->load("companies");
|
|||
$langs->load("bills");
|
||||
$langs->load("orders");
|
||||
|
||||
$user->getrights('propale');
|
||||
$user->getrights('fichinter');
|
||||
$user->getrights('commande');
|
||||
$user->getrights('projet');
|
||||
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require("./pre.inc.php");
|
|||
|
||||
$langs->load("mails");
|
||||
|
||||
$user->getrights("mailing");
|
||||
|
||||
if (! $user->rights->mailing->lire || $user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require("./pre.inc.php");
|
|||
$langs->load("commercial");
|
||||
$langs->load("orders");
|
||||
|
||||
$user->getrights("mailing");
|
||||
|
||||
if (! $user->rights->mailing->lire || $user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
require("../../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/mailing/mailing.class.php';
|
||||
|
||||
$user->getrights();
|
||||
$langs->load("companies");
|
||||
$langs->load("mails");
|
||||
$langs->load("exports");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -32,10 +31,6 @@ require_once("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
|
||||
$user->getrights('propale');
|
||||
$user->getrights('commande');
|
||||
$user->getrights('projet');
|
||||
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("companies");
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -27,10 +25,8 @@
|
|||
\brief Fichier de gestion du menu gauche de l'espace commercial
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
|
||||
$user->getrights();
|
||||
|
||||
function llxHeader($head = "", $title = "")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ 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");
|
||||
|
||||
$user->getrights('propale');
|
||||
|
||||
$langs->load('companies');
|
||||
$langs->load('propal');
|
||||
$langs->load('compta');
|
||||
|
|
|
|||
|
|
@ -35,12 +35,6 @@ $langs->load('companies');
|
|||
$langs->load('projects');
|
||||
$langs->load('propal');
|
||||
|
||||
$user->getrights('propale');
|
||||
$user->getrights('fichinter');
|
||||
$user->getrights('commande');
|
||||
$user->getrights('projet');
|
||||
$user->getrights("commercial");
|
||||
|
||||
$socid = isset($_GET["id"])?$_GET["id"]:$_GET["socid"]; // Fonctionne si on passe id ou socid
|
||||
if ($socid == '') accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require("./pre.inc.php");
|
|||
|
||||
$langs->load("propal");
|
||||
|
||||
$user->getrights('propale');
|
||||
|
||||
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ function llxHeader($head = "", $urlp = "")
|
|||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
$user->getrights();
|
||||
$langs->load("companies");
|
||||
$langs->load("commercial");
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/prospect.class.php");
|
|||
|
||||
$langs->load("propal");
|
||||
|
||||
$user->getrights();
|
||||
|
||||
// Sécurité accés client
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0)
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ if ($user->societe_id > 0)
|
|||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$user->getrights('facture');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -31,11 +31,6 @@ require_once("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
|
||||
$user->getrights('propale');
|
||||
$user->getrights('commande');
|
||||
$user->getrights('projet');
|
||||
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("orders");
|
||||
$langs->load("bills");
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@ require_once("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
|
||||
$user->getrights('propale');
|
||||
$user->getrights('commande');
|
||||
$user->getrights('projet');
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("bills");
|
||||
$langs->load("companies");
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
|
||||
|
||||
$user->getrights('commande');
|
||||
$user->getrights('expedition');
|
||||
|
||||
if (!$user->rights->commande->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ require('./pre.inc.php');
|
|||
require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
|
||||
$user->getrights('commande');
|
||||
if (!$user->rights->commande->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ $langs->load('propal');
|
|||
$langs->load('deliveries');
|
||||
$langs->load('products');
|
||||
|
||||
$user->getrights('commande');
|
||||
$user->getrights('expedition');
|
||||
|
||||
if (!$user->rights->commande->lire) accessforbidden();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
|
|||
$langs->load("orders");
|
||||
$langs->load("sendings");
|
||||
|
||||
$user->getrights('commande');
|
||||
if (!$user->rights->commande->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
|||
|
||||
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
||||
|
||||
$user->getrights('commande');
|
||||
if (!$user->rights->commande->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
require("../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
|
||||
|
||||
$user->getrights('commande');
|
||||
|
||||
$langs->load("orders");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
require("../../main.inc.php");
|
||||
|
||||
$user->getrights('commande');
|
||||
|
||||
$langs->load("orders");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->admin && !$user->rights->banque)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
||||
|
||||
$user->getrights('compta');
|
||||
|
||||
if (!$user->rights->banque->lire) accessforbidden();
|
||||
|
||||
llxHeader();
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->admin && !$user->rights->banque)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('compta');
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->rights->banque->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
global $db, $user, $conf, $langs;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require("./pre.inc.php");
|
|||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('compta');
|
||||
|
||||
if (! $user->rights->banque->consolidate) accessforbidden();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->rights->banque->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
|||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->admin && !$user->rights->banque)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
if (! $user->rights->banque->transfer)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@
|
|||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/tva.class.php");
|
||||
|
||||
$user->getrights('compta');
|
||||
$user->getrights('tax');
|
||||
|
||||
if (!$user->admin && !$user->rights->tax->charges->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
require_once("./pre.inc.php");
|
||||
|
||||
$user->getrights("societe");
|
||||
|
||||
if (! $user->rights->societe->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ $langs->load("companies");
|
|||
$langs->load("bills");
|
||||
$langs->load('deliveries');
|
||||
|
||||
$user->getrights('commande');
|
||||
|
||||
if (! $user->rights->commande->lire) accessforbidden();
|
||||
|
||||
// Sécurité accès client
|
||||
|
|
|
|||
|
|
@ -31,15 +31,11 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
|||
|
||||
$langs->load("orders");
|
||||
|
||||
$user->getrights('commande');
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
$user->getrights('');
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php'
|
|||
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||
|
||||
$user->getrights();
|
||||
|
||||
if (! $user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
|||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php");
|
||||
|
||||
|
||||
$user->getrights('facture');
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ $langs->load('propal');
|
|||
$langs->load('compta');
|
||||
$langs->load('other');
|
||||
|
||||
$user->getrights('facture');
|
||||
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once("./facture-rec.class.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/project.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
$user->getrights('facture');
|
||||
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
|||
|
||||
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
||||
|
||||
$user->getrights('facture');
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ require("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
|
||||
$user->getrights('facture');
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ $langs->load("companies");
|
|||
if ($conf->facture->enabled) $langs->load("bills");
|
||||
if ($conf->projet->enabled) $langs->load("projects");
|
||||
|
||||
$user->getrights("commercial");
|
||||
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
if ($socid == '') accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande
|
|||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php');
|
||||
if ($conf->tax->enabled) require_once(DOL_DOCUMENT_ROOT.'/chargesociales.class.php');
|
||||
|
||||
$user->getrights(); // On a besoin des permissions sur plusieurs modules
|
||||
|
||||
// L'espace compta/tréso doit toujours etre actif car c'est un espace partagé
|
||||
// par de nombreux modules (banque, facture, commande à facturer, etc...) indépendemment
|
||||
// de l'utilisation de la compta ou non. C'est au sein de cet espace que chaque sous fonction
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights("facture");
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
// Sécurité accés client
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
|||
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('banks');
|
||||
$langs->load('companies');
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
|||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights("banque");
|
||||
|
||||
// Sécurité accés client
|
||||
if (! $user->rights->banque)
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
|||
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights("facture");
|
||||
$user->getrights("adherent");
|
||||
|
||||
// Sécurité accés client
|
||||
if (! $user->rights->facture->lire && ! $user->rights->adherent->cotisation->lire)
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
|||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||
if ($conf->banque->enabled) require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$user->getrights('facture');
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('banks');
|
||||
$langs->load('companies');
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
|||
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights("facture");
|
||||
|
||||
// Sécurité accés client
|
||||
if (! $user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php");
|
||||
|
||||
$user->getrights("facture");
|
||||
|
||||
// Sécurité accés
|
||||
if (! $user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights("compta");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
require("../../../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/comptacompte.class.php';
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $langs;
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("admin");
|
||||
$langs->load("bills");
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ function llxHeader($head = "", $title="", $help_url='')
|
|||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ $langs->load("banks");
|
|||
$langs->load("withdrawals");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights("prelevement");
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ if (! $sortorder) $sortorder="DESC";
|
|||
if (! $sortfield) $sortfield="p.datep";
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
|
||||
// S<>curit<69> acc<63>s client
|
||||
$user->getrights('facture');
|
||||
$module='propale';
|
||||
if (! empty($_GET["socid"]))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ if ($user->societe_id > 0)
|
|||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$user->getrights('facture');
|
||||
|
||||
/*
|
||||
*
|
||||
* Mode fiche
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ require("../../chargesociales.class.php");
|
|||
/*
|
||||
*
|
||||
*/
|
||||
$user->getrights('compta');
|
||||
if (!$user->rights->compta->resultat->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/report.inc.php");
|
|||
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('compta');
|
||||
$user->getrights('facture');
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ require("../../chargesociales.class.php");
|
|||
/*
|
||||
*
|
||||
*/
|
||||
$user->getrights('compta');
|
||||
if (!$user->rights->compta->resultat->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ require(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
|||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
|
||||
// Protection
|
||||
$user->getrights('compta');
|
||||
$user->getrights('tax');
|
||||
|
||||
if (!$user->admin && !$user->rights->tax->charges)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ require("./pre.inc.php");
|
|||
require(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
||||
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('compta');
|
||||
$user->getrights('tax');
|
||||
|
||||
if (!$user->admin && ! $user->rights->tax->charges->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,9 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/compta/ventilation/fournisseur/lignes.php
|
||||
\ingroup facture
|
||||
\brief Page de detail des lignes de ventilation d'une facture
|
||||
|
|
@ -29,8 +27,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('banque');
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -18,12 +18,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/compta/ventilation/liste.php
|
||||
\ingroup compta
|
||||
\brief Page de ventilation des lignes de facture
|
||||
|
|
@ -32,8 +30,6 @@
|
|||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('banque');
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
require("../../../main.inc.php");
|
||||
$user->getrights('');
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
|||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
|||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('facture');
|
||||
$user->getrights('banque');
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
$user->getrights('');
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ require("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
|
||||
|
||||
$user->getrights('commercial');
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
// Protection quand utilisateur externe
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
|
|||
$langs->load("companies");
|
||||
$langs->load("users");
|
||||
|
||||
$user->getrights("societe");
|
||||
$user->getrights("commercial");
|
||||
|
||||
|
||||
$error = array();
|
||||
$socid=$_GET["socid"]?$_GET["socid"]:$_POST["socid"];
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ require("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
|
||||
|
||||
$user->getrights('commercial');
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
// Protection quand utilisateur externe
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
||||
|
||||
$user->getrights('commercial');
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("ldap");
|
||||
$langs->load("admin");
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ require("./pre.inc.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
|
||||
|
||||
$user->getrights('commercial');
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
// Protection quand utilisateur externe
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ $langs->load("orders");
|
|||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('contrat');
|
||||
$user->getrights('commercial');
|
||||
|
||||
if (! $user->rights->contrat->lire)
|
||||
accessforbidden();
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
|
|||
|
||||
$langs->load("contracts");
|
||||
|
||||
$user->getrights('contrat');
|
||||
$user->getrights('commercial');
|
||||
|
||||
if (!$user->rights->contrat->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ $langs->load("orders");
|
|||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
|
||||
$user->getrights('contrat');
|
||||
|
||||
if (!$user->rights->contrat->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.cl
|
|||
|
||||
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
||||
|
||||
$user->getrights('contrat');
|
||||
$user->getrights('commercial');
|
||||
|
||||
if (!$user->rights->contrat->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,17 +16,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/pre.inc.php
|
||||
\brief Fichier gestionnaire du menu de gauche de l'accueil
|
||||
\version $Revision$
|
||||
\version $Source$
|
||||
*/
|
||||
|
||||
require ("../main.inc.php");
|
||||
$user->getrights('document');
|
||||
|
||||
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/client.class.php');
|
||||
|
||||
$user->getrights("facture");
|
||||
|
||||
if (!$user->rights->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ $langs->load('propal');
|
|||
$langs->load('deliveries');
|
||||
$langs->load('stocks');
|
||||
|
||||
$user->getrights('commande');
|
||||
$user->getrights('expedition');
|
||||
if (!$user->rights->commande->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user