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
openfolio.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
* Open port folio document
9
*
10
* @author Anakeen 2000
11
* @version $Id: openfolio.php,v 1.6 2005/06/28 08:37:46 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FREEDOM
14
* @subpackage GED
15
*/
16
/**
17
*/
18
include_once (
"FDL/Class.Doc.php"
);
19
include_once (
'FREEDOM/Lib.portfolio.php'
);
20
// -----------------------------------
21
// -----------------------------------
22
function
openfolio
(&
$action
)
23
{
24
// -----------------------------------
25
// Set the globals elements
26
$docid
=
GetHttpVars
(
"id"
, 0);
// document to edit
27
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
28
29
$folio =
new_Doc
(
$dbaccess
,
$docid
);
30
31
if
(!$folio->isAffected()) {
32
$action
->exitError(sprintf(_(
"document %s not exists"
) ,
$docid
));
33
}
34
$action
->lay->Set(
"dirid"
, $folio->initid);
35
$action
->lay->Set(
"docid"
,
$docid
);
36
$action
->lay->Set(
"title"
, $folio->title);
37
38
$dir
=
new_Doc
(
$dbaccess
, $folio->initid);
39
$savedTab =
$dir
->getParamValue(
'pfl_savetab'
);
40
$savedDispo =
$dir
->getParamValue(
'pfl_savedispo'
, 1);
41
$pfctx =
portfolio_get_context
(
$dir
);
42
43
$action
->lay->set(
"FRAMELISTWIDTH"
,
'180'
);
44
$action
->lay->set(
"VIEWSTATE"
, 2);
45
$action
->lay->set(
"TABSELECTED"
,
''
);
46
$action
->lay->set(
"FRAME1"
,
'&app=FDL&action=FDL_CARD&latest=Y&id='
. $folio->initid);
47
$action
->lay->set(
"FRAME2"
,
'&app=FREEDOM&action=FREEDOM_LOGO'
);
48
$action
->lay->set(
"FRAMELIST"
,
'&app=FREEDOM&action=FOLIOLIST&dirid='
. $folio->initid);
49
50
if
($savedTab) {
51
if
(isset($pfctx[
'tabselected'
])) {
52
$action
->lay->set(
"TABSELECTED"
, $pfctx[
'tabselected'
]);
53
}
54
if
(isset($pfctx[
'framelist'
])) {
55
$action
->lay->set(
"FRAMELIST"
,
'&app=FREEDOM&action=FOLIOLIST&dirid='
. $pfctx[
'framelist'
][
'dirid'
] .
'&folioid='
. $pfctx[
'framelist'
][
'folioid'
]);
56
}
57
}
58
59
if
($savedDispo) {
60
if
(isset($pfctx[
'framelistwidth'
])) {
61
$action
->lay->set(
"FRAMELISTWIDTH"
, $pfctx[
'framelistwidth'
]);
62
}
63
64
if
(isset($pfctx[
'viewstate'
])) {
65
$action
->lay->set(
"VIEWSTATE"
, $pfctx[
'viewstate'
]);
66
}
67
if
(isset($pfctx[
'frame1'
])) {
68
$doc1 =
new_Doc
(
$dbaccess
, $pfctx[
'frame1'
]);
69
if
($doc1->isAlive()) {
70
$action
->lay->set(
"FRAME1"
,
'&app=FDL&action=FDL_CARD&latest=Y&id='
. $pfctx[
'frame1'
]);
71
}
72
}
73
if
(isset($pfctx[
'frame2'
])) {
74
$doc2 =
new_Doc
(
$dbaccess
, $pfctx[
'frame2'
]);
75
if
($doc2->isAlive()) {
76
$action
->lay->set(
"FRAME2"
,
'&app=FDL&action=FDL_CARD&latest=Y&id='
. $pfctx[
'frame2'
]);
77
}
78
}
79
}
80
}
81
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase