Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
freedom_applybatch.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Use to help to the construction of batch document
8  *
9  * @author Anakeen
10  * @version $Id: freedom_applybatch.php,v 1.7 2008/08/14 09:59:14 eric Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Doc.php");
18 include_once ("FDL/Lib.Dir.php");
19 /**
20  * Choose a batch document
21  * @param Action &$action current action
22  * @global id int Http var : folder identifier to use to construct batch
23  */
25 {
26 
27  $dirid = GetHttpVars("id");
28  $dbaccess = $action->dbaccess;
29  $bdoc = new_Doc($dbaccess, "BATCH");
30  $action->parent->AddJsRef($action->GetParam("CORE_JSURL") . "/subwindow.js");
31 
32  $tb = $bdoc->getChildFam();
33  foreach ($tb as $k => $v) {
34  $tb[$k]["iconsrc"] = $bdoc->getIcon($v["icon"]);
35 
36  $fa = new_doc($dbaccess, $v["id"]);
37  $la = $fa->getActionAttributes();
38  $ta = array();
39  if ($la) {
40  foreach ($la as $ka => $va) {
41  $ta[] = $va->getLabel();
42  }
43  }
44  $tb[$k]["actions"] = implode(",<br>", $ta);
45  }
46 
47  $action->lay->setBlockData("BATCHFAMS", $tb);
48  $action->lay->set("dirid", urlencode($dirid));
49 }
global $action
freedom_applybatch(Action &$action)
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
getIcon($name, $text, $width="", $height="")
← centre documentaire © anakeen