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
usercard_vcard.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: usercard_vcard.php,v 1.10 2005/11/23 14:03:50 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
// ---------------------------------------------------------------
19
// $Id: usercard_vcard.php,v 1.10 2005/11/23 14:03:50 eric Exp $
20
// $Source: /home/cvsroot/anakeen/freedom/freedom/Action/Usercard/usercard_vcard.php,v $
21
// ---------------------------------------------------------------
22
23
include_once (
"FDL/Class.Doc.php"
);
24
include_once (
"FDL/Class.UsercardVcard.php"
);
25
// -----------------------------------
26
function
usercard_vcard
(&
$action
)
27
{
28
// -----------------------------------
29
30
// Get all the params
31
$docid
=
GetHttpVars
(
"id"
);
// dccument to export
32
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
33
34
$doc
=
new_Doc
(
$dbaccess
,
$docid
);
35
36
$doc
->GetValues();
37
38
$vcard =
new
UsercardVcard
();
39
$export_file = uniqid(
getTmpDir
() .
"/export"
);
40
41
$vcard->Open($export_file,
"w"
);
42
$vcard->WriteCard(
$doc
->title,
$doc
->getvalues());
43
$vcard->close();
44
45
http_DownloadFile($export_file, chop(
$doc
->title) .
"."
. $vcard->ext, $vcard->mime_type);
46
47
unlink($export_file);
48
exit
;
49
}
50
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase