1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
include('../gen/sql/pgsql/om_etat.inc.php'); |
4 |
|
|
|
5 |
nhaye |
391 |
// |
6 |
|
|
$champAffiche = array( |
7 |
|
|
'om_etat.om_etat as "'._("om_etat").'"', |
8 |
|
|
'om_etat.id as "'._("id").'"', |
9 |
|
|
'om_etat.libelle as "'._("libelle").'"', |
10 |
|
|
"case om_etat.actif when 't' then 'Oui' else 'Non' end as \""._("actif")."\"", |
11 |
|
|
'om_collectivite.niveau as "'._("niveau").'"', |
12 |
fraynaud |
3 |
); |
13 |
nhaye |
391 |
// |
14 |
|
|
if ($_SESSION['niveau'] == '2') { |
15 |
|
|
array_push($champAffiche, "om_collectivite.libelle as \""._("collectivite")."\""); |
16 |
|
|
} |
17 |
|
|
// |
18 |
|
|
$champRecherche = array( |
19 |
|
|
'om_etat.om_etat as "'._("om_etat").'"', |
20 |
|
|
'om_etat.id as "'._("id").'"', |
21 |
|
|
'om_etat.libelle as "'._("libelle").'"', |
22 |
|
|
'om_collectivite.niveau as "'._("niveau").'"', |
23 |
|
|
); |
24 |
|
|
// |
25 |
|
|
if ($_SESSION['niveau'] == '2') { |
26 |
|
|
array_push($champRecherche, "om_collectivite.libelle as \""._("collectivite")."\""); |
27 |
|
|
} |
28 |
|
|
// |
29 |
|
|
if (isset($f) && $f->isAccredited(array($obj, $obj."_copier"), "OR")) { |
30 |
|
|
// |
31 |
|
|
$href_copie = array( |
32 |
|
|
"lien" => "../scr/valid_copie.php?obj=".$obj."&idx=", |
33 |
|
|
"id" => "", |
34 |
|
|
"lib" => "<span class=\"om-icon om-icon-16 om-icon-fix copy-16\" title=\""._("Copier")."\">"._("Copier")."</span>", |
35 |
|
|
); |
36 |
|
|
// |
37 |
|
|
$href[3] = $href_copie; |
38 |
|
|
} else { |
39 |
|
|
// |
40 |
|
|
$href_copie = array("lien" => "", "id" => "", "lib" => ""); |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
/** |
44 |
|
|
* Options |
45 |
|
|
*/ |
46 |
|
|
if ($_SESSION['niveau'] == '2') { |
47 |
|
|
$selection = ""; |
48 |
|
|
} else { |
49 |
|
|
$selection = " where (".$obj.".om_collectivite='".$_SESSION['collectivite']."' or niveau='2')"; |
50 |
fraynaud |
3 |
$options = array(); |
51 |
|
|
$option = array( |
52 |
|
|
"type" => "condition", |
53 |
nhaye |
391 |
"field" => "om_collectivite.niveau", |
54 |
fraynaud |
3 |
"case" => array( |
55 |
|
|
"0" => array( |
56 |
|
|
"values" => array('2', ), |
57 |
|
|
"style" => "tab_desactive", |
58 |
|
|
"href" => array( |
59 |
|
|
0 => array("lien" => "", "id" => "", "lib" => ""), |
60 |
|
|
1 => array("lien" => "", "id" => "", "lib" => ""), |
61 |
|
|
2 => array("lien" => "", "id" => "", "lib" => ""), |
62 |
nhaye |
391 |
3 => $href_copie, |
63 |
fraynaud |
3 |
), |
64 |
|
|
), |
65 |
|
|
), |
66 |
|
|
); |
67 |
|
|
array_push($options, $option); |
68 |
|
|
} |
69 |
nhaye |
391 |
|
70 |
|
|
?> |