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