17 include_once (
"FDL/Lib.Dir.php");
18 include_once (
"FDL/Class.Doc.php");
19 include_once (
"FDL/Class.DocAttr.php");
24 $docid = GetHttpVars(
"id", 0);
25 $classid = GetHttpVars(
"classid", 0);
26 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/geometry.js");
29 $action->lay->
Set(
"docid",
$doc->id);
31 $action->lay->eSet(
"TITLE", _(
"creation of document family"));
32 $action->lay->eSet(
"ftitle", _(
"untitle family"));
34 if (($classid == 0) && (
$docid != 0)) $classid =
$doc->fromid;
38 $selectclass = array();
40 foreach ($tclassdoc as $k => $cdoc) {
41 $selectclass[$k][
"idcdoc"] = $cdoc[
"id"];
42 $selectclass[$k][
"classname"] = $cdoc[
"title"];
43 $selectclass[$k][
"selected"] =
"";
52 if (
$err !=
"") $action->ExitError(
$err);
53 $action->lay->
Set(
"TITLE",
$doc->title);
55 if (($classid > 0) || (
$doc->doctype =
'C')) {
57 foreach ($selectclass as $k => $cdoc) {
59 if ($classid == $selectclass[$k][
"idcdoc"]) {
61 $selectclass[$k][
"selected"] =
"selected";
65 $action->lay->SetBlockData(
"SELECTCLASS", $selectclass);
createfam(Action &$action)
GetClassesDoc($dbaccess, $userid, $classid=0, $qtype="LIST", $extraFilters=array())
new_Doc($dbaccess, $id= '', $latest=false)
if($file) if($subject==""&&$file) if($subject=="") $err