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