17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"FDL/popupfam.php");
25 $docid = GetHttpVars(
"id");
26 $abstract = (GetHttpVars(
"abstract",
'N') ==
"Y");
27 $headers = (GetHttpVars(
"props",
'N') ==
"Y");
28 $specialmenu = GetHttpVars(
"specialmenu");
29 $zone = GetHttpVars(
"zone");
38 $action->lay->
Set(
"id",
$doc->id);
39 $action->lay->
Set(
"ftitle", addjsslashes($fdoc[
"title"]));
40 $action->lay->
Set(
"profid",
$doc->profid);
41 $action->lay->
Set(
"ddocid",
"0");
42 include_once (
"FDL/popup_util.php");
79 $clf = (
$doc->CanLockFile() ==
"");
80 $cuf = (
$doc->CanUnLockFile() ==
"");
81 $cud = (
$doc->canEdit() ==
"");
90 if ((
$doc->doctype ==
"C") && ($cud)) {
102 else if ((
$doc->locked != $action->user->id) && $clf)
popupCtrlActive(
'popupcard', $kdiv,
'lockdoc');
105 if (
$doc->isLocked()) {
106 if ($cuf)
popupActive(
'popupcard', $kdiv,
'unlockdoc');
111 if (!
$doc->isRevisable()) {
114 }
else if (((
$doc->lmodify ==
'Y') || (
$doc->revision == 0)) && ($cud || $clf))
popupCtrlActive(
'popupcard', $kdiv,
'revise');
117 if (
$doc->IsControlled() && (
$doc->profid > 0) && (
$doc->Control(
"viewacl") ==
"")) {
123 if (
$doc->Control(
"modifyacl") ==
"") {
130 $action->lay->
Set(
"dtitle", AddJsSlashes(
$doc->title));
131 if (
$doc->PreDocDelete() ==
"") {
141 if (($clf) || ($cud)) {
161 if (
$doc->locked == - 1) {
181 if (
$doc->locked != - 1) {
187 if ($wdoc->isAlive()) {
189 if (count($wdoc->GetFollowingStates()) > 0)
popupActive(
'popupcard', $kdiv,
'editstate');
198 if ($abstract)
popupActive(
'popupcard', $kdiv,
'properties');
201 if ((
$doc->doctype !=
"C") || (!$action->HasPermission(
"FAMILY"))) {
214 if (
$doc->doctype ==
"C") {
224 else PopupCtrlactive(
'popupcard', $kdiv,
'headers');
227 else PopupCtrlactive(
'popupcard', $kdiv,
'addpostit');
229 if (!$action->parent->Haspermission(
"FREEDOM",
"FREEDOM")) {
239 if (!$action->parent->Haspermission(
"FREEDOM_READ",
"FREEDOM")) {
247 if (
$doc->cvid > 0) {
253 $ti = $cvdoc->getMultipleRawValues(
"CV_IDVIEW");
254 $tl = $cvdoc->getMultipleRawValues(
"CV_LVIEW");
255 $tz = $cvdoc->getMultipleRawValues(
"CV_ZVIEW");
256 $tk = $cvdoc->getMultipleRawValues(
"CV_KVIEW");
257 $tm = $cvdoc->getMultipleRawValues(
"CV_MSKID");
258 $td = $cvdoc->getMultipleRawValues(
"CV_DISPLAYED");
262 if (count($tk) > 0) {
263 foreach ($tk as $k => $v) {
264 if ($td[$k] !=
"no") {
266 if ($ti[$k] ==
"") $cvk =
"CV$k";
269 if (($clf) || ($cud)) {
270 if ($cvdoc->control($cvk) ==
"") {
273 "zoneview" => $tz[$k],
279 if ($cvdoc->control($cvk) ==
"") {
282 "zoneview" => $tz[$k],
290 $action->lay->SetBlockData(
"SVIEW", $tv);
291 $action->lay->SetBlockData(
"SEDIT", $te);
294 if (count($tv) > 0) {
296 foreach ($tv as $k => $v)
popupActive(
'popupview', $kdiv, $k);
303 if (count($te) > 0) {
305 foreach ($te as $k => $v)
popupActive(
'popupedit', $kdiv, $k);
314 $tsubmenu[
"security"] = array(
315 "idmenu" =>
"security",
316 "labelmenu" => _(
"Security")
318 $noctrlkey = ($action->
getParam(
"FDL_CTRLKEY",
"yes") ==
"no");
321 $tsubmenu[
"ctrlkey"] = array(
322 "idmenu" =>
"ctrlkey",
323 "labelmenu" => _(
"others...")
328 $addidmenu = array();
329 foreach ($tsubmenu as $v) {
330 $addidmenu[] = $v[
"idmenu"];
332 if (count($addidmenu) > 0) {
333 foreach ($addidmenu as $v) {
336 Popupinvisible(
'popupcard', $kdiv, $v);
340 foreach ($ti as $ki => $vi) {
343 PopupActive(
'popupcard', $kdiv, $v);
351 if ($mctrl) PopupCtrlActive(
'popupcard', $kdiv, $v);
354 $action->lay->SetBlockData(
"SUBMENU", $tsubmenu);
355 $action->lay->SetBlockData(
"SUBDIVMENU", $tsubmenu);
356 $action->lay->eSet(
"zone", $zone);
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
print< H1 > Check Database< i > $dbaccess</i ></H1 > $a
getParam($name, $def="")
must be in core or global type
new_Doc($dbaccess, $id= '', $latest=false)