[2] | 1 | <?php |
---|
| 2 | /***********************************************************************************\ |
---|
| 3 | * Expresso Administração * |
---|
| 4 | * by Joao Alfredo Knopik Junior (joao.alfredo@gmail.com, jakjr@celepar.pr.gov.br) * |
---|
| 5 | * ----------------------------------------------------------------------------------* |
---|
| 6 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 7 | * under the terms of the GNU General Public License as published by the * |
---|
| 8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 9 | * option) any later version. * |
---|
| 10 | \***********************************************************************************/ |
---|
| 11 | |
---|
| 12 | class uigroups |
---|
| 13 | { |
---|
| 14 | var $public_functions = array |
---|
| 15 | ( |
---|
[64] | 16 | 'list_groups' => True, |
---|
| 17 | 'add_groups' => True, |
---|
| 18 | 'edit_groups' => True, |
---|
| 19 | 'css' => True |
---|
[2] | 20 | ); |
---|
| 21 | |
---|
| 22 | var $nextmatchs; |
---|
| 23 | var $group; |
---|
| 24 | var $functions; |
---|
[33] | 25 | var $ldap_functions; |
---|
| 26 | var $db_functions; |
---|
[2] | 27 | |
---|
| 28 | function uigroups() |
---|
| 29 | { |
---|
| 30 | $this->group = CreateObject('expressoAdmin1_2.group'); |
---|
| 31 | $this->nextmatchs = createobject('phpgwapi.nextmatchs'); |
---|
| 32 | $this->functions = CreateObject('expressoAdmin1_2.functions'); |
---|
[33] | 33 | $this->ldap_functions = CreateObject('expressoAdmin1_2.ldap_functions'); |
---|
| 34 | $this->db_functions = CreateObject('expressoAdmin1_2.db_functions'); |
---|
[2] | 35 | |
---|
| 36 | $c = CreateObject('phpgwapi.config','expressoAdmin1_2'); |
---|
| 37 | $c->read_repository(); |
---|
| 38 | $this->current_config = $c->config_data; |
---|
| 39 | |
---|
| 40 | if(!@is_object($GLOBALS['phpgw']->js)) |
---|
| 41 | { |
---|
| 42 | $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); |
---|
| 43 | } |
---|
| 44 | $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2');#diretorio, arquivo.js, aplicacao |
---|
| 45 | $GLOBALS['phpgw']->js->validate_file('jscode','expressoadmin','expressoAdmin1_2'); |
---|
| 46 | $GLOBALS['phpgw']->js->validate_file('jscode','groups','expressoAdmin1_2'); |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | function list_groups() |
---|
| 50 | { |
---|
| 51 | $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; |
---|
[64] | 52 | $manager_acl = $this->functions->read_acl($account_lid); |
---|
| 53 | $raw_context = $acl['raw_context']; |
---|
| 54 | $contexts = $manager_acl['contexts']; |
---|
| 55 | foreach ($manager_acl['contexts_display'] as $index=>$tmp_context) |
---|
| 56 | { |
---|
| 57 | $context_display .= '<br>'.$tmp_context; |
---|
| 58 | } |
---|
[2] | 59 | |
---|
| 60 | // Verifica se tem acesso a este modulo |
---|
| 61 | if (!$this->functions->check_acl($account_lid,'list_groups')) |
---|
| 62 | { |
---|
| 63 | $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/expressoAdmin1_2/inc/access_denied.php')); |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | if(isset($_POST['query'])) |
---|
| 67 | { |
---|
| 68 | // limit query to limit characters |
---|
| 69 | if(eregi('^[a-z_0-9_-].+$',$_POST['query'])) |
---|
| 70 | $GLOBALS['query'] = $_POST['query']; |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | unset($GLOBALS['phpgw_info']['flags']['noheader']); |
---|
| 74 | unset($GLOBALS['phpgw_info']['flags']['nonavbar']); |
---|
| 75 | |
---|
| 76 | $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('User groups'); |
---|
| 77 | $GLOBALS['phpgw']->common->phpgw_header(); |
---|
| 78 | |
---|
| 79 | $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); |
---|
| 80 | $p->set_file(array('groups' => 'groups.tpl')); |
---|
| 81 | $p->set_block('groups','list','list'); |
---|
| 82 | $p->set_block('groups','row','row'); |
---|
| 83 | $p->set_block('groups','row_empty','row_empty'); |
---|
| 84 | |
---|
| 85 | // Seta as variaveis padroes. |
---|
| 86 | $var = Array( |
---|
| 87 | 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], |
---|
| 88 | 'back_url' => $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'), |
---|
| 89 | 'add_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.add_groups'), |
---|
| 90 | 'add_group_disabled' => $this->functions->check_acl($account_lid,'add_groups') ? '' : 'disabled', |
---|
[64] | 91 | //'context' => $context, |
---|
[2] | 92 | 'context_display' => $context_display, |
---|
| 93 | 'lang_groups_names' => lang('Groups Names'), |
---|
| 94 | 'lang_description' => lang('Description'), |
---|
| 95 | 'lang_add_groups' => lang('Add Groups'), |
---|
| 96 | 'lang_edit' => lang('Edit'), |
---|
| 97 | 'lang_delete' => lang('Delete'), |
---|
| 98 | 'lang_back' => lang('back'), |
---|
| 99 | 'lang_context' => lang('context'), |
---|
| 100 | 'lang_search' => lang('search') |
---|
| 101 | ); |
---|
| 102 | $p->set_var($var); |
---|
| 103 | |
---|
| 104 | // Save query |
---|
| 105 | $p->set_var('query', $GLOBALS['query']); |
---|
| 106 | |
---|
| 107 | //Admin make a search |
---|
| 108 | if ($GLOBALS['query'] != '') |
---|
| 109 | { |
---|
[64] | 110 | $groups_info = $this->functions->get_list('groups', $GLOBALS['query'], $contexts); |
---|
[2] | 111 | } |
---|
| 112 | $total = count($groups_info); |
---|
| 113 | |
---|
| 114 | if (!count($total) && $GLOBALS['query'] != '') |
---|
| 115 | { |
---|
| 116 | $p->set_var('message',lang('No matches found')); |
---|
| 117 | } |
---|
| 118 | else if ($total) |
---|
| 119 | { |
---|
| 120 | if ($this->functions->check_acl($account_lid,'edit_groups')) |
---|
| 121 | { |
---|
| 122 | $can_edit = True; |
---|
| 123 | } |
---|
| 124 | if ($this->functions->check_acl($account_lid,'delete_groups')) |
---|
| 125 | { |
---|
| 126 | $can_delete = True; |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | foreach($groups_info as $group) |
---|
| 130 | { |
---|
| 131 | $tr_color = $this->nextmatchs->alternate_row_color($tr_color); |
---|
| 132 | $var = Array( |
---|
| 133 | 'tr_color' => $tr_color, |
---|
| 134 | 'row_cn' => $group['cn'], |
---|
| 135 | 'row_description' => $group['description'] |
---|
| 136 | ); |
---|
| 137 | $p->set_var($var); |
---|
| 138 | |
---|
| 139 | if ($can_edit) |
---|
| 140 | { |
---|
| 141 | $p->set_var('edit_link',$this->row_action('edit','groups',$group['gidnumber'],$group['cn'])); |
---|
| 142 | } |
---|
| 143 | else |
---|
| 144 | { |
---|
| 145 | $p->set_var('edit_link',' '); |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | if ($can_delete) |
---|
| 149 | { |
---|
[64] | 150 | $p->set_var('delete_link',"<a href='#' onClick='javascript:delete_group(\"".$group['cn']."\",\"".$group['gidnumber']."\");'>Excluir</a>"); |
---|
[2] | 151 | } |
---|
| 152 | else |
---|
| 153 | { |
---|
| 154 | $p->set_var('delete_link',' '); |
---|
| 155 | } |
---|
| 156 | |
---|
| 157 | $p->fp('rows','row',True); |
---|
| 158 | } |
---|
| 159 | } |
---|
| 160 | $p->parse('rows','row_empty',True); |
---|
| 161 | $p->set_var($var); |
---|
| 162 | |
---|
| 163 | if (! $GLOBALS['phpgw']->acl->check('group_access',4,'admin')) |
---|
| 164 | { |
---|
| 165 | $p->set_var('input_add','<input type="submit" value="' . lang('Add') . '">'); |
---|
| 166 | } |
---|
| 167 | if (! $GLOBALS['phpgw']->acl->check('group_access',2,'admin')) |
---|
| 168 | { |
---|
| 169 | $p->set_var('input_search',lang('Search') . ' <input name="query" value="'.htmlspecialchars(stripslashes($GLOBALS['query'])).'">'); |
---|
| 170 | } |
---|
| 171 | $p->pfp('out','list'); |
---|
| 172 | } |
---|
| 173 | |
---|
| 174 | function add_groups() |
---|
| 175 | { |
---|
| 176 | $GLOBALS['phpgw']->js->set_onload('get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);'); |
---|
[33] | 177 | if ($this->current_config['expressoAdmin_samba_support'] == 'true') |
---|
| 178 | $GLOBALS['phpgw']->js->set_onload('get_available_sambadomains(document.forms[0].context.value, \'create_group\');'); |
---|
| 179 | |
---|
[64] | 180 | $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; |
---|
| 181 | $manager_acl = $this->functions->read_acl($manager_lid); |
---|
| 182 | $manager_contexts = $manager_acl['contexts']; |
---|
[2] | 183 | |
---|
| 184 | // Verifica se tem acesso a este modulo |
---|
[64] | 185 | if (!$this->functions->check_acl($manager_lid,'add_groups')) |
---|
[2] | 186 | { |
---|
| 187 | $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/expressoAdmin1_2/inc/access_denied.php')); |
---|
| 188 | } |
---|
| 189 | |
---|
| 190 | unset($GLOBALS['phpgw_info']['flags']['noheader']); |
---|
| 191 | unset($GLOBALS['phpgw_info']['flags']['nonavbar']); |
---|
| 192 | $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create Group'); |
---|
| 193 | $GLOBALS['phpgw']->common->phpgw_header(); |
---|
| 194 | |
---|
| 195 | // Set o template |
---|
| 196 | $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); |
---|
| 197 | $p->set_file(Array('create_group' => 'groups_form.tpl')); |
---|
| 198 | |
---|
| 199 | // Pega combo das organizações e seleciona um dos setores em caso de um erro na validaçao dos dados. |
---|
[64] | 200 | //$combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); |
---|
| 201 | foreach ($manager_contexts as $index=>$context) |
---|
| 202 | $combo_manager_org .= $this->functions->get_organizations($context, trim(strtolower($group_info['context']))); |
---|
[23] | 203 | $combo_all_orgs = $this->functions->get_organizations($GLOBALS['phpgw_info']['server']['ldap_context'], trim(strtolower($group_info['context']))); |
---|
[2] | 204 | |
---|
| 205 | // Chama funcao para criar lista de aplicativos disponiveis. |
---|
[64] | 206 | $apps = $this->functions->make_list_app($manager_lid); |
---|
[2] | 207 | |
---|
[33] | 208 | // Cria combo de dominio samba |
---|
| 209 | if ($this->current_config['expressoAdmin_samba_support'] == 'true') |
---|
| 210 | { |
---|
| 211 | $a_sambadomains = $this->db_functions->get_sambadomains_list(); |
---|
| 212 | $sambadomainname_options = ''; |
---|
| 213 | if (count($a_sambadomains)) |
---|
| 214 | { |
---|
| 215 | foreach ($a_sambadomains as $a_sambadomain) |
---|
| 216 | { |
---|
| 217 | // So mostra os sambaDomainName do contexto do manager |
---|
[64] | 218 | if ($this->ldap_functions->exist_sambadomains($manager_contexts, $a_sambadomain['samba_domain_name'])) |
---|
[33] | 219 | $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; |
---|
| 220 | } |
---|
| 221 | } |
---|
| 222 | } |
---|
| 223 | |
---|
[2] | 224 | // Seta variaveis utilizadas pelo tpl. |
---|
| 225 | $var = Array( |
---|
| 226 | 'color_bg1' => "#E8F0F0", |
---|
| 227 | 'color_bg2' => "#D3DCE3", |
---|
| 228 | 'type' => 'create_group', |
---|
| 229 | 'cn' => '', |
---|
| 230 | 'restrictionsOnGroup' => $this->current_config['expressoAdmin_restrictionsOnGroup'], |
---|
[33] | 231 | 'type' => 'create_group', |
---|
[2] | 232 | 'ldap_context' => $GLOBALS['phpgw_info']['server']['ldap_context'], |
---|
[46] | 233 | 'ufn_ldap_context' => ldap_dn2ufn($GLOBALS['phpgw_info']['server']['ldap_context']), |
---|
[2] | 234 | 'lang_back' => lang('Back'), |
---|
| 235 | 'lang_save' => lang('save'), |
---|
[73] | 236 | 'lang_group_organization' => lang('Group Organization'), |
---|
| 237 | 'lang_search_organization' => lang('Search Organiztion'), |
---|
[2] | 238 | 'lang_org' => lang('Organizations'), |
---|
| 239 | 'lang_group_name' => lang('group name'), |
---|
[46] | 240 | 'lang_description' => lang('Description'), |
---|
| 241 | 'lang_email' => lang('E-mail'), |
---|
| 242 | 'concatenateDomain' => $this->current_config['expressoAdmin_concatenateDomain'], |
---|
| 243 | 'defaultDomain' => $this->current_config['expressoAdmin_defaultDomain'], |
---|
[2] | 244 | 'lang_group_users' => lang('Group users'), |
---|
| 245 | 'lang_applications' => lang('Applications'), |
---|
| 246 | 'lang_add_user' => lang('Add User'), |
---|
| 247 | 'lang_rem_user' => lang('Remove User'), |
---|
| 248 | 'lang_all_users' => lang('Select users from all sub-organizations'), |
---|
| 249 | 'apps' => $apps, |
---|
[33] | 250 | //'use_attrs_samba_checked' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? 'CHECKED' : '', |
---|
| 251 | 'use_attrs_samba_checked' => '', |
---|
| 252 | 'disabled_samba' => 'disabled', |
---|
| 253 | 'display_samba_options' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? '' : '"display:none"', |
---|
[64] | 254 | 'disable_email_groups' => $this->functions->check_acl($manager_lid,'edit_email_groups') ? '' : 'disabled', |
---|
[33] | 255 | 'sambadomainname_options' => $sambadomainname_options, |
---|
[2] | 256 | 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.list_groups'), |
---|
| 257 | 'combo_manager_org' => $combo_manager_org, |
---|
| 258 | 'combo_all_orgs' => $combo_all_orgs |
---|
| 259 | ); |
---|
| 260 | $p->set_var($var); |
---|
| 261 | |
---|
| 262 | $p->pfp('out','create_group'); |
---|
| 263 | } |
---|
| 264 | |
---|
| 265 | function edit_groups() |
---|
| 266 | { |
---|
| 267 | $GLOBALS['phpgw']->js->set_onload('get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);'); |
---|
[64] | 268 | |
---|
| 269 | $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; |
---|
| 270 | $manager_acl = $this->functions->read_acl($manager_lid); |
---|
| 271 | $manager_contexts = $manager_acl['contexts']; |
---|
| 272 | |
---|
[2] | 273 | // Verifica se tem acesso a este modulo |
---|
[64] | 274 | if (!$this->functions->check_acl($manager_lid,'edit_groups')) |
---|
[2] | 275 | { |
---|
| 276 | $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/expressoAdmin1_2/inc/access_denied.php')); |
---|
| 277 | } |
---|
| 278 | |
---|
| 279 | // GET all infomations about the group. |
---|
[64] | 280 | $group_info = $this->group->get_info($_GET['gidnumber']); |
---|
[2] | 281 | |
---|
| 282 | unset($GLOBALS['phpgw_info']['flags']['noheader']); |
---|
| 283 | unset($GLOBALS['phpgw_info']['flags']['nonavbar']); |
---|
| 284 | $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Group'); |
---|
| 285 | $GLOBALS['phpgw']->common->phpgw_header(); |
---|
| 286 | |
---|
| 287 | // Set o template |
---|
| 288 | $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); |
---|
| 289 | $p->set_file(Array('create_group' => 'groups_form.tpl')); |
---|
| 290 | |
---|
| 291 | // Pega combo das organizações e seleciona a org do grupo. |
---|
[64] | 292 | //$combo_manager_org = $this->functions->get_organizations($manager_context, trim(strtolower($group_info['context']))); |
---|
| 293 | foreach ($manager_contexts as $index=>$context) |
---|
| 294 | $combo_manager_org .= $this->functions->get_organizations($context, trim(strtolower($group_info['context']))); |
---|
[23] | 295 | $combo_all_orgs = $this->functions->get_organizations($GLOBALS['phpgw_info']['server']['ldap_context'], trim(strtolower($group_info['context']))); |
---|
[2] | 296 | |
---|
| 297 | // Usuarios do grupo. |
---|
[24] | 298 | $user_count = 0; |
---|
[2] | 299 | if (count($group_info['memberuid_info']) > 0) |
---|
| 300 | { |
---|
[24] | 301 | foreach ($group_info['memberuid_info'] as $uid=>$user_data) |
---|
[2] | 302 | { |
---|
[24] | 303 | $array_users[$user_data['uidnumber']] = $user_data['cn']; |
---|
| 304 | $array_users_uid[$user_data['uidnumber']] = $uid; |
---|
| 305 | $array_users_type[$user_data['uidnumber']] = $user_data['type']; |
---|
[2] | 306 | } |
---|
| 307 | natcasesort($array_users); |
---|
| 308 | foreach ($array_users as $uidnumber=>$cn) |
---|
| 309 | { |
---|
[24] | 310 | $user_count++; |
---|
| 311 | if ($array_users_type[$uidnumber] == 'u') |
---|
| 312 | { |
---|
| 313 | $users .= "<option value=" . $uidnumber . ">" . $cn . " [" . $array_users_uid[$uidnumber] . "]</option>"; |
---|
| 314 | } |
---|
| 315 | else |
---|
| 316 | { |
---|
| 317 | $unknow .= "<option value=-1>" . $cn . " [Corrigir manualmente]</option>"; |
---|
| 318 | } |
---|
[2] | 319 | } |
---|
[24] | 320 | |
---|
| 321 | $opt_tmp_users = '<option value="-1" disabled>----------------------------- Usuários ---------------------------- </option>'."\n"; |
---|
[73] | 322 | $opt_tmp_unknow = '<option value="-1" disabled>------------ Usuários não encontrados no BD, somente no LDAP ------------</option>'."\n"; |
---|
[24] | 323 | $ea_select_usersInGroup = $unknow != '' ? $opt_tmp_unknow . $unknow . $opt_tmp_users . $users : $opt_tmp_users . $users; |
---|
[2] | 324 | } |
---|
| 325 | |
---|
| 326 | // Chama funcao para criar lista de aplicativos disponiveis. |
---|
[64] | 327 | $apps = $this->functions->make_list_app($manager_lid, $group_info['apps']); |
---|
[2] | 328 | |
---|
[33] | 329 | // Cria combo de dominios do samba |
---|
| 330 | if ($this->current_config['expressoAdmin_samba_support'] == 'true') |
---|
| 331 | { |
---|
| 332 | $a_sambadomains = $this->db_functions->get_sambadomains_list(); |
---|
| 333 | $sambadomainname_options = ''; |
---|
| 334 | if (count($a_sambadomains)) |
---|
| 335 | { |
---|
| 336 | foreach ($a_sambadomains as $a_sambadomain) |
---|
| 337 | { |
---|
| 338 | if ($a_sambadomain['samba_domain_sid'] == $group_info['sambasid']) |
---|
| 339 | $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "' SELECTED>" . $a_sambadomain['samba_domain_name'] . "</option>"; |
---|
| 340 | else |
---|
| 341 | $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; |
---|
| 342 | } |
---|
| 343 | } |
---|
| 344 | } |
---|
| 345 | |
---|
[2] | 346 | // Seta variaveis utilizadas pelo tpl. |
---|
| 347 | $var = Array( |
---|
| 348 | 'color_bg1' => "#E8F0F0", |
---|
| 349 | 'color_bg2' => "#D3DCE3", |
---|
| 350 | 'type' => 'edit_group', |
---|
| 351 | 'ldap_context' => $GLOBALS['phpgw_info']['server']['ldap_context'], |
---|
| 352 | 'lang_back' => lang('Back'), |
---|
| 353 | 'lang_save' => lang('save'), |
---|
[73] | 354 | 'lang_group_organization' => lang('Group Organization'), |
---|
| 355 | 'lang_search_organization' => lang('Search Organiztion'), |
---|
[2] | 356 | 'lang_org' => lang('Organizations'), |
---|
| 357 | 'lang_group_name' => lang('group name'), |
---|
[46] | 358 | 'lang_description' => lang('Description'), |
---|
| 359 | 'lang_email' => lang('E-mail'), |
---|
[2] | 360 | 'lang_group_users' => lang('Group users'), |
---|
| 361 | 'lang_applications' => lang('Applications'), |
---|
| 362 | 'lang_add_user' => lang('Add User'), |
---|
| 363 | 'lang_rem_user' => lang('Remove User'), |
---|
| 364 | 'lang_all_users' => lang('Select users from all sub-organizations'), |
---|
| 365 | 'gidnumber' => $group_info['gidnumber'], |
---|
[64] | 366 | //'manager_context' => $manager_context, |
---|
[2] | 367 | 'cn' => $group_info['cn'], |
---|
[24] | 368 | 'user_count' => $user_count, |
---|
[46] | 369 | 'email' => $group_info['email'], |
---|
[2] | 370 | 'description' => $group_info['description'], |
---|
| 371 | 'apps' => $apps, |
---|
| 372 | 'use_attrs_samba_checked' => $group_info['sambaGroup'] ? 'CHECKED' : '', |
---|
[33] | 373 | 'disabled_samba' => $group_info['sambaGroup'] ? '' : 'disabled', |
---|
[64] | 374 | 'disable_email_groups' => $this->functions->check_acl($manager_lid,'edit_email_groups') ? '' : 'disabled', |
---|
[33] | 375 | 'sambadomainname_options' => $sambadomainname_options, |
---|
[23] | 376 | 'phpgwaccountvisible_checked' => $group_info['phpgwaccountvisible'] == '-1' ? 'CHECKED' : '', |
---|
[2] | 377 | 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.list_groups'), |
---|
| 378 | 'combo_manager_org' => $combo_manager_org, |
---|
| 379 | 'combo_all_orgs' => $combo_all_orgs, |
---|
| 380 | 'ea_select_usersInGroup' => $ea_select_usersInGroup |
---|
| 381 | ); |
---|
| 382 | $p->set_var($var); |
---|
| 383 | |
---|
| 384 | $p->pfp('out','create_group'); |
---|
| 385 | } |
---|
| 386 | |
---|
| 387 | function row_action($action,$type,$gidnumber,$group_name) |
---|
| 388 | { |
---|
| 389 | return '<a href="'.$GLOBALS['phpgw']->link('/index.php',Array( |
---|
| 390 | 'menuaction' => 'expressoAdmin1_2.uigroups.'.$action.'_'.$type, |
---|
| 391 | 'gidnumber' => $gidnumber, |
---|
| 392 | 'group_name' => $group_name |
---|
| 393 | )).'"> '.lang($action).' </a>'; |
---|
| 394 | } |
---|
| 395 | |
---|
| 396 | function css() |
---|
| 397 | { |
---|
| 398 | $appCSS = ''; |
---|
| 399 | /* 'th.activetab |
---|
| 400 | { |
---|
| 401 | color:#000000; |
---|
| 402 | background-color:#D3DCE3; |
---|
| 403 | border-top-width : 1px; |
---|
| 404 | border-top-style : solid; |
---|
| 405 | border-top-color : Black; |
---|
| 406 | border-left-width : 1px; |
---|
| 407 | border-left-style : solid; |
---|
| 408 | border-left-color : Black; |
---|
| 409 | border-right-width : 1px; |
---|
| 410 | border-right-style : solid; |
---|
| 411 | border-right-color : Black; |
---|
| 412 | } |
---|
| 413 | |
---|
| 414 | th.inactivetab |
---|
| 415 | { |
---|
| 416 | color:#000000; |
---|
| 417 | background-color:#E8F0F0; |
---|
| 418 | border-bottom-width : 1px; |
---|
| 419 | border-bottom-style : solid; |
---|
| 420 | border-bottom-color : Black; |
---|
| 421 | } |
---|
| 422 | |
---|
| 423 | .td_left { border-left : 1px solid Gray; border-top : 1px solid Gray; } |
---|
| 424 | .td_right { border-right : 1px solid Gray; border-top : 1px solid Gray; } |
---|
| 425 | |
---|
| 426 | div.activetab{ display:inline; } |
---|
| 427 | div.inactivetab{ display:none; }';*/ |
---|
| 428 | |
---|
| 429 | return $appCSS; |
---|
| 430 | } |
---|
| 431 | |
---|
| 432 | } |
---|
| 433 | ?> |
---|