17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"FDL/Class.DocAttr.php");
19 include_once (
"FDL/Lib.Dir.php");
24 $docid = GetHttpVars(
"id", 0);
25 $createp = GetHttpVars(
"create", 0);
26 $action->lay->
Set(
"create", intval($createp));
28 if ($createp) $action->lay->
Set(
"TITLE", _(
"change creation profile"));
29 else $action->lay->
Set(
"TITLE", _(
"change profile"));
30 $action->lay->
Set(
"NOCREATE", (!$createp));
36 if (
$err !=
"") $action->ExitError(
$err);
37 $action->lay->
Set(
"docid",
$doc->id);
38 $action->lay->eSet(
"doctitle", _(
"new profile document"));
40 $selectclass = array();
41 if ((
$doc->usefor !=
"P") && (strstr(
$doc->usefor,
'W') ===
false) && (
$doc->fromid != 28)) {
47 if (is_array($tclassdoc)) {
48 foreach ($tclassdoc as $k => $pdoc) {
49 if ($pdoc[
"id"] !=
$doc->id) {
50 $selectclass[$k][
"idpdoc"] = $pdoc[
"id"];
51 $selectclass[$k][
"profname"] = $pdoc[
"title"];
52 $selectclass[$k][
"selected"] =
"";
63 $doc->GetFathersDoc();
64 $action->lay->eSet(
"doctitle",
$doc->title);
70 $sprofid = abs(
$doc->cprofid);
72 $sprofid = abs(
$doc->profid);
74 if (
$doc->dprofid != 0) $sprofid = abs(
$doc->dprofid);
77 if ($sprofid ==
$doc->id) $action->lay->
Set(
"selected_spec",
"selected");
79 $action->lay->
Set(
"selected_spec",
"");
81 foreach ($selectclass as $k => $pdoc) {
83 if ($sprofid == $selectclass[$k][
"idpdoc"]) {
84 $selectclass[$k][
"selected"] =
"selected";
89 $action->lay->SetBlockData(
"SELECTPROF", $selectclass);
91 if (((
$doc->doctype !=
'C') || $createp) && (
$doc->doctype !=
"P") && (strstr(
$doc->usefor,
'W') ===
false) && (
$doc->fromid != 28)) {
94 $action->lay->set(
"CV",
true);
96 $action->lay->set(
"CV",
false);
108 $chdoc =
$doc->GetFromDoc();
115 foreach ($tcv as $k => $v) {
117 $tcv[$k][
"selcv"] =
"";
123 if ($v[
"id"] ==
$doc->ccvid) $tcv[$k][
"selcv"] =
"selected";
125 if ($v[
"id"] ==
$doc->cvid) $tcv[$k][
"selcv"] =
"selected";
128 $action->lay->SetBlockData(
"SELECTCV", $tcv);
setControlView(&$action, &$doc, $createp=false)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
editprof(Action &$action)
internalGetDocCollection($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true, $trash="", &$debug=null, $folderRecursiveLevel=2, $join= '',\SearchDoc &$searchDoc=null)
new_Doc($dbaccess, $id= '', $latest=false)
GetSqlCond($Table, $column, $integer=false)
if($file) if($subject==""&&$file) if($subject=="") $err
GetProfileDoc($dbaccess, $docid, $defProfFamId="")