17 include_once (
"FDL/import_file.php");
18 include_once (
"FDL/Lib.Dir.php");
24 $usage->setDefinitionText(
"Import document interface");
25 $classid =
$usage->addOptionalParameter(
"classid",
"family used to view schema");
26 $dirid =
$usage->addOptionalParameter(
"dirid",
"directory to place imported doc");
27 $descr = (
$usage->addOptionalParameter(
"descr",
"view information", array(
31 $policy = (
$usage->addOptionalParameter(
"policy",
"view policy options", array(
35 $usage->setStrictMode(
false);
37 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/subwindow.js");
38 $action->parent->addJsRef(
"lib/jquery/jquery.js");
39 $action->parent->addJsRef(
"lib/jquery-ui/js/jquery-ui.js");
40 $action->parent->addJsRef(
"FREEDOM:freedom_editimport.js");
41 $action->parent->addCssRef(
"css/dcp/jquery-ui.css");
42 $action->parent->addCssRef(
"FREEDOM:freedom_editimport.css");
47 $query->AddQuery(
"doctype='C'");
49 $selectclass = array();
53 foreach ($tclassdoc as $k => $cdoc) {
54 $selectclass[$k][
"idcdoc"] = $cdoc[
"initid"];
55 $selectclass[$k][
"classname"] = $cdoc[
"title"];
56 if ($cdoc[
"initid"] == $classid) $selectclass[$k][
"selected"] =
"selected";
57 else $selectclass[$k][
"selected"] =
"";
60 $action->lay->SetBlockData(
"SELECTCLASS", $selectclass);
62 $action->lay->set(
"mailaddr",
getMailAddr($action->user->id));
63 $action->lay->set(
"separator", $action->
getParam(
"FREEDOM_CSVSEPARATOR"));
64 $action->lay->set(
"enclosure", $action->
getParam(
"FREEDOM_CSVENCLOSURE"));
65 $action->lay->set(
"linebreak", $action->
getParam(
"FREEDOM_CSVLINEBREAK"));
67 $action->lay->
Set(
"descr", (
bool)$descr);
70 $action->lay->eSet(
"dirid",
$dirid);
freedom_editimport(Action &$action)
getMailAddr($userid, $full=false)
GetClassesDoc($dbaccess, $userid, $classid=0, $qtype="LIST", $extraFilters=array())
Verify arguments for action function.
if(($docid!==0)&&(!is_numeric($docid))) $query