Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
onefam_ng.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  * Generated Header (not documented yet)
9  *
10  * @author Anakeen 2000
11  * @version $Id: onefam_ng.php,v 1.9 2008/04/18 09:47:38 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FREEDOM
14  * @subpackage
15  */
16 /**
17  */
18 include_once ("ONEFAM/onefam_root.php");
20 {
21 
22  $action->lay->set("APP_TITLE", _($action->parent->description));
23 
24  $nbcol = intval($action->getParam("ONEFAM_LWIDTH", 1));
25 
26  $delta = 0;
27  if ($action->read("navigator") == "EXPLORER") $delta = 10;
28 
29  $iz = $action->getParam("CORE_ICONSIZE");
30 
31  $dbaccess = $action->GetParam("FREEDOM_DB");
32 
33  $izpx = intval($action->getParam("SIZE_IMG-SMALL")) + 2;
34  $action->lay->set("wcols", $izpx * $nbcol + $delta);
35  $action->lay->set("Title", _($action->parent->short_name));
36 
37  $openfam = $action->getParam("ONEFAM_FAMOPEN");
38  if (($openfam != "") && (!is_numeric($openfam))) $openfam = getFamIdFromName($dbaccess, $openfam);
39  if ($openfam > 0) {
40  $action->lay->set("OPENFAM", true);
41  $action->lay->set("openfam", $openfam);
42  } else {
43  $action->lay->set("OPENFAM", false);
44  }
45  $action->lay->Set("oneBgColor", (($action->getParam("ONEFAM_BGCOLOR") != 'inherit') && ($action->getParam("ONEFAM_BGCOLOR") != '')));
46 
47  $action->parent->AddJsRef($action->GetParam("CORE_JSURL") . "/subwindow.js");
48  $action->parent->AddJsRef($action->GetParam("CORE_JSURL") . "/resizeimg.js");
49  /* Multidoc */
50  $action->parent->AddJsRef("lib/jquery/jquery.js", false);
51  $action->parent->AddJsRef("ONEFAM/Layout/onefam_ng.js");
52  $action->parent->AddJsRef("FDL:underscore.js", true);
53  $action->parent->AddJsRef("FDL:backbone.js", true);
54  $action->parent->AddJsRef("FDL:multidoc.js", true);
55 
56  $iz = $action->getParam("CORE_ICONSIZE");
57  $izpx = intval($action->getParam("SIZE_IMG-SMALL"));
58  $action->lay->SetBlockData("SELECTMASTER", getTableFamilyList($action->GetParam("ONEFAM_MIDS") , $izpx));
59 
60  if (($action->GetParam("ONEFAM_IDS") != "") && ($action->GetParam("ONEFAM_MIDS") != "")) {
61  $action->lay->SetBlockData("SEPARATOR", array(
62  array(
63  "zou"
64  )
65  ));
66  }
67 
68  if ($action->HasPermission("ONEFAM")) {
69  $action->lay->SetBlockData("CHOOSEUSERFAMILIES", array(
70  array(
71  "zou"
72  )
73  ));
74  $action->lay->SetBlockData("SELECTUSER", getTableFamilyList($action->GetParam("ONEFAM_IDS") , $izpx));
75  }
76  if ($action->HasPermission("ONEFAM_MASTER")) {
77  $action->lay->SetBlockData("CHOOSEMASTERFAMILIES", array(
78  array(
79  "zou"
80  )
81  ));
82  }
83 
84  $action->lay->set("izpx", $izpx);
85  // Change CSS
86  $smode = getSplitMode($action);
87 
88  switch ($smode) {
89  case "vertical":
90  $action->parent->AddCssRef("WHAT/Layout/HB.css");
91  break;
92 
93  case "inverse":
94  $action->parent->AddCssRef("WHAT/Layout/inverse.css");
95  break;
96 
97  default:
98  case "basic":
99  $action->parent->AddCssRef("ONEFAM:onefam_ng.css", true);
100  break;
101  }
102 }
103 ?>
← centre documentaire © anakeen - published under CC License - Dynacase