[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin/inc class.boaclmanager.inc.php, 1.2, 1.2.4.1 cl
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] admin/inc class.boaclmanager.inc.php, 1.2, 1.2.4.1 class.uiaccounts.inc.php, 1.23.2.9.2.21, 1.23.2.9.2.22 class.uiaclmanager.inc.php, 1.5.2.2.2.1, 1.5.2.2.2.2 hook_admin.inc.php, 1.26.2.1.2.5, 1.26.2.1.2.6 |
Date: |
Thu, 23 Oct 2003 15:26:38 +0000 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv10565/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boaclmanager.inc.php class.uiaccounts.inc.php
class.uiaclmanager.inc.php hook_admin.inc.php
Log Message:
update for accountmaster
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/hook_admin.inc.php,v
retrieving revision 1.26.2.1.2.5
retrieving revision 1.26.2.1.2.6
diff -C2 -d -r1.26.2.1.2.5 -r1.26.2.1.2.6
*** hook_admin.inc.php 19 Oct 2003 01:34:02 -0000 1.26.2.1.2.5
--- hook_admin.inc.php 23 Oct 2003 15:26:36 -0000 1.26.2.1.2.6
***************
*** 24,27 ****
--- 24,32 ----
if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
{
+ $file['account | contact master'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaclmanager.list_accountmasters&account_id='
. $GLOBALS['phpgw_info']['user']['account_id']);
+ }
+
+ if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
+ {
$file['User Accounts'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
}
Index: class.boaclmanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boaclmanager.inc.php,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** class.boaclmanager.inc.php 4 Sep 2001 03:34:02 -0000 1.2
--- class.boaclmanager.inc.php 23 Oct 2003 15:26:35 -0000 1.2.4.1
***************
*** 9,20 ****
* option) any later version.
*
\**************************************************************************/
-
/* $Id$ */
class boaclmanager
{
! var $ui;
! var $so;
! var $public_functions = array(
'submit' => True
);
--- 9,18 ----
* option) any later version.
*
\**************************************************************************/
/* $Id$ */
class boaclmanager
{
! var $public_functions = array
! (
'submit' => True
);
***************
*** 22,27 ****
function boaclmanager()
{
! //$this->so = createobject('admin.soaclmanager');
! $this->ui = createobject('admin.uiaclmanager');
}
--- 20,24 ----
function boaclmanager()
{
! //$this->ui = createobject('admin.uiaclmanager');
}
***************
*** 30,34 ****
if ($GLOBALS['cancel'])
{
! $this->ui->list_apps();
return False;
}
--- 27,31 ----
if ($GLOBALS['cancel'])
{
! //$this->ui->list_apps();
return False;
}
***************
*** 44,49 ****
$GLOBALS['phpgw']->acl->add_repository($GLOBALS['acl_app'], $location,
$GLOBALS['account_id'], $total_rights);
! $this->ui->list_apps();
}
}
--- 41,76 ----
$GLOBALS['phpgw']->acl->add_repository($GLOBALS['acl_app'], $location,
$GLOBALS['account_id'], $total_rights);
! //$this->ui->list_apps();
}
+ function list_accountmasters()
+ {
+ $acc =
$GLOBALS['phpgw']->acl->read_specific(array('type' =>
'applocation','acl_location' => 'accountmaster'));
+ $this->total = $GLOBALS['phpgw']->acl->total;
+
+ //_debug_array($acc);
+
+ while(is_array($acc) && list(,$val) = each($acc))
+ {
+ $acc_name =
$GLOBALS['phpgw']->accounts->get_account_data($val['account']);
+ $data[] = array
+ (
+ 'account_id' => $val['account'],
+ 'lid' =>
$acc_name[$val['account']]['lid'],
+ 'firstname' =>
$acc_name[$val['account']]['firstname'],
+ 'lastname' =>
$acc_name[$val['account']]['lastname']
+ );
+ }
+ return $data;
+ }
+
+ function get_acl_accounts()
+ {
+ $GLOBALS['phpgw']->acl->read_specific(array('type' =>
'account','acl_location' => 'accountmaster'));
+ }
+
+ function edit_accountmasters($values)
+ {
+ }
}
+ ?>
Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.21
retrieving revision 1.23.2.9.2.22
diff -C2 -d -r1.23.2.9.2.21 -r1.23.2.9.2.22
*** class.uiaccounts.inc.php 19 Oct 2003 01:34:02 -0000 1.23.2.9.2.21
--- class.uiaccounts.inc.php 23 Oct 2003 15:26:36 -0000 1.23.2.9.2.22
***************
*** 1157,1161 ****
// );
$edit_entry = '';
! $addressbook_message =
lang('This account have not contact');
}
}
--- 1157,1161 ----
// );
$edit_entry = '';
! $addressbook_message =
lang('This account has no contact entry yet');
}
}
***************
*** 1163,1167 ****
{
$edit_entry = '';
! $addressbook_message = lang('You have
not edit access to addressmaster records');
}
}
--- 1163,1167 ----
{
$edit_entry = '';
! $addressbook_message = lang('You do not
have edit access to addressmaster records');
}
}
Index: class.uiaclmanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaclmanager.inc.php,v
retrieving revision 1.5.2.2.2.1
retrieving revision 1.5.2.2.2.2
diff -C2 -d -r1.5.2.2.2.1 -r1.5.2.2.2.2
*** class.uiaclmanager.inc.php 25 May 2003 15:41:25 -0000 1.5.2.2.2.1
--- class.uiaclmanager.inc.php 23 Oct 2003 15:26:36 -0000 1.5.2.2.2.2
***************
*** 9,13 ****
* option) any later version.
*
\**************************************************************************/
-
/* $Id$ */
--- 9,12 ----
***************
*** 16,33 ****
var $template;
var $nextmatchs;
! var $public_functions = array(
! 'list_apps' => True,
! 'access_form' => True,
! 'account_list' => True
);
function uiaclmanager()
{
! $this->account_id = intval($_GET['account_id']);
if (!$this->account_id ||
$GLOBALS['phpgw']->acl->check('account_access',64,'admin'))
{
$GLOBALS['phpgw']->redirect_link('/index.php');
}
! $this->template =
createobject('phpgwapi.Template',PHPGW_APP_TPL);
}
--- 15,38 ----
var $template;
var $nextmatchs;
! var $public_functions = array
! (
! 'list_apps' => True,
! 'access_form' => True,
! 'account_list' => True,
! 'list_accountmasters' => True,
! 'edit_accountmasters' => True
);
function uiaclmanager()
{
! $this->account_id = intval($_GET['account_id']);
!
if (!$this->account_id ||
$GLOBALS['phpgw']->acl->check('account_access',64,'admin'))
{
$GLOBALS['phpgw']->redirect_link('/index.php');
}
! $this->template =
createobject('phpgwapi.Template',PHPGW_APP_TPL);
! $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
! $this->boacl =
CreateObject('admin.boaclmanager');
}
***************
*** 109,112 ****
--- 114,118 ----
$total_rights += $rights;
}
+
if ($total_rights)
{
***************
*** 155,158 ****
--- 161,298 ----
$this->template->pfp('out','form');
+ }
+
+ function list_accountmasters()
+ {
+ $link_data = array
+ (
+ 'menuaction' =>
'admin.uiaclmanager.edit_accountmasters',
+ 'account_id' =>
$GLOBALS['phpgw_info']['user']['account_id']
+ );
+
+ if ($_POST['edit'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
+ if ($_POST['done'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+ }
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('admin') . ': ' . lang('list accountmasters');
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
+
+
$GLOBALS['phpgw']->template->set_file(array('admin_list_t' =>
'list_accountmasters.tpl'));
+
$GLOBALS['phpgw']->template->set_block('admin_list_t','admin_list','list');
+
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
+
+
$GLOBALS['phpgw']->template->set_var('sort_lid',lang('loginid'));
+
$GLOBALS['phpgw']->template->set_var('sort_firstname',lang('firstname'));
+
$GLOBALS['phpgw']->template->set_var('sort_lastname',lang('lastname'));
+
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('edit'));
+
$GLOBALS['phpgw']->template->set_var('lang_done',lang('done'));
+ $admins = $this->boacl->list_accountmasters();
+
+ //_debug_array($admins);
+ for ($i=0;$i<count($admins);$i++)
+ {
+
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+
+ $GLOBALS['phpgw']->template->set_var(array
+ (
+ 'lid' => $admins[$i]['lid'],
+ 'firstname' =>
$admins[$i]['firstname'],
+ 'lastname' =>
$admins[$i]['lastname'])
+ );
+
+
$GLOBALS['phpgw']->template->fp('list','admin_list',True);
+ }
+
+
$GLOBALS['phpgw']->template->pfp('out','admin_list_t',True);
+ }
+
+ function accounts_popup()
+ {
+
$GLOBALS['phpgw']->accounts->accounts_popup('admin_acl');
+ }
+
+ function edit_accountmasters()
+ {
+ $link_data = array
+ (
+ 'menuaction' =>
'admin.uiaclmanager.list_accountmasters',
+ 'account_id' =>
$GLOBALS['phpgw_info']['user']['account_id']
+ );
+
+ if ($_POST['save'])
+ {
+
$this->boacl->edit_accountmasters($_POST['account_users']);
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
+ if ($_POST['cancel'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('admin') . ': ' . lang('edit accountmaster list');
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
+
+ $GLOBALS['phpgw']->template->set_file(array('admin_add'
=> 'form_accountmasters.tpl'));
+
$GLOBALS['phpgw']->template->set_block('admin_add','select');
+
$GLOBALS['phpgw']->template->set_block('admin_add','popwin');
+
+
$GLOBALS['phpgw']->template->set_var('lang_select_accountmasters',lang('select
accountmasters'));
+
$GLOBALS['phpgw']->template->set_var('lang_save',lang('save'));
+
$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('cancel'));
+
+ $link_data['menuaction'] =
'admin.uiaclmanager.edit_accountmasters';
+
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
+ $sel_accounts = $this->boacl->list_accountmasters();
+
+ if
($GLOBALS['phpgw_info']['user']['preferences']['common']['account_selection']
== 'popup')
+ {
+
$GLOBALS['phpgw']->template->set_var('accounts_link',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaclmanager.accounts_popup'));
+
$GLOBALS['phpgw']->template->set_var('lang_open_popup',lang('open popup
window'));
+
+ while(is_array($sel_accounts) && list(,$acc) =
each($sel_accounts))
+ {
+ $user_list .= '<option value="' .
$acc['account_id'] . '" selected>'
+ .
$GLOBALS['phpgw']->common->display_fullname($acc['lid'],$acc['firstname'],$acc['lastname'])
+ .
'</option>'."\n";
+ }
+ $account_num = count($sel_accounts);
+
$GLOBALS['phpgw']->template->set_var('select_size',($account_num <
25?$account_num:25));
+
$GLOBALS['phpgw']->template->set_var('user_list',$user_list);
+
$GLOBALS['phpgw']->template->fp('accounts','popwin',True);
+ }
+ else
+ {
+ $account_list =
$GLOBALS['phpgw']->accounts->get_list('accounts');
+ $account_num = count($account_list);
+
+ $user_list = '';
+ while (list($key,$entry) = each($account_list))
+ {
+ $user_list .= '<option value="' .
$entry['account_id'] . '"'
+ .
$group_info['account_user'][intval($entry['account_id'])] . '>'
+ .
$GLOBALS['phpgw']->common->display_fullname(
+ $entry['account_lid'],
+ $entry['account_firstname'],
+ $entry['account_lastname'])
+ . '</option>'."\n";
+ }
+
$GLOBALS['phpgw']->template->set_var('select_size',($account_num <
7?$account_num:7));
+
$GLOBALS['phpgw']->template->set_var('user_list',$user_list);
+
$GLOBALS['phpgw']->template->fp('admin_add','select',True);
+ }
+
+ $GLOBALS['phpgw']->template->set_var('select','');
+ $GLOBALS['phpgw']->template->set_var('popwin','');
+ $GLOBALS['phpgw']->template->pfp('out','admin_add');
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin/inc class.boaclmanager.inc.php, 1.2, 1.2.4.1 class.uiaccounts.inc.php, 1.23.2.9.2.21, 1.23.2.9.2.22 class.uiaclmanager.inc.php, 1.5.2.2.2.1, 1.5.2.2.2.2 hook_admin.inc.php, 1.26.2.1.2.5, 1.26.2.1.2.6,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.48.2.2.2.17, 1.48.2.2.2.18
- Next by Date:
[Phpgroupware-cvs] admin/templates/default form_accountmasters.tpl, NONE, 1.1.2.1 list_accountmasters.tpl, NONE, 1.1.2.1
- Previous by thread:
[Phpgroupware-cvs] phpgwapi/inc class.accounts_shared.inc.php, 1.48.2.2.2.17, 1.48.2.2.2.18
- Next by thread:
[Phpgroupware-cvs] admin/templates/default form_accountmasters.tpl, NONE, 1.1.2.1 list_accountmasters.tpl, NONE, 1.1.2.1
- Index(es):