Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
barmenu.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Definition of bar menu for folder navigation
8  *
9  * @author Anakeen
10  * @version $Id: barmenu.php,v 1.19 2007/08/10 16:09:49 eric Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Dir.php");
18 include_once ("FDL/Class.QueryDir.php");
19 include_once ("FDL/freedom_util.php");
20 
21 include_once ("FDL/popup_util.php");
22 // -----------------------------------
23 function barmenu(Action & $action)
24 {
25  // -----------------------------------
26  $dbaccess = $action->dbaccess;
27  popupInit("newmenu", array(
28  'newdoc',
29  'newsystem',
30  'newfld',
31  'newprof',
32  'newfam',
33  'newwf',
34  'newact'
35  ));
36  popupInit("searchmenu", array(
37  'speedsearch',
38  'newsearch',
39  'newdsearch',
40  'newsearchfulltext'
41  ));
42 
43  popupInit("helpmenu", array(
44  'import',
45  'importtar',
46  'planexec'
47  ));
48 
49  $tmark = array();
50  $tid = array();
51  $tbook = array(
52  'managebook',
53  'addtobook',
54  'broot'
55  );
56  $ubook = $action->GetParam("FREEDOM_UBOOK");
57  if (strlen($ubook) > 2) {
58 
59  $tubook = explode('][', substr($ubook, 1, -1));
60 
61  foreach ($tubook as $k => $v) {
62  list($id, $label) = explode("|", $v);
63  $tid[$id] = $label;
64  $tbook[] = "bookmark$id";
65  $tmark[] = array(
66  "idmark" => "bookmark$id",
67  "markid" => urlencode($id) ,
68  "labelmark" => $label
69  );
70  }
71  popupInit("bookmarks", $tbook);
72  foreach ($tid as $k => $v) {
73  popupActive("bookmarks", 1, "bookmark$k");
74  }
75  } else {
76  popupInit("bookmarks", $tbook);
77  }
78 
79  popupActive("newmenu", 1, 'newdoc');
80  popupActive("newmenu", 1, 'newfld');
81  popupActive("newmenu", 1, 'newact');
82  popupActive("newmenu", 1, 'newprof');
83  popupInvisible("newmenu", 1, 'newsystem');
84  if ($action->HasPermission("FREEDOM_ADMIN")) {
85  popupActive("helpmenu", 1, 'planexec');
86  }
87  if ($action->HasPermission("FREEDOM_MASTER")) {
88  popupActive("helpmenu", 1, 'import');
89  popupActive("helpmenu", 1, 'importtar');
90  popupActive("newmenu", 1, 'newact');
91  popupActive("newmenu", 1, 'newsystem');
92  popupActive("newmenu", 1, 'newfam');
93  popupActive("newmenu", 1, 'newwf');
94  } else {
95  popupInvisible("helpmenu", 1, 'import');
96  popupInvisible("helpmenu", 1, 'importtar');
97  popupInvisible("newmenu", 1, 'newfam');
98  popupInvisible("newmenu", 1, 'newact');
99  popupInvisible("newmenu", 1, 'newwf');
100  }
101  popupActive("searchmenu", 1, 'newsearch');
102  popupActive("searchmenu", 1, 'newdsearch');
103  popupInvisible("searchmenu", 1, 'speedsearch');
104  popupActive("searchmenu", 1, 'newsearchfulltext');
105  // if ($action->GetParam("TE_ACTIVATE") == "yes") popupActive("searchmenu",1,'newsearchfulltext');
106  //else popupInvisible("searchmenu",1,'newsearchfulltext');
107  popupActive("bookmarks", 1, 'managebook');
108  popupActive("bookmarks", 1, 'addtobook');
109  $rootlabel = getTDoc($dbaccess, 9);
110  if ($rootlabel) {
111  $action->lay->eSet("rootlabel", $rootlabel["title"]);
112  popupActive("bookmarks", 1, 'broot');
113  } else {
114  popupInvisible("bookmarks", 1, 'broot');
115  }
116 
117  $action->lay->eSetBlockData("MARKS", $tmark);
118  popupGen(1);
119 }
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
global $action
barmenu(Action &$action)
Definition: barmenu.php:23
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen