Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
tabindex.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: tabindex.php,v 1.3 2004/03/22 15:21:40 eric Exp $
12  * @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13  * @package FDL
14  * @subpackage CORE
15  */
16 /**
17  */
18 // ---------------------------------------------------------------
19 // $Id: tabindex.php,v 1.3 2004/03/22 15:21:40 eric Exp $
20 // $Source: /home/cvsroot/anakeen/freedom/core/Zone/Core/tabindex.php,v $
21 // ---------------------------------------------------------------
22 // $Log: tabindex.php,v $
23 // Revision 1.3 2004/03/22 15:21:40 eric
24 // change HTTP variable name to put register_globals = Off
25 //
26 // Revision 1.2 2003/08/18 15:46:42 eric
27 // phpdoc
28 //
29 // Revision 1.1 2002/01/08 12:41:34 eric
30 // first
31 //
32 // Revision 1.13 2001/10/17 14:45:16 eric
33 // mise en place de i18n via gettext
34 //
35 // Revision 1.12 2001/08/30 15:07:45 eric
36 // correction = / ==
37 //
38 // Revision 1.11 2001/08/29 16:07:57 yannick
39 // See changelog
40 //
41 // Revision 1.10 2001/08/29 12:51:04 yannick
42 // Bouchage du trou dans tabindex
43 //
44 // Revision 1.9 2000/11/14 17:35:31 yannick
45 // Affichage des TabIndex
46 //
47 // Revision 1.8 2000/11/13 11:36:19 marc
48 // Gestion des droits pour affichage dans Tabindex
49 //
50 // Revision 1.7 2000/11/08 11:33:44 marc
51 // Show tabs according acl
52 //
53 // Revision 1.6 2000/10/23 14:11:22 yannick
54 // Gestion des droits
55 //
56 // Revision 1.5 2000/10/22 14:19:06 marc
57 // Gestion des langues
58 //
59 // Revision 1.4 2000/10/19 16:45:39 marc
60 // Mise au point
61 //
62 // Revision 1.3 2000/10/11 19:44:41 marc
63 // Mise au point (accès graphiques, Css pour TABINDEX...)
64 //
65 // Revision 1.2 2000/10/10 19:09:11 marc
66 // Mise au point
67 //
68 // Revision 1.1 2000/10/09 19:00:33 marc
69 // Creation
70 //
71 // Revision 1.1 2000/10/06 19:37:44 marc
72 // Creation
73 //
74 //
75 // ---------------------------------------------------------------
76 include_once ("Class.Action.php");
77 // -----------------------------------
78 function tabindex(&$action)
79 {
80  // -----------------------------------
81  global $_GET;
82  $appname = $_GET["app"];
83  $actname = $_GET["action"];
84 
85  $appcalled = new Application();
86  $appcalled->Set($appname, $action->parent);
87  $actcalled = new Action();
88  $actcalled->Set($actname, $appcalled, $action->session);
89 
90  $query = new QueryDb($action->dbaccess, "Action");
91  $query->order_by = "toc_order";
92  $query->basic_elem->sup_where = array(
93  "toc='Y'",
94  "available='Y'",
95  "id_application=" . $appcalled->id
96  );
97  $query->Query();
98  $itoc = 0;
99  if ($query->nb > 0) {
100  while (list($k, $v) = each($query->list)) {
101  $v->Set($v->name, $actcalled->parent, $actcalled->session);
102  if ($v->HasPermission($v->acl)) {
103  $toc[$itoc]["classlabel"] = ($v->name == $actcalled->name ? "TABLabelSelected" : "TABLabel");
104  $toc[$itoc]["classcell"] = ($v->name == $actcalled->name ? "TABBackgroundSelected" : "TABBackground");
105  $toc[$itoc]["base"] = $action->parent->GetParam("CORE_BASEURL");
106  $toc[$itoc]["app"] = $actcalled->parent->name;
107  $toc[$itoc]["action"] = $v->name;
108  $limg = ($v->name == $actcalled->name ? "tabselected.png" : "tab.png");
109  $toc[$itoc]["img"] = $action->parent->GetImageUrl($limg);;
110  if (substr($v->short_name, 0, 1) == '&') {
111  $sn = substr($v->short_name, 1, strlen($v->short_name));
112  $toc[$itoc]["label"] = $actcalled->text($sn);
113  } else {
114  $toc[$itoc]["label"] = _($v->short_name);
115  }
116  $itoc++;
117  }
118  }
119  }
120  if (isset($toc)) {
121  $action->lay->SetBlockCorresp("TAG", "TAG_LABELCLASS", "classlabel");
122  $action->lay->SetBlockCorresp("TAG", "TAG_CELLBGCLASS", "classcell");
123  $action->lay->SetBlockCorresp("TAG", "TAG_ENTRYURLROOT", "base");
124  $action->lay->SetBlockCorresp("TAG", "TAG_ENTRYAPP", "app");
125  $action->lay->SetBlockCorresp("TAG", "TAG_ENTRYPAGE", "action");
126  $action->lay->SetBlockCorresp("TAG", "TAG_ENTRYIMG", "img");
127  $action->lay->SetBlockCorresp("TAG", "TAG_ENTRYLABEL", "label");
128  $action->lay->SetBlockData("TAG", $toc);
129  $action->lay->SetBlockCorresp("COMPLETE", "TAG_CELLBGCLASS", "classcell");
130  $action->lay->SetBlockData("COMPLETE", $toc);
131  if ($appcalled->with_frame == "Y") {
132  $action->lay->set("TARGET", "main");
133  } else {
134  $action->lay->set("TARGET", "_self");
135  }
136  $action->lay->SetBlockData("NOTAG", NULL);
137  } else {
138  $action->lay->SetBlockData("TAG", NULL);
139  $action->lay->SetBlockCorresp("NOTAG", "TAG_NONE", "notag");
140  $action->lay->SetBlockData("NOTAG", array(
141  array(
142  "notag" => " "
143  )
144  ));
145  }
146 }
147 ?>
← centre documentaire © anakeen - published under CC License - Dynacase