20 include_once (
"FDL/Class.Doc.php");
36 $usage->setStrictMode(
false);
37 $docid =
$usage->addRequiredParameter(
"id",
"id of the document");
38 $abstract = (
$usage->addOptionalParameter(
"abstract",
"view only abstract's attributes", array(
42 $zonebodycard =
$usage->addOptionalParameter(
"zone",
"view with another specific representation", null,
"");
43 $ulink = (
$usage->addOptionalParameter(
"ulink",
"enable or disable hyperlink", array(
48 $target =
$usage->addOptionalParameter(
"target",
"target for hyperlinks ('mail', '_self', etc.)", null,
"");
49 $wedit = (
$usage->addOptionalParameter(
"wedit",
"view by word editor", array(
53 $fromedit = (
$usage->addOptionalParameter(
"fromedit",
"compose temporary document", array(
57 $latest =
$usage->addOptionalParameter(
"latest",
"view latest revision of document", null,
"");
58 $tmime =
$usage->addOptionalParameter(
"tmime",
"MIME type", null,
"");
59 $charset =
$usage->addOptionalParameter(
"chset",
"charset", null,
"UTF-8");
74 include_once (
"FDL/modcard.php");
76 $doc =
$doc->duplicate(
true,
false,
true);
79 setHttpVar(
"id",
$doc->id);
81 if ($zonebodycard ==
"") $zonebodycard =
$doc->defaultview;
82 if ($zonebodycard ==
"")
$action->exitError(_(
"no zone specified"));
85 $action->lay->Set(
"ZONESCARD",
$doc->viewDoc($zonebodycard, $target, $ulink, $abstract));
87 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/geometry.js");
88 $action->parent->AddJsRef(
$action->GetParam(
"CORE_JSURL") .
"/subwindow.js");
91 $export_file = uniqid(
getTmpDir() .
"/export") .
".doc";
93 $of = fopen($export_file,
"w+");
94 fwrite($of,
$action->lay->gen());
97 http_DownloadFile($export_file, chop(
$doc->title) .
".html",
"application/msword");
104 header(
"Content-Type: $tmime; charset=$charset");
setPostVars(Doc &$doc, &$info=array())
Verify arguments for action function.
new_Doc($dbaccess, $id= '', $latest=false)
if($file) if($subject==""&&$file) if($subject=="") $err