1 {if $acl}
2 <!-- Javacript function used to switch a complete row or col of selected hours -->
3 <script language="javascript" type="text/javascript">
4 {literal}
5 var $regex = new Array();
6 function toggle_chk($reg)
7 {
8 if(!$regex[$reg]){
9 $regex[$reg] =1;
10 }
11 $regex[$reg] *= -1;
12 if($regex[$reg] == 1){
13 chk_set_all($reg,true);
14 }else{
15 chk_set_all($reg,false);
16 }
17 }
18 {/literal}
19 </script>
20 {/if}
22 <h1>{t}Specify the hours this user is allowed to log in{/t}</h1>
23 <br>
25 <table cellspacing=0 cellpadding=0 style='border: solid 1px #B0B0B0; background-color: #EEEEEE; width :100%;' >
26 <tr>
27 <td> </td>
28 <td colspan=24 style='text-align:center;height:24px;border-bottom: solid 1px #B0B0B0;'><b>{t}Hour{/t}</b></td>
29 </tr>
30 <tr>
31 <td style='text-align: left;' class='list0'> </td>
32 {foreach from=$Hours item=hours key=key_hours}
33 {if (($hours)%2)==0}
34 <td style="text-align:center;height: 22px; background-color: rgb(226, 226, 226); ">
35 {else}
36 <td style="text-align:center;height: 22px; background-color: rgb(245, 245, 245); border-right: solid 1px #B0B0B0;">
37 {/if}
38 {$hours}
39 </td>
40 {/foreach}
41 </tr>
43 {if $acl}
44 <!-- Add toggle buttons for hours -->
45 <tr>
46 <td style='text-align: left;' class='list0'>
47
48 </td>
49 {foreach from=$Hours item=hours key=key_hours}
50 {if (($hours)%2)==0}
51 <td style="text-align:center; height: 22px; background-color: rgb(226, 226, 226); text-align: right;">
52 {else}
53 <td style="text-align:center; height: 22px; background-color: rgb(245, 245, 245); border-right: solid 1px #B0B0B0; text-align: right;">
54 {/if}
56 <input type='button' onClick="toggle_chk('^day_[0-9]*_{$hours}$');" value='+/-' style='width:100%;'>
57 </td>
58 {/foreach}
59 <td>
60 <input type='button' onClick="toggle_chk('^day_[0-9]*_[0-9]*$');" value='+/-' style='width:100%;'>
61 </td>
62 </tr>
63 {/if}
65 <!-- Add Entries -->
66 {foreach from=$Matrix item=days key=key_day}
67 <tr>
68 <td class='list0'>
69 <b>{$Days[$key_day]}</b>
70 </td>
71 {foreach from=$days item=hours key=key_hour}
72 {if (($key_hour)%2)==0}
73 <td style="text-align:center;height: 22px; background-color: rgb(226, 226, 226); ">
74 {else}
75 <td style="text-align:center;height: 22px; background-color: rgb(245, 245, 245); border-right: solid 1px;">
76 {/if}
77 <input type='checkbox'
78 {if $acl} id='day_{$key_day}_{$key_hour}' name='day_{$key_day}_{$key_hour}' {/if}
79 {if $Matrix[$key_day].$key_hour} checked {/if}
80 {if !$acl} disabled {/if}>
81 </td>
82 {/foreach}
84 {if $acl}
85 <!-- Add toggle button for days -->
86 <td>
87 <input type='button' onClick="toggle_chk('^day_{$key_day}_[0-9]*$')" value='+/-' style='padding:0px;margin:0px;'>
88 </td>
89 {/if}
90 </tr>
91 {/foreach}
92 </table>
93 <br>
94 <input type='hidden' name='sambaLogonHoursPosted' value='1'>
95 <br>
96 <p class="plugbottom">
97 {if $acl}
98 <input type=submit name="save_logonHours" value="{msgPool type=saveButton}">
99
100 {/if}
101 <input type=submit name="cancel_logonHours" value="{msgPool type=cancelButton}">
102 </p>
104 <!--
105 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
106 -->