17 include_once (
"FDL/freedom_util.php");
18 include_once (
"FDL/Lib.Dir.php");
23 $id = GetHttpVars(
"id", 0);
24 $dhtml = (GetHttpVars(
"dh", 1) == 1 ?
true :
false);
25 $action->lay->set(
"html", $dhtml);
26 $lim = GetHttpVars(
"lim", 100);
27 $order = GetHttpVars(
"order");
31 header(
'Content-type: text/xml; charset=utf-8');
33 $baseurl = $action->getparam(
"CORE_EXTERNURL");
35 if (!$action->auth) $addauth =
'&authtype=basic';
38 $standurl =
__xmlentities($action->GetParam(
"CORE_STANDURL"));
39 $action->lay->set(
"standurl", $standurl);
40 $action->lay->set(
"server", substr($baseurl, 0, strrpos($baseurl,
'/')));
42 $cssf = getparam(
"CORE_STANDURL") .
"$addauth&app=CORE&action=CORE_CSS&session=" . $action->session->id .
"&layout=FDL:RSS.CSS";
43 $action->lay->set(
"rsscss", $cssf);
45 setlocale(LC_TIME,
"C");
46 $rsslink = $baseurl .
__xmlentities(
"?sole=Y$addauth&app=FDL&action=FDL_CARD&latest=Y&id=" . $id);
47 $action->lay->set(
"rsslink", $rsslink);
48 $action->lay->set(
"copy",
"Copyright 2006 Anakeen");
49 $action->lay->set(
"lang", substr(
getParam(
"CORE_LANG") , 0, 2));
50 $action->lay->set(
"datepub", strftime(
"%a, %d %b %Y %H:%M:%S %z", time()));
51 $action->lay->set(
"ttl", 60);
52 $action->lay->set(
"category",
"Dynacase documents");
53 $action->lay->set(
"generator",
"Dynacase version " . $action->parent->
getParam(
"VERSION"));
56 $action->lay->set(
"lastbuild", strftime(
"%a, %d %b %Y %H:%M:%S %z", intval(
$doc->revdate)));
58 if (
$doc->defDoctype ==
'S') $aclctrl =
"execute";
59 else $aclctrl =
"open";
60 if ((
$err =
$doc->Control($aclctrl)) !=
"") {
67 $action->lay->set(
"icon",
$doc->getIcon());
68 if (
$doc->doctype !=
'S' &&
$doc->doctype !=
'D') {
79 if (
$doc->getRawValue(
"REP_IDSORT")) {
80 $order =
$doc->getRawValue(
"REP_IDSORT");
81 $order.=
" " .
$doc->getRawValue(
"REP_ORDERSORT");
82 }
else $order =
"revdate desc";
93 $lattr = $fdoc->GetNormalAttributes();
95 foreach ($lattr as $k => $v) {
96 $tcol1[$v->id] = array(
98 "collabel" => $v->getLabel() ,
99 "rightfornumber" => ($v->type ==
"money") ?
"right" :
"left"
102 $tinternals = $tmpdoc->_getInternals();
103 foreach ($tinternals as $k => $v) {
107 "rightfornumber" =>
"left"
111 $tcols =
$doc->getMultipleRawValues(
"REP_IDCOLS");
112 foreach ($tcols as $val) {
113 $tcolshown[$val] = $tcol1[$val];
120 foreach ($ldoc as $kdoc => $vdoc) {
124 $items[$zdoc->id] = array(
126 "link" => $baseurl .
__xmlentities(
"?sole=Y$addauth&app=FDL&action=FDL_CARD&id=" . $zdoc->id) ,
128 "revdate" => strftime(
"%a, %d %b %Y %H:%M:%S %z", intval($zdoc->revdate)) ,
130 "category" => $zdoc->fromname,
133 "rsslink" => $rsslink,
139 foreach ($tcolshown as $kc => $vc) {
140 if ($zdoc->getRawValue($kc) ==
"") $lines[] = array(
141 "attr" => $vc[
"collabel"],
147 $cval = strftime(
"%x %T", $vdoc[$kc]);
151 $cval = _($vdoc[$kc]);
155 $cval = $zdoc->getTitle();
159 if (isset($lattr[$kc])) {
160 $cval = $zdoc->getHtmlValue($lattr[$kc], $zdoc->getRawValue($kc) ,
"",
false);
161 if ($lattr[$kc]->
type ==
"image") $cval =
"<img width=\"30px\" src=\"$cval\">";
162 }
else $cval = $zdoc->getPropertyValue($kc);
165 $items[$zdoc->id][
"title"] =
__xmlentities(html_entity_decode($cval, ENT_NOQUOTES,
'UTF-8'));
170 "attr" => $vc[
"collabel"],
176 $action->lay->setBlockData(
"lines" . $zdoc->id, $lines);
178 $items[$zdoc->id][
"descr"] = ($dhtml ?
__xmlentities(($zdoc->viewdoc(
"FDL:VIEWTHUMBCARD"))) :
"...");
179 $items[$zdoc->id][
"title"] =
__xmlentities($zdoc->getTitle());
182 $action->lay->setBlockData(
"Items", $items);
183 $action->lay->set(
"report",
$report);
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
getMailAddr($userid, $full=false)
getParam($name, $def="")
must be in core or global type
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
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)
getIdFromName($dbaccess, $name)
if($file) if($subject==""&&$file) if($subject=="") $err
getDocObject($dbaccess, $v, $k=0)