noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
fiche_def.inc.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00020 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00021 require_once("class_ihidden.php");
00022 require_once("class_fiche_def.php");
00023 
00024 /*! \file
00025  * \brief Let customise the fiche_def_ref for the user
00026  */
00027 echo '<div class="content">';
00028 // record change
00029 if ( isset ($_POST['confirm_mod']))
00030 {
00031     extract ($_POST);
00032     $update=new Fiche_Def_Ref($cn);
00033     $update->frd_id=sql_string($frd_id);
00034     $update->frd_text=sql_string($frd_text);
00035     $update->frd_class_base=sql_string($frd_class_base);
00036     $update->Save();
00037 }
00038 // Load All Fiche_def
00039 $fiche_def=new Fiche_Def_Ref($cn);
00040 $all=$fiche_def->LoadAll();
00041 
00042 // Display Them
00043 echo '<table align="left">';
00044 for ($i=0;$i<sizeof($all);$i++)
00045 {
00046     echo '<TR>';
00047     echo $all[$i]->Display();
00048     echo "<TD>";
00049     echo '<form method="post">';
00050     $w=new IHidden();
00051     echo $w->input('idx',$all[$i]->frd_id);
00052     echo HtmlInput::submit('mod','modifie');
00053     echo $w->input($_REQUEST['ac'],'ac');
00054     //echo $w->input($sa,'sa');
00055     echo "</form>";
00056     echo "</TD>";
00057     echo '</TR>';
00058 }
00059 echo "</table>";
00060 // modify input
00061 if ( isset ($_POST['mod']) )
00062 {
00063     extract ($_POST);
00064     echo '<div style="float:left;padding:2%">';
00065     echo _("Voulez-vous modifier ?");
00066     echo "<br><font color=\"red\"> ";
00067     echo _("Attention, ne changer pas la signification de ce poste.");
00068     echo hi(_("par exemple ne pas changer Client par fournisseur"))."<br>";
00069     echo _("sinon le programme fonctionnera mal, ".
00070            "utiliser uniquement des chiffres pour la classe de base ou rien")."</font>";
00071 
00072     $mod=new Fiche_Def_Ref($cn);
00073     $mod->frd_id=$idx;
00074     $mod->Get();
00075     echo '<form method="post">';
00076     echo '<ul style="list-style-type:none"';
00077     echo $mod->Input();
00078     echo "</ul>";
00079     $w=new IHidden();
00080     echo $w->input('ac',$_REQUEST['ac']);
00081 //    echo $w->input('sa',$sa);
00082     echo HtmlInput::submit('confirm_mod' ,'Confirme');
00083     echo HtmlInput::submit('no','Cancel');
00084     echo '</form>';
00085     echo '</div>';
00086 }
00087 echo '</div>';
 All Data Structures Namespaces Files Functions Variables Enumerations