noalyss
Version-9
include
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
*/
24
if
( ! defined (
'ALLOWED'
) ) die(
'Appel direct ne sont pas permis'
);
25
echo
'<div class="content">'
;
26
27
$gDossier
=
dossier::id
();
28
29
//-----------------------------------------------------
30
// confirm mod
31
if
( 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
}
39
$object
=
new
Acc_Parm_Code
(
$cn
);
40
41
$all
=
$object
->load_all();
42
echo
'<div style="float:left; ">'
;
43
echo
'<table align="left">'
;
44
for
(
$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
}
58
echo
"</table>"
;
59
echo
"</div>"
;
60
//-----------------------------------------------------
61
// modifie
62
if
( 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
}
87
echo
'</div>'
;
$i
$i
Definition:
action_document_type_mtable_input.php:83
$cn
$cn
Definition:
ajax_anc_accounting.php:30
$id
$id
Definition:
ajax_fiche_def_detail.php:33
$w
foreach($array as $idx=> $m) $w
Definition:
anc_group.inc.php:69
id
$input_from id
Definition:
balance.inc.php:63
Acc_Parm_Code
Manage the table parm_code which contains the custom parameter for the module accountancy.
Definition:
acc_parm_code.class.php:30
HtmlInput\hidden
static hidden($p_name, $p_value, $p_id="")
Definition:
html_input.class.php:230
HtmlInput\submit
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Definition:
html_input.class.php:211
IHidden
Html Input.
Definition:
ihidden.class.php:31
$_POST
$_POST['ac']
Definition:
do.php:310
$gDossier
$gDossier
Definition:
poste.inc.php:27
$all
$all
Definition:
poste.inc.php:41
$object
if(isset( $_POST['confirm_mod'])) $object
Definition:
poste.inc.php:39