Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Api/freedom_import.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  * importation of documents
9  *
10  * @author Anakeen 2002
11  * @version $Id: freedom_import.php,v 1.9 2008/11/13 16:49:16 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage WSH
15  */
16 /**
17  */
18 
19 global $appl, $action;
20 
21 include_once ("FDL/import_file.php");
22 
23 $to = GetHttpVars("to");
24 // mode HTML
25 $appl = new Application();
26 $appl->Set("FREEDOM", $core);
27 
28 $action->Set("FREEDOM_IMPORT", $appl);
29 
30 $out = ($action->execute());
31 if ($to) {
32  include_once ("FDL/sendmail.php");
33 
34  $themail = new Fdl_Mail_mime();
35  $themail->setHTMLBody($out, false);
36 
37  $from = getMailAddr($action->user->id);
38  if ($from == "") $from = getParam('SMTP_FROM');
39  if ($from == "") $from = $action->user->login . '@' . php_uname('n');
40 
41  $subject = sprintf(_("result of import %s") , basename(GetHttpVars("file")));
43  if ($err) error_log("import sending mail: Error:$err");
44 } else {
45  if (GetHttpVars("htmlmode") == "Y") print $out;
46 }
47 ?>
← centre documentaire © anakeen - published under CC License - Dynacase