noalyss Version-9
security_list_action.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4?>
5<div id="security_action_tbl">
6
7 <?php
8 echo HtmlInput::button("grant_all_action", _("Toutes les actions"), " onclick=\" grant_action(1) \"");
9 echo HtmlInput::button("revoke_all_action", _("Aucune action"), " onclick=\" grant_action (0) \"");
10 function display_security_fieldset($p_legend,$p_array,$sec_User) {
11
13 ?>
14<fieldset><legend><?php echo $p_legend;?></legend>
15 <TABLE >
16
17 <?php
18 foreach ( $p_array as $l_line){
19 ?>
20 <tr>
21 <td align="right">
22 <?php echo $l_line['ac_description'];?>
23 </td>
24
25 <?php
26 $right=$sec_User->check_action($l_line['ac_id']);
27 $is_switch=new Inplace_Switch(sprintf('action%d',$l_line['ac_id']),$right);
28 $is_switch->set_callback("ajax_misc.php");
29 $is_switch->add_json_param("op", "action_access");
30 $is_switch->add_json_param("gDossier",$gDossier);
31 $is_switch->add_json_param("ac_id",$l_line['ac_id']);
32 $is_switch->add_json_param("user_id",$sec_User->id);
33 ?>
34 <td >
35
36
37 <?php echo $is_switch->input(); ?>
38
39 </td>
40 </tr>
41 <?php
42} // end loop
43
44 ?>
45 </table>
46</fieldset>
47<?php
48
49}// end function
50
51?>
52<?php
53// Security Card
54$array=$cn->get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ",
55 array(800,1000));
56 display_security_fieldset(_('Fiche'),$array,$sec_User); ?>
57<?php
58// Security follow-up
59$array=$cn->get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ",
60 array(1001,1100));
61 display_security_fieldset(_('Suivi'),$array,$sec_User); ?>
62
63<?php
64// Security Accountancy
65 $array=$cn->get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ",
66 array(1101,1200));
67 display_security_fieldset(_('Comptabilité'),$array,$sec_User); ?>
68
69<?php
70// Note Sharing
71 $array=$cn->get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ",
72 array(1200,1300));
73 display_security_fieldset(_('Note'),$array,$sec_User);
74?>
75</div>
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
return false Description text align
$input_from id
Definition: balance.inc.php:63
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
A switch let you switch between 2 values : 0 and 1, it is used to replace the check.
$all table
display_security_fieldset($p_legend, $p_array, $sec_User)