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