Platform  3.1
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  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5  * @package FDL
6 */
7 /**
8  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: fckdocattr.php,v 1.1 2008/12/12 17:46:48 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage
15  */
16 /**
17  */
18 
19 include_once ("FDL/Class.DocFam.php");
20 
21 function fckdocattr(&$action)
22 {
23 
24  $docid = GetHttpVars("famid");
25  $dbaccess = $action->GetParam("FREEDOM_DB");
27  if ($doc->isAlive()) {
28  $listattr = $doc->GetNormalAttributes();
29  foreach ($listattr as $k => $v) {
30  $tatt[$k] = array(
31  "aid" => "[V_" . strtoupper($k) . "]",
32  "alabel" => str_replace("'", "\\'", $v->getLabel())
33  );
34  }
35  $listattr = $doc->GetFileAttributes();
36  foreach ($listattr as $k => $v) {
37  if ($v->type == "image") {
38  $tatt[$k] = array(
39  "aid" => "<img src=\"[V_" . strtoupper($k) . "]\">",
40  "alabel" => str_replace("'", "\\'", $v->getLabel())
41  );
42  } else {
43  $tatt[$k] = array(
44  "aid" => "<a href=\"[V_" . strtoupper($k) . "]\">" . str_replace("'", "\\'", $v->getLabel()) . "</a>",
45  "alabel" => str_replace("'", "\\'", $v->getLabel())
46  );
47  }
48  }
49 
50  $action->lay->setBlockData("ATTR", $tatt);
51  }
52 }
53 ?>
← centre documentaire © anakeen - published under CC License - Dynacase