19 include_once (
"FDL/freedom_util.php");
20 include_once (
"FDL/Lib.Dir.php");
26 $dhtml = (
GetHttpVars(
"dh", 1) == 1 ?
true :
false);
27 $action->lay->set(
"html", $dhtml);
33 header(
'Content-type: text/xml; charset=utf-8');
34 $action->lay->setEncoding(
"utf-8");
36 $baseurl =
$action->getparam(
"CORE_EXTERNURL");
38 if (!
$action->auth) $addauth =
'&authtype=basic';
42 $action->lay->set(
"standurl", $standurl);
43 $action->lay->set(
"server", substr($baseurl, 0, strrpos($baseurl,
'/')));
45 $cssf = getparam(
"CORE_STANDURL") .
"$addauth&app=CORE&action=CORE_CSS&session=" .
$action->session->id .
"&layout=FDL:RSS.CSS";
46 $action->lay->set(
"rsscss", $cssf);
48 setlocale(LC_TIME,
"C");
49 $rsslink = $baseurl .
__xmlentities(
"?sole=Y$addauth&app=FDL&action=FDL_CARD&latest=Y&id=" .
$id);
50 $action->lay->set(
"rsslink", $rsslink);
51 $action->lay->set(
"copy",
"Copyright 2006 Anakeen");
53 $action->lay->set(
"datepub", strftime(
"%a, %d %b %Y %H:%M:%S %z", time()));
55 $action->lay->set(
"category",
"Dynacase documents");
56 $action->lay->set(
"generator",
"Dynacase version " .
$action->parent->getParam(
"VERSION"));
59 $action->lay->set(
"lastbuild", strftime(
"%a, %d %b %Y %H:%M:%S %z",
$doc->revdate));
61 if (
$doc->defDoctype ==
'S') $aclctrl =
"execute";
62 else $aclctrl =
"open";
63 if ((
$err =
$doc->Control($aclctrl)) !=
"") {
68 if (
$doc->doctype !=
'S' &&
$doc->doctype !=
'D') {
80 if (
$doc->getValue(
"REP_IDSORT")) {
81 $order =
$doc->getValue(
"REP_IDSORT");
82 $order.=
" " .
$doc->getValue(
"REP_ORDERSORT");
83 }
else $order =
"revdate desc";
92 foreach ($lattr as $k => $v) {
93 $tcol1[$v->id] = array(
95 "collabel" => $v->getLabel() ,
96 "rightfornumber" => ($v->type ==
"money") ?
"right" :
"left"
99 $tinternals = $tmpdoc->_getInternals();
100 foreach ($tinternals as $k => $v) {
104 "rightfornumber" =>
"left"
107 $tcolshown = array();
108 $tcols =
$doc->getTValue(
"REP_IDCOLS");
109 foreach ($tcols as $k => $v) {
110 $tcolshown[$v] = $tcol1[$v];
117 foreach (
$ldoc as $kdoc => $vdoc) {
121 $items[$zdoc->id] = array(
123 "link" => $baseurl .
__xmlentities(
"?sole=Y$addauth&app=FDL&action=FDL_CARD&id=" . $zdoc->id) ,
125 "revdate" => strftime(
"%a, %d %b %Y %H:%M:%S %z", $zdoc->revdate) ,
127 "category" => $zdoc->fromname,
130 "rsslink" => $rsslink,
136 foreach ($tcolshown as $kc => $vc) {
137 if ($zdoc->getValue($kc) ==
"") $lines[] = array(
138 "attr" => $vc[
"collabel"],
144 $cval = strftime(
"%x %T", $vdoc[$kc]);
148 $cval = _($vdoc[$kc]);
152 $cval = $zdoc->getHtmlValue(
$lattr[$kc], $zdoc->getValue($kc) ,
"",
false);
153 if (
$lattr[$kc]->
type ==
"image") $cval =
"<img width=\"30px\" src=\"$cval\">";
156 $items[$zdoc->id][
"title"] =
__xmlentities(html_entity_decode($cval, ENT_NOQUOTES,
'UTF-8'));
161 "attr" => $vc[
"collabel"],
167 $action->lay->setBlockData(
"lines" . $zdoc->id, $lines);
169 $items[$zdoc->id][
"descr"] = ($dhtml ?
__xmlentities(($zdoc->viewdoc(
"FDL:VIEWTHUMBCARD"))) :
"...");
170 $items[$zdoc->id][
"title"] =
__xmlentities($zdoc->getTitle());
173 $action->lay->setBlockData(
"Items", $items);
174 $action->lay->set(
"report", $report);
179 return preg_replace(array(