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
change_action.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
* Change an attribute of an WHAT Action
9
*
10
*
11
* @param string $appname internal name of the application
12
* @param string $actname internal name of the action
13
* @param string $attribute internal name of the field of the action
14
* @param string $value new value for the attribute
15
* @author Anakeen 2003
16
* @version $Id: change_action.php,v 1.2 2003/08/18 15:46:41 eric Exp $
17
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
18
* @package FDL
19
* @subpackage WSH
20
*/
21
/**
22
*/
23
// ---------------------------------------------------------------
24
// $Id: change_action.php,v 1.2 2003/08/18 15:46:41 eric Exp $
25
// $Source: /home/cvsroot/anakeen/freedom/core/Api/change_action.php,v $
26
// ---------------------------------------------------------------
27
include_once (
"Class.Application.php"
);
28
29
$appname
=
GetHttpVars
(
"appname"
,
""
);
30
$actionname
=
GetHttpVars
(
"actname"
,
""
);
31
$attribute
=
GetHttpVars
(
"attribute"
,
""
);
32
$value
=
GetHttpVars
(
"value"
,
""
);
33
34
if
(
$appname
==
""
||
$actionname
==
""
||
$attribute
==
""
)
return
false
;
35
$app
=
new
Application
();
36
$null
=
""
;
37
$app
->Set(
$appname
,
$null
);
38
if
(
$app
->id > 0) {
39
$action
=
new
Action
(
$app
->dbaccess);
40
$action
->Set(
$actionname
,
$app
);
41
if
(
$action
->id > 0) {
42
reset(
$action
->fields);
43
while
(list($k, $v) = each(
$action
->fields)) {
44
if
($v ==
$attribute
) {
45
$action
->$attribute =
$value
;
46
$action
->Modify();
47
return
true
;
48
}
49
}
50
}
51
}
52
return
false
;
53
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase