/[openfoncier]/trunk/obj/om_etat.class.php
ViewVC logotype

Diff of /trunk/obj/om_etat.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 312 by atreal, Wed Mar 28 17:19:49 2012 UTC revision 391 by nhaye, Wed Sep 19 15:22:23 2012 UTC
# Line 4  Line 4 
4  require_once ("../gen/obj/om_etat.class.php");  require_once ("../gen/obj/om_etat.class.php");
5    
6  class om_etat extends om_etat_gen {  class om_etat extends om_etat_gen {
7        
8      var $maj;      var $maj;
9      var $retourformulaire;      var $retourformulaire;
10        
11      function om_etat($id,&$db,$debug) {      function om_etat($id,&$db,$debug) {
12          $this->constructeur($id,$db,$debug);          $this->constructeur($id,$db,$debug);
13      }// fin constructeur      }// fin constructeur
14        
15      function verifier($val, &$db, $DEBUG) {      function verifier($val = array(), &$db = NULL, $DEBUG = false) {
16            // On appelle la methode de la classe parent
17          parent::verifier($val, $db, $DEBUG);          parent::verifier($val, $db, $DEBUG);
18          $f="&nbsp!    ";          // On verifie si il y a un autre id 'actif' pour la collectivite
19          $imgv="<img src='../app/img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";          if ($this->valF['actif'] == "Oui") {
20          if ($this->valF['id']==""){              if ($this->maj == 0) {
21              $this->msg= $this->msg.$imgv._('identifiant')."&nbsp;"._('obligatoire').$f;                  //
22              $this->correct=False;                  $this->verifieractif($db, $val, $DEBUG, ']');
23          }else              } else {
24              // verification si il y a un autre id "actif" pour la collectivite                  //
25              if($this->valF['actif']=="Oui")                  $this->verifieractif($db, $val, $DEBUG, $val['om_etat']);
26                  if($this->maj==0)              }
27                      $this->verifieractif($db, $val, $DEBUG,']');          }
                 else  
                     $this->verifieractif($db, $val, $DEBUG,$val['om_etat']);  
28      }      }
29    
30      /**      function setType(&$form, $maj) {
31       *          parent::setType($form,$maj);
32       */  
     function setType(&$form,$maj) {  
     parent :: setType($form,$maj);      
33          $form->setType('image', 'hidden');          $form->setType('image', 'hidden');
34    
35          if ($maj < 2) { //ajouter et modifier          if ($maj < 2) { //ajouter et modifier
36              $form->setType('actif', 'checkbox');              $form->setType('actif', 'checkbox');
37              $form->setType('orientation', 'select');              $form->setType('orientation', 'select');
# Line 54  class om_etat extends om_etat_gen { Line 52  class om_etat extends om_etat_gen {
52              $form->setType('sql', 'textarea');              $form->setType('sql', 'textarea');
53              $form->setType('om_sousetat', 'select');              $form->setType('om_sousetat', 'select');
54              $form->setType('sousetat', 'textareamulti');              $form->setType('sousetat', 'textareamulti');
55              if($this->retourformulaire=='om_collectivite'){  
56                if ($this->retourformulaire == 'om_collectivite') {
57                  $form->setType('logotop', 'localisation2');                  $form->setType('logotop', 'localisation2');
58                  $form->setType('titretop', 'localisation2');                  $form->setType('titretop', 'localisation2');
59                  $form->setType('corpstop', 'localisation2');                  $form->setType('corpstop', 'localisation2');
60                  $form->setType('se_couleurtexte', 'rvb2');                  $form->setType('se_couleurtexte', 'rvb2');
61                  $form->setType('logo', 'upload2');                  $form->setType('logo', 'upload2');
62              }else{              } else {
63                  $form->setType('logotop', 'localisation');                  $form->setType('logotop', 'localisation');
64                  $form->setType('titretop', 'localisation');                  $form->setType('titretop', 'localisation');
65                  $form->setType('corpstop', 'localisation');                  $form->setType('corpstop', 'localisation');
66                  $form->setType('se_couleurtexte', 'rvb');                  $form->setType('se_couleurtexte', 'rvb');
67                  $form->setType('logo', 'upload');                                  $form->setType('logo', 'upload');
68              }              }
69          }          }
70    
71            if ($maj == 2 or $maj == 3) {
72                $form->setType('orientation', 'selectstatic');
73                $form->setType('format', 'selectstatic');
74                $form->setType('titreattribut', 'selectstatic');
75                $form->setType('corpsattribut', 'selectstatic');
76                $form->setType('footerattribut', 'selectstatic');
77                $form->setType('titrefont', 'selectstatic');
78                $form->setType('corpsfont', 'selectstatic');
79                $form->setType('footerfont', 'selectstatic');
80                $form->setType('se_font', 'selectstatic');
81                $form->setType('titrealign', 'selectstatic');
82                $form->setType('corpsalign', 'selectstatic');
83                $form->setType('titrebordure', 'selectstatic');
84                $form->setType('corpsbordure', 'selectstatic');
85                $form->setType('om_sousetat', 'selectstatic');
86            }
87      }      }
88            
89      function setTaille(&$form, $maj) {      function setTaille(&$form, $maj) {
90      parent ::  setTaille($form, $maj);            parent::setTaille($form, $maj);
91    
92          $form->setTaille('sousetat', 50);          $form->setTaille('sousetat', 50);
93          $form->setTaille('corps', 120);          $form->setTaille('corps', 120);
94          $form->setTaille('om_sql', 120);          $form->setTaille('om_sql', 120);
# Line 80  class om_etat extends om_etat_gen { Line 97  class om_etat extends om_etat_gen {
97      }      }
98    
99      function setMax(&$form, $maj) {      function setMax(&$form, $maj) {
100      parent ::  setMax($form, $maj);            parent::setMax($form, $maj);
101    
102          $form->setMax('sousetat', 8);          $form->setMax('sousetat', 8);
103          $form->setMax('corps', 30);          $form->setMax('corps', 30);
104          $form->setMax('om_sql', 5);              $form->setMax('om_sql', 5);
105      }      }
106    
       
     /**  
      *  
      */  
107      function setSelect(&$form, $maj, $db, $debug) {      function setSelect(&$form, $maj, $db, $debug) {
108      parent :: setSelect($form, $maj, $db, $debug);              parent::setSelect($form, $maj, $db, $debug);
109          //  
110          $contenu=array();          $contenu = array();
111          $contenu[0]=array('P','L');          $contenu[0] = array('P', 'L');
112          $contenu[1]=array(_("portrait"),_("paysage"));          $contenu[1] = array(_('portrait'), _('paysage'));
113          $form->setSelect("orientation",$contenu);          $form->setSelect('orientation',  $contenu);
114          //  
115          $contenu=array();          $contenu = array();
116          $contenu[0]=array('A4','A3');          $contenu[0] = array('A4', 'A3');
117          $contenu[1]=array('A4','A3');          $contenu[1] = array('A4', 'A3');
118          $form->setSelect("format",$contenu);          $form->setSelect('format', $contenu);
119          //  
120          $contenu=array();          $contenu = array();
121          $contenu[0]=array('','I','B','U','BI','UI');          $contenu[0] = array('', 'I', 'B', 'U', 'BI', 'UI');
122          $contenu[1]=array(_("normal"),_("italique"),_("gras"),_("souligne"),_("italique")." "._("gras"),_("souligne")." "._("gras"));          $contenu[1] = array(_('normal'), _('italique'), _('gras'), _('souligne'), _('italique').' '._('gras'), _('souligne').' '._('gras'));
123          $form->setSelect("titreattribut",$contenu);          $form->setSelect('titreattribut', $contenu);
124          $form->setSelect("corpsattribut",$contenu);          $form->setSelect('corpsattribut', $contenu);
125          $form->setSelect("footerattribut",$contenu);          $form->setSelect('footerattribut', $contenu);
126          //  
127          $contenu=array();          $contenu = array();
128          $contenu[0]=array('helvetica','times','arial','courier');          $contenu[0] = array('helvetica', 'times', 'arial', 'courier');
129          $contenu[1]=array('helvetica','times','arial','courier');          $contenu[1] = array('helvetica', 'times', 'arial', 'courier');
130          $form->setSelect("titrefont",$contenu);          $form->setSelect('titrefont', $contenu);
131          $form->setSelect("corpsfont",$contenu);          $form->setSelect('corpsfont', $contenu);
132          $form->setSelect("footerfont",$contenu);          $form->setSelect('footerfont', $contenu);
133          $form->setSelect("se_font",$contenu);          $form->setSelect('se_font', $contenu);
134          //  
135          $contenu=array();          $contenu = array();
136          $contenu[0]=array('L','R','J','C');          $contenu[0] = array('L', 'R', 'J', 'C');
137          $contenu[1]=array(_("gauche"),_("droite"),_("justifie"),_("centre"));          $contenu[1] = array(_('gauche'), _('droite'), _('justifie'), _('centre'));
138          $form->setSelect("titrealign",$contenu);          $form->setSelect('titrealign', $contenu);
139          $form->setSelect("corpsalign",$contenu);          $form->setSelect('corpsalign', $contenu);
140          //  
141          $contenu=array();          $contenu = array();
142          $contenu[0]=array('0','1');          $contenu[0] = array('0', '1');
143          $contenu[1]=array(_("sans"),_("avec"));          $contenu[1] = array(_('sans'), _('avec'));
144          $form->setSelect("titrebordure",$contenu);          $form->setSelect('titrebordure', $contenu);
145          $form->setSelect("corpsbordure",$contenu);          $form->setSelect('corpsbordure', $contenu);
146    
147          // position geographique          // position geographique
148          $contenu=array();          $contenu = array();
149          $contenu[0]=array('image','logoleft');          $contenu[0] = array('image', 'logoleft');
150          $form->setSelect("logotop",$contenu);          $form->setSelect('logotop', $contenu);
151          $contenu=array();          $contenu = array();
152          $contenu[0]=array('image','titreleft');          $contenu[0] = array('image', 'titreleft');
153          $form->setSelect("titretop",$contenu);          $form->setSelect('titretop', $contenu);
154          $contenu=array();          $contenu = array();
155          $contenu[0]=array('image','corpsleft');          $contenu[0] = array('image', 'corpsleft');
156          $form->setSelect("corpstop",$contenu);          $form->setSelect('corpstop', $contenu);
157    
158          // parametre textareamulti          // parametre textareamulti
159          $contenu=array();          $contenu = array();
160          $contenu[0] ="om_sousetat";          $contenu[0]  = 'om_sousetat';
161          $form->setSelect("sousetat",$contenu);          $form->setSelect('sousetat', $contenu);
162            
163          // om_sousetat          // om_sousetat
164                  if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php"))          if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php"))
165                          include ("../sql/".$db->phptype."/".$this->table.".form.inc.php");              include ("../sql/".$db->phptype."/".$this->table.".form.inc.php");
166          $contenu=array();          $contenu=array();
167          $res = $db->query($sql_om_sousetat);          $res = $db->query($sql_om_sousetat);
168          if (database::isError($res))          if (database::isError($res))
# Line 166  class om_etat extends om_etat_gen { Line 181  class om_etat extends om_etat_gen {
181          $form->setSelect('om_sousetat',$contenu);          $form->setSelect('om_sousetat',$contenu);
182          }          }
183      }      }
184        
     /**  
      *  
      */  
185      function setRegroupe(&$form, $maj) {      function setRegroupe(&$form, $maj) {
           
186          $form->setRegroupe('om_collectivite','D',_('om_collectivite'), "collapsible");          $form->setRegroupe('om_collectivite','D',_('om_collectivite'), "collapsible");
187          $form->setRegroupe('id','G','');          $form->setRegroupe('id','G','');
188          $form->setRegroupe('libelle','G','');          $form->setRegroupe('libelle','G','');
189          $form->setRegroupe('actif','F','');          $form->setRegroupe('actif','F','');
190            
191          $form->setRegroupe('orientation', 'D', _("Parametres generaux du document"), "startClosed");          $form->setRegroupe('orientation', 'D', _("Parametres generaux du document"), "startClosed");
192          $form->setRegroupe('format','G','');          $form->setRegroupe('format','G','');
193          $form->setRegroupe('footerfont','G','');          $form->setRegroupe('footerfont','G','');
# Line 185  class om_etat extends om_etat_gen { Line 196  class om_etat extends om_etat_gen {
196          $form->setRegroupe('logo','G','');          $form->setRegroupe('logo','G','');
197          $form->setRegroupe('logoleft','G','');          $form->setRegroupe('logoleft','G','');
198          $form->setRegroupe('logotop','F','');          $form->setRegroupe('logotop','F','');
199            
200          $form->setRegroupe('titreleft','D',_("Parametres du titre du document"), "startClosed");          $form->setRegroupe('titreleft','D',_("Parametres du titre du document"), "startClosed");
201          $form->setRegroupe('titretop','G','');          $form->setRegroupe('titretop','G','');
202          $form->setRegroupe('titrelargeur','G','');          $form->setRegroupe('titrelargeur','G','');
# Line 195  class om_etat extends om_etat_gen { Line 206  class om_etat extends om_etat_gen {
206          $form->setRegroupe('titretaille','G','');          $form->setRegroupe('titretaille','G','');
207          $form->setRegroupe('titrebordure','G','');          $form->setRegroupe('titrebordure','G','');
208          $form->setRegroupe('titrealign','F','');          $form->setRegroupe('titrealign','F','');
209            
210          $form->setRegroupe('corpsleft','D',_("Parametres du corps du document"), "startClosed");          $form->setRegroupe('corpsleft','D',_("Parametres du corps du document"), "startClosed");
211          $form->setRegroupe('corpstop','G','');          $form->setRegroupe('corpstop','G','');
212          $form->setRegroupe('corpslargeur','G','');          $form->setRegroupe('corpslargeur','G','');
# Line 205  class om_etat extends om_etat_gen { Line 216  class om_etat extends om_etat_gen {
216          $form->setRegroupe('corpstaille','G','');          $form->setRegroupe('corpstaille','G','');
217          $form->setRegroupe('corpsbordure','G','');          $form->setRegroupe('corpsbordure','G','');
218          $form->setRegroupe('corpsalign','F','');          $form->setRegroupe('corpsalign','F','');
219            
220          $form->setRegroupe('om_sousetat','D', _("Sous etat(s) : selection"), "startClosed");          $form->setRegroupe('om_sousetat','D', _("Sous etat(s) : selection"), "startClosed");
221          $form->setRegroupe('sousetat','F', '');          $form->setRegroupe('sousetat','F', '');
222            
           
223          $form->setRegroupe('se_font','D', _("Sous etat(s) : police / marges / couleur"), "startClosed");          $form->setRegroupe('se_font','D', _("Sous etat(s) : police / marges / couleur"), "startClosed");
224          $form->setRegroupe('se_margeleft','G','');          $form->setRegroupe('se_margeleft','G','');
225          $form->setRegroupe('se_margetop','G','');          $form->setRegroupe('se_margetop','G','');
226          $form->setRegroupe('se_margeright','G','');          $form->setRegroupe('se_margeright','G','');
227          $form->setRegroupe('se_couleurtexte','F','');          $form->setRegroupe('se_couleurtexte','F','');
           
228      }      }
229            
     /**  
      *  
      */  
230      function setGroupe(&$form, $maj) {      function setGroupe(&$form, $maj) {
   
231          $form->setGroupe('om_collectivite','D');          $form->setGroupe('om_collectivite','D');
232          $form->setGroupe('id','G');          $form->setGroupe('id','G');
233          $form->setGroupe('libelle','G');          $form->setGroupe('libelle','G');
234          $form->setGroupe('actif','F');          $form->setGroupe('actif','F');
235            
236          $form->setGroupe('orientation','D');          $form->setGroupe('orientation','D');
237          $form->setGroupe('format','F');          $form->setGroupe('format','F');
238            
239          $form->setGroupe('footerfont','D');          $form->setGroupe('footerfont','D');
240          $form->setGroupe('footerattribut','G');          $form->setGroupe('footerattribut','G');
241          $form->setGroupe('footertaille','F');          $form->setGroupe('footertaille','F');
242            
243          $form->setGroupe('logo','D');          $form->setGroupe('logo','D');
244          $form->setGroupe('logoleft','G');          $form->setGroupe('logoleft','G');
245          $form->setGroupe('logotop','F');          $form->setGroupe('logotop','F');
246            
247          $form->setGroupe('titreleft','D');          $form->setGroupe('titreleft','D');
248          $form->setGroupe('titretop','G');          $form->setGroupe('titretop','G');
249          $form->setGroupe('titrelargeur','G');          $form->setGroupe('titrelargeur','G');
250          $form->setGroupe('titrehauteur','F');          $form->setGroupe('titrehauteur','F');
251            
252          $form->setGroupe('titrefont','D');          $form->setGroupe('titrefont','D');
253          $form->setGroupe('titreattribut','G');          $form->setGroupe('titreattribut','G');
254          $form->setGroupe('titretaille','G');          $form->setGroupe('titretaille','G');
255          $form->setGroupe('titrebordure','G');          $form->setGroupe('titrebordure','G');
256          $form->setGroupe('titrealign','F');          $form->setGroupe('titrealign','F');
257            
258          $form->setGroupe('corpsleft','D');          $form->setGroupe('corpsleft','D');
259          $form->setGroupe('corpstop','G');          $form->setGroupe('corpstop','G');
260          $form->setGroupe('corpslargeur','G');          $form->setGroupe('corpslargeur','G');
261          $form->setGroupe('corpshauteur','F');          $form->setGroupe('corpshauteur','F');
262            
263          $form->setGroupe('corpsfont','D');          $form->setGroupe('corpsfont','D');
264          $form->setGroupe('corpsattribut','G');          $form->setGroupe('corpsattribut','G');
265          $form->setGroupe('corpstaille','G');          $form->setGroupe('corpstaille','G');
266          $form->setGroupe('corpsbordure','G');          $form->setGroupe('corpsbordure','G');
267          $form->setGroupe('corpsalign','F');          $form->setGroupe('corpsalign','F');
268            
269          $form->setGroupe('om_sousetat','D');          $form->setGroupe('om_sousetat','D');
270          $form->setGroupe('sousetat','F');          $form->setGroupe('sousetat','F');
271            
272          $form->setGroupe('se_font','D');          $form->setGroupe('se_font','D');
273          $form->setGroupe('se_margeleft','G');          $form->setGroupe('se_margeleft','G');
274          $form->setGroupe('se_margetop','G');          $form->setGroupe('se_margetop','G');
275          $form->setGroupe('se_margeright','G');          $form->setGroupe('se_margeright','G');
276          $form->setGroupe('se_couleurtexte','F');          $form->setGroupe('se_couleurtexte','F');
           
277      }      }
278            
     /**  
      *  
      */  
279      function setLib(&$form, $maj) {      function setLib(&$form, $maj) {
           
280          $form->setLib('footerattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));          $form->setLib('footerattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));
281          $form->setLib('titreleft',_('left'));          $form->setLib('titreleft',_('left'));
282          $form->setLib('titretop',_('top'));          $form->setLib('titretop',_('top'));
# Line 287  class om_etat extends om_etat_gen { Line 287  class om_etat extends om_etat_gen {
287          $form->setLib('titretaille',_('taille'));          $form->setLib('titretaille',_('taille'));
288          $form->setLib('titrebordure',_('bordure'));          $form->setLib('titrebordure',_('bordure'));
289          $form->setLib('titrealign','');          $form->setLib('titrealign','');
           
290          $form->setLib('titre',_('titre'));          $form->setLib('titre',_('titre'));
           
291          $form->setLib('corps',_('corps'));          $form->setLib('corps',_('corps'));
292          $form->setLib('corpsleft',_('left'));          $form->setLib('corpsleft',_('left'));
293          $form->setLib('corpstop',_('top'));          $form->setLib('corpstop',_('top'));
           
294          $form->setLib('corpslargeur',_('largeur'));          $form->setLib('corpslargeur',_('largeur'));
295          $form->setLib('corpshauteur',_('hauteur'));          $form->setLib('corpshauteur',_('hauteur'));
296          $form->setLib('corpsfont',_('font'));          $form->setLib('corpsfont',_('font'));
# Line 301  class om_etat extends om_etat_gen { Line 298  class om_etat extends om_etat_gen {
298          $form->setLib('corpstaille',_('taille'));          $form->setLib('corpstaille',_('taille'));
299          $form->setLib('corpsbordure',_('bordure'));          $form->setLib('corpsbordure',_('bordure'));
300          $form->setLib('corpsalign','');          $form->setLib('corpsalign','');
           
301          $form->setLib('om_sousetat',_('sous_etat'));          $form->setLib('om_sousetat',_('sous_etat'));
302          $form->setLib('sousetat','');          $form->setLib('sousetat','');
303          $form->setLib('se_font',_('font'));          $form->setLib('se_font',_('font'));
# Line 309  class om_etat extends om_etat_gen { Line 305  class om_etat extends om_etat_gen {
305          $form->setLib('se_margetop',_('marges')."&nbsp;"._('haute'));          $form->setLib('se_margetop',_('marges')."&nbsp;"._('haute'));
306          $form->setLib('se_margeright',_('marges')."&nbsp;"._('droite'));          $form->setLib('se_margeright',_('marges')."&nbsp;"._('droite'));
307          $form->setLib('se_couleurtexte',_('couleur'));          $form->setLib('se_couleurtexte',_('couleur'));
           
308      }      }
309        
     /**  
      *  
      */  
310      function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {      function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
311          parent::setVal($form, $maj, $validation, $db, $DEBUG=null);          parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
312          $this->maj=$maj;          $this->maj = $maj;
313          if ($validation == 0) {          if ($validation == 0) {
314              if ($maj == 0) {              if ($maj == 0) {
315                  // ======================= a rajouter au generateur ===========                  // ======================= a rajouter au generateur ===========
# Line 360  class om_etat extends om_etat_gen { Line 352  class om_etat extends om_etat_gen {
352                  $form->setVal('se_margeright',5);                  $form->setVal('se_margeright',5);
353                  $form->setVal('se_couleurtexte','0-0-0');                  $form->setVal('se_couleurtexte','0-0-0');
354              }              }
   
           
           
355          }          }
           
356      }      }
357    
358      function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {      function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {
359          $this->maj=$maj;          $this->maj = $maj;
360          $this->retourformulaire=$retourformulaire;          $this->retourformulaire = $retourformulaire;
361          if ($validation==0) {          if($validation == 0) {
362            if ($maj == 0){              if ($maj == 0) {
363              $form->setVal($retourformulaire, $idxformulaire);                  $form->setVal($retourformulaire, $idxformulaire);
364              $form->setVal('orientation','P');                  $form->setVal('orientation','P');
365              $form->setVal('format','A4');                  $form->setVal('format','A4');
366              $form->setVal('footerfont','helvetica');                  $form->setVal('footerfont','helvetica');
367              $form->setVal('footerattribut','I');                  $form->setVal('footerattribut','I');
368              $form->setVal('footertaille',8);                  $form->setVal('footertaille',8);
369              $form->setVal('logo','logopdf.png');                  $form->setVal('logo','logopdf.png');
370              $form->setVal('logoleft', 10);                  $form->setVal('logoleft', 10);
371              $form->setVal('logotop', 10);                  $form->setVal('logotop', 10);
372              $form->setVal('titre',_("Texte du titre"));                  $form->setVal('titre',_("Texte du titre"));
373              $form->setVal('titreleft',109);                  $form->setVal('titreleft',109);
374              $form->setVal('titretop',16);                  $form->setVal('titretop',16);
375              $form->setVal('titrelargeur',0);                  $form->setVal('titrelargeur',0);
376              $form->setVal('titrehauteur',10);                  $form->setVal('titrehauteur',10);
377              $form->setVal('titrefont','arial');                  $form->setVal('titrefont','arial');
378              $form->setVal('titreattribut','B');                  $form->setVal('titreattribut','B');
379              $form->setVal('titretaille',20);                  $form->setVal('titretaille',20);
380              $form->setVal('titrebordure',0);                  $form->setVal('titrebordure',0);
381              $form->setVal('titrealign','L');                  $form->setVal('titrealign','L');
382              $form->setVal('corps',_("Texte du corps"));                  $form->setVal('corps',_("Texte du corps"));
383              $form->setVal('corpsleft',14);                  $form->setVal('corpsleft',14);
384              $form->setVal('corpstop',66);                  $form->setVal('corpstop',66);
385              $form->setVal('corpslargeur',110);                  $form->setVal('corpslargeur',110);
386              $form->setVal('corpshauteur',5);                  $form->setVal('corpshauteur',5);
387              $form->setVal('corpsfont','times');                  $form->setVal('corpsfont','times');
388              $form->setVal('corpsattribut','');                  $form->setVal('corpsattribut','');
389              $form->setVal('corpstaille',10);                  $form->setVal('corpstaille',10);
390              $form->setVal('corpsbordure',0);                  $form->setVal('corpsbordure',0);
391              $form->setVal('corpsalign','J');                  $form->setVal('corpsalign','J');
392              $form->setVal('om_sql',' select ... from  ... where ... = &idx');                  $form->setVal('om_sql',' select ... from  ... where ... = &idx');
393              $form->setVal('sousetat','');                  $form->setVal('sousetat','');
394              $form->setVal('se_font','helvetica');                  $form->setVal('se_font','helvetica');
395              $form->setVal('se_margeleft',8);                  $form->setVal('se_margeleft',8);
396              $form->setVal('se_margetop',5);                  $form->setVal('se_margetop',5);
397              $form->setVal('se_margeright',5);                  $form->setVal('se_margeright',5);
398              $form->setVal('se_couleurtexte','0-0-0');                  $form->setVal('se_couleurtexte','0-0-0');
399          }}                    }
400      }              }
401        }
402    
403      /**      /**
404       * verification sur existence d un etat deja actif pour la collectivite       * verification sur existence d un etat deja actif pour la collectivite
# Line 416  class om_etat extends om_etat_gen { Line 406  class om_etat extends om_etat_gen {
406      function verifieractif(&$db, $val, $DEBUG,$id){      function verifieractif(&$db, $val, $DEBUG,$id){
407          $sql = "select om_etat from ".DB_PREFIXE."om_etat where id ='".$val['id']."'";          $sql = "select om_etat from ".DB_PREFIXE."om_etat where id ='".$val['id']."'";
408          $sql.= " and om_collectivite ='".$val['om_collectivite']."'";          $sql.= " and om_collectivite ='".$val['om_collectivite']."'";
409          $sql.= " and actif ='Oui'";          $sql.= " and actif IS TRUE";
410          if($id!=']')          if($id!=']')
411              $sql.=" and om_etat !='".$id."'";              $sql.=" and om_etat !='".$id."'";
412          $res = $db->query($sql);          $res = $db->query($sql);
# Line 435  class om_etat extends om_etat_gen { Line 425  class om_etat extends om_etat_gen {
425      }      }
426    
427  }// fin classe  }// fin classe
 ?>  
428    ?>

Legend:
Removed from v.312  
changed lines
  Added in v.391

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26