Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
verifycomputedfiles.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  * Specific menu for family
9  *
10  * @author Anakeen 2000
11  * @version $Id: verifycomputedfiles.php,v 1.5 2008/04/14 10:12:14 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.Doc.php");
20 /**
21  * Edit an attribute inline
22  * @param Action &$action current action
23  * @global docid Http var : document identificator to see
24  * @global attrid Http var : the id of attribute to edit
25  */
27 {
28  $docid = GetHttpVars("id");
29  $attrid = GetHttpVars("attrid");
30  $dbaccess = $action->GetParam("FREEDOM_DB");
31 
32  header('Content-type: text/xml; charset=utf-8');
33 
34  $mb = microtime();
35 
36  $action->lay->set("CODE", "OK");
37  $action->lay->set("warning", "");
38  $action->lay->set("modjsft", $modjsft);
39 
41  if (!$doc->isAffected()) $err = sprintf(_("cannot see unknow reference %s") , $docid);
42  if ($err == "") {
43  $action->lay->set("docid", $doc->id);
44  $files = $doc->GetFilesProperties();
45  }
46 
47  if ($err != "") $action->lay->set("CODE", "KO");
48  $action->lay->set("warning", $err);
49  $action->lay->set("delay", microtime_diff(microtime() , $mb));
50 
51  foreach ($files as $k => $v) {
52  if (($v["teng_state"] == 1) || ($v["teng_state"] < 0)) {
53  $files[$k]["icon"] = "img-cache/20-" . getIconMimeFile($v["mime_s"]) . ".png";
54  } else {
55  $files[$k]["icon"] = "";
56  }
57  $files[$k]["name"] = str_replace('&', '&amp;', $files[$k]["name"]);
58  }
59 
60  $action->lay->setBlockData("FILES", $files);
61  $action->lay->set("count", count($files));
62  $action->lay->set("docid", $doc->id);
63 }
64 ?>
← centre documentaire © anakeen - published under CC License - Dynacase