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
freedom_editpreffam.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
* Generated Header (not documented yet)
9
*
10
* @author Anakeen 2000
11
* @version $Id: freedom_editpreffam.php,v 1.3 2005/02/08 11:34:37 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage GED
15
*/
16
/**
17
*/
18
// ---------------------------------------------------------------
19
// $Id: freedom_editpreffam.php,v 1.3 2005/02/08 11:34:37 eric Exp $
20
// $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/freedom_editpreffam.php,v $
21
// ---------------------------------------------------------------
22
include_once (
"FDL/Class.Doc.php"
);
23
include_once (
"FDL/Lib.Dir.php"
);
24
25
function
freedom_editpreffam
(&
$action
)
26
{
27
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
28
29
$action
->parent->AddJsRef(
$action
->GetParam(
"CORE_JSURL"
) .
"/geometry.js"
);
30
$tcdoc =
GetClassesDoc
(
$dbaccess
,
$action
->user->id, array(
31
1,
32
2
33
) ,
"TABLE"
);
34
$idsfam =
$action
->GetParam(
"FREEDOM_PREFFAMIDS"
);
35
$tidsfam = explode(
","
, $idsfam);
36
37
$selectclass = array();
38
if
(is_array($tcdoc)) {
39
while
(list($k, $pdoc) = each($tcdoc)) {
40
41
$selectclass[$k][
"cid"
] = $pdoc[
"id"
];
42
$selectclass[$k][
"ctitle"
] = $pdoc[
"title"
];
43
$selectclass[$k][
"selected"
] = (in_array($pdoc[
"id"
], $tidsfam)) ?
"checked"
:
""
;
44
}
45
}
46
47
uasort($selectclass,
"cmpselect"
);
48
$action
->lay->SetBlockData(
"SELECTPREF"
, $selectclass);
49
}
50
51
function
cmpselect
(
$a
, $b)
52
{
53
return
strcasecmp(
$a
[
"ctitle"
], $b[
"ctitle"
]);
54
}
55
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase