17 include_once (
"FDL/Class.Dir.php");
18 include_once (
"GENERIC/generic_util.php");
24 $allcol = (GetHttpVars(
"allcol",
"N") ==
"Y");
25 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/subwindow.js");
26 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/selectbox.js");
27 $dbaccess = $action->dbaccess;
31 if ($homefld->id > 0) $stree =
getChildCatg($homefld->id, 1,
true, 4);
35 $action->lay->SetBlockData(
"CATG", $stree);
46 if (
$doc->name !=
"") $famname =
$doc->name;
47 else $famname =
$doc->id;
48 if (
$doc->ccvid > 0) {
55 $cvid = $cvdoc->getRawValue(
"CV_IDCVIEW");
57 $err = $cvdoc->control($cvid);
59 $tview = $cvdoc->getView($cvid);
60 if (isset($tview[
"CV_MSKID"]))
$doc->setMask($tview[
"CV_MSKID"]);
64 $action->lay->
Set(
"TITLE",
$doc->title);
66 $action->lay->
Set(
"dtitle", sprintf(_(
"import <I>%s</I> documents from") ,
$doc->title));
68 $lattr =
$doc->GetNormalAttributes();
69 $action->lay->
Set(
"dallcol",
"");
70 $action->lay->
Set(
"dnallcol",
"none");
72 $lattr =
$doc->GetImportAttributes();
73 $action->lay->
Set(
"dallcol",
"none");
74 $action->lay->
Set(
"dnallcol",
"");
76 $format =
"DOC;" . $famname .
";0;" .
getDefFld($action) .
"; ";
78 foreach ($lattr as $k => $attr) {
79 $format.= $attr->getLabel() .
" ;";
81 $lattr =
$doc->GetNormalAttributes();
83 foreach ($lattr as $k => $attr) {
84 if ($attr->visibility ==
"O")
continue;
86 "idattr" => $attr->id,
87 "lattr" => $attr->getLabel()
90 if ($allcol) $lattr =
$doc->GetNormalAttributes();
91 else $lattr =
$doc->GetImportAttributes();
93 foreach ($lattr as $k => $attr) {
95 "idattr" => $attr->id,
96 "lattr" => $attr->getLabel()
100 $action->lay->SetBlockData(
"AKEYS1", $tkey);
101 $action->lay->SetBlockData(
"AKEYS2", $tkey);
102 $action->lay->SetBlockData(
"COLUMNS", $tcol);
103 $action->lay->
Set(
"format", $format);
105 $action->lay->
Set(
"classname", $famname);
getDefFld(Action &$action)
getDefFam(Action &$action)
generic_editimport(Action &$action)
exitError($texterr, $exit=true, $code="")
getChildCatg($docid, $level, $notfldsearch=false, $maxlevel=2)
new_Doc($dbaccess, $id= '', $latest=false)
if($file) if($subject==""&&$file) if($subject=="") $err