phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_shared.inc.php,1.48


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_shared.inc.php,1.48.2.2.2.9,1.48.2.2.2.10
Date: Sun, 04 May 2003 20:01:11 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv4433/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.accounts_shared.inc.php 
Log Message:
update accounts_popup

Index: class.accounts_shared.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.accounts_shared.inc.php,v
retrieving revision 1.48.2.2.2.9
retrieving revision 1.48.2.2.2.10
diff -C2 -r1.48.2.2.2.9 -r1.48.2.2.2.10
*** class.accounts_shared.inc.php       4 May 2003 21:49:59 -0000       
1.48.2.2.2.9
--- class.accounts_shared.inc.php       5 May 2003 00:01:09 -0000       
1.48.2.2.2.10
***************
*** 250,254 ****
                function accounts_popup($app)
                {
!                       $group_id       = 
get_var('group_id',array('POST','GET'));
  
                        if(isset($_POST['query']))
--- 250,259 ----
                function accounts_popup($app)
                {
!                       $group_id = get_var('group_id',array('GET','POST'));
! 
!                       /*if(isset($_GET['group_id']))
!                       {
!                               $group_id = $_GET['group_id'];
!                       }*/
  
                        if(isset($_POST['query']))
***************
*** 289,297 ****
  
                        
$GLOBALS['phpgw']->template->set_file(array('accounts_list_t' => 
'accounts_popup.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('accounts_list_t','group_list','bla');
                        
$GLOBALS['phpgw']->template->set_block('accounts_list_t','accounts_list','list');
  
                        
$GLOBALS['phpgw']->template->set_var('title',$GLOBALS['phpgw_info']['site_title']);
-                       
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Accounts and Groups'));
                        
$GLOBALS['phpgw']->template->set_var('charset',$GLOBALS['phpgw']->translation->translate('charset'));
                        
$GLOBALS['phpgw']->template->set_var('font',$GLOBALS['phpgw_info']['theme']['font']);
--- 294,305 ----
  
                        
$GLOBALS['phpgw']->template->set_file(array('accounts_list_t' => 
'accounts_popup.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('accounts_list_t','group_cal','cal');
!                       
$GLOBALS['phpgw']->template->set_block('accounts_list_t','group_other','other');
!                       
$GLOBALS['phpgw']->template->set_block('accounts_list_t','bla_intro','ibla');
!                       
$GLOBALS['phpgw']->template->set_block('accounts_list_t','other_intro','iother');
                        
$GLOBALS['phpgw']->template->set_block('accounts_list_t','accounts_list','list');
  
+ 
                        
$GLOBALS['phpgw']->template->set_var('title',$GLOBALS['phpgw_info']['site_title']);
                        
$GLOBALS['phpgw']->template->set_var('charset',$GLOBALS['phpgw']->translation->translate('charset'));
                        
$GLOBALS['phpgw']->template->set_var('font',$GLOBALS['phpgw_info']['theme']['font']);
***************
*** 299,303 ****
                        
$GLOBALS['phpgw']->template->set_var('lang_groups',lang('user groups'));
                        
$GLOBALS['phpgw']->template->set_var('lang_accounts',lang('user accounts'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_show_user',lang('show user'));
                        
$GLOBALS['phpgw']->template->set_var('css_file',$GLOBALS['phpgw_info']['server']['webserver_url']
 . SEP . 'phpgwapi' . SEP . 'templates'
                                                                                
                                        . SEP . 'idots' . SEP . 'css' . SEP . 
'idots.css');
--- 307,311 ----
                        
$GLOBALS['phpgw']->template->set_var('lang_groups',lang('user groups'));
                        
$GLOBALS['phpgw']->template->set_var('lang_accounts',lang('user accounts'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_show_users',lang('show users'));
                        
$GLOBALS['phpgw']->template->set_var('css_file',$GLOBALS['phpgw_info']['server']['webserver_url']
 . SEP . 'phpgwapi' . SEP . 'templates'
                                                                                
                                        . SEP . 'idots' . SEP . 'css' . SEP . 
'idots.css');
***************
*** 309,312 ****
--- 317,321 ----
                                        
$GLOBALS['phpgw']->template->set_var('select_name',"participants[]'][0]");
                                        
$GLOBALS['phpgw']->template->set_var('js_function','ExchangeAccountSelect');
+                                       
$GLOBALS['phpgw']->template->fp('ibla','bla_intro',True);
                                        break;
                                case 'admin':
***************
*** 314,317 ****
--- 323,327 ----
                                        
$GLOBALS['phpgw']->template->set_var('select_name',"account_user[]']");
                                        
$GLOBALS['phpgw']->template->set_var('js_function','ExchangeAccountSelect');
+                                       
$GLOBALS['phpgw']->template->fp('iother','other_intro',True);
                                        break;
                                case 'projects':
***************
*** 319,322 ****
--- 329,333 ----
                                        
$GLOBALS['phpgw']->template->set_var('select_name',"values[coordinator]']");
                                        
$GLOBALS['phpgw']->template->set_var('js_function','ExchangeAccountText');
+                                       
$GLOBALS['phpgw']->template->fp('iother','other_intro',True);
                                        break;
                        }
***************
*** 333,342 ****
                        {
                                $user_groups = 
$this->membership($this->account);
-                               $app_user = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run',1,$app);
  
                                for ($i = 0;$i<count($app_user);$i++)
                                {
                                        $type = $this->get_type($app_user[$i]);
!                                       if ($type == 'g')
                                        {
                                                $app_groups[] = $app_user[$i];
--- 344,353 ----
                        {
                                $user_groups = 
$this->membership($this->account);
  
+                               $app_user = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run',1,$app);
                                for ($i = 0;$i<count($app_user);$i++)
                                {
                                        $type = $this->get_type($app_user[$i]);
!                                       if($type == 'g')
                                        {
                                                $app_groups[] = $app_user[$i];
***************
*** 385,395 ****
                        while (is_array($user_groups) && list(,$group) = 
each($user_groups))
                        {
-                               $link_data['group_id'] = $group['account_id'];
                                if (in_array($group['account_id'],$app_groups))
                                {
                                        
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color($tr_color));
!                                       
$GLOBALS['phpgw']->template->set_var('link_user_group',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                        
$GLOBALS['phpgw']->template->set_var('name_user_group',$group['account_name']);
                                        
$GLOBALS['phpgw']->template->set_var('accountid',$group['account_id']);
                                }
                                else
--- 396,411 ----
                        while (is_array($user_groups) && list(,$group) = 
each($user_groups))
                        {
                                if (in_array($group['account_id'],$app_groups))
                                {
                                        
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color($tr_color));
!                                       //$link_data['group_id'] = 
$group['account_id'];
!                                       
$GLOBALS['phpgw']->template->set_var('link_user_group',$GLOBALS['phpgw']->link('/index.php','menuaction='
 . $action . '&group_id=' . $group['account_id']));
                                        
$GLOBALS['phpgw']->template->set_var('name_user_group',$group['account_name']);
                                        
$GLOBALS['phpgw']->template->set_var('accountid',$group['account_id']);
+                                       switch($app)
+                                       {
+                                               case 'calendar':        
$GLOBALS['phpgw']->template->fp('cal','group_cal',True); break;
+                                               default:                        
$GLOBALS['phpgw']->template->fp('other','group_other',True); break;
+                                       }
                                }
                                else
***************
*** 397,413 ****
                                        
$GLOBALS['phpgw']->template->set_var('link_user_group','');
                                        
$GLOBALS['phpgw']->template->set_var('lang_user_group','');
- 
                                }
-                               
$GLOBALS['phpgw']->template->fp('bla','group_list',True);
                        }
  
!                       if (!$query)
                        {
!                               if ($group_id)
                                {
                                        //echo 'GROUP_ID: ' . $group_id;
!                                       $users          = 
$GLOBALS['phpgw']->acl->get_ids_for_location($group_id,1,'phpgw_group');
! 
!                                       //_debug_array($users);
  
                                        for ($i=0;$i<count($users);$i++)
--- 413,425 ----
                                        
$GLOBALS['phpgw']->template->set_var('link_user_group','');
                                        
$GLOBALS['phpgw']->template->set_var('lang_user_group','');
                                }
                        }
  
!                       if (!$GLOBALS['query'])
                        {
!                               if (isset($group_id) && !empty($group_id))
                                {
                                        //echo 'GROUP_ID: ' . $group_id;
!                                       $users = 
$GLOBALS['phpgw']->acl->get_ids_for_location($group_id,1,'phpgw_group');
  
                                        for ($i=0;$i<count($users);$i++)
***************
*** 438,443 ****
                                                        'account_lid'           
=> $GLOBALS['phpgw']->accounts->data['account_lid'],
                                                        'account_firstname'     
=> $GLOBALS['phpgw']->accounts->data['firstname'],
!                                                       'account_lastname'      
=> $GLOBALS['phpgw']->accounts->data['lastname'],
!                                                       'account_type'          
=> $GLOBALS['phpgw']->accounts->data['account_type']
                                                );
                                        }
--- 450,454 ----
                                                        'account_lid'           
=> $GLOBALS['phpgw']->accounts->data['account_lid'],
                                                        'account_firstname'     
=> $GLOBALS['phpgw']->accounts->data['firstname'],
!                                                       'account_lastname'      
=> $GLOBALS['phpgw']->accounts->data['lastname']
                                                );
                                        }
***************
*** 459,463 ****
                        else
                        {
!                               $entries        = 
$this->get_list('both',$start,$sort,$order,$GLOBALS['query']);
                                $total          = $this->total;
                                for ($i=0;$i<count($entries);$i++)
--- 470,479 ----
                        else
                        {
!                               switch($app)
!                               {
!                                       case 'calendar':        $select = 
'both'; break;
!                                       default:                        $select 
= 'accounts'; break;
!                               }
!                               $entries        = 
$this->get_list($select,$start,$sort,$order,$GLOBALS['query']);
                                $total          = $this->total;
                                for ($i=0;$i<count($entries);$i++)
***************
*** 470,475 ****
                                                        'account_lid'           
=> $entries[$i]['account_lid'],
                                                        'account_firstname'     
=> $entries[$i]['account_firstname'],
!                                                       'account_lastname'      
=> $entries[$i]['account_lastname'],
!                                                       'account_type'          
=> $entries[$i]['account_type']
                                                );
                                        }
--- 486,490 ----
                                                        'account_lid'           
=> $entries[$i]['account_lid'],
                                                        'account_firstname'     
=> $entries[$i]['account_firstname'],
!                                                       'account_lastname'      
=> $entries[$i]['account_lastname']
                                                );
                                        }
***************
*** 489,493 ****
  
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $query, 'search_obj' => 1)));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 504,508 ----
  
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $GLOBALS['query'], 'search_obj' => 1)));
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 514,526 ****
                                $GLOBALS['phpgw']->template->set_var(array
                                (
!                                       'lid'                   => 
$val_users[$i]['account_lid'],
!                                       'firstname'             => $firstname,
!                                       'lastname'              => $lastname,
!                                       'accountid'             => 
$val_users[$i]['account_id'],
!                                       'accounttype'   => 
$val_users[$i]['account_type'])
!                               );
  
                                
$GLOBALS['phpgw']->template->fp('list','accounts_list',True);
                        }
  
                        
$GLOBALS['phpgw']->template->set_var('lang_done',lang('done'));
--- 529,547 ----
                                $GLOBALS['phpgw']->template->set_var(array
                                (
!                                       'lid'                           => 
$val_users[$i]['account_lid'],
!                                       'firstname'                     => 
$firstname,
!                                       'lastname'                      => 
$lastname,
!                                       'accountid'                     => 
$val_users[$i]['account_id'],
!                                       'account_display'       => 
$GLOBALS['phpgw']->common->grab_owner_name($val_users[$i]['account_id'])
!                               ));
  
                                
$GLOBALS['phpgw']->template->fp('list','accounts_list',True);
                        }
+ 
+                       $GLOBALS['phpgw']->template->set_var('start',$start);
+                       $GLOBALS['phpgw']->template->set_var('sort',$sort);
+                       $GLOBALS['phpgw']->template->set_var('order',$order);
+                       
$GLOBALS['phpgw']->template->set_var('query',$GLOBALS['query']);
+                       
$GLOBALS['phpgw']->template->set_var('group_id',$group_id);
  
                        
$GLOBALS['phpgw']->template->set_var('lang_done',lang('done'));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]