Plugins  LAST
 All Data Structures Files Functions Variables Pages
copro-parameter.inc.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of NOALYSS.
5  *
6  * NOALYSS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * NOALYSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with NOALYSS; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /* $Revision$ */
21 
22 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
23 
24 /**
25  * @file
26  * @brief table parametre pour les copropriétés
27  *
28  */
29 require_once 'class_copro_parameter.php';
30 global $cn,$g_copro_parameter;
31 
32 if ( isset ($_POST['save']))
33 {
34  $cn->start();
35  try {
36  /*$g_copro_parameter->save('categorie_lot',$_POST['categorie_lot']);
37  $g_copro_parameter->save('categorie_coprop',$_POST['categorie_coprop']);*/
38  $g_copro_parameter->save('journal_appel',$_POST['journal_appel']);
39  $g_copro_parameter->save('categorie_appel',$_POST['categorie_appel']);
40  $g_copro_parameter->save('categorie_charge',$_POST['categorie_charge']);
41  //$g_copro_parameter->save('categorie_immeuble',$_POST['categorie_immeuble']);
42  }
43  catch(Exception $e)
44  {
45  $cn->rollback();
46  echo $e->getTraceAsString();
47  }
48  $cn->commit();
49 }
51 /*
52  * Liste paramètres
53  */
54 $cat_lot=new ISelect('categorie_lot');
55 $cat_lot->value=$cn->make_array("select fd_id,fd_label from fiche_def order by fd_label");
56 $cat_lot->selected=$g_copro_parameter->categorie_lot;
57 $cat_lot->readOnly=true;
58 
59 $cat_coprop=new ISelect('categorie_coprop');
60 $cat_coprop->value=$cn->make_array("select fd_id,fd_label from fiche_def order by fd_label ");
61 $cat_coprop->selected=$g_copro_parameter->categorie_coprop;
62 $cat_coprop->readOnly=true;
63 
64 $journal_appel=new ISelect('journal_appel');
65 $journal_appel->value=$cn->make_array("select jrn_def_id,jrn_def_name from jrn_def where jrn_def_type='ODS' order by 2");
66 $journal_appel->selected=$g_copro_parameter->journal_appel;
67 
68 $categorie_appel=new ISelect('categorie_appel');
69 $categorie_appel->value=$cn->make_array("select fd_id,fd_label from fiche_def order by fd_label ");
70 $categorie_appel->selected=$g_copro_parameter->categorie_appel;
71 
72 $categorie_charge=new ISelect('categorie_charge');
73 $categorie_charge->value=$cn->make_array("select fd_id,fd_label from fiche_def order by fd_label ");
74 $categorie_charge->selected=$g_copro_parameter->categorie_charge;
75 
76 $categorie_immeuble=new ISelect('categorie_immeuble');
77 $categorie_immeuble->value=$cn->make_array("select fd_id,fd_label from fiche_def order by fd_label ");
78 $categorie_immeuble->selected=$g_copro_parameter->categorie_immeuble;
79 $categorie_immeuble->readOnly=true;
80 ?>
81 <form method="POST">
82 <table>
83  <tr>
84  <td>
85  Catégorie de fiches pour les immeubles
86  </td>
87  <td>
88  <?php echo $categorie_immeuble->input()?>
89  </td>
90  </tr>
91  <tr>
92  <td>
93  Catégorie de fiches pour les copropriétaires
94  </td>
95  <td>
96  <?php echo $cat_coprop->input();?>
97  </td>
98  </tr>
99  <tr>
100  <td>
101  Catégorie de fiches pour les lots
102  </td>
103  <td>
104  <?php echo $cat_lot->input()?>
105  </td>
106  </tr>
107  <tr>
108  <td>
109  Catégorie de fiches pour les appels de fond
110  </td>
111  <td>
112  <?php echo $categorie_appel->input();?>
113  </td>
114  </tr>
115  <tr>
116  <td>
117  Catégorie de fiches pour les charges
118  </td>
119  <td>
120  <?php echo $categorie_charge->input();?>
121  </td>
122  </tr>
123  <tr>
124  <td>
125  Journal Appel de fond
126  </td>
127  <td>
128  <?php echo $journal_appel->input();?>
129  </td>
130  </tr>
131 </table>
132  <?php echo HtmlInput::submit("save",_("Sauver"))?>
133 </form>
$categorie_appel
global $cn
$categorie_immeuble
$categorie_charge
global $g_copro_parameter
$categorie_appel table