noalyss Version-9
poste.inc.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu
20/*! \file
21 * \brief p_action contains the main action (always poste here)
22 * action contains the sub action
23 */
24if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
25echo '<div class="content">';
26
28
29//-----------------------------------------------------
30// confirm mod
31if ( isset( $_POST['confirm_mod'] ) )
32{
33 extract($_POST, EXTR_SKIP);
34 $update=new Acc_Parm_Code($cn,$p_code);
35 $update->p_comment=$p_comment;
36 $update->p_value=$p_value;
37 $update->save();
38}
40
41$all=$object->load_all();
42echo '<div style="float:left; ">';
43echo '<table align="left">';
44for ($i=0;$i<sizeof($all);$i++)
45{
46 echo '<TR>';
47 echo $all[$i]->display();
48 echo '<TD><FORM method="POST">';
49 $w=new IHidden();
50 $w->name='id';
51 $w->value=$i;
52 echo $w->input();
53 echo HtmlInput::submit('mod','modifie');
54 echo '</FORM>';
55 echo '</TD>';
56 echo "</TR>";
57}
58echo "</table>";
59echo "</div>";
60//-----------------------------------------------------
61// modifie
62if ( isset ($_POST['mod'] ))
63{
64 echo '<div style="float:left;">';
65
66 echo '<fieldset>';
67 echo "<legend>Voulez-vous vraiment modifier ?</legend>";
68 echo '<FORM METHOD="POST">';
69
70 echo "<TABLE>";
71 $id=$_POST['id'];
72 echo $all[$id]->form();
73 echo "</TABLE>";
74 $h=new IHidden();
75 $h->name='p_action';
76 $h->value='divers';
77 ;
78 echo $h->input();
79 echo HtmlInput::hidden('sa','poste');
80 echo HtmlInput::submit('confirm_mod','Confirme');
81 echo HtmlInput::submit('no','Cancel');
82 echo "</FORM>";
83 echo '</fieldset>';
84 echo "</div>";
85
86}
87echo '</div>';
foreach($array as $idx=> $m) $w
$input_from id
Definition: balance.inc.php:63
Manage the table parm_code which contains the custom parameter for the module accountancy.
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input.
$_POST['ac']
Definition: do.php:310
$gDossier
Definition: poste.inc.php:27
$all
Definition: poste.inc.php:41
if(isset( $_POST['confirm_mod'])) $object
Definition: poste.inc.php:39