00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 require_once("class_fiche_def.php");
00026
00027 if ( isset ($_POST['confirm_mod'])) {
00028 extract ($_POST);
00029 $update=new fiche_def_ref($cn);
00030 $update->frd_id=FormatString($frd_id);
00031 $update->frd_text=FormatString($frd_text);
00032 $update->frd_class_base=FormatString($frd_class_base);
00033 $update->Save();
00034 }
00035
00036 $fiche_def=new fiche_def_ref($cn);
00037 $all=$fiche_def->LoadAll();
00038
00039 echo '<table align="left">';
00040 for ($i=0;$i<sizeof($all);$i++)
00041 {
00042 echo '<TR>';
00043 echo $all[$i]->Display();
00044 echo "<TD>";
00045 echo '<form method="post">';
00046 $w=new widget('hidden');
00047 echo $w->IOValue('idx',$i);
00048 echo $w->Submit('mod','modifie');
00049 echo $w->IOValue('fiche','p_action');
00050 echo "</form>";
00051 echo "</TD>";
00052 echo '</TR>';
00053 }
00054 echo "</table>";
00055
00056 if ( isset ($_POST['mod']) )
00057 {
00058 extract ($_POST);
00059 echo '<div style="position:float;padding:2%">';
00060 echo "Voulez-vous modifier ?<br><font color=\"red\"> Attention, ne changer pas la signification de ";
00061 echo " ce poste, <i>par exemple ne pas changer Client par fournisseur</i>, <br>sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour la classe de base ou rien</font>";
00062 $idx=$_POST['idx'];
00063 $mod=new fiche_def_ref($cn);
00064 $mod->frd_id=$all[$idx]->frd_id;
00065 $mod->frd_text=$all[$idx]->frd_text;
00066 $mod->frd_class_base=$all[$idx]->frd_class_base;
00067 echo '<form method="post">';
00068 echo '<ul style="list-style-type:none"';
00069 echo $mod->Input();
00070 echo "</ul>";
00071 $w=new widget("hidden");
00072 echo $w->IOValue('p_action','fiche');
00073 echo $w->Submit('confirm_mod' ,'Confirme');
00074 echo $w->Submit('no','Cancel');
00075 echo '</form>';
00076 echo '</div>';
00077 }