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
faddbook_prefered.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 Prefered personns
9
*
10
* @author Anakeen 2005
11
* @version $Id: faddbook_prefered.php,v 1.7 2005/11/24 13:48:17 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage USERCARD
15
*/
16
/**
17
*/
18
include_once (
"FDL/freedom_util.php"
);
19
include_once (
"FDL/Class.Doc.php"
);
20
21
function
faddbook_prefered
(&
$action
)
22
{
23
24
$action
->parent->AddJsRef(
$action
->GetParam(
"CORE_PUBURL"
) .
"/FDL/Layout/common.js"
);
25
$action
->parent->AddJsRef(
$action
->GetParam(
"CORE_JSURL"
) .
"/subwindow.js"
);
26
$dbaccess
=
$action
->getParam(
"FREEDOM_DB"
);
27
28
$cpref =
$action
->getParam(
"FADDBOOK_PREFERED"
,
""
);
29
$tc = explode(
"|"
, $cpref);
30
// $sfam = $action->getParam("DEFAULT_FAMILY");
31
// $fam = new_Doc($dbaccess, $sfam);
32
// $action->lay->set("icon", $fam->getIcon());
33
$cu = array();
34
foreach
($tc as $k => $v) {
35
if
($v ==
""
)
continue
;
36
$cc
=
new_Doc
(
$dbaccess
, $v);
37
$cu[] = array(
38
"id"
=>
$cc
->id,
39
"resume"
=>
$cc
->viewDoc((isset(
$cc
->faddbook_resume) ?
$cc
->faddbook_resume :
"FDL:VIEWTHUMBCARD"
)) ,
40
"icon"
=>
$cc
->getIcon() ,
41
"title"
=> mb_convert_case(mb_strtolower(
$cc
->title) , MB_CASE_TITLE) ,
42
"fabzone"
=> (isset(
$cc
->faddbook_card) ?
$cc
->faddbook_card :
$cc
->defaultview) ,
43
"jstitle"
=> addslashes(mb_convert_case(mb_strtolower(
$cc
->title) , MB_CASE_TITLE))
44
);
45
}
46
usort($cu,
"sortmya"
);
47
$action
->lay->setBlockData(
"Contacts"
, $cu);
48
}
49
function
sortmya
(
$a
, $b)
50
{
51
return
strcmp(
$a
[
"title"
], $b[
"title"
]);
52
}
53
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase