Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
action_mod.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Modify action parameters
9
*
10
* @author Anakeen 2000
11
* @version $Id: action_mod.php,v 1.4 2005/07/08 15:29:51 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage APPMNG
15
*/
16
/**
17
*/
18
19
include_once (
"Class.SubForm.php"
);
20
include_once (
"Class.Action.php"
);
21
// -----------------------------------
22
function
action_mod
(&
$action
)
23
{
24
// -----------------------------------
25
// Get all the params
26
$id
=
GetHttpVars
(
"id"
);
27
$appl_id =
$action
->Read(
"action_appl_id"
);
28
29
if
(
$id
==
""
) {
30
$ActionCour =
new
Action
(
$action
->GetParam(
"CORE_DB"
));
31
}
else
{
32
$ActionCour =
new
Action
(
$action
->GetParam(
"CORE_DB"
) , array(
33
$id
,
34
$appl_id
35
));
36
}
37
38
$ActionCour->available =
GetHttpVars
(
"available"
);
39
40
if
(
$id
==
""
) {
41
$res = $ActionCour->Add();
42
if
($res !=
""
) {
43
$txt =
$action
->text(
"err_add_action"
) .
" : $res"
;
44
$action
->Register(
"USERS_ERROR"
, AddSlashes($txt));
45
}
46
}
else
{
47
$res = $ActionCour->Modify();
48
if
($res !=
""
) {
49
$txt =
$action
->text(
"err_mod_action"
) .
" : $res"
;
50
$action
->Register(
"USERS_ERROR"
, AddSlashes($txt));
51
}
52
}
53
redirect(
$action
,
"APPMNG"
,
"ACTIONLIST"
);
54
}
55
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase