37 |
|
|
38 |
if ($_GET["id"]) |
if ($_GET["id"]) |
39 |
{ |
{ |
40 |
$soc = new Societe($db); |
$soc = new TelephonieClient($db); |
41 |
$result = $soc->fetch($_GET["id"], $user); |
$result = $soc->fetch($_GET["id"], $user); |
42 |
|
|
43 |
if (!$soc->perm_read) |
if (!$soc->perm_read) |
47 |
|
|
48 |
if ( $result == 1 && $soc->perm_read) |
if ( $result == 1 && $soc->perm_read) |
49 |
{ |
{ |
50 |
|
$soc->log_consult($user,'r'); |
51 |
|
|
52 |
|
|
53 |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
54 |
{ |
{ |
55 |
/* Commentaires */ |
/* Commentaires */ |
57 |
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_commentaire as c"; |
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_commentaire as c"; |
58 |
$sql .= " WHERE fk_soc = ".$soc->id; |
$sql .= " WHERE fk_soc = ".$soc->id; |
59 |
$sql .= " ORDER BY c.datec DESC"; |
$sql .= " ORDER BY c.datec DESC"; |
|
|
|
60 |
$resql = $db->query($sql); |
$resql = $db->query($sql); |
61 |
|
|
62 |
if ($resql) |
if ($resql) |