30 |
|
|
31 |
$mesg = ''; |
$mesg = ''; |
32 |
|
|
33 |
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) |
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel") && $user->rights->telephonie->ligne->creer) |
34 |
{ |
{ |
35 |
$ligne = new LigneTel($db); |
$ligne = new LigneTel($db); |
36 |
$ligne->id = $_GET["id"]; |
$ligne->id = $_GET["id"]; |
79 |
} |
} |
80 |
} |
} |
81 |
|
|
82 |
if ( $result == 1) |
if ($result == 1) |
83 |
|
{ |
84 |
|
$client_comm = new Societe($db); |
85 |
|
$client_comm->fetch($ligne->client_comm_id, $user); |
86 |
|
} |
87 |
|
|
88 |
|
if (!$client_comm->perm_read) |
89 |
|
{ |
90 |
|
print "Lecture non authorisée"; |
91 |
|
} |
92 |
|
|
93 |
|
|
94 |
|
if ($result == 1 && $client_comm->perm_read) |
95 |
{ |
{ |
96 |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
97 |
{ |
{ |