Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

poste.inc.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PhpCompta.
00004  *
00005  *   PhpCompta 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  *   PhpCompta 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 PhpCompta; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 /* $Revision: 1.4 $ */
00020 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00025 require_once("class_parm_code.php");
00026 
00027 //-----------------------------------------------------
00028 // confirm mod
00029 if ( isset( $_POST['confirm_mod'] ) )
00030 {
00031   extract($_POST);
00032   $update=new parm_code($cn,$p_code);
00033   $update->p_comment=$p_comment;
00034   $update->p_value=$p_value;
00035   $update->Save();
00036 }
00037 $object=new parm_code($cn);
00038 
00039 $all=$object->LoadAll();
00040 echo '<div style="position:float;align:right; ">';
00041 echo '<table align="left">';
00042 for ($i=0;$i<sizeof($all);$i++)  {
00043   echo '<TR>';
00044   echo $all[$i]->Display();
00045   echo '<TD><FORM method="POST">';
00046   $w=new widget('hidden');
00047   $w->name='id';
00048   $w->value=$i;
00049   echo $w->IOValue();
00050   echo $w->Submit('mod','modifie');
00051   echo '</FORM>';
00052   echo '</TD>';
00053   echo "</TR>";
00054 }
00055 echo "</table>";
00056 echo "</div>";
00057 //-----------------------------------------------------
00058 // modifie
00059 if ( isset ($_POST['mod'] ))
00060 {
00061   echo '<div style="position:float;align:right;">';
00062   echo "Voulez-vous vraiment modifier ?";
00063   echo '<FORM METHOD="POST">';
00064 
00065   echo "<TABLE>";
00066   $id=$_POST['id'];
00067   echo $all[$id]->Input();
00068   echo "</TABLE>";
00069   $h=new widget('hidden');
00070   $h->name='p_action';
00071   $h->value='poste';
00072   echo $h->IOValue();
00073   echo $w->Submit('confirm_mod','Confirme');
00074   echo $w->Submit('no','Cancel');
00075   echo "</FORM>";
00076   echo "</div>";
00077 
00078 }