Ajout lecture des permissions

This commit is contained in:
Rodolphe Quiedeville 2005-01-17 15:14:21 +00:00
parent 7ecfcd1efd
commit 6d1818c6f0

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -28,7 +28,8 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require("../contact.class.php");
$user->getrights();
$langs->load("companies"); $langs->load("companies");
$langs->load("customers"); $langs->load("customers");
@ -57,7 +58,7 @@ if($_GET["socid"] && $_GET["select"])
} }
else else
{ {
Header("Location: lien.php?socid=".$soc->id); Header("Location: lien.php?socid=".$_GET["socid"]);
} }
} }
@ -125,7 +126,7 @@ if($_GET["socid"])
$socm = new Societe($db); $socm = new Societe($db);
$socm->fetch($soc->parent); $socm->fetch($soc->parent);
print '<tr><td>Maison mère</td><td colspan="3">'.$socm->nom_url.'</td></tr>'; print '<tr><td>Maison mère</td><td colspan="3">'.$socm->nom_url.' ('.$socm->code_client.')<br />'.$socm->ville.'</td></tr>';
} }
print '</table>'; print '</table>';
@ -140,6 +141,9 @@ if($_GET["socid"])
} }
else else
{ {
if ($user->rights->societe->creer)
{
$page=$_GET["page"]; $page=$_GET["page"];
if ($page == -1) { $page = 0 ; } if ($page == -1) { $page = 0 ; }
@ -245,7 +249,7 @@ if($_GET["socid"])
dolibarr_print_error($db); dolibarr_print_error($db);
} }
} }
}
} }