diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 4a071ee5a99..0864ceb1379 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2007 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -298,9 +298,7 @@ elseif ($_GET["action"] == 'edit' && $_GET["id"] > 0) print ''; print ''; print "\n"; - print ''; - print ''; } elseif ($_GET["id"] > 0) @@ -308,11 +306,9 @@ elseif ($_GET["id"] > 0) /* * Affichage en mode visu */ - llxHeader(); - if ($mesg) print $mesg."
"; - dolibarr_fiche_head($head, $a, $langs->trans("InterventionCard")); + $fichinter = new Fichinter($db); $result=$fichinter->fetch($_GET["id"]); @@ -321,6 +317,13 @@ elseif ($_GET["id"] > 0) dolibarr_print_error($db); exit; } + + if ($user->societe_id > 0 && $fichinter->socid <> $user->societe_id) + accessforbidden(); + + llxHeader(); + dolibarr_fiche_head($head, $a, $langs->trans("InterventionCard")); + $fichinter->fetch_client(); print '';