21require_once NOALYSS_INCLUDE.
'/database/profile_menu_sql.class.php';
40 parent::__construct($p_cn,
$p_id);
61 $me_code_dep=
$menu[
'me_code_dep'];
63 $mp_type=
$menu[
'p_type_display'];
65 $me_menu=
$menu[
'me_menu'];
66 $me_desc=
$menu[
'me_description'];
67 $me_def=(
$menu[
'pm_default']==
'1')?
'<span class="notice" style="display:inline">Défaut</span>':
'';
69 <li
id=
"sub<?php echo $menu['pm_id'] ?>">
72 <?php echo $me_menu ?>
73 <?php echo $me_desc ?> <?php echo $me_def ?>
74 <?php $ret2=$this->
cn->exec_sql(
"
85 FROM profile_menu as pm
86 join profile_menu_type on (p_type_display=pm_type)
87 join menu_ref as mr on (mr.me_code=pm.me_code)
89 p_id=$1 and me_code_dep=$2
125 FROM profile_menu as pm
126 join profile_menu_type on (p_type_display=pm_type)
127 join menu_ref as mr on (mr.me_code=pm.me_code)
129 p_id=$1 and p_type_display='M'
131 ", array($this->
p_id));
140 $ret=$this->
cn->exec_sql(
"
151 FROM profile_menu as pm
152 join profile_menu_type on (p_type_display=pm_type)
153 join menu_ref as mr on (mr.me_code=pm.me_code)
155 p_id=$1 and p_type_display not in ('M','P') and me_code_dep is null
157 ", array($this->
p_id));
169 include NOALYSS_TEMPLATE.
'/profile_menu_display_module.php';
195 join menu_ref using (me_code)
198 pm_id_dep = $2 order by p_order',
199 array($this->
p_id, $p_module_id));
200 require NOALYSS_TEMPLATE.
'/profile_menu_display_submenu.php';
209 $ret=$this->
cn->exec_sql(
"
220 FROM profile_menu as pm
221 join profile_menu_type on (p_type_display=pm_type)
222 join menu_ref as mr on (mr.me_code=pm.me_code)
224 p_id=$1 and me_type='PR'
226 ", array($this->
p_id));
239 select p.p_id,p.p_name,s.p_granted,s.ua_id,s.ua_right
241 join user_sec_action_profile as s on (s.p_granted=p.p_id)
244 select p2.p_id, p2.p_name,null,null,'X'
247 p2.p_id not in (select p_granted from user_sec_action_profile where p_id = $1) order by p_name;
248 ", array($this->
p_id));
250 array(
'value'=>
'R',
'label'=>_(
'Lecture')),
251 array(
'value'=>
'W',
'label'=>_(
'Ecriture et suppression')),
252 array(
'value'=>
'O',
'label'=>_(
'Ecriture')),
253 array(
'value'=>
'X',
'label'=>_(
'Aucun accès'))
255 require_once NOALYSS_TEMPLATE.
'/user_sec_profile.php';
265 select p.r_id,p.r_name,s.ur_id,s.ur_right
266 from stock_repository as p
267 join profile_sec_repository as s on (s.r_id=p.r_id)
270 select p2.r_id, p2.r_name,null,'X'
271 from stock_repository as p2
273 p2.r_id not in (select r_id from profile_sec_repository where p_id = $1) order by r_name;
274 ", array($this->
p_id));
276 array(
'value'=>
'R',
'label'=>_(
'Lecture')),
277 array(
'value'=>
'W',
'label'=>_(
'Ecriture')),
278 array(
'value'=>
'X',
'label'=>_(
'Aucun accès'))
280 require_once NOALYSS_TEMPLATE.
'/profile_sec_repository.php';
288 echo
create_script(
"profile_menu_mtable.param_add({profile_id:{$this->p_id}});");
span($p_string, $p_extra='')
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
static id()
return the 'gDossier' value after a check
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
static build($p_id, $profile_id)
create_script($p_string)
create the HTML for adding the script tags around of the script