[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin inc/class.boaccounts.inc.php inc/class.bo...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] admin inc/class.boaccounts.inc.php inc/class.bo... |
Date: |
Tue, 05 Sep 2006 10:04:02 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: admin
Changes by: Dave Hall <skwashd> 06/09/05 10:04:02
Modified files:
inc : class.boaccounts.inc.php class.bocommon.inc.php
class.socommon.inc.php
class.uiaccess_history.inc.php
class.uiaccounts.inc.php
templates/base : cats.xsl filter_location.xsl
templates/desktop: app_data.xsl
Log message:
my mixed bag which includes, fix delete account, E_ALL, ui clean ups etc
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.boaccounts.inc.php?cvsroot=phpgroupware&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.socommon.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.uiaccess_history.inc.php?cvsroot=phpgroupware&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.uiaccounts.inc.php?cvsroot=phpgroupware&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/admin/templates/base/cats.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/admin/templates/base/filter_location.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/admin/templates/desktop/app_data.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: inc/class.boaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boaccounts.inc.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- inc/class.boaccounts.inc.php 23 Aug 2006 16:22:47 -0000 1.52
+++ inc/class.boaccounts.inc.php 5 Sep 2006 10:04:01 -0000 1.53
@@ -9,7 +9,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\**************************************************************************/
- /* $Id: class.boaccounts.inc.php,v 1.52 2006/08/23 16:22:47 skwashd Exp
$ */
+ /* $Id: class.boaccounts.inc.php,v 1.53 2006/09/05 10:04:01 skwashd Exp
$ */
//FIXME define constants for rights so we can fuck all these magic
numbers
@@ -39,7 +39,7 @@
function boaccounts()
{
- $this->so =& CreateObject('admin.soaccounts');
+ $this->so = createObject('admin.soaccounts');
}
function DONTlist_methods($_type='xmlrpc')
@@ -504,7 +504,7 @@
$GLOBALS['hook_values']['account_id'] = $account_id;
$db = clone($GLOBALS['phpgw']->db);
- $db->query('SELECT app_name,app_order FROM
phpgw_applications WHERE app_enabled!=0 ORDER BY app_order',__LINE__,__FILE__);
+ $db->query('SELECT app_name,app_order FROM
phpgw_applications WHERE app_enabled != 0 ORDER BY
app_order',__LINE__,__FILE__);
if($db->num_rows())
{
while($db->next_record())
Index: inc/class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.bocommon.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- inc/class.bocommon.inc.php 26 Mar 2006 20:00:56 -0000 1.1
+++ inc/class.bocommon.inc.php 5 Sep 2006 10:04:01 -0000 1.2
@@ -1,19 +1,19 @@
<?php
/**
- * phpGroupWare - property: a Facilities Management System.
+ * phpGroupWare - admin
*
* @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @copyright Copyright (C) 2003-2006 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.bocommon.inc.php,v 1.1 2006/03/26 20:00:56
sigurdne Exp $
+ * @version $Id: class.bocommon.inc.php,v 1.2 2006/09/05 10:04:01
skwashd Exp $
*/
/**
* Description
- * @package property
+ * @package admin
*/
class bocommon
@@ -29,8 +29,7 @@
var $public_functions = array
(
- 'select_part_of_town' => True,
- 'menu' => True,
+ 'menu' => true
);
var $soap_functions = array(
@@ -93,58 +92,14 @@
// $this->datetimeformat = "F j, Y g:iA";
break;
}
-
- /* if
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
- {
- $this->dateformat = "M d Y";
- $this->datetimeformat = "M d Y g:iA";
- }
- else
- {
- $this->dateformat = "Y-m-d";
- $this->datetimeformat = "Y-m-d G:i:s";
- }
-
-
- if(!$GLOBALS['phpgw_info']['flags']['css'])
- {
- $GLOBALS['phpgw_info']['flags']['css'] .=
"-->\n</style>\n"
- . '<link rel="stylesheet"
type="text/css" media="all" href="'
- .
$GLOBALS['phpgw_info']['server']['webserver_url'].'/' . $this->currentapp .
'/templates/'
- .
$GLOBALS['phpgw_info']['server']['template_set']
- .
'/css/'.$GLOBALS['phpgw_info']['server']['template_set'].'.css"
title="'.$GLOBALS['phpgw_info']['server']['template_set'].'" />'
- . "\n<style type=\"text/css\">\n<!--\n";
- }
-*/
}
function jscalendar()
{
- $phpgw_js_url =
$GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js';
- $img =
$GLOBALS['phpgw']->common->image('phpgwapi','cal');
-
- $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- $jsDateFormat = str_replace(array('d', 'm', 'M', 'Y'),
array('%d', '%m', '%b', '%Y'), $dateformat);
-
- $GLOBALS['phpgw_info']['flags']['java_script']
.='</script>
- <link rel="stylesheet" type="text/css" media="all"
href="'.$phpgw_js_url.'/jscalendar/calendar-win2k-cold-1.css"
title="win2k-cold-1" >
- <script type="text/javascript"
src="'.$phpgw_js_url.'/jscalendar/calendar.js"></script>
- <script type="text/javascript"
src="'.$phpgw_js_url.'/jscalendar/calendar-setup.js"></script>
- <script type="text/javascript"
src="'.$phpgw_js_url.'/jscalendar/lang/calendar-'.substr($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],0,2)
.'.js"></script>
- ';
-
-
-// <script type="text/javascript"
src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',$GLOBALS['phpgw']->link('/phpgwapi/js/jscalendar/jscalendar-setup.php')).'"></script>
-
- $cal_info=array(
-// 'stylesheet'
=> $phpgw_js_url.'/jscalendar/calendar-win2k-cold-1.css',
-// 'calendar_source'
=> $phpgw_js_url.'/jscalendar/calendar.js',
-// 'calendar_setup_source' =>
$phpgw_js_url.'/jscalendar/calendar-setup.js',
-// 'calendar_lang'
=>
$phpgw_js_url.'/jscalendar/lang/calendar-'.substr($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],0,2)
.'.js',
- 'jsDateFormat'
=> $jsDateFormat,
- 'img'
=> $img,
- );
- return $cal_info;
+ if ( !isset($GLOBALS['phpgw']->jscal) ||
!is_object($GLOBALS['phpgw']->jscal) )
+ {
+ $GLOBALS['phpgw']->jscal =
createObject('phpgwapi.jscalendar');
+ }
}
function check_perms($rights, $required)
@@ -1260,42 +1215,6 @@
}
- function validate_db_insert($values)
- {
- foreach($values as $value)
- {
- if($value || $value === 0)
- {
- $insert_value[] = "'".$value."'";
- }
- else
- {
- $insert_value[] = 'NULL';
- }
- }
-
- $values = implode(",", $insert_value);
- return $values;
- }
-
- function validate_db_update($value_set)
- {
- while (is_array($value_set) && list($field,$value) =
each($value_set))
- {
- if($value || $value === 0)
- {
- $value_entry[]= "$field='$value'";
- }
- else
- {
- $value_entry[]= "$field=NULL";
- }
- }
-
- $value_set = implode(",", $value_entry);
- return $value_set;
- }
-
function fm_cache($name='',$value='')
{
return $this->socommon->fm_cache($name,$value);
@@ -1442,7 +1361,7 @@
function new_db()
{
- return $this->socommon->new_db();
+ return clone($GLOBALS['phpgw']->db);
}
function get_max_location_level()
Index: inc/class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.socommon.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- inc/class.socommon.inc.php 26 Mar 2006 20:00:56 -0000 1.1
+++ inc/class.socommon.inc.php 5 Sep 2006 10:04:01 -0000 1.2
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.socommon.inc.php,v 1.1 2006/03/26 20:00:56
sigurdne Exp $
+ * @version $Id: class.socommon.inc.php,v 1.2 2006/09/05 10:04:01
skwashd Exp $
*/
/**
@@ -29,66 +29,28 @@
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
}
- $this->db = CreateObject('phpgwapi.db');
-
- if($GLOBALS['phpgw_info']['server']['db_name'])
- {
- $this->db->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
- $this->db->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
- $this->db->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
- $this->db->User =
$GLOBALS['phpgw_info']['server']['db_user'];
- $this->db->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
- }
- else
- {
- $ConfigDomain =
get_var('ConfigDomain',array('COOKIE','POST'));
- $phpgw_domain = $GLOBALS['phpgw_domain'];
- $this->db->Host =
$phpgw_domain[$ConfigDomain]['db_host'];
- $this->db->Database =
$phpgw_domain[$ConfigDomain]['db_name'];
- $this->db->User =
$phpgw_domain[$ConfigDomain]['db_user'];
- $this->db->Password =
$phpgw_domain[$ConfigDomain]['db_pass'];
- }
+ $this->db =& $GLOBALS['phpgw']->db;
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
- {
- $this->join = " JOIN ";
- $this->like = "ILIKE";
- }
- else
- {
- $this->join = " INNER JOIN ";
- $this->like = "LIKE";
- }
-
- $this->left_join = " LEFT JOIN ";
- }
-
- function fm_cache($name='',$value='')
- {
- if($value)
- {
- $value = serialize($value);
- $this->db->query("INSERT INTO fm_cache
(name,value)VALUES ('$name','$value')",__LINE__,__FILE__);
- }
- else
- {
- $this->db->query("SELECT value FROM fm_cache
where name='$name'");
- $this->db->next_record();
- $value= unserialize($this->db->f('value'));
- return $value;
- }
+ $this->join = $this->db->join;
+ $this->like = $this->db->like;
}
function create_preferences($app='',$user_id='')
{
+ $prefs = createObject('phpgwapi.preferences');
+ $vals = $prefs->read_repository();
+ return $vals[$app];
+ /*
$this->db->query("SELECT preference_value FROM
phpgw_preferences where preference_app = '$app' AND
preference_owner=".(int)$user_id );
$this->db->next_record();
$value=
unserialize($this->db->f('preference_value'));
return $value;
+ */
}
+ //FIXME This won't work with non sql accounts :( - skwashd
apr2006
function get_user_list_right($right='',$acl_location='')
{
$acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
@@ -202,64 +164,6 @@
return $employees;
}
- function read_single_tenant($id)
- {
- $this->db->query("SELECT * FROM fm_tenant WHERE id
=$id",__LINE__,__FILE__);
- $this->db->next_record();
-
- $tenant_data = array
- (
- 'first_name' =>
$this->db->f('first_name'),
- 'last_name' =>
$this->db->f('last_name'),
- 'contact_phone' =>
$this->db->f('contact_phone')
- );
-
-//_debug_array($tenant_data);
-
- return $tenant_data;
- }
-
- function check_location($location_code='',$type_id='')
- {
- $this->db->query("SELECT count(*) FROM
fm_location$type_id where location_code='$location_code'");
- $this->db->next_record();
-
- if ( $this->db->f(0))
- {
- return True;
- }
- }
-
- function select_part_of_town()
- {
- $this->db->query("SELECT name, part_of_town_id FROM
fm_part_of_town ORDER BY name ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $part_of_town[$i]['id'] =
$this->db->f('part_of_town_id');
- $part_of_town[$i]['name'] =
stripslashes($this->db->f('name'));
- $i++;
- }
-
- return $part_of_town;
- }
-
- function select_district_list()
- {
- $this->db->query("SELECT id, descr FROM fm_district
where id >'0' ORDER BY id ");
-
- $i = 0;
- while ($this->db->next_record())
- {
- $district[$i]['id']
= $this->db->f('id');
- $district[$i]['name']
= stripslashes($this->db->f('descr'));
- $i++;
- }
-
- return $district;
- }
-
function next_id($table='',$key='')
{
if(is_array($key))
@@ -321,23 +225,14 @@
return $next_id;
}
- function select_wo_hours_category_list()
+ // TODO work out if this is really needed
+ function new_db()
{
- $this->db->query("SELECT id, descr FROM
fm_wo_hours_category ORDER BY id ");
-
- $i = 0;
- while ($this->db->next_record())
+ if ( isset($GLBOALS['phpgw']->db) &&
is_object($GLBOALS['phpgw']->db) )
{
- $category_list[$i]['id'] = $this->db->f('id');
- $category_list[$i]['name'] =
stripslashes($this->db->f('descr'));
- $i++;
- }
-
- return $category_list;
+ return clone($GLOBALS['phpgw']->db);
}
- function new_db()
- {
$db = CreateObject('phpgwapi.db');
if($GLOBALS['phpgw_info']['server']['db_name'])
{
@@ -349,24 +244,24 @@
}
else
{
- $ConfigDomain =
get_var('ConfigDomain',array('COOKIE','POST'));
+ $ConfigDomain = $_REQUEST['ConfigDomain'];
$phpgw_domain = $GLOBALS['phpgw_domain'];
$db->Host =
$phpgw_domain[$ConfigDomain]['db_host'];
$db->Database =
$phpgw_domain[$ConfigDomain]['db_name'];
$db->User =
$phpgw_domain[$ConfigDomain]['db_user'];
$db->Password =
$phpgw_domain[$ConfigDomain]['db_pass'];
}
-
return $db;
}
function get_max_location_level()
{
- $this->db->query("SELECT count(*) as level FROM
fm_location_type ");
+ $this->db->query("SELECT COUNT(*) as level FROM
fm_location_type ");
$this->db->next_record();
return $this->db->f('level');
}
+ // FIXME won't work for non sql accounts
function active_group_members($group_id = '')
{
$this->db->query("SELECT phpgw_accounts.account_id,
phpgw_accounts.account_lid FROM phpgw_acl $this->join phpgw_accounts on
phpgw_acl.acl_account = phpgw_accounts.account_id"
Index: inc/class.uiaccess_history.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccess_history.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- inc/class.uiaccess_history.inc.php 14 Feb 2006 08:48:21 -0000 1.13
+++ inc/class.uiaccess_history.inc.php 5 Sep 2006 10:04:01 -0000 1.14
@@ -9,7 +9,7 @@
* option) any later version.
*
\**************************************************************************/
- /* $Id: class.uiaccess_history.inc.php,v 1.13 2006/02/14 08:48:21
skwashd Exp $ */
+ /* $Id: class.uiaccess_history.inc.php,v 1.14 2006/09/05 10:04:01
skwashd Exp $ */
class uiaccess_history
{
@@ -93,14 +93,14 @@
'row_total' =>
($record['lo']?$record['total']:' ')
);
$this->template->set_var($var);
- $this->template->fp('rows_access','row',True);
+ $this->template->fp('rows_access','row', true);
}
if (! $total_records && $account_id)
{
$this->nextmatchs->template_alternate_row_color($this->template);
$this->template->set_var('row_message',lang('No
login history exists for this user'));
-
$this->template->fp('rows_access','row_empty',True);
+ $this->template->fp('rows_access','row_empty',
true);
}
$loggedout = $this->bo->return_logged_out($account_id);
Index: inc/class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- inc/class.uiaccounts.inc.php 12 Aug 2006 09:13:01 -0000 1.63
+++ inc/class.uiaccounts.inc.php 5 Sep 2006 10:04:01 -0000 1.64
@@ -9,7 +9,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\**************************************************************************/
- /* $Id: class.uiaccounts.inc.php,v 1.63 2006/08/12 09:13:01 skwashd Exp
$ */
+ /* $Id: class.uiaccounts.inc.php,v 1.64 2006/09/05 10:04:01 skwashd Exp
$ */
class uiaccounts
{
@@ -32,8 +32,8 @@
{
$GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
- $this->bo =&
CreateObject('admin.boaccounts');
- $this->nextmatchs =&
CreateObject('phpgwapi.nextmatchs');
+ $this->bo = createObject('admin.boaccounts');
+ $this->nextmatchs =createObject('phpgwapi.nextmatchs');
@set_time_limit(300);
}
@@ -156,14 +156,15 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('group_list' => $data));
}
- function list_users($param_cd='')
+ function list_users($param_cd = '')
{
- if ($_POST['done'] ||
$GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
+ if ( (isset($_POST['done']) && $_POST['done'])
+ ||
$GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
{
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uimainscreen.mainscreen');
}
- if ($_POST['add'])
+ if ( isset($_POST['add']) && $_POST['add'] )
{
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.edit_user');
}
@@ -173,8 +174,9 @@
$cd = $param_cd;
}
- $GLOBALS['query'] =
(isset($_POST['query'])?$_POST['query']:'');
- $start =
(isset($_POST['start'])?intval($_POST['start']):'');
+ //this is a work around hack for the ugly nextmatch code
+ $query = $GLOBALS['query'] = isset($_POST['query']) ?
$_POST['query'] : '';
+ $start = isset($_POST['start']) ? (int) $_POST['start']
: '';
if(isset($_GET['order']))
{
@@ -241,20 +243,26 @@
'lang_sort_statustext' => lang('sort the
entries')
);
- while (list($null,$account) = each($account_info))
+ foreach ( $account_info as $account )
{
$user_data[] = Array
(
- 'view_url'
=>
($this->bo->check_rights('view','account_access')?$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.view_user&account_id='
. $account['account_id']):''),
+ 'view_url'
=> $this->bo->check_rights('view','account_access')
+
? $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'admin.uiaccounts.view_user', 'account_id' =>
$account['account_id']) )
+
: '',
'lang_view'
=> ($this->bo->check_rights('view','account_access')?lang('view'):''),
'lang_view_statustext' =>
($this->bo->check_rights('view','account_access')?lang('view this user'):''),
- 'edit_url'
=>
($this->bo->check_rights('edit','account_access')?$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.edit_user&account_id='
. $account['account_id']):''),
+ 'edit_url'
=> $this->bo->check_rights('edit','account_access')
+
? $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'admin.uiaccounts.edit_user', 'account_id' =>
$account['account_id']) )
+
: '',
'lang_edit'
=> ($this->bo->check_rights('edit','account_access')?lang('edit'):''),
'lang_edit_statustext' =>
($this->bo->check_rights('edit','account_access')?lang('edit this user'):''),
'lid'
=> (!$account['account_lid']?'':$account['account_lid']),
'firstname'
=> (!$account['account_firstname']?'':$account['account_firstname']),
'lastname'
=> (!$account['account_lastname']?'':$account['account_lastname']),
- 'delete_url'
=>
($this->bo->check_rights('delete','account_access')?$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.delete_user&account_id='
. $account['account_id']):''),
+ 'delete_url'
=> $this->bo->check_rights('delete','account_access')
+
?$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'admin.uiaccounts.delete_user', 'account_id' =>
$account['account_id']) )
+
: '',
'lang_delete_statustext' =>
($this->bo->check_rights('delete','account_access')?lang('delete this
user'):''),
'lang_delete'
=> ($this->bo->check_rights('delete','account_access')?lang('delete'):'')
);
@@ -909,15 +917,16 @@
return False;
}
- $id2delete = $_REQUEST['account_id'];
- if($_REQUEST['deleteAccount'])
+ if ( isset($_REQUEST['deleteAccount']) &&
isset($_REQUEST['account_id']) )
{
-
if(!$this->bo->delete_user($_REQUEST['deleteID'], $_REQUEST['account']))
+
if(!$this->bo->delete_user($_REQUEST['account_id'], $_REQUEST['account']))
{
- //Add error message here
+ //TODO Make this nicer
+ echo 'Failed to delete user';
}
}
- if($_REQUEST['cancel'] || $_REQUEST['deleteAccount'])
+ if( (isset($_REQUEST['cancel']) && $_REQUEST['cancel'] )
+ || ( isset($_REQUEST['deleteAccount']) &&
$_REQUEST['deleteAccount']) )
{
$this->list_users();
}
@@ -926,28 +935,34 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
//Add list entry to delete all references to
this account (user)
- $accountlist[0] = array('account_id' => '0',
+ $alist = array();
+ $alist[0] = array
+ (
+ 'account_id' => '0',
'account_name' => lang('Delete all entries')
);
+
// get account list for new owner
- $accounts =& CreateObject('phpgwapi.accounts');
- $accounts = $accounts->get_list('accounts');
- for($i=0; $i < count($accounts); $i++)
- {
- if((int)$accounts[$i]['account_id'] !=
$id2delete)
- {
- $accountlist[] = array
- (
- 'account_id' =>
$accounts[$i]['account_id'],
- 'account_name' =>
$GLOBALS['phpgw']->common->display_fullname($accounts[$i]['account_lid'],
-
$accounts[$i]['account_firstname'],
-
$accounts[$i]['account_lastname']
-
)
+ $accounts = CreateObject('phpgwapi.accounts');
+ $accounts_list =
$accounts->get_list('accounts');
+
+ foreach ( $accounts_list as $account )
+ {
+ if((int)$account['account_id'] !=
$_REQUEST['account_id'] )
+ {
+ $alist[] = array
+ (
+ 'account_id' =>
$account['account_id'],
+ 'account_name' =>
$accounts->id2name($account['account_id'])
);
}
}
- $data = array ('delete_id' => $id2delete,
- 'accountlist' =>
$accountlist,
+ unset($accounts);
+ unset($accounts_list);
+ $data = array
+ (
+ 'account_id' =>
$_REQUEST['account_id'],
+ 'accountlist' => $alist,
'lang_new_owner' =>
lang('Who would you like to transfer ALL records owned by the deleted user
to?'),
'l_cancel' =>
lang('cancel'),
'l_delete' =>
lang('delete')
Index: templates/base/cats.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/admin/templates/base/cats.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/cats.xsl 14 Feb 2006 09:47:27 -0000 1.1
+++ templates/base/cats.xsl 5 Sep 2006 10:04:02 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: cats.xsl,v 1.1 2006/02/14 09:47:27 skwashd Exp $ -->
+<!-- $Id: cats.xsl,v 1.2 2006/09/05 10:04:02 skwashd Exp $ -->
<xsl:template name="cats">
<xsl:choose>
@@ -80,15 +80,15 @@
</xsl:choose>
<td align="center">
<xsl:variable name="add_sub_url"
select="add_sub_url"/>
- <a href="{$add_sub_url}"
onMouseover="window.status='{$lang_add_sub_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_add_sub"/></a>
+ <a href="{add_sub_url}"
onMouseover="window.status='{$lang_add_sub_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_add_sub"/></a>
</td>
<td align="center">
<xsl:variable name="edit_url"
select="edit_url"/>
- <a href="{$edit_url}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_edit"/></a>
+ <a href="{edit_url}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_edit"/></a>
</td>
<td align="center">
<xsl:variable name="delete_url"
select="delete_url"/>
- <a href="{$delete_url}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_delete"/></a>
+ <a href="{delete_url}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="lang_delete"/></a>
</td>
</tr>
</xsl:template>
@@ -170,6 +170,13 @@
</textarea>
</td>
</tr>
+ <tr>
+ <td colspan="2"><label
for="value_color"><xsl:value-of select="lang_color"/></label>:</td>
+ <td>
+ <input name="values[color]"
id="value_color" value="{value_color}" />
+ <img src="img_color_selector"
onclick="colorSelector('colorSelector);" alt="{lang_color_selector}"
title="lang_color_selector" />
+ </td>
+ </tr>
<tr height="50" valign="bottom">
<td>
Index: templates/base/filter_location.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/admin/templates/base/filter_location.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/filter_location.xsl 26 Mar 2006 20:00:56 -0000 1.1
+++ templates/base/filter_location.xsl 5 Sep 2006 10:04:02 -0000 1.2
@@ -1,14 +1,11 @@
-<!-- $Id: filter_location.xsl,v 1.1 2006/03/26 20:00:56 sigurdne Exp $ -->
-
+<!-- $Id: filter_location.xsl,v 1.2 2006/09/05 10:04:02 skwashd Exp $ -->
<xsl:template name="filter_location">
<xsl:variable name="select_action"><xsl:value-of
select="select_action"/></xsl:variable>
<xsl:variable name="select_name_location"><xsl:value-of
select="select_name_location"/></xsl:variable>
<xsl:variable name="lang_submit"><xsl:value-of
select="lang_submit"/></xsl:variable>
<form method="post" action="{$select_action}">
<xsl:for-each select="hidden_vars" >
- <xsl:variable
name="name"><xsl:value-of select="name"/></xsl:variable>
- <xsl:variable
name="value"><xsl:value-of select="value"/></xsl:variable>
- <INPUT type="hidden"
name="{$name}" value="{$value}" ></INPUT>
+ <input type="hidden" name="{name}"
value="{value}" />
</xsl:for-each>
<select name="{$select_name_location}"
onChange="this.form.submit();" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
@@ -27,13 +24,12 @@
</xsl:template>
<xsl:template match="location_list">
- <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
<xsl:choose>
<xsl:when test="selected">
- <option value="{$id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="descr"/></option>
+ <option value="{id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="descr"/></option>
</xsl:when>
<xsl:otherwise>
- <option value="{$id}"><xsl:value-of
disable-output-escaping="yes" select="descr"/></option>
+ <option value="{id}"><xsl:value-of
disable-output-escaping="yes" select="descr"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Index: templates/desktop/app_data.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/admin/templates/desktop/app_data.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/desktop/app_data.xsl 22 Mar 2006 13:02:56 -0000 1.1
+++ templates/desktop/app_data.xsl 5 Sep 2006 10:04:02 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: app_data.xsl,v 1.1 2006/03/22 13:02:56 skwashd Exp $ -->
+<!-- $Id: app_data.xsl,v 1.2 2006/09/05 10:04:02 skwashd Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -104,12 +104,9 @@
<!-- BEGIN newOwnerList -->
<xsl:template match="new_owner_list">
- <xsl:variable name="delete_id" select="delete_id"/>
- <xsl:variable name="l_cancel" select="l_cancel"/>
- <xsl:variable name="l_delete" select="l_delete"/>
<form method="post">
- <input type="hidden" name="deleteID"
value="{$delete_id}" />
- <table style="text-align: center">
+ <input type="hidden" name="account_id"
value="{account_id}" />
+ <table id="admin_new_owner_list">
<tr>
<td colspan="2">
<xsl:value-of
select="lang_new_owner"/><br />
@@ -124,10 +121,10 @@
</tr>
<tr>
<td>
- <input type="submit"
name="deleteAccount" value="{$l_delete}" />
+ <input type="submit"
name="deleteAccount" value="{l_delete}" />
</td>
<td>
- <input type="submit"
name="cancel" value="{$l_cancel}" />
+ <input type="submit"
name="cancel" value="{l_cancel}" />
</td>
</tr>
</table>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin inc/class.boaccounts.inc.php inc/class.bo...,
Dave Hall <=