17 include_once (
"FDL/import_tar.php");
22 $to = GetHttpVars(
"to");
28 $targs = array_merge($_GET, $_POST);
30 foreach ($targs as $k => $v) {
31 if ($k ==
"action" || $k ==
"app") {
34 $args.=
" " . escapeshellarg(
"--$k=$v");
39 $cmd[] = sprintf(
"%s --userid=%s --app=FREEDOM --action=FREEDOM_ANA_TAR --htmlmode=Y %s | ( %s --userid=%s --api=fdl_sendmail --subject=%s --htmlmode=Y --file=stdin --to=%s )",
$wsh, escapeshellarg($action->user->id) ,
$args,
$wsh, escapeshellarg($action->user->id) , escapeshellarg(
$subject) , escapeshellarg(
$to));
43 if (
$err == 0) $action->lay->set(
"text", sprintf(_(
"Import %s is in progress. When update will be finished an email to <%s> will be sended with result rapport") ,
$filename,
$to));
44 else $action->lay->set(
"text", sprintf(_(
"update of %s catalogue has failed,") ,
$filename));
if(substr($wsh, 0, 1)!= '/') $args
foreach($argv as $arg) $cmd
getWshCmd($nice=false, $userid=0, $sudo=false)
bgexec($tcmd, &$result, &$err)
if($file) if($subject==""&&$file) if($subject=="") $err
freedom_import_dir(Action &$action)