Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
popupdocmenu.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  * Specific menu for family
9  */
10 require_once "FDL/popupdoc.php";
11 
12 /**
13  * define popupmenu for a document
14  *
15  * @param Action &$action current action
16  *
17  * @return void
18  */
20 {
21  // -----------------------------------
22  // define accessibility
23  $docid = $action->getArgument("id");
24  $abstract = ($action->getArgument("abstract", 'N') == "Y");
25  $zone = $action->getArgument("mzone"); // special zone
26  $js = ($action->getArgument("js", "true") == "true") ? true : false;
27  $css = ($action->getArgument("css", "true") == "true") ? true : false;
28 
29  $dbaccess = $action->GetParam("FREEDOM_DB");
30  $doc = new_Doc($dbaccess, $docid); # _("States")
31  if ($zone == "") $specmenu = $doc->specialmenu;
32  else $specmenu = $zone;
33  if (is_string($specmenu) && preg_match("/(.*):(.*)/", $specmenu, $reg)) {
34  $menuapp = $reg[1];
35  $menuaction = $reg[2];
36  } else {
37  $menuapp = "FDL";
38  $menuaction = "POPUPDOCDETAIL";
39  }
40 
41  $action->lay->set("menuapp", $menuapp);
42  $action->lay->set("menuaction", $menuaction);
43  if ($js) {
44  $action->parent->AddJsRef($action->GetParam("CORE_PUBURL") . "/FDL/Layout/popupdoc.js");
45  $action->parent->AddJsRef($action->GetParam("CORE_PUBURL") . "/FDL/Layout/popupdocmenu.js");
46  }
47  if ($css) {
48  $action->parent->AddCssRef("FDL:POPUP.CSS", true);
49  }
50 }
51 ?>
← centre documentaire © anakeen - published under CC License - Dynacase