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
prototree.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
* Display doucment explorer
9
*
10
* @author Anakeen 2006
11
* @version $Id: prototree.php,v 1.2 2008/06/11 16:18:24 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage FDL
15
*/
16
/**
17
*/
18
/**
19
* Add branch in folder tree
20
* @param Action &$action current action
21
* @param array $tree : tree definition
22
*/
23
function
prototree
(&
$action
, $tree, $postact = array())
24
{
25
header(
'Content-type: text/xml; charset=utf-8'
);
26
$action
->lay =
new
Layout
(
getLayoutFile
(
"FDL"
,
"prototree.xml"
) ,
$action
);
27
$action
->lay->setEncoding(
"utf-8"
);
28
29
$action
->lay->set(
"count"
, count($tree));
30
$action
->lay->set(
"code"
,
"OK"
);
31
$action
->lay->set(
"warning"
,
""
);
32
$pulid = uniqid(
"ul"
);
33
foreach
($tree as $k => $v) {
34
$tree[$k][
"ulid"
] = $pulid . $k;
35
if
(!isset($v[
"selecturl"
])) $tree[$k][
"selecturl"
] =
false
;
36
if
(!isset($v[
"selectjs"
])) $tree[$k][
"selectjs"
] =
false
;
37
$tree[$k][
"selectnone"
] = !($tree[$k][
"selectjs"
] || $tree[$k][
"selecturl"
]);
38
}
39
$action
->lay->setBlockData(
"TREE"
, $tree);
40
$action
->lay->setBlockData(
"ACTIONS"
, $postact);
41
}
42
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase