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
adddirfile.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: adddirfile.php,v 1.15 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 FDL
14
* @subpackage GED
15
*/
16
/**
17
*/
18
// ---------------------------------------------------------------
19
// $Id: adddirfile.php,v 1.15 2005/06/28 08:37:46 eric Exp $
20
// $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/adddirfile.php,v $
21
// ---------------------------------------------------------------
22
include_once (
"FDL/Lib.Dir.php"
);
23
include_once (
"FDL/freedom_util.php"
);
24
// -----------------------------------
25
function
adddirfile
(&
$action
)
26
{
27
// -----------------------------------
28
// PrintAllHttpVars();
29
// Get all the params
30
$dirid =
GetHttpVars
(
"dirid"
);
31
$docid
=
GetHttpVars
(
"docid"
);
32
$mode
=
GetHttpVars
(
"mode"
);
33
$return =
GetHttpVars
(
"return"
);
// return action may be folio
34
$folio = (
GetHttpVars
(
"folio"
,
"N"
) ==
"Y"
);
// return in folio
35
$folio = ($folio | $return);
36
37
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
38
39
$doc
=
new_Doc
(
$dbaccess
,
$docid
);
40
$dir
=
new_Doc
(
$dbaccess
, $dirid);
41
42
$err
=
$dir
->AddFile(
$doc
->initid,
$mode
);
43
44
if
(
$err
!=
""
)
$action
->addWarningMsg(
$err
);
45
46
if
($folio) {
47
$refreshtab = ((
$doc
->doctype ==
"F"
) ?
"N"
:
"Y"
);
48
redirect(
$action
,
GetHttpVars
(
"app"
) ,
"FOLIOLIST&refreshtab=$refreshtab&dirid=$dirid"
);
49
}
else
redirect(
$action
,
GetHttpVars
(
"app"
) ,
"FREEDOM_VIEW&dirid=$dirid"
);
50
}
51
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase