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("