1 |
<?PHP |
<?PHP |
2 |
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
5 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
26 |
|
|
27 |
llxHeader("","","Fiche Ligne"); |
llxHeader("","","Fiche Ligne"); |
28 |
|
|
|
|
|
|
|
|
29 |
if ($_GET["id"] or $_GET["numero"]) |
if ($_GET["id"] or $_GET["numero"]) |
30 |
{ |
{ |
31 |
if ($_GET["action"] <> 're-edit') |
|
32 |
|
$ligne = new LigneTel($db); |
33 |
|
if ($_GET["id"]) |
34 |
{ |
{ |
35 |
$ligne = new LigneTel($db); |
$result = $ligne->fetch_by_id($_GET["id"]); |
36 |
if ($_GET["id"]) |
} |
37 |
{ |
if ($_GET["numero"]) |
38 |
$result = $ligne->fetch_by_id($_GET["id"]); |
{ |
39 |
} |
$result = $ligne->fetch($_GET["numero"]); |
|
if ($_GET["numero"]) |
|
|
{ |
|
|
$result = $ligne->fetch($_GET["numero"]); |
|
|
} |
|
40 |
} |
} |
41 |
|
|
42 |
if ( $result ) |
if ($result == 1) |
43 |
|
{ |
44 |
|
$client_comm = new Societe($db); |
45 |
|
$client_comm->fetch($ligne->client_comm_id, $user); |
46 |
|
} |
47 |
|
|
48 |
|
if (!$client_comm->perm_read) |
49 |
|
{ |
50 |
|
print "Lecture non authorisée"; |
51 |
|
} |
52 |
|
|
53 |
|
|
54 |
|
if ($result == 1 && $client_comm->perm_read) |
55 |
{ |
{ |
56 |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit') |
57 |
{ |
{ |
136 |
} |
} |
137 |
else |
else |
138 |
{ |
{ |
139 |
print $sql; |
//print $sql; |
140 |
} |
} |
141 |
|
|
142 |
print '<tr><td colspan="2" align="center">'; |
print '<tr><td colspan="2" align="center">'; |