Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
fckdocattr.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Generated Header (not documented yet)
8  *
9  * @author Anakeen
10  * @version $Id: fckdocattr.php,v 1.1 2008/12/12 17:46:48 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.DocFam.php");
18 
20 {
21 
22  $docid = GetHttpVars("famid");
23  $dbaccess = $action->dbaccess;
25  if ($doc->isAlive()) {
26  $tatt = array();
27  $listattr = $doc->GetNormalAttributes();
28  foreach ($listattr as $k => $v) {
29  $tatt[$k] = array(
30  "aid" => "[V_" . strtoupper($k) . "]",
31  "alabel" => str_replace('"', '\\"', $v->getLabel())
32  );
33  }
34  $listattr = $doc->GetFileAttributes();
35  foreach ($listattr as $k => $v) {
36  if ($v->type == "image") {
37  $tatt[$k] = array(
38  "aid" => "<img src='[V_" . strtoupper($k) . "]'>",
39  "alabel" => str_replace('"', '\\"', $v->getLabel())
40  );
41  } else {
42  $tatt[$k] = array(
43  "aid" => "<a href='[V_" . strtoupper($k) . "]'>" . $v->getLabel() . "</a>",
44  "alabel" => str_replace('"', '\\"', $v->getLabel())
45  );
46  }
47  }
48 
49  $action->lay->set("DOCATTR", json_encode($tatt));
50  }
51 }
global $action
$docid
Definition: cleanFamily.php:13
fckdocattr(Action &$action)
Definition: fckdocattr.php:19
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen