Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_import_dir.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  * Import directory with document descriptions
9  *
10  * @author Anakeen 2000
11  * @version $Id: freedom_import_dir.php,v 1.5 2007/01/19 16:23:32 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 include_once ("FDL/import_tar.php");
20 
22 {
23 
24  $to = GetHttpVars("to");
25  $filename = GetHttpVars("filename");
26 
27  $wsh = getWshCmd(true);
28 
29  global $_GET, $_POST;
30  $targs = array_merge($_GET, $_POST);
31  $args = "";
32  foreach ($targs as $k => $v) {
33  if (($k != "action") && ($k != "app")) $args.= " --$k=\"$v\"";
34  }
35 
36  $subject = sprintf(_("result of archive import %s") , $filename);
37 
38  $cmd[] = "$wsh --userid={$action->user->id} --app=FREEDOM --action=FREEDOM_ANA_TAR --htmlmode=Y $args | ( $wsh --userid={$action->user->id} --api=fdl_sendmail --subject=\"$subject\" --htmlmode=Y --file=stdin --to=\"$to\" )";
39 
40  bgexec($cmd, $result, $err);
41 
42  if ($err == 0) $action->lay->set("text", sprintf(_("Import %s is in progress. When update will be finished an email to &lt;%s&gt; will be sended with result rapport") , $filename, $to));
43  else $action->lay->set("text", sprintf(_("update of %s catalogue has failed,") , $filename));
44 }
45 ?>
← centre documentaire © anakeen - published under CC License - Dynacase