From 3177cbe7b6ac19bc77d3e5b5f49915e149942404 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Fri, 21 Dec 2001 03:41:06 +0000 Subject: [PATCH] formatting --- admin/inc/class.bocurrentsessions.inc.php | 5 +- admin/inc/class.soaccounts.inc.php | 5 +- admin/inc/class.socurrentsessions.inc.php | 3 +- admin/inc/class.uiaccess_history.inc.php | 42 +-- admin/inc/class.uiaccounts.inc.php | 315 +++++++++++----------- admin/inc/class.uiaclmanager.inc.php | 3 +- admin/inc/class.uicurrentsessions.inc.php | 14 +- admin/inc/class.uiserver.inc.php | 6 +- 8 files changed, 193 insertions(+), 200 deletions(-) diff --git a/admin/inc/class.bocurrentsessions.inc.php b/admin/inc/class.bocurrentsessions.inc.php index dd8565f880..102d46704e 100644 --- a/admin/inc/class.bocurrentsessions.inc.php +++ b/admin/inc/class.bocurrentsessions.inc.php @@ -17,8 +17,8 @@ var $ui; var $so; var $public_functions = array( - 'kill' => True - ); + 'kill' => True + ); function bocurrentsessions() { @@ -70,5 +70,4 @@ $this->ui = createobject('admin.uicurrentsessions'); $this->ui->list_sessions(); } - } diff --git a/admin/inc/class.soaccounts.inc.php b/admin/inc/class.soaccounts.inc.php index 1af63d7fbf..9ca297ece1 100755 --- a/admin/inc/class.soaccounts.inc.php +++ b/admin/inc/class.soaccounts.inc.php @@ -10,10 +10,9 @@ \**************************************************************************/ /* $Id$ */ - + class soaccounts { - function soaccounts() { } @@ -94,7 +93,7 @@ } } -/* if ($apps_after) +/* if ($apps_after) { $GLOBALS['pref'] = CreateObject('phpgwapi.preferences',$userData['account_id']); $GLOBALS['phpgw']->common->hook_single('add_def_pref','admin'); diff --git a/admin/inc/class.socurrentsessions.inc.php b/admin/inc/class.socurrentsessions.inc.php index b5a83a20a9..bcda4572eb 100644 --- a/admin/inc/class.socurrentsessions.inc.php +++ b/admin/inc/class.socurrentsessions.inc.php @@ -48,5 +48,4 @@ } return $values; } - - } \ No newline at end of file + } diff --git a/admin/inc/class.uiaccess_history.inc.php b/admin/inc/class.uiaccess_history.inc.php index 3e4e601943..e0f1b6563b 100644 --- a/admin/inc/class.uiaccess_history.inc.php +++ b/admin/inc/class.uiaccess_history.inc.php @@ -15,8 +15,8 @@ { var $template; var $public_functions = array( - 'list_history' => True - ); + 'list_history' => True + ); function uiaccess_history() { @@ -46,25 +46,25 @@ $total_records = $this->bo->total($account_id); $var = Array( - 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], - 'nextmatchs_left' => $this->nextmatchs->left('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), - 'nextmatchs_right' => $this->nextmatchs->right('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), - 'showing' => $this->nextmatchs->show_hits($total_records,$start), - 'lang_loginid' => lang('LoginID'), - 'lang_ip' => lang('IP'), - 'lang_login' => lang('Login'), - 'lang_logout' => lang('Logout'), - 'lang_total' => lang('Total') + 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'nextmatchs_left' => $this->nextmatchs->left('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), + 'nextmatchs_right' => $this->nextmatchs->right('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id), + 'showing' => $this->nextmatchs->show_hits($total_records,$start), + 'lang_loginid' => lang('LoginID'), + 'lang_ip' => lang('IP'), + 'lang_login' => lang('Login'), + 'lang_logout' => lang('Logout'), + 'lang_total' => lang('Total') ); if ($account_id) { $var['link_return_to_view_account'] = '' . lang('Return to view account') . ''; + Array( + 'menuaction' => 'admin.uiaccounts.view', + 'account_id' => $account_id + ) + ) . '">' . lang('Return to view account') . ''; $var['lang_last_x_logins'] = lang('Last %1 logins for %2',$total_records,$this->bo->grab_fullname($account_id)); } else @@ -76,7 +76,7 @@ $records = $this->bo->list_history($account_id,$start,$order,$sort); while (is_array($records) && list(,$record) = each($records)) - { + { $this->nextmatchs->template_alternate_row_color($this->template); $var = array( @@ -109,8 +109,8 @@ } $var = Array( - 'bg_color' => $GLOBALS['phpgw_info']['themes']['bg_color'], - 'footer_total' => lang('Total records') . ': ' . $total_records + 'bg_color' => $GLOBALS['phpgw_info']['themes']['bg_color'], + 'footer_total' => lang('Total records') . ': ' . $total_records ); if ($account_id) { @@ -120,11 +120,11 @@ { $var['lang_percent'] = lang('Percent of users that logged out') . ': ' . $percent . '%'; } - + // create the menu on the left, if needed $menuClass = CreateObject('admin.uimenuclass'); $var['rows'] = $menuClass->createHTMLCode('view_account'); - + $this->template->set_var($var); $this->template->pfp('out','list'); } diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index bb80b4cf3a..da168a6e18 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -13,17 +13,16 @@ class uiaccounts { - var $public_functions = array( - 'list_groups' => True, - 'list_users' => True, - 'add_group' => True, - 'add_user' => True, - 'delete_group' => True, - 'delete_user' => True, - 'edit_user' => True, - 'edit_group' => True, - 'view_user' => True + 'list_groups' => True, + 'list_users' => True, + 'add_group' => True, + 'add_user' => True, + 'delete_group' => True, + 'delete_user' => True, + 'edit_user' => True, + 'edit_group' => True, + 'view_user' => True ); var $bo; @@ -39,9 +38,9 @@ function row_action($action,$type,$account_id) { return ' '.lang($action).' '; + 'menuaction' => 'admin.uiaccounts.'.$action.'_'.$type, + 'account_id' => $account_id + )).'"> '.lang($action).' '; } function list_groups() @@ -82,16 +81,16 @@ $url = $GLOBALS['phpgw']->link('/index.php'); - $var = Array( - 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], - 'left_next_matchs' => $this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), - 'right_next_matchs' => $this->nextmatchs->right('/admin/groups.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), - 'lang_groups' => lang('user groups'), - 'sort_name' => $this->nextmatchs->show_sort_order($sort,'account_lid',$order,'/index.php',lang('name'),'menuaction=admin.uiaccounts.list_groups'), - 'header_edit' => lang('Edit'), - 'header_delete' => lang('Delete') - ); - $p->set_var($var); + $var = Array( + 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'left_next_matchs' => $this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), + 'right_next_matchs' => $this->nextmatchs->right('/admin/groups.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'), + 'lang_groups' => lang('user groups'), + 'sort_name' => $this->nextmatchs->show_sort_order($sort,'account_lid',$order,'/index.php',lang('name'),'menuaction=admin.uiaccounts.list_groups'), + 'header_edit' => lang('Edit'), + 'header_delete' => lang('Delete') + ); + $p->set_var($var); if (!count($account_info) || !$total) { @@ -119,9 +118,9 @@ { $tr_color = $this->nextmatchs->alternate_row_color($tr_color); $var = Array( - 'tr_color' => $tr_color, - 'group_name' => (!$account['account_lid']?' ':$account['account_lid']), - 'delete_link' => $this->row_action('delete','group',$account['account_id']) + 'tr_color' => $tr_color, + 'group_name' => (!$account['account_lid']?' ':$account['account_lid']), + 'delete_link' => $this->row_action('delete','group',$account['account_id']) ); $p->set_var($var); @@ -148,8 +147,8 @@ } } $var = Array( - 'new_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_group'), - 'search_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups') + 'new_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_group'), + 'search_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups') ); $p->set_var($var); @@ -189,7 +188,7 @@ $p->set_file( Array( - 'accounts' => 'accounts.tpl' + 'accounts' => 'accounts.tpl' ) ); $p->set_block('accounts','list','list'); @@ -210,20 +209,20 @@ $url = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'); $var = Array( - 'bg_color' => $GLOBALS['phpgw_info']['theme']['bg_color'], - 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], - 'left_next_matchs' => $this->nextmatchs->left($url,$start,$total,'menuaction=admin.uiaccounts.list_users'), - 'lang_user_accounts' => lang('user accounts'), - 'right_next_matchs' => $this->nextmatchs->right($url,$start,$total,'menuaction=admin.uiaccounts.list_users'), - 'lang_loginid' => $this->nextmatchs->show_sort_order($sort,'account_lid',$order,$url,lang('LoginID')), - 'lang_lastname' => $this->nextmatchs->show_sort_order($sort,'account_lastname',$order,$url,lang('last name')), - 'lang_firstname' => $this->nextmatchs->show_sort_order($sort,'account_firstname',$order,$url,lang('first name')), - 'lang_edit' => lang('edit'), - 'lang_delete' => lang('delete'), - 'lang_view' => lang('view'), - 'actionurl' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_user'), - 'accounts_url' => $url, - 'lang_search' => lang('search') + 'bg_color' => $GLOBALS['phpgw_info']['theme']['bg_color'], + 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'left_next_matchs' => $this->nextmatchs->left($url,$start,$total,'menuaction=admin.uiaccounts.list_users'), + 'lang_user_accounts' => lang('user accounts'), + 'right_next_matchs' => $this->nextmatchs->right($url,$start,$total,'menuaction=admin.uiaccounts.list_users'), + 'lang_loginid' => $this->nextmatchs->show_sort_order($sort,'account_lid',$order,$url,lang('LoginID')), + 'lang_lastname' => $this->nextmatchs->show_sort_order($sort,'account_lastname',$order,$url,lang('last name')), + 'lang_firstname' => $this->nextmatchs->show_sort_order($sort,'account_firstname',$order,$url,lang('first name')), + 'lang_edit' => lang('edit'), + 'lang_delete' => lang('delete'), + 'lang_view' => lang('view'), + 'actionurl' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_user'), + 'accounts_url' => $url, + 'lang_search' => lang('search') ); $p->set_var($var); @@ -311,10 +310,10 @@ } $group_info = Array( - 'account_id' => $GLOBALS['HTTP_GET_VARS']['account_id'], - 'account_name' => '', - 'account_user' => Array(), - 'account_apps' => Array() + 'account_id' => $GLOBALS['HTTP_GET_VARS']['account_id'], + 'account_name' => '', + 'account_user' => Array(), + 'account_apps' => Array() ); $this->create_edit_group($group_info); } @@ -348,7 +347,7 @@ Array( 'body' => 'delete_common.tpl', 'message_row' => 'message_row.tpl', - 'form_button' => 'form_button_script.tpl' + 'form_button' => 'form_button_script.tpl' ) ); @@ -368,11 +367,11 @@ while (list(,$id) = each($old_group_list)) { $user_list .= '' . $GLOBALS['phpgw']->common->grab_owner_name($id) . '
'; + Array( + 'menuaction' => 'admin.uiaccounts.edit_user', + 'account_id' => $id + ) + ) . '">' . $GLOBALS['phpgw']->common->grab_owner_name($id) . '
'; } $p->set_var('message_display',$user_list); $p->parse('messages','message_row',True); @@ -383,22 +382,22 @@ } $var = Array( - 'submit_button' => lang('Submit'), - 'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_group'), - 'action_text_button' => lang('Yes'), - 'action_confirm_button' => '', - 'action_extra_field' => ''."\n" + 'submit_button' => lang('Submit'), + 'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_group'), + 'action_text_button' => lang('Yes'), + 'action_confirm_button' => '', + 'action_extra_field' => ''."\n" ); $p->set_var($var); $p->parse('yes','form_button'); $var = Array( - 'submit_button' => lang('Submit'), - 'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'), - 'action_text_button' => ' '.lang('No'), - 'action_confirm_button' => '', - 'action_extra_field' => '' + 'submit_button' => lang('Submit'), + 'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'), + 'action_text_button' => ' '.lang('No'), + 'action_confirm_button' => '', + 'action_extra_field' => '' ); $p->set_var($var); $p->parse('no','form_button'); @@ -425,13 +424,13 @@ ) ); $var = Array( - 'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'), - 'account_id' => $GLOBALS['HTTP_GET_VARS']['account_id'] + 'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'), + 'account_id' => $GLOBALS['HTTP_GET_VARS']['account_id'] ); // the account can have special chars/white spaces, if it is a ldap dn $account_id = rawurlencode($GLOBALS['HTTP_GET_VARS']['account_id']); - + // Find out who the new owner is of the deleted users records... $users = $GLOBALS['phpgw']->accounts->get_list('accounts'); $c_users = count($users); @@ -473,14 +472,14 @@ else { $group_info = Array( - 'account_id' => intval($GLOBALS['HTTP_GET_VARS']['account_id']), - 'account_name' => $GLOBALS['phpgw']->accounts->id2name($GLOBALS['HTTP_GET_VARS']['account_id']), - 'account_user' => $this->bo->load_group_users($GLOBALS['HTTP_GET_VARS']['account_id']), - 'account_apps' => $this->bo->load_group_apps($GLOBALS['HTTP_GET_VARS']['account_id']) + 'account_id' => intval($GLOBALS['HTTP_GET_VARS']['account_id']), + 'account_name' => $GLOBALS['phpgw']->accounts->id2name($GLOBALS['HTTP_GET_VARS']['account_id']), + 'account_user' => $this->bo->load_group_users($GLOBALS['HTTP_GET_VARS']['account_id']), + 'account_apps' => $this->bo->load_group_apps($GLOBALS['HTTP_GET_VARS']['account_id']) ); $this->create_edit_group($group_info); - } + } } function edit_user($cd='',$account_id='') @@ -509,7 +508,7 @@ else { $this->create_edit_user($account_id); - } + } } function view_user() @@ -535,20 +534,20 @@ $t->set_block('account','link_row'); $var = Array( - 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], - 'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'], - 'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'], - 'lang_action' => lang('View user account'), - 'lang_loginid' => lang('LoginID'), - 'lang_account_active' => lang('Account active'), - 'lang_password' => lang('Password'), - 'lang_reenter_password' => lang('Re-Enter Password'), - 'lang_lastname' => lang('Last Name'), - 'lang_groups' => lang('Groups'), - 'lang_firstname' => lang('First Name'), - 'lang_lastlogin' => lang('Last login'), - 'lang_lastloginfrom' => lang('Last login from'), - 'lang_expires' => lang('Expires') + 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'], + 'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'], + 'lang_action' => lang('View user account'), + 'lang_loginid' => lang('LoginID'), + 'lang_account_active' => lang('Account active'), + 'lang_password' => lang('Password'), + 'lang_reenter_password' => lang('Re-Enter Password'), + 'lang_lastname' => lang('Last Name'), + 'lang_groups' => lang('Groups'), + 'lang_firstname' => lang('First Name'), + 'lang_lastlogin' => lang('Last login'), + 'lang_lastloginfrom' => lang('Last login from'), + 'lang_expires' => lang('Expires') ); $t->parse('password_fields','form_logininfo',True); @@ -556,33 +555,33 @@ $account = CreateObject('phpgwapi.accounts',intval($GLOBALS['HTTP_GET_VARS']['account_id']),'u'); $userData = $account->read_repository(); - $var['account_lid'] = $userData['account_lid']; - $var['account_firstname'] = $userData['firstname']; - $var['account_lastname'] = $userData['lastname']; + $var['account_lid'] = $userData['account_lid']; + $var['account_firstname'] = $userData['firstname']; + $var['account_lastname'] = $userData['lastname']; if ($userData['status']) { - $var['account_status'] = lang('Enabled'); + $var['account_status'] = lang('Enabled'); } else { - $var['account_status'] = '' . lang('Disabled') . ''; + $var['account_status'] = '' . lang('Disabled') . ''; } // Last login time if ($userData['lastlogin']) { - $var['account_lastlogin'] = $GLOBALS['phpgw']->common->show_date($userData['lastlogin']); + $var['account_lastlogin'] = $GLOBALS['phpgw']->common->show_date($userData['lastlogin']); } else { - $var['account_lastlogin'] = lang('Never'); + $var['account_lastlogin'] = lang('Never'); } // Last login IP if ($userData['lastloginfrom']) { - $var['account_lastloginfrom'] = $userData['lastloginfrom']; + $var['account_lastloginfrom'] = $userData['lastloginfrom']; } else { @@ -592,7 +591,7 @@ // Account expires if ($userData['expires'] != -1) { - $var['input_expires'] = $GLOBALS['phpgw']->common->show_date($userData['expires']); + $var['input_expires'] = $GLOBALS['phpgw']->common->show_date($userData['expires']); } else { @@ -616,7 +615,7 @@ $account_lastlogin = $userData['account_lastlogin']; $account_lastloginfrom = $userData['account_lastloginfrom']; - $account_status = $userData['account_status']; + $account_status = $userData['account_status']; // create list of available app $i = 0; @@ -647,8 +646,8 @@ $part1 = sprintf("%s%s",lang($perm_display[$i]['translatedName']),($_userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]?'  X':' ')); } - $i++; - + $i++; + if ($perm_display[$i]['translatedName']) { $part2 = sprintf("%s%s",lang($perm_display[$i]['translatedName']),($_userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]?'  X':' ')); @@ -657,7 +656,7 @@ { $part2 = ' '; } - + $appRightsOutput .= sprintf("$part1$part2\n",$GLOBALS['phpgw_info']['theme']['row_on']); } @@ -673,14 +672,14 @@ function create_edit_group($group_info,$_errors='') { $apps_with_acl = Array( - 'addressbook' => True, - 'todo' => True, - 'calendar' => True, - 'notes' => True, - 'projects' => True, - 'phonelog' => True, - 'infolog' => True, - 'phpwebhosting' => True + 'addressbook' => True, + 'todo' => True, + 'calendar' => True, + 'notes' => True, + 'projects' => True, + 'phonelog' => True, + 'infolog' => True, + 'phpwebhosting' => True ); $sbox = createobject('phpgwapi.sbox'); @@ -713,15 +712,15 @@ } $var = Array( - 'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.'.($group_info['account_id']?'edit':'add').'_group'), - 'hidden_vars' => '', - 'lang_group_name' => lang('group name'), - 'group_name_value' => $group_info['account_name'], - 'lang_include_user' => lang('Select users for inclusion'), - 'error' => (!$_errors?'':'
'.$GLOBALS['phpgw']->common->error_list($_errors).'
'), - 'select_size' => ($account_num < 5?$account_num:5), - 'user_list' => $user_list, - 'lang_permissions' => lang('Permissions this group has') + 'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.'.($group_info['account_id']?'edit':'add').'_group'), + 'hidden_vars' => '', + 'lang_group_name' => lang('group name'), + 'group_name_value' => $group_info['account_name'], + 'lang_include_user' => lang('Select users for inclusion'), + 'error' => (!$_errors?'':'
'.$GLOBALS['phpgw']->common->error_list($_errors).'
'), + 'select_size' => ($account_num < 5?$account_num:5), + 'user_list' => $user_list, + 'lang_permissions' => lang('Permissions this group has') ); $p->set_var($var); @@ -780,8 +779,8 @@ } $var = Array( - 'permissions_list' => $perm_html, - 'lang_submit_button' => lang('submit changes') + 'permissions_list' => $perm_html, + 'lang_submit_button' => lang('submit changes') ); $p->set_var($var); $p->pfp('out','form'); @@ -821,7 +820,7 @@ { $userGroups[$key]['account_id'] = $value; } - + $account = CreateObject('phpgwapi.accounts'); $allGroups = $account->get_list('groups'); } @@ -860,27 +859,27 @@ $page_params['menuaction'] = 'admin.boaccounts.'.($_account_id?'edit':'add').'_user'; if($_account_id) { - $page_params['account_id'] = $_account_id; - $page_params['old_loginid'] = rawurlencode($userData['account_lid']); + $page_params['account_id'] = $_account_id; + $page_params['old_loginid'] = rawurlencode($userData['account_lid']); } $var = Array( - 'form_action' => $GLOBALS['phpgw']->link('/index.php',$page_params), - 'error_messages' => (!$_errors?'':'
'.$GLOBALS['phpgw']->common->error_list($_errors).'
'), - 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], - 'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'], - 'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'], - 'lang_action' => ($_account_id?lang('Edit user account'):lang('Add new account')), - 'lang_loginid' => lang('LoginID'), - 'lang_account_active' => lang('Account active'), - 'lang_password' => lang('Password'), - 'lang_reenter_password' => lang('Re-Enter Password'), - 'lang_lastname' => lang('Last Name'), - 'lang_groups' => lang('Groups'), - 'lang_expires' => lang('Expires'), - 'lang_firstname' => lang('First Name'), - 'lang_button' => ($_account_id?lang('Save'):lang('Add')) - /* 'lang_file_space' => lang('File Space') */ + 'form_action' => $GLOBALS['phpgw']->link('/index.php',$page_params), + 'error_messages' => (!$_errors?'':'
'.$GLOBALS['phpgw']->common->error_list($_errors).'
'), + 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], + 'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'], + 'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'], + 'lang_action' => ($_account_id?lang('Edit user account'):lang('Add new account')), + 'lang_loginid' => lang('LoginID'), + 'lang_account_active' => lang('Account active'), + 'lang_password' => lang('Password'), + 'lang_reenter_password' => lang('Re-Enter Password'), + 'lang_lastname' => lang('Last Name'), + 'lang_groups' => lang('Groups'), + 'lang_expires' => lang('Expires'), + 'lang_firstname' => lang('First Name'), + 'lang_button' => ($_account_id?lang('Save'):lang('Add')) + /* 'lang_file_space' => lang('File Space') */ ); $t->set_var($var); $t->parse('form_buttons','form_buttons_',True); @@ -928,27 +927,27 @@ $account_file_space_select .= ''; $var = Array( - 'lang_file_space' => 'File space', - 'account_file_space' => $account_file_space, - 'account_file_space_select' => $account_file_space_select + 'lang_file_space' => 'File space', + 'account_file_space' => $account_file_space, + 'account_file_space_select' => $account_file_space_select ); $t->set_var($var); */ $var = Array( - 'input_expires' => $GLOBALS['phpgw']->common->dateformatorder($_y,$_m,$_d,True), - 'lang_never' => lang('Never'), - 'account_lid' => '', - 'lang_homedir' => $lang_homedir, - 'lang_shell' => $lang_shell, - 'homedirectory' => $homedirectory, - 'loginshell' => $loginshell, - 'account_status' => '', - 'account_firstname' => '', - 'account_lastname' => '', - 'account_passwd' => $account_passwd, - 'account_passwd_2' => $account_passwd_2, - 'account_file_space' => $account_file_space + 'input_expires' => $GLOBALS['phpgw']->common->dateformatorder($_y,$_m,$_d,True), + 'lang_never' => lang('Never'), + 'account_lid' => '', + 'lang_homedir' => $lang_homedir, + 'lang_shell' => $lang_shell, + 'homedirectory' => $homedirectory, + 'loginshell' => $loginshell, + 'account_status' => '', + 'account_firstname' => '', + 'account_lastname' => '', + 'account_passwd' => $account_passwd, + 'account_passwd_2' => $account_passwd_2, + 'account_file_space' => $account_file_space ); if($userData['expires'] == -1) @@ -1015,7 +1014,7 @@ ($userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]?' checked':'')); } - $i++; + $i++; if ($perm_display[$i]['translatedName']) { @@ -1028,17 +1027,17 @@ { $part2 = ' '; } - + $appRightsOutput .= sprintf('%s%s',$GLOBALS['phpgw_info']['theme']['row_on'], $part1, $part2); } $var = Array( - 'groups_select' => ''."\n", - 'permissions_list' => $appRightsOutput + 'groups_select' => ''."\n", + 'permissions_list' => $appRightsOutput ); $t->set_var($var); - // create the menu on the left, if needed + // create the menu on the left, if needed $menuClass = CreateObject('admin.uimenuclass'); $t->set_var('rows',$menuClass->createHTMLCode('edit_user')); diff --git a/admin/inc/class.uiaclmanager.inc.php b/admin/inc/class.uiaclmanager.inc.php index ede189d98f..420a120c3c 100644 --- a/admin/inc/class.uiaclmanager.inc.php +++ b/admin/inc/class.uiaclmanager.inc.php @@ -85,7 +85,7 @@ 'acl_app' => $app, 'account_id' => $GLOBALS['account_id'] ); - + $this->template->set_var('link_location',$GLOBALS['phpgw']->link('/index.php',$link_values)); $this->template->set_var('lang_location',lang($value['name'])); $this->template->fp('rows','link_row',True); @@ -150,5 +150,4 @@ $this->template->pfp('out','form'); } - } diff --git a/admin/inc/class.uicurrentsessions.inc.php b/admin/inc/class.uicurrentsessions.inc.php index d3417d0bfe..edb50152d7 100644 --- a/admin/inc/class.uicurrentsessions.inc.php +++ b/admin/inc/class.uicurrentsessions.inc.php @@ -17,9 +17,9 @@ var $template; var $bo; var $public_functions = array( - 'list_sessions' => True, - 'kill' => True - ); + 'list_sessions' => True, + 'kill' => True + ); function uicurrentsessions() { @@ -132,7 +132,7 @@ { $this->template->set_var('row_action',$GLOBALS['phpgw']->strip_html($value['session_action'])); } - else if (! $can_view_action) + elseif(! $can_view_action) { $this->template->set_var('row_action','  --  '); } @@ -140,7 +140,7 @@ { $this->template->set_var('row_action',' '); } - + if ($value['session_id'] != $GLOBALS['phpgw_info']['user']['sessionid'] && ! $GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin')) { $this->template->set_var('row_kill','