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_imod.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_imod.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 FDL
14
* @subpackage GED
15
*/
16
/**
17
*/
18
// ---------------------------------------------------------------
19
// $Id: freedom_imod.php,v 1.6 2005/06/28 08:37:46 eric Exp $
20
// $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Freedom/freedom_imod.php,v $
21
// ---------------------------------------------------------------
22
//include_once("FDL/freedom_util.php");
23
include_once (
"FDL/modcard.php"
);
24
include_once (
"FDL/Class.Dir.php"
);
25
include_once (
"FDL/Class.DocFam.php"
);
26
include_once (
"FDL/Class.Doc.php"
);
27
include_once (
"FDL/fdl_xml.php"
);
28
29
// -----------------------------------
30
function
freedom_imod
(&
$action
)
31
{
32
33
$famid
=
GetHttpVars
(
"famid"
);
34
$xml =
GetHttpVars
(
"xml_initial"
);
35
$attrid =
GetHttpVars
(
"attrid"
);
36
$noredirect =
GetHttpVars
(
"noredirect"
);
// if true its a quick save
37
$action
->lay->Set(
"attrid"
, $attrid);
38
$action
->lay->Set(
"famid"
,
$famid
);
39
40
$type_attr =
GetHttpVars
(
"type_attr"
);
41
$action
->lay->Set(
"type_attr"
, $type_attr);
42
43
$mod =
GetHttpVars
(
"mod"
);
44
$action
->lay->Set(
"mod"
, $mod);
45
if
($noredirect)
$action
->lay->Set(
"close"
,
"no"
);
46
47
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
48
49
$idoc
=
fromxml
(
$dbaccess
, $xml,
$famid
,
true
);
50
51
SetHttpVar
(
"id"
,
$idoc
->id);
52
53
$err
=
modcard
(
$action
, $ndocid);
// ndocid change if new doc
54
if
(
$err
!=
""
)
$action
->ExitError(
$err
);
55
56
$idoc
=
new_Doc
(
$dbaccess
,
$idoc
->id);
57
58
$idoc
->RefreshTitle();
59
60
$action
->lay->Set(
"title"
, htmlentities(addslashes(
$idoc
->title) , ENT_COMPAT,
"UTF-8"
));
61
62
$xml2 =
$idoc
->toxml(
false
, $attrid);
63
64
$xml_send = base64_encode($xml2);
65
$action
->lay->Set(
"xml2"
, $xml_send);
66
$action
->lay->gen();
67
}
68
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase