noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
poste.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 /*! \file
00021  * \brief p_action contains the main action (always poste here)
00022  *  action contains the sub action 
00023  */
00024 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00025 require_once("class_ihidden.php");
00026 require_once("class_acc_parm_code.php");
00027 echo '<div class="content">';
00028 
00029 $gDossier=dossier::id();
00030 
00031 //-----------------------------------------------------
00032 // confirm mod
00033 if ( isset( $_POST['confirm_mod'] ) )
00034 {
00035     extract($_POST);
00036     $update=new Acc_Parm_Code($cn,$p_code);
00037     $update->p_comment=$p_comment;
00038     $update->p_value=$p_value;
00039     $update->save();
00040 }
00041 $object=new Acc_Parm_Code($cn);
00042 
00043 $all=$object->load_all();
00044 echo '<div style="float:left; ">';
00045 echo '<table align="left">';
00046 for ($i=0;$i<sizeof($all);$i++)
00047 {
00048     echo '<TR>';
00049     echo $all[$i]->display();
00050     echo '<TD><FORM method="POST">';
00051     $w=new IHidden();
00052     $w->name='id';
00053     $w->value=$i;
00054     echo $w->input();
00055     echo HtmlInput::submit('mod','modifie');
00056     echo '</FORM>';
00057     echo '</TD>';
00058     echo "</TR>";
00059 }
00060 echo "</table>";
00061 echo "</div>";
00062 //-----------------------------------------------------
00063 // modifie
00064 if ( isset ($_POST['mod'] ))
00065 {
00066     echo '<div style="float:left;">';
00067     echo IPoste::ipopup('ipop_account');
00068     echo '<fieldset>';
00069     echo "<legend>Voulez-vous vraiment modifier ?</legend>";
00070     echo '<FORM METHOD="POST">';
00071 
00072     echo "<TABLE>";
00073     $id=$_POST['id'];
00074     echo $all[$id]->form();
00075     echo "</TABLE>";
00076     $h=new IHidden();
00077     $h->name='p_action';
00078     $h->value='divers';
00079     ;
00080     echo $h->input();
00081     echo HtmlInput::hidden('sa','poste');
00082     echo HtmlInput::submit('confirm_mod','Confirme');
00083     echo HtmlInput::submit('no','Cancel');
00084     echo "</FORM>";
00085     echo '</fieldset>';
00086     echo "</div>";
00087 
00088 }
00089 echo '</div>';
 All Data Structures Namespaces Files Functions Variables Enumerations