/[openfoncier]/trunk/sql/pgsql/om_etat.inc.php
ViewVC logotype

Contents of /trunk/sql/pgsql/om_etat.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 391 - (show annotations)
Wed Sep 19 15:22:23 2012 UTC (12 years, 4 months ago) by nhaye
File size: 2069 byte(s)
Régénération avec le core 4.3.0,
modificaation des surcharges pour que le code soit similaire à celui du framework

1 <?php
2 //$Id$
3 include('../gen/sql/pgsql/om_etat.inc.php');
4
5 //
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 );
13 //
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."&amp;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 $options = array();
51 $option = array(
52 "type" => "condition",
53 "field" => "om_collectivite.niveau",
54 "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 3 => $href_copie,
63 ),
64 ),
65 ),
66 );
67 array_push($options, $option);
68 }
69
70 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26