69 function Form($ClassLabel =
"label3", $ClassTitre =
"titre3", $ClassCell =
"tab1")
71 $this->cell_class = $ClassCell;
72 $this->label_class = $ClassLabel;
73 $this->titre_class = $ClassTitre;
79 $src =
"<INPUT TYPE=\"hidden\" NAME=\"$name\" VALUE=\"$value\">\n";
82 function Img($src, $alt =
"", $border = 0, $vspace = 0, $hspace = 0)
85 if ($alt !=
"") $walt =
"ALT=\"$alt\"";
86 $src =
"<IMG SRC=\"$src\" BORDER=\"$border\" $walt VSPACE=$vspace HSPACE=$hspace>\n";
89 function Table($border = 0, $width =
"100%", $align =
"", $space = 0, $padd = 0)
92 if ($align !=
"") $walign =
"ALIGN=\"$align\"";
93 $src =
"<TABLE BORDER=\"$border\" WIDTH=\"$width\" $walign CELLSPACING=\"$space\" CELLPADDING=\"$padd\">\n";
97 function Hr($width =
"100%", $align =
"")
100 if ($align !=
"") $walign =
"ALIGN=\"$align\"";
101 $src =
"<HR WIDTH=\"$width\" $walign>\n";
108 return "</TR>\n<TR>\n";
110 return "</TR>\n<TR CLASS=\"$class\" >\n";
117 $src =
"\t<TD CLASS=\"{$this->label_class}\" ALIGN=\"$align\" COLSPAN=$span>$libelle\n";
119 $src.=
"\t<DIV CLASS=\"{$this->titre_class}\" > $value</DIV></TD>\n";
121 $src.=
"\t<DIV CLASS=\"$class\" > $value</DIV></TD>\n";
125 function LibCells($libelle,
$value, $classval =
"", $classlib =
"", $align =
"LEFT")
129 $src =
"\t<TD CLASS=\"$classlib\" ALIGN=\"$align\">$libelle</TD>\n";
130 $src.=
"\t<TD CLASS=\"$classval\" ALIGN=\"$align\">$value</TD>\n";
139 $src =
"\t<TD CLASS=\"{$this->cell_class}\" ALIGN=\"$align\" COLSPAN=$span> $value</TD>\n";
141 $src =
"\t<TD CLASS=\"$class\" ALIGN=\"$align\" COLSPAN=$span> $value</TD>\n";
150 $wwidth =
" width=\"$width\"";
153 $src =
"\t<TD NOWRAP $wwidth CLASS=\"{$this->titre_class}\" COLSPAN=$span>$value</TD>\n";
155 $src =
"\t<TD NOWRAP CLASS=\"$class\" COLSPAN=$span>$value</TD>\n";
167 $src =
"\t<TD CLASS=\"{$this->label_class}\" COLSPAN=$span>$libelle\n";
168 $src.=
"<DIV CLASS=\"finput\"><FONT SIZE=\"-1\">" .
"<TEXTAREA WRAP=\"virtual\" ROWS=$rows COLS=$cols NAME=\"p_$name\">";
172 $src.=
"</TEXTAREA></FONT></TD>\n";
183 $src =
"\t<TD CLASS=\"{$this->label_class}\" COLSPAN=$span>$libelle\n";
184 $src.=
"<DIV CLASS=\"finput\"><FONT SIZE=\"-1\">" .
"<INPUT MAXLENGTH=$max SIZE=$size NAME=\"p_$name\"";
188 $src.=
" VALUE=\"$value\">\n";
190 $src.=
"</FONT></TD>\n";
200 $src =
"\t<TD CLASS=\"{$this->label_class}\" COLSPAN=$span>$libelle\n";
201 $src.=
"<FONT SIZE=\"-1\">" .
"<INPUT MAXLENGTH=$max SIZE=$size NAME=\"p_$name\"";
205 $src.=
" VALUE=\"$value\">\n";
207 $src.=
"</FONT></TD>\n";
217 $src =
"\t<TD CLASS=\"{$this->label_class}\" COLSPAN=$span>$libelle\n";
218 $src.=
"<FONT SIZE=\"-1\">" .
"<INPUT MAXLENGTH=$max SIZE=$size NAME=\"p_$name\"";
222 $src.=
" VALUE=\"$value\">\n";
224 $src.=
"</FONT></TD>\n";
228 function Input($CREATION, $libelle, $max,
$size, $name, $entite, $span = 1)
235 $src =
"<DIV CLASS=\"finput\"><FONT SIZE=\"-1\">" .
"<INPUT MAXLENGTH=$max SIZE=$size NAME=\"p_$name\"";
239 $src.=
" VALUE=\"$value\">\n";
246 $src =
"<FONT SIZE=\"-1\">" .
"<INPUT MAXLENGTH=$max SIZE=$size NAME=\"p_$name\"";
247 $src.=
" VALUE=\"$value\">\n";
252 function Select($libelle, $name, $name_id, $name_lib, $entite, $liste, $vide =
"vide")
255 if (isset($entite->$name) && ($entite->$name ==
"")) unset($entite->$name);
256 $src =
"\t<TD CLASS=\"{$this->label_class}\">$libelle\n";
257 $src.=
"<DIV CLASS=\"{$this->titre_class}\">\n";
258 $src.=
"<SELECT NAME=\"p_$name\" SIZE=1>\n";
259 if ($vide ==
"vide") {
260 if (!isset($entite->$name)) {
261 $src.=
"<OPTION SELECTED VALUE=\"\">-- vide --\n";
263 $src.=
"<OPTION VALUE=\"\">-- vide --\n";
266 if (
sizeof($liste) > 0) {
267 foreach ($liste as $k => $v) {
268 if ((isset($entite->$name)) && ($entite->$name == $v->$name_id)) {
269 $src.=
"<OPTION SELECTED VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib .
"\n";
271 if (($vide !=
"vide") && (!isset($entite->$name)) && ($vide == $v->$name_lib)) {
272 $src.=
"<OPTION SELECTED VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib .
"\n";
274 $src.=
"<OPTION VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib .
"\n";
279 $src.=
"</SELECT></DIV></TD> \n";
283 function SelectConcat($libelle, $name, $name_id, $name_lib1, $name_lib2, $entite, $liste, $vide =
"vide")
286 if (isset($entite->$name) && ($entite->$name ==
"")) unset($entite->$name);
287 $src =
"\t<TD CLASS=\"{$this->label_class}\">$libelle\n";
288 $src.=
"<DIV CLASS=\"{$this->titre_class}\">\n";
289 $src.=
"<SELECT NAME=\"p_$name\" SIZE=1>\n";
290 if (($vide ==
"vide") && (!isset($entite->$name))) {
291 $src.=
"<OPTION SELECTED VALUE=\"\">-- vide --\n";
293 if (
sizeof($liste) > 0) {
294 foreach ($liste as $k => $v) {
295 if ((isset($entite->$name)) && ($entite->$name == $v->$name_id)) {
296 $src.=
"<OPTION SELECTED VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib1 .
" " . $v->$name_lib2 .
"\n";
298 if (($vide !=
"vide") && (!isset($entite->$name)) && ($vide == $v->$name_lib1)) {
299 $src.=
"<OPTION SELECTED VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib1 .
" " . $v->$name_lib2 .
"\n";
301 $src.=
"<OPTION VALUE=\"" . $v->$name_id .
"\">" . $v->$name_lib1 .
" " . $v->$name_lib2 .
"\n";
306 $src.=
"</SELECT></DIV></TD> \n";
314 $src =
"\t<TD CLASS=\"{$this->label_class}\">$libelle\n";
315 $src.=
"<DIV CLASS=\"{$this->titre_class}\">\n";
316 $src.=
"<SELECT NAME=\"p_$name\" SIZE=1>\n";
317 if ($vide ==
"OUI") {
318 if (!isset($entite->$name)) {
319 $src.=
"<OPTION SELECTED VALUE=\"\">-- vide --\n";
321 if ((isset($entite->$name)) && ($entite->$name ==
'')) {
322 $src.=
"<OPTION SELECTED VALUE=\"\">-- vide --\n";
325 if (
sizeof($liste) > 0) {
326 foreach ($liste as $k => $v) {
327 if ((isset($entite->$name)) && ($entite->$name == $v)) {
328 $src.=
"<OPTION SELECTED VALUE='$v'>$v\n";
330 $src.=
"<OPTION VALUE='$v'>$v\n";
334 $src.=
"</SELECT></DIV></TD> \n";