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
foliolist.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
* Folio List Containt
9
*
10
* @author Anakeen 2003
11
* @version $Id: foliolist.php,v 1.16 2007/10/19 15:20:14 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
include_once (
'FREEDOM/freedom_view.php'
);
20
include_once (
'FREEDOM/Lib.portfolio.php'
);
21
/**
22
* View a containt of portfolio separator
23
* @param Action &$action current action
24
* @global dirid Http var : separator identificator to see
25
* @global folioid Http var : portfolio of separator
26
*/
27
function
foliolist
(&
$action
)
28
{
29
// Get all the params
30
$dirid =
GetHttpVars
(
"dirid"
);
// directory to see
31
$folioid =
GetHttpVars
(
"folioid"
);
// portfolio id
32
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
33
$refreshtab = (
GetHttpVars
(
"refreshtab"
,
"N"
) ==
"Y"
);
// need refresh tabs
34
$action
->parent->AddJsRef(
$action
->GetParam(
"CORE_JSURL"
) .
"/resizeimg.js"
);
35
36
$filter
= array();
37
if
(($dirid == $folioid) || ($folioid == 0)) {
38
$filter
[] =
"doctype != 'S'"
;
39
$filter
[] =
"doctype != 'D'"
;
40
}
41
$dir
=
new_Doc
(
$dbaccess
, $dirid);
42
if
((
$dir
->doctype ==
'S'
)) {
43
if
(
$dir
->usefor ==
'G'
) {
44
// recompute search to restriction to local folder
45
// only for filters
46
$dir
->id =
""
;
47
$dir
->initid =
""
;
48
$dir
->doctype =
'T'
;
49
$dir
->setValue(
"SE_IDFLD"
, $folioid);
50
$dir
->setValue(
"SE_SUBLEVEL"
,
"1"
);
51
$dir
->setValue(
"SE_ORDERBY"
,
"title"
);
52
$dir
->Add();
53
$dir
->SpecRefresh();
54
$dir
->Modify();
55
SetHttpVar
(
"dirid"
,
$dir
->initid);
// redirect dirid to new temporary search
56
57
}
else
{
58
// recompute search to add current father folder
59
// $dir->id="";
60
// $dir->initid="";
61
// $dir->doctype='T';
62
if
(($folioid > 0) && (
$dir
->getValue(
"SE_IDCFLD"
) != $folioid)) {
63
$dir
->setValue(
"SE_IDCFLD"
, $folioid);
64
$dir
->setValue(
"SE_ORDERBY"
,
"title"
);
65
// $dir->Add();
66
$dir
->SpecRefresh();
67
$dir
->Modify();
68
}
69
// SetHttpVar("dirid",$dir->initid); // redirect dirid to new temporary search
70
71
72
}
73
}
74
75
$pfctx =
portfolio_get_context
(
$dir
);
76
$action
->lay->set(
"LISTICON"
, $pfctx[
'listtype'
] ==
'icon'
);
77
78
if
($folioid) {
79
$dir
=
new_Doc
(
$dbaccess
, $folioid);
80
}
81
82
$action
->lay->set(
"docid"
,
$dir
->initid);
83
$pfctx =
portfolio_get_context
(
$dir
);
84
$action
->lay->set(
"FRAMELISTWIDTH"
,
'180'
);
85
if
(isset($pfctx[
'framelistwidth'
])) {
86
$action
->lay->set(
"FRAMELISTWIDTH"
, $pfctx[
'framelistwidth'
]);
87
}
88
89
setHttpVar(
"sqlorder"
,
"title"
);
90
$action
->parent->SetVolatileParam(
"FREEDOM_VIEW"
,
"icon"
);
91
$nbdoc =
viewfolder
(
$action
,
false
,
true
,
false
, 100,
$filter
);
92
if
($nbdoc > 1)
$action
->lay->set(
"docs"
, _(
"documents"
));
93
else
$action
->lay->set(
"docs"
, _(
"document"
));
94
95
$action
->lay->set(
"refreshtab"
, $refreshtab);
96
}
97
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase