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