Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
popupfolio.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * popup for portfolio list
8  *
9  * @author Anakeen
10  * @version $Id: popupfolio.php,v 1.14 2008/06/03 10:14:13 eric Exp $
11  * @package FDL
12  * @subpackage GED
13  */
14 /**
15  */
16 //
17 include_once ("FDL/Class.Doc.php");
19 {
20  // -----------------------------------
21  // ------------------------------
22  // get all parameters
23  $dirid = GetHttpVars("dirid"); //
24  $folioid = GetHttpVars("folioid"); // portfolio id
25  $kdiv = 1; // only one division
26  $dbaccess = $action->dbaccess;
27 
29  if ($dir->locked == - 1) { // it is revised document
30  $ldocid = $dir->getLatestId();
31  if ($ldocid != $dir->id) $dir = new_Doc($dbaccess, $ldocid);
32  }
33 
34  include_once ("FDL/popup_util.php");
35  // ------------------------------------------------------
36  // definition of popup menu
37  popupInit('popupfolio', array(
38  'newdoc',
39  'newgc',
40  'newsgc',
41  'insertbasket',
42  'searchinsert'
43  ));
44 
45  Popupinvisible('popupfolio', $kdiv, 'insertbasket');
46  Popupinvisible('popupfolio', $kdiv, 'searchinsert');
47  Popupinvisible('popupfolio', $kdiv, 'newdoc');
48  Popupinvisible('popupfolio', $kdiv, 'newgc');
49  Popupinvisible('popupfolio', $kdiv, 'newsgc');
50 
51  if ($dir->doctype == "D") {
52  /*
53  * @var Dir $dir
54  */
55  Popupactive('popupfolio', $kdiv, 'newdoc');
56  if ($dir->control("modify") == "") {
57  Popupactive('popupfolio', $kdiv, 'insertbasket');
58  Popupactive('popupfolio', $kdiv, 'searchinsert');
59  }
60  if (!$action->getParam("FREEDOM_IDBASKET")) Popupinvisible('popupfolio', $kdiv, 'insertbasket');
61 
62  if ($dir->usefor != "G") {
63  $sub = $dir->getAuthorizedFamilies();
64 
65  $insertgc = true;
66  $insertsgc = true;
67  if (!$dir->hasNoRestriction()) {
68  $keys = array_keys($sub);
69 
70  $insertgc = (in_array(18, $keys));
71  $insertsgc = (in_array(19, $keys));
72  }
73  if ($insertgc) popupactive('popupfolio', $kdiv, 'newgc');
74  if ($insertsgc) popupactive('popupfolio', $kdiv, 'newsgc');
75  }
76  }
77  popupGen($kdiv);
78  // set dirid to folio if is in search
79  if ($dir->doctype == 'S') $action->lay->eset("dirid", $folioid);
80  else $action->lay->eset("dirid", $dirid);
81 
82  setFamidInLayout($action);
83 }
global $action
new_Doc($dbaccess, $id= '', $latest=false)
popupfolio(Action &$action)
Definition: popupfolio.php:18
$dir
Definition: resizeimg.php:144
getParam($name, $def="")
setFamidInLayout(Action &$action)
$dbaccess
Definition: checkVault.php:17
← centre documentaire © anakeen