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

Annotation of /trunk/sql/pgsql/om_sousetat.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 393 - (hide annotations)
Wed Sep 19 16:23:00 2012 UTC (12 years, 4 months ago) by nhaye
File size: 2155 byte(s)
Application de la maj 4.3.0 d'OM sur om_sousetat,
régénération, mise à jour des surcharges.

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26