phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uientity.inc.php, 1.14, 1.15 class


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] property/inc class.uientity.inc.php, 1.14, 1.15 class.uiadmin_entity.inc.php, 1.12, 1.13 class.soadmin_entity.inc.php, 1.15, 1.16 class.soentity.inc.php, 1.14, 1.15 class.uitts.inc.php, 1.43, 1.44 class.sotts.inc.php, 1.33, 1.34 class.botts.inc.php, 1.23, 1.24 class.menu.inc.php, 1.2, 1.3 class.boentity.inc.php, 1.8, 1.9 hook_admin.inc.php, 1.43, 1.44
Date: Wed, 12 Nov 2003 18:00:54 +0000

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv30193/inc

Modified Files:
        class.uientity.inc.php class.uiadmin_entity.inc.php 
        class.soadmin_entity.inc.php class.soentity.inc.php 
        class.uitts.inc.php class.sotts.inc.php class.botts.inc.php 
        class.menu.inc.php class.boentity.inc.php hook_admin.inc.php 
Log Message:
no message

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** hook_admin.inc.php  10 Oct 2003 21:57:15 -0000      1.43
--- hook_admin.inc.php  12 Nov 2003 18:00:52 -0000      1.44
***************
*** 15,20 ****
                        (
                                'Configuration' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
-                               'Equipment type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=equipment'),
-                               'Report type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=report'),
                                'Street'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=street'),
                                'District'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uicategory.index&type=district'),
--- 15,18 ----
***************
*** 38,45 ****
                                'Permissions'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.list_acl2'),
                                'User contact info'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiadmin.contact_info'),
-                               'Report status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=report_status'),
                                'Request status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=request_status'),
                                'Workorders status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=workorder_status'),
-                               'Equipment status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=equipment_status'),
                                'Agreement status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=agreement_status'),
                                'Document Status'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=document_status'),
--- 36,41 ----

Index: class.menu.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.menu.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** class.menu.inc.php  5 Nov 2003 21:15:49 -0000       1.2
--- class.menu.inc.php  12 Nov 2003 18:00:52 -0000      1.3
***************
*** 62,69 ****
                                $menu['module'][$i]['name']                     
=       lang('Documentation');
                                $menu['module'][$i]['statustext']       =       
lang('Documentation');
-                               $i++;
-                               $menu['module'][$i]['link']                     
=       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uireport.index');
-                               $menu['module'][$i]['name']                     
=       lang('Report');
-                               $menu['module'][$i]['statustext']       =       
lang('Report');
  
                                $entity                 = 
CreateObject($this->currentapp.'.soadmin_entity');
--- 62,65 ----
***************
*** 83,106 ****
                                unset($entity);
  
- /*                            if ($sub == 'equipment')
-                               {
-                                       $menu['sub_menu'][$i]['link']           
        =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index');
-                                       $menu['sub_menu'][$i]['name']           
        =       lang('Equipment');
-                                       $menu['sub_menu'][$i]['statustext']     
        =       lang('Equipment');
-                                       $i++;
-                                       $menu['sub_menu'][$i]['link']           
        =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uimeter.index');
-                                       $menu['sub_menu'][$i]['name']           
        =       lang('Meter');
-                                       $menu['sub_menu'][$i]['statustext']     
        =       lang('Meter');
- 
-                                       if ($this->acl2->check('.equipment',16))
-                                       {
-                                               $i++;
-                                               $menu['sub_menu'][$i]['link']   
                =       
$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uistandard_entity.index&type=equipment');
-                                               $menu['sub_menu'][$i]['name']   
                =       lang('Equipment type');
-                                               
$menu['sub_menu'][$i]['statustext']             =       lang('Equipment type');
-                                       }
-                               }
- 
- */
                                if ($sub == 'location')
                                {
--- 79,82 ----

Index: class.soentity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** class.soentity.inc.php      10 Nov 2003 17:24:01 -0000      1.14
--- class.soentity.inc.php      12 Nov 2003 18:00:51 -0000      1.15
***************
*** 73,76 ****
--- 73,78 ----
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:'');
                                $status = 
(isset($data['status'])?$data['status']:'');
+                               $start_date = 
(isset($data['start_date'])?$data['start_date']:'');
+                               $end_date = 
(isset($data['end_date'])?$data['end_date']:'');
                        }
  
***************
*** 123,130 ****
  
                                $this->bocommon->fm_cache('sql_entity_' . 
$entity_id . '_' . $cat_id . '_' . $lookup,$sql);
!                               $this->bocommon->fm_cache('uicols_entityt_' . 
$entity_id . '_' . $cat_id,$this->bocommon->uicols);
!                               
$this->bocommon->fm_cache('cols_return_entityt_' . $entity_id . '_' . 
$cat_id,$this->bocommon->cols_return);
!                               
$this->bocommon->fm_cache('cols_return_lookup_entityt_' . $entity_id . '_' . 
$cat_id,$this->bocommon->cols_return_lookup);
!                               $this->bocommon->fm_cache('cols_extra_entityt_' 
. $entity_id . '_' . $cat_id,$this->bocommon->cols_extra);
  
                                $uicols                                         
= $this->bocommon->uicols;
--- 125,132 ----
  
                                $this->bocommon->fm_cache('sql_entity_' . 
$entity_id . '_' . $cat_id . '_' . $lookup,$sql);
!                               $this->bocommon->fm_cache('uicols_entityt_' . 
$entity_id . '_' . $cat_id . '_' . $lookup,$this->bocommon->uicols);
!                               
$this->bocommon->fm_cache('cols_return_entityt_' . $entity_id . '_' . $cat_id . 
'_' . $lookup,$this->bocommon->cols_return);
!                               
$this->bocommon->fm_cache('cols_return_lookup_entityt_' . $entity_id . '_' . 
$cat_id . '_' . $lookup,$this->bocommon->cols_return_lookup);
!                               $this->bocommon->fm_cache('cols_extra_entityt_' 
. $entity_id . '_' . $cat_id . '_' . $lookup,$this->bocommon->cols_extra);
  
                                $uicols                                         
= $this->bocommon->uicols;
***************
*** 135,142 ****
                        else
                        {
!                               $uicols                                         
        = $this->bocommon->fm_cache('uicols_entityt_' . $entity_id . '_' . 
$cat_id);
!                               $cols_return                                    
= $this->bocommon->fm_cache('cols_return_entityt_' . $entity_id . '_' . 
$cat_id);
!                               $this->cols_return_lookup               = 
$this->bocommon->fm_cache('cols_return_lookup_entityt_' . $entity_id . '_' . 
$cat_id);
!                               $this->cols_extra                               
= $this->bocommon->fm_cache('cols_extra_entityt_' . $entity_id . '_' . $cat_id);
                                if($lookup)
                                {
--- 137,144 ----
                        else
                        {
!                               $uicols                                         
        = $this->bocommon->fm_cache('uicols_entityt_' . $entity_id . '_' . 
$cat_id . '_' . $lookup);
!                               $cols_return                                    
= $this->bocommon->fm_cache('cols_return_entityt_' . $entity_id . '_' . $cat_id 
. '_' . $lookup);
!                               $this->cols_return_lookup               = 
$this->bocommon->fm_cache('cols_return_lookup_entityt_' . $entity_id . '_' . 
$cat_id . '_' . $lookup);
!                               $this->cols_extra                               
= $this->bocommon->fm_cache('cols_extra_entityt_' . $entity_id . '_' . $cat_id 
. '_' . $lookup);
                                if($lookup)
                                {
***************
*** 226,229 ****
--- 228,238 ----
                                $where = 'AND';
                        }
+ 
+                       if ($start_date)
+                       {
+                               $filtermethod .= " $where 
$entity_table.entry_date >= $start_date AND $entity_table.entry_date <= 
$end_date ";
+                               $where= 'AND';
+                       }
+ 
                        if($query)
                        {
***************
*** 251,258 ****
  
                        $j=0;
!                       $k=count($cols_return);
                        while ($this->db->next_record())
                        {
!                               for ($i=0;$i<$k;$i++)
                                {
                                        $entity_list[$j][$cols_return[$i]] = 
$this->db->f($cols_return[$i]);
--- 260,268 ----
  
                        $j=0;
!                       $n=count($cols_return);
! //_debug_array($cols_return);
                        while ($this->db->next_record())
                        {
!                               for ($i=0;$i<$n;$i++)
                                {
                                        $entity_list[$j][$cols_return[$i]] = 
$this->db->f($cols_return[$i]);
***************
*** 367,371 ****
                                        $entity['p_cat_id']                     
= $this->db->f('p_cat_id');
                                        $entity['location_code']        = 
$this->db->f('location_code');
!                                       $entity['vendor_id']            = 
$this->db->f('vendor_id');
                                        $entity['status']                       
= $this->db->f('status');
  
--- 377,382 ----
                                        $entity['p_cat_id']                     
= $this->db->f('p_cat_id');
                                        $entity['location_code']        = 
$this->db->f('location_code');
!                                       $entity['tenant_id']            = 
$this->db->f('tenant_id');
!                                       $entity['contact_phone']        = 
$this->db->f('contact_phone');
                                        $entity['status']                       
= $this->db->f('status');
  

Index: class.uiadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** class.uiadmin_entity.inc.php        10 Nov 2003 17:53:01 -0000      1.12
--- class.uiadmin_entity.inc.php        12 Nov 2003 18:00:51 -0000      1.13
***************
*** 116,120 ****
                                                                                
        'var'   =>      'id',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.index')
                                                                                
)),
                                'lang_id'       => lang('entity id'),
--- 116,121 ----
                                                                                
        'var'   =>      'id',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.index',
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_id'       => lang('entity id'),
***************
*** 124,128 ****
                                                                                
        'var'   =>      'name',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.index')
                                                                                
)),
                                'lang_name'     => lang('Name'),
--- 125,130 ----
                                                                                
        'var'   =>      'name',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.index',
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_name'     => lang('Name'),
***************
*** 359,363 ****
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.category',
!                                                                               
                                                'entity_id' =>$entity_id)
                                                                                
)),
                                'lang_id'       => lang('category id'),
--- 361,366 ----
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.category',
!                                                                               
                                                'entity_id' =>$entity_id,
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_id'       => lang('category id'),
***************
*** 368,372 ****
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.category',
!                                                                               
                                                'entity_id' =>$entity_id)
                                                                                
)),
                                'lang_name'     => lang('Name'),
--- 371,376 ----
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.category',
!                                                                               
                                                'entity_id' =>$entity_id,
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_name'     => lang('Name'),
***************
*** 892,896 ****
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.list_attribute',
                                                                                
                                                        'entity_id'     
=>$entity_id,
!                                                                               
                                                        'cat_id'        
=>$cat_id)
                                                                                
)),
                                'sort_sorting'  => 
$this->nextmatchs->show_sort_order(array
--- 896,901 ----
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.list_attribute',
                                                                                
                                                        'entity_id'     
=>$entity_id,
!                                                                               
                                                        'cat_id'        
=>$cat_id,
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'sort_sorting'  => 
$this->nextmatchs->show_sort_order(array
***************
*** 901,905 ****
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.list_attribute',
                                                                                
                                                        'entity_id'     
=>$entity_id,
!                                                                               
                                                        'cat_id'        
=>$cat_id)
                                                                                
)),
                                'lang_name'     => lang('Name'),
--- 906,911 ----
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiadmin_entity.list_attribute',
                                                                                
                                                        'entity_id'     
=>$entity_id,
!                                                                               
                                                        'cat_id'        
=>$cat_id,
!                                                                               
                                                'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_name'     => lang('Name'),

Index: class.boentity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boentity.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** class.boentity.inc.php      5 Nov 2003 21:15:47 -0000       1.8
--- class.boentity.inc.php      12 Nov 2003 18:00:52 -0000      1.9
***************
*** 47,55 ****
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
!                       $this->so               = 
CreateObject($this->currentapp.'.soentity');
!                       $this->soadmin_entity           = 
CreateObject($this->currentapp.'.soadmin_entity');
  
!                       $this->solocation = 
CreateObject($this->currentapp.'.solocation');
!                       $this->bocommon = 
CreateObject($this->currentapp.'.bocommon');
  
                        if ($session)
--- 47,57 ----
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
!                       $this->so                       = 
CreateObject($this->currentapp.'.soentity');
  
!                       $this->solocation       = 
CreateObject($this->currentapp.'.solocation');
!                       $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
!                       $this->vfs                      = 
CreateObject('phpgwapi.vfs');
!                       $this->rootdir          = $this->vfs->basedir;
!                       $this->fakebase         = $this->vfs->fakebase;
  
                        if ($session)
***************
*** 69,72 ****
--- 71,77 ----
                        $status = get_var('status',array('POST','GET'));
  
+                       $this->soadmin_entity           = 
CreateObject($this->currentapp.'.soadmin_entity',$entity_id,$cat_id);
+                       $this->category_name    = 
$this->soadmin_entity->category_name;
+ 
                        if ($start)
                        {
***************
*** 241,245 ****
                        $entity = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' => 
$this->district_id,
!                                                                               
        
'lookup'=>$data['lookup'],'allrows'=>$data['allrows'],'entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'status'=>$this->status));
                        $this->total_records = $this->so->total_records;
  
--- 246,253 ----
                        $entity = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' => 
$this->district_id,
!                                                                               
        
'lookup'=>$data['lookup'],'allrows'=>$data['allrows'],'entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'status'=>$this->status,
!                                                                               
        
'start_date'=>$this->bocommon->date_to_timestamp($data['start_date']),'end_date'=>$this->bocommon->date_to_timestamp($data['end_date']),
!                                                                               
        'allrows'=>$allrows));
! 
                        $this->total_records = $this->so->total_records;
  
***************
*** 285,290 ****
                        if($entity['location_code'])
                        {
!                               
$location_data=$this->solocation->read_single($entity['location_code']);
!                               $entity['location_data'] = $location_data;
                        }
  
--- 293,305 ----
                        if($entity['location_code'])
                        {
!                               
$entity['location_data']=$this->solocation->read_single($entity['location_code']);
!                               if($entity['tenant_id'])
!                               {
!                                       
$tenant_data=$this->bocommon->read_single_tenant($entity['tenant_id']);
!                                       $entity['location_data']['tenant_id']   
= $entity['tenant_id'];
!                                       
$entity['location_data']['contact_phone']= $entity['contact_phone'];
!                                       $entity['location_data']['last_name']   
= $tenant_data['last_name'];
!                                       $entity['location_data']['first_name']  
= $tenant_data['first_name'];
!                               }
                        }
  
***************
*** 374,377 ****
--- 389,406 ----
                        }
  
+                       $this->vfs->override_acl = 1;
+ 
+                       $entity['files'] = $this->vfs->ls (array(
+                                    'string' => $this->fakebase. SEP . 
$this->category_name . SEP . $entity['location_data']['loc1'] .  SEP . 
$data['id'],
+                                    'relatives' => array(RELATIVE_NONE)));
+ 
+                       $this->vfs->override_acl = 0;
+ 
+                       if(!$entity['files'][0]['file_id'])
+                       {
+                               unset($entity['files']);
+                       }
+ 
+ 
                        
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp,$insert_record_entity);
  
***************
*** 380,383 ****
--- 409,492 ----
                }
  
+ 
+               function create_home_dir()
+               {
+                       if(!$this->vfs->file_exists(array(
+                                       'string' => $this->fakebase. SEP . 
$this->category_name,
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $this->vfs->override_acl = 1;
+ 
+                               if(!$this->vfs->mkdir (array(
+                                    'string' => $this->fakebase. SEP . 
$this->category_name,
+                                    'relatives' => array(
+                                         RELATIVE_NONE
+                                    )
+                               )))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . $this->category_name);
+                               }
+                               else
+                               {
+                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . $this->category_name);
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+ 
+                       return $receipt;
+               }
+ 
+               function create_document_dir($loc1='',$id='')
+               {
+                       if(!$this->vfs->file_exists(array(
+                                       'string' => $this->fakebase. SEP . 
$this->category_name .  SEP . $loc1,
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $this->vfs->override_acl = 1;
+                               if(!$this->vfs->mkdir (array(
+                                    'string' => $this->fakebase. SEP . 
$this->category_name .  SEP . $loc1,
+                                    'relatives' => array(
+                                         RELATIVE_NONE
+                                    )
+                               )))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . $this->category_name .  SEP . $loc1);
+                               }
+                               else
+                               {
+                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . $this->category_name .  SEP . $loc1);
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+ 
+ 
+                       if(!$this->vfs->file_exists(array(
+                                       'string' => $this->fakebase. SEP . 
$this->category_name .  SEP . $loc1 .  SEP . $id,
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $this->vfs->override_acl = 1;
+                               if(!$this->vfs->mkdir (array(
+                                    'string' => $this->fakebase. SEP . 
$this->category_name .  SEP . $loc1 .  SEP . $id,
+                                    'relatives' => array(
+                                         RELATIVE_NONE
+                                    )
+                               )))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP  . $this->category_name  .  SEP . $loc1 .  SEP . $id);
+                               }
+                               else
+                               {
+                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . $this->category_name .  SEP . $loc1 .  SEP . $id);
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+ 
+ //_debug_array($receipt);
+                       return $receipt;
+               }
+ 
                function 
save($values,$values_attribute,$action='',$entity_id,$cat_id)
                {
***************
*** 420,423 ****
--- 529,564 ----
                        {
                                $receipt = 
$this->so->edit($values,$values_attribute,$entity_id,$cat_id);
+ 
+                               if($values['delete_file'])
+                               {
+                                       for 
($i=0;$i<count($values['delete_file']);$i++)
+                                       {
+                                               $file = $this->fakebase. SEP . 
$this->category_name . SEP . $location[0] . SEP . $values['id'] . SEP . 
$values['delete_file'][$i];
+ 
+                                               
if($this->vfs->file_exists(array(
+                                                               'string' => 
$file,
+                                                               'relatives' => 
Array(RELATIVE_NONE)
+                                                       )))
+                                               {
+                                                       
$this->vfs->override_acl = 1;
+ 
+                                                       if(!$this->vfs->rm 
(array(
+                                                               'string' => 
$file,
+                                                            'relatives' => 
array(
+                                                                 RELATIVE_NONE
+                                                            )
+                                                       )))
+                                                       {
+                                                               
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'. 
$this->fakebase. SEP . $this->category_name . SEP . $location[0]. SEP . 
$values['id'] . SEP .$values['delete_file'][$i]);
+                                                       }
+                                                       else
+                                                       {
+                                                               
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'. 
$this->fakebase. SEP . $this->category_name . SEP . $location[0]. SEP . 
$values['id'] . SEP . $values['delete_file'][$i]);
+                                                       }
+                                                       
$this->vfs->override_acl = 0;
+                                               }
+                                       }
+                               }
+ 
                        }
                        else
***************
*** 438,515 ****
                        return $this->so->generate_id($data);
                }
- 
- /*
-               function read_attibutes($data)
-               {
- 
-                       $soadmin_entity = 
CreateObject($this->currentapp.'.soadmin_entity');
- 
-                       if($data['form'])
-                       {
-                               
$GLOBALS['phpgw']->xslttpl->add_file(array('attributes_form'));
-                       }
-                       else
-                       {
-                               
$GLOBALS['phpgw']->xslttpl->add_file(array('attributes_view'));
-                       }
- 
-                       $input_type_array = array(
-                               'R' => 'radio',
-                               'CH' => 'checkbox',
-                               'LB' => 'listbox',
-                       );
- 
-                       $attributes_values      = 
$this->so->read_attibutes($data);
- 
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       $sep = '/';
-                       $dlarr[strpos($dateformat,'Y')] = 'Y';
-                       $dlarr[strpos($dateformat,'m')] = 'm';
-                       $dlarr[strpos($dateformat,'d')] = 'd';
-                       ksort($dlarr);
- 
-                       $dateformat= (implode($sep,$dlarr));
- 
- 
-                       for ($i=0;$i<count($attributes_values);$i++)
-                       {
-                               if($attributes_values[$i]['datatype']=='D' && 
$attributes_values[$i]['value'])
-                               {
-                                       $timestamp_date= 
mktime(0,0,0,date(m,strtotime($attributes_values[$i]['value'])),date(d,strtotime($attributes_values[$i]['value'])),date(y,strtotime($attributes_values[$i]['value'])));
-                                       $attributes_values[$i]['value'] = 
$GLOBALS['phpgw']->common->show_date($timestamp_date,$dateformat);
-                               }
-                               if($attributes_values[$i]['datatype']=='R' || 
$attributes_values[$i]['datatype']=='CH' || 
$attributes_values[$i]['datatype']=='LB')
-                               {
-                                       $attributes_values[$i]['choice']        
= 
$soadmin_entity->read_attrib_choice($data['entity_id'],$data['cat_id'],$attributes_values[$i]['attrib_id']);
-                                       
$input_type=$input_type_array[$attributes_values[$i]['datatype']];
- 
-                                       
if($attributes_values[$i]['datatype']=='CH')
-                                       {
-                                               
$attributes_values[$i]['value']=unserialize($attributes_values[$i]['value']);
-                                               
$attributes_values[$i]['choice'] = 
$this->bocommon->select_multi_list_2($attributes_values[$i]['value'],$attributes_values[$i]['choice'],$input_type);
- 
-                                       }
-                                       else
-                                       {
-                                               for 
($j=0;$j<count($attributes_values[$i]['choice']);$j++)
-                                               {
-                                                       
$attributes_values[$i]['choice'][$j]['input_type']=$input_type;
-                                                       
if($attributes_values[$i]['choice'][$j]['id']==$attributes_values[$i]['value'])
-                                                       {
-                                                               
$attributes_values[$i]['choice'][$j]['checked']='checked';
-                                                       }
-                                               }
-                                       }
-                               }
- 
-                               
$attributes_values[$i]['lang_attribute_statustext'] = lang('Enter the attribute 
value for this entity');
-                               $attributes_values[$i]['datatype_text'] = 
$this->bocommon->translate_datatype($attributes_values[$i]['datatype']);
-                               $attributes_values[$i]['counter']       = $i;
-                               $attributes_values[$i]['type_id']       = 
$data['type_id'];
-                       }
- 
-                       return  $attributes_values;
-               }
- */
  
        }
--- 579,582 ----

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** class.uitts.inc.php 10 Nov 2003 17:24:01 -0000      1.43
--- class.uitts.inc.php 12 Nov 2003 18:00:51 -0000      1.44
***************
*** 41,45 ****
                        $this->filter                           = 
$this->bo->filter;
                        $this->cat_id                           = 
$this->bo->cat_id;
!                       $this->part_of_town_id          = 
$this->bo->part_of_town_id;
  
                        $this->menu->sub                        ='ticket';
--- 41,46 ----
                        $this->filter                           = 
$this->bo->filter;
                        $this->cat_id                           = 
$this->bo->cat_id;
!                       $this->district_id                      = 
$this->bo->district_id;
!                       $this->allrows                          = 
$this->bo->allrows;
  
                        $this->menu->sub                        ='ticket';
***************
*** 55,59 ****
                                'order'         => $this->order,
                                'filter'        => $this->filter,
!                               'cat_id'        => $this->cat_id
                        );
                        $this->bo->save_sessiondata($data);
--- 56,62 ----
                                'order'         => $this->order,
                                'filter'        => $this->filter,
!                               'cat_id'        => $this->cat_id,
!                               'district_id'   => $this->district_id,
!                               'allrows'       => $this->allrows
                        );
                        $this->bo->save_sessiondata($data);
***************
*** 112,116 ****
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'query'         
=>$this->query)
                                                                                
)),
  
--- 115,121 ----
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'query'         
=>$this->query,
!                                                                               
                                                        
'allrows'=>$this->allrows)
                                                                                
)),
  
***************
*** 126,130 ****
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'query'         
=>$this->query)
                                                                                
)),
  
--- 131,137 ----
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'query'         
=>$this->query,
!                                                                               
                                                        
'allrows'=>$this->allrows)
                                                                                
)),
  
***************
*** 146,150 ****
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'query'         
=>$this->query)
                                                                                
)),
                                'lang_assigned_to'              => 
lang('Assigned to'),
--- 153,159 ----
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'query'         
=>$this->query,
!                                                                               
                                                        
'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_assigned_to'              => 
lang('Assigned to'),
***************
*** 157,161 ****
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'query'         
=>$this->query)
                                                                                
)),
                                'lang_opened_by'                => lang('Opened 
by')
--- 166,172 ----
                                                                                
                                                        'cat_id'        
=>$this->cat_id,
                                                                                
                                                        'filter'        
=>$this->filter,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'query'         
=>$this->query,
!                                                                               
                                                        
'allrows'=>$this->allrows)
                                                                                
)),
                                'lang_opened_by'                => lang('Opened 
by')
***************
*** 177,181 ****
                                                'cat_id'        =>$this->cat_id,
                                                'filter'        =>$this->filter,
!                                               'query'         =>$this->query
                        );
  
--- 188,193 ----
                                                'cat_id'        =>$this->cat_id,
                                                'filter'        =>$this->filter,
!                                               'query'         =>$this->query,
!                                               'district_id'   => 
$this->district_id
                        );
  
***************
*** 189,192 ****
--- 201,215 ----
                        }
  
+ 
+                       if(!$this->allrows)
+                       {
+                               $record_limit   = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $record_limit   = $this->bo->total_records;
+                       }
+ 
+ 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
***************
*** 196,205 ****
                                'autorefresh'                                   
=> $autorefresh,
                                'links'                                         
        => $links,
!                               'allow_allrows'                                 
=> false,
                                'start_record'                                  
=> $this->start,
!                               'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
                                'num_records'                                   
=> count($ticket_list),
                                'all_records'                                   
=> $this->bo->total_records,
!                               'link_url'                                      
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uitts.index'),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                'lang_no_cat'                                   
=> lang('no category'),
--- 219,229 ----
                                'autorefresh'                                   
=> $autorefresh,
                                'links'                                         
        => $links,
!                               'allow_allrows'                                 
=> True,
!                               'allrows'                                       
        => $this->allrows,
                                'start_record'                                  
=> $this->start,
!                               'record_limit'                                  
=> $record_limit,
                                'num_records'                                   
=> count($ticket_list),
                                'all_records'                                   
=> $this->bo->total_records,
!                               'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                'lang_no_cat'                                   
=> lang('no category'),
***************
*** 218,222 ****
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
!                               'table_add'                                     
        => $table_add
                        );
  
--- 242,251 ----
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
!                               'table_add'                                     
        => $table_add,
! 
!                               'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
!                               'lang_no_district'                              
=> lang('no district'),
!                               'lang_district_statustext'              => 
lang('Select the district the selection belongs to. To do not use a district 
select NO DISTRICT'),
!                               'select_district_name'                  => 
'district_id'
                        );
  

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** class.sotts.inc.php 10 Nov 2003 17:24:02 -0000      1.33
--- class.sotts.inc.php 12 Nov 2003 18:00:52 -0000      1.34
***************
*** 65,68 ****
--- 65,70 ----
                                $order = 
(isset($data['order'])?$data['order']:'');
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:0);
+                               $district_id = 
(isset($data['district_id'])?$data['district_id']:0);
+                               $allrows = 
(isset($data['allrows'])?$data['allrows']:'');
                        }
  
***************
*** 122,125 ****
--- 124,133 ----
                        }
  
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " $where  
district_id='$district_id' ";
+                               $where = 'AND';
+                       }
+ 
                        if($query)
                        {
***************
*** 138,147 ****
  
                        $sql = "SELECT fm_tts_tickets.*, fm_tts_category.descr 
as category,phpgw_accounts.account_lid as user_lid FROM fm_tts_tickets 
$this->join fm_tts_category on fm_tts_tickets.cat_id=fm_tts_category.id "
!                       . " $this->join phpgw_accounts on 
fm_tts_tickets.user_id=phpgw_accounts.account_id $filtermethod $querymethod";
  
  //echo $sql;
                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
!                       $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
  
                        $i = 0;
--- 146,165 ----
  
                        $sql = "SELECT fm_tts_tickets.*, fm_tts_category.descr 
as category,phpgw_accounts.account_lid as user_lid FROM fm_tts_tickets 
$this->join fm_tts_category on fm_tts_tickets.cat_id=fm_tts_category.id "
!                       . " $this->join phpgw_accounts on 
fm_tts_tickets.user_id=phpgw_accounts.account_id "
!                       . " $this->join fm_location1 on 
fm_tts_tickets.loc1=fm_location1.loc1 "
!                       . " $this->join fm_part_of_town on 
fm_location1.part_of_town_id=fm_part_of_town.part_of_town_id $filtermethod 
$querymethod";
  
  //echo $sql;
                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
! 
!                       if(!$allrows)
!                       {
!                               $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
!                       }
!                       else
!                       {
!                               $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
!                       }
  
                        $i = 0;
***************
*** 274,278 ****
  
  
! //_debug_array($ticket);
  
                        return $ticket;
--- 292,296 ----
  
  
! //_debug_array($ticket['entity']);
  
                        return $ticket;

Index: class.uientity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** class.uientity.inc.php      10 Nov 2003 17:53:01 -0000      1.14
--- class.uientity.inc.php      12 Nov 2003 18:00:51 -0000      1.15
***************
*** 22,31 ****
                var $public_functions = array
                (
!                       'columns'=> True,
!                       'excel'  => True,
!                       'index'  => True,
!                       'view'   => True,
!                       'edit'   => True,
!                       'delete' => True
                );
  
--- 22,32 ----
                var $public_functions = array
                (
!                       'columns'       => True,
!                       'excel'         => True,
!                       'index'         => True,
!                       'view'          => True,
!                       'edit'          => True,
!                       'delete'        => True,
!                       'view_file'     =>True
                );
  
***************
*** 67,70 ****
--- 68,73 ----
                        $this->district_id                      = 
$this->bo->district_id;
                        $this->status                           = 
$this->bo->status;
+                       $this->fakebase                         = 
$this->bo->fakebase;
+                       $this->category_name            = 
$this->bo->category_name;
  
                        $this->menu->sub                        
='entity_'.$this->entity_id;
***************
*** 192,195 ****
--- 195,241 ----
                }
  
+               function view_file()
+               {
+                       if(!$this->acl_read)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
 . $this->acl2_location);
+                       }
+ 
+                       $GLOBALS['phpgw_info']['flags']['noframework'] = True;
+                       $file_name      = 
urldecode(get_var('file_name',array('POST','GET')));
+                       $loc1           = get_var('loc1',array('POST','GET'));
+                       $id             = get_var('id',array('POST','GET'));
+ 
+                       $file = $this->fakebase. SEP . $this->category_name . 
SEP . $loc1 . SEP . $id . SEP . $file_name;
+ 
+ //echo 'file: ' . $file . '<br>';
+                       if($this->bo->vfs->file_exists(array(
+                               'string' => $file,
+                               'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $filename       = current(explode('.', 
basename($file_name)));
+ 
+                               $filetype       = 
$this->bo->vfs->file_type(array(
+                                                       'string' => $file,
+                                                       'relatives' => 
Array(RELATIVE_NONE)));
+ 
+                               $size           = 
$this->bo->vfs->get_size(array(
+                                                       'string' => $file,
+                                                       'relatives' => 
Array(RELATIVE_NONE),
+                                                       'checksubdirs' => 
True));
+ 
+                               $browser = CreateObject('phpgwapi.browser');
+                               
$browser->content_header($filename,$filetype,$size);
+ 
+                               $document= $this->bo->vfs->read(array(
+                                       'string' => $file,
+                                       'relatives' => Array(RELATIVE_NONE)));
+ 
+                               echo $document;
+ 
+ //                            flush();
+                       }
+               }
  
                function index()
***************
*** 207,211 ****
                        $links = $this->menu->links();
  
!                       $entity_list = $this->bo->read();
  
                        $uicols = $this->bo->uicols;
--- 253,260 ----
                        $links = $this->menu->links();
  
!                       $start_date             = 
urldecode(get_var('start_date',array('POST','GET')));
!                       $end_date                       = 
urldecode(get_var('end_date',array('POST','GET')));
! 
!                       $entity_list = 
$this->bo->read(array('start_date'=>$start_date,'end_date'=>$end_date));
  
                        $uicols = $this->bo->uicols;
***************
*** 265,269 ****
                                        $table_header[$i]['width']              
= '5%';
                                        $table_header[$i]['align']              
= 'center';
!                                       if($uicols['datatype'][$i]!='T')
                                        {
                                                $table_header[$i]['sort_link']  
=true;
--- 314,318 ----
                                        $table_header[$i]['width']              
= '5%';
                                        $table_header[$i]['align']              
= 'center';
!                                       if($uicols['datatype'][$i]!='T' && 
$uicols['datatype'][$i]!='CH')
                                        {
                                                $table_header[$i]['sort_link']  
=true;
***************
*** 279,283 ****
                                                                                
                        'district_id'   => $this->district_id,
                                                                                
                        'entity_id'             =>$this->entity_id,
!                                                                               
                        'cat_id'        =>$this->cat_id)
                                                        ));
                                        }
--- 328,334 ----
                                                                                
                        'district_id'   => $this->district_id,
                                                                                
                        'entity_id'             =>$this->entity_id,
!                                                                               
                        'cat_id'        =>$this->cat_id,
!                                                                               
                        'start_date'=>$start_date,
!                                                                               
                        'end_date'=>$end_date)
                                                        ));
                                        }
***************
*** 327,331 ****
                                                'district_id'   
=>$this->district_id,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query
                        );
  
--- 378,384 ----
                                                'district_id'   
=>$this->district_id,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query,
!                                               'start_date'    =>$start_date,
!                                               'end_date'              
=>$end_date
                        );
  
***************
*** 340,344 ****
                                                'status_id'             
=>$this->status,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query
                        );
  
--- 393,399 ----
                                                'status_id'             
=>$this->status,
                                                'filter'                
=>$this->filter,
!                                               'query'                 
=>$this->query,
!                                               'start_date'    =>$start_date,
!                                               'end_date'              
=>$end_date
                        );
  
***************
*** 350,353 ****
--- 405,409 ----
                                );
  
+                       $link_date_search                                       
= 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.date_search');
  
                        $data = array
***************
*** 361,364 ****
--- 417,430 ----
                                'lang_columns_help'                     => 
lang('Choose columns'),
  
+                               'start_date'                            => 
$start_date,
+                               'end_date'                                      
=> $end_date,
+                               'lang_none'                                     
=> lang('None'),
+                               'lang_date_search'                      => 
lang('Date search'),
+                               'lang_date_search_help'         => lang('Narrow 
the search by dates'),
+                               'link_date_search'                      => 
$link_date_search,
+                               'lang_date_search'                      => 
lang('Date search'),
+                               'overlib_source'                        => 
'./'.$this->currentapp.'/inc/overlib.js',
+ 
+ 
                                'links'                                         
        => $links,
                                'allow_allrows'                                 
=> false,
***************
*** 435,438 ****
--- 501,505 ----
                        }
  
+                       $config         = 
CreateObject('phpgwapi.config',$this->currentapp);
                        $bolocation                     = 
CreateObject($this->currentapp.'.bolocation');
  
***************
*** 442,445 ****
--- 509,513 ----
                        $bypass                         = 
get_var('bypass',array('POST','GET'));
                        $lookup_tenant          = 
get_var('lookup_tenant',array('POST','GET'));
+                       $tenant_id                      = 
get_var('tenant_id',array('POST','GET'));
  
                        $insert_record          = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
***************
*** 486,490 ****
                        {
                                $location_code          = 
get_var('location_code',array('POST','GET'));
-                               $tenant_id                      = 
get_var('tenant_id',array('POST','GET'));
                                $values['descr']        = 
get_var('descr',array('POST','GET'));
                                $p_entity_id            = 
get_var('p_entity_id',array('POST','GET'));
--- 554,557 ----
***************
*** 524,527 ****
--- 591,597 ----
                                $lookup_tenant=True;
                        }
+ 
+                       $receipt        = $this->bo->create_home_dir();
+ 
  //_debug_array($values);
                        if ($values['save'])
***************
*** 539,547 ****
                                }
  
-                               if(!$values['status'])
-                               {
- //                                    
$receipt['error'][]=array('msg'=>lang('Please select a status !'));
-                               }
- 
                                if($id)
                                {
--- 609,612 ----
***************
*** 551,558 ****
                                else
                                {
!                                       if (!$receipt['error'])
!                                       {
!                                               
$values['id']=$this->bo->generate_id(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
!                                       }
                                }
  
--- 616,631 ----
                                else
                                {
!                                       
$values['id']=$this->bo->generate_id(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
!                               }
! 
!                               $values['file_name']=$_FILES['file']['name'];
!                               $to_file = $this->fakebase. SEP . 
$this->category_name . SEP . $values['location']['loc1'] . SEP . $values['id'] 
. SEP . $values['file_name'];
! 
!                               if(!$values['document_name_orig'] && 
$this->bo->vfs->file_exists(array(
!                                               'string' => $to_file,
!                                               'relatives' => 
Array(RELATIVE_NONE)
!                                       )))
!                               {
!                                       
$receipt['error'][]=array('msg'=>lang('This file already exists !'));
                                }
  
***************
*** 562,565 ****
--- 635,650 ----
                                        $id = $values['id'];
                                        $function_msg = lang('edit entity');
+ 
+                                       if($values['file_name'])
+                                       {
+                                               
$this->bo->create_document_dir($values['location']['loc1'], $values['id']);
+                                               if(!$this->bo->vfs->cp (array (
+                                                       'from'  => 
$_FILES['file']['tmp_name'],
+                                                       'to'    => $to_file,
+                                                       'relatives'     => 
array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL))))
+                                               {
+                                                       
$receipt['error'][]=array('msg'=>lang('Failed to upload file !'));
+                                               }
+                                       }
                                }
                                else
***************
*** 711,719 ****
                                }
                        }
! //_debug_array($values['origin']);
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
                        $data = array
                        (
                                'origin_list'                                   
=> $values['origin'],
                                'value_origin_type'                             
=> $values['origin'][0]['type'],
--- 796,834 ----
                                }
                        }
! //_debug_array($values['files']);
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
+                       $link_file_data = array
+                       (
+                               'menuaction'    => 
$this->currentapp.'.uientity.view_file',
+                                               'loc1'                  
=>$values['location_data']['loc1'],
+                                               'id'                    =>$id,
+                                               'cat_id'                
=>$this->cat_id,
+                                               'entity_id'             
=>$this->entity_id
+                                               );
+ 
+ 
+                       $config->read_repository();
+                       $link_to_files = $config->config_data['files_url'];
+ 
+                       $j      = count($values['files']);
+                       for ($i=0;$i<$j;$i++)
+                       {
+                               
$values['files'][$i]['file_name']=urlencode($values['files'][$i]['name']);
+                       }
+ 
                        $data = array
                        (
+                               'link_view_file'                                
=> $GLOBALS['phpgw']->link('/index.php',$link_file_data),
+                               'link_to_files'                                 
=> $link_to_files,
+                               'files'                                         
        => $values['files'],
+                               'lang_files'                                    
=> lang('files'),
+                               'lang_filename'                                 
=> lang('Filename'),
+                               'lang_delete_file'                              
=> lang('Delete file'),
+                               'lang_view_file_statustext'             => 
lang('Klick to view file'),
+                               'lang_delete_file_statustext'   => lang('Check 
to delete file'),
+                               'lang_upload_file'                              
=> lang('Upload file'),
+                               'lang_file_statustext'                  => 
lang('Select file to upload'),
+ 
                                'origin_list'                                   
=> $values['origin'],
                                'value_origin_type'                             
=> $values['origin'][0]['type'],
***************
*** 814,817 ****
--- 929,933 ----
                        }
  
+                       $config         = 
CreateObject('phpgwapi.config',$this->currentapp);
                        $bolocation                     = 
CreateObject($this->currentapp.'.bolocation');
  
***************
*** 906,911 ****
--- 1022,1053 ----
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
  
+                       $link_file_data = array
+                       (
+                               'menuaction'    => 
$this->currentapp.'.uientity.view_file',
+                                               'loc1'                  
=>$values['location_data']['loc1'],
+                                               'id'                    =>$id,
+                                               'cat_id'                
=>$this->cat_id,
+                                               'entity_id'             
=>$this->entity_id
+                                               );
+ 
+ 
+                       $config->read_repository();
+                       $link_to_files = $config->config_data['files_url'];
+ 
+                       $j      = count($values['files']);
+                       for ($i=0;$i<$j;$i++)
+                       {
+                               
$values['files'][$i]['file_name']=urlencode($values['files'][$i]['name']);
+                       }
+ 
                        $data = array
                        (
+                               'link_view_file'                                
=> $GLOBALS['phpgw']->link('/index.php',$link_file_data),
+                               'link_to_files'                                 
=> $link_to_files,
+                               'files'                                         
        => $values['files'],
+                               'lang_files'                                    
=> lang('files'),
+                               'lang_filename'                                 
=> lang('Filename'),
+                               'lang_view_file_statustext'             => 
lang('Klick to view file'),
+ 
                                'origin_list'                                   
=> $values['origin'],
                                'lang_entity'                                   
=> lang('entity'),

Index: class.soadmin_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin_entity.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** class.soadmin_entity.inc.php        10 Nov 2003 17:53:01 -0000      1.15
--- class.soadmin_entity.inc.php        12 Nov 2003 18:00:51 -0000      1.16
***************
*** 11,15 ****
                var $grants;
  
!               function soadmin_entity()
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
--- 11,15 ----
                var $grants;
  
!               function soadmin_entity($entity_id='',$cat_id='')
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
***************
*** 21,24 ****
--- 21,29 ----
                        $this->join                     = $this->bocommon->join;
  
+                       if($entity_id && $cat_id)
+                       {
+                               $this->category_name    = 
$this->read_category_name($entity_id,$cat_id);
+                       }
+ 
                }
  
***************
*** 279,282 ****
--- 284,295 ----
                                return $category;
                        }
+               }
+ 
+               function read_category_name($entity_id,$cat_id)
+               {
+                       $sql = "SELECT * FROM fm_entity_category where 
entity_id=$entity_id AND id=$cat_id";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       $this->db->next_record();
+                       return $this->db->f('name');
                }
  

Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** class.botts.inc.php 9 Nov 2003 20:25:11 -0000       1.23
--- class.botts.inc.php 12 Nov 2003 18:00:52 -0000      1.24
***************
*** 64,67 ****
--- 64,69 ----
                        $filter = get_var('filter',array('POST','GET'));
                        $cat_id = get_var('cat_id',array('POST','GET'));
+                       $district_id    = 
get_var('district_id',array('POST','GET'));
+                       $allrows        = 
get_var('allrows',array('POST','GET'));
  
                        if ($start)
***************
*** 94,97 ****
--- 96,107 ----
                                $this->cat_id = $cat_id;
                        }
+                       if(isset($district_id))
+                       {
+                               $this->district_id = $district_id;
+                       }
+                       if(isset($allrows))
+                       {
+                               $this->allrows = $allrows;
+                       }
                }
  
***************
*** 115,118 ****
--- 125,130 ----
                        $this->order    = $data['order'];
                        $this->cat_id   = $data['cat_id'];
+                       $this->district_id      = $data['district_id'];
+                       $this->allrows  = $data['allrows'];
                }
  
***************
*** 294,298 ****
  
                        $tickets = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;
  
--- 306,311 ----
  
                        $tickets = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'district_id' => 
$this->district_id,
!                                                                               
        'allrows'=>$this->allrows));
                        $this->total_records = $this->so->total_records;
  
***************
*** 458,471 ****
                                $record_history[$i]['value_action']     = 
$type?$type:'';
                                unset($type);
- 
                                if ($value['status'] == 'A' || $value['status'] 
== 'G')
                                {
!                                       if (! $value['new_value'])
                                        {
!                                               
$record_history[$i]['value_new_value']  = lang('None');
                                        }
                                        else
                                        {
!                                               
$record_history[$i]['value_new_value']  = 
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
                                        }
                                }
--- 471,484 ----
                                $record_history[$i]['value_action']     = 
$type?$type:'';
                                unset($type);
                                if ($value['status'] == 'A' || $value['status'] 
== 'G')
                                {
!                                       if ((int)$value['new_value']>0)
                                        {
!                                               
$record_history[$i]['value_new_value']  = 
$GLOBALS['phpgw']->accounts->id2name($value['new_value']);
                                        }
                                        else
                                        {
!                                               
$record_history[$i]['value_new_value']  = lang('None');
! 
                                        }
                                }





reply via email to

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