29 |
|
|
30 |
if ($_GET["id"]) |
if ($_GET["id"]) |
31 |
{ |
{ |
32 |
|
$client_comm = new Societe($db); |
33 |
$contrat = new TelephonieContrat($db); |
$contrat = new TelephonieContrat($db); |
34 |
|
|
35 |
$result = $contrat->fetch($_GET["id"]); |
$result = $contrat->fetch($_GET["id"]); |
36 |
|
$client_comm->fetch($contrat->client_comm_id, $user); |
37 |
|
|
38 |
if ( $result == 1 ) |
if (!$client_comm->perm_read) |
39 |
|
{ |
40 |
|
print "Lecture non authorisée"; |
41 |
|
} |
42 |
|
|
43 |
|
if ( $result && $client_comm->perm_read) |
44 |
{ |
{ |
45 |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
46 |
{ |
{ |