phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.9,1.10 cla


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bocommon.inc.php,1.9,1.10 class.bolookup.inc.php,1.2,1.3 class.socommon.inc.php,1.5,1.6 class.solookup.inc.php,1.4,1.5class.sostandard_entity.inc.php,1.3,1.4 class.uibuilding.inc.php,1.4,1.5 class.uilookup.inc.php,1.5,1.6 class.uiproperty.inc.php,1.5,1.6 class.uitts.inc.php,1.5,1.6 hook_admin.inc.php,1.12,1.13
Date: Mon, 10 Feb 2003 11:46:17 -0500

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

Modified Files:
        class.bocommon.inc.php class.bolookup.inc.php 
        class.socommon.inc.php class.solookup.inc.php 
        class.sostandard_entity.inc.php class.uibuilding.inc.php 
        class.uilookup.inc.php class.uiproperty.inc.php 
        class.uitts.inc.php hook_admin.inc.php 
Log Message:
no message

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.bocommon.inc.php      7 Feb 2003 11:18:44 -0000       1.9
--- class.bocommon.inc.php      10 Feb 2003 16:46:15 -0000      1.10
***************
*** 218,224 ****
--- 218,226 ----
                                $location['tenant']                             
                                = True;
                                $location['lang_tenant']                        
                        = lang('Tenant');
+                               $location['lang_tenant_phone']                  
                = lang('Tenant phone');
                        }
  
  
+                       $location['overlib_source']                             
                        = './'.$this->currentapp.'/inc/overlib.js';
                        $location['value_property_id']                          
                = $data['property_id'];
                        $location['value_building_id']                          
                = $data['building_id'];
***************
*** 228,236 ****
                        $location['value_equipment_id']                         
                = $data['equipment_id'];
  
                        $location['lang_location']                              
                        = lang('Location');
!                       $location['location_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.property');
                        $location['lang_property']                              
                        = lang('Property');
                        $location['lang_building']                              
                        = lang('Building');
                        $location['lang_entrance']                              
                        = lang('Entrance');
                        $location['lang_apartment']                             
                        = lang('Apartment');
  
--- 230,255 ----
                        $location['value_equipment_id']                         
                = $data['equipment_id'];
  
+ 
                        $location['lang_location']                              
                        = lang('Location');
!                       $location['location_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
!                       $location['property_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=property');
!                       $location['building_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=building');
!                       $location['entrance_link']                              
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=entrance');
!                       $location['apartment_link']                             
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=apartment');
!                       $location['tenant_link']                                
                        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.location&list=tenant');
                        $location['lang_property']                              
                        = lang('Property');
+                       $location['lang_select_property_help']          = 
lang('Klick this link to select property');
+                       $location['lang_select_building_help']          = 
lang('Klick this link to select building');
+                       $location['lang_select_entrance_help']          = 
lang('Klick this link to select entrance');
+                       $location['lang_select_apartment_help']         = 
lang('Klick this link to select apartment');
+                       $location['lang_select_tenant_help']            = 
lang('Klick this link to select tenant');
+                       $location['lang_select_equipment_help']         = 
lang('Klick this link to select equipment');
+ 
+ 
+                       $location['lang_property_name']                         
                = lang('Property Name');
                        $location['lang_building']                              
                        = lang('Building');
                        $location['lang_entrance']                              
                        = lang('Entrance');
+                       $location['lang_floor']                                 
                        = lang('Floor');
+                       $location['lang_address']                               
                        = lang('Address');
                        $location['lang_apartment']                             
                        = lang('Apartment');
  
***************
*** 585,588 ****
--- 604,727 ----
                }
  
+               function select_category_property_list($format='',$selected='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                       }
+ 
+                       $categories= 
$this->socommon->select_category_property_list();
+ 
+                       while (is_array($categories) && list(,$category) = 
each($categories))
+                       {
+                               $sel_category = '';
+                               if ($category['id']==$selected)
+                               {
+                                       $sel_category = 'selected';
+                               }
+ 
+                               $category_list[] = array
+                               (
+                                       'cat_id'        => $category['id'],
+                                       'name'          => $category['name'],
+                                       'selected'      => $sel_category
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($category_list);$i++)
+                       {
+                               if ($category_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($category_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $category_list;
+               }
+               function select_category_building_list($format='',$selected='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                       }
+ 
+                       $categories= 
$this->socommon->select_category_building_list();
+ 
+                       while (is_array($categories) && list(,$category) = 
each($categories))
+                       {
+                               $sel_category = '';
+                               if ($category['id']==$selected)
+                               {
+                                       $sel_category = 'selected';
+                               }
+ 
+                               $category_list[] = array
+                               (
+                                       'cat_id'        => $category['id'],
+                                       'name'          => $category['name'],
+                                       'selected'      => $sel_category
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($category_list);$i++)
+                       {
+                               if ($category_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($category_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $category_list;
+               }
+               function select_category_entrance_list($format='',$selected='')
+               {
+                       switch($format)
+                       {
+                               case 'select':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                               case 'filter':
+                                       
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
+                                       break;
+                       }
+ 
+                       $categories= 
$this->socommon->select_category_entrance_list();
+ 
+                       while (is_array($categories) && list(,$category) = 
each($categories))
+                       {
+                               $sel_category = '';
+                               if ($category['id']==$selected)
+                               {
+                                       $sel_category = 'selected';
+                               }
+ 
+                               $category_list[] = array
+                               (
+                                       'cat_id'        => $category['id'],
+                                       'name'          => $category['name'],
+                                       'selected'      => $sel_category
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($category_list);$i++)
+                       {
+                               if ($category_list[$i]['selected'] != 
'selected')
+                               {
+                                       unset($category_list[$i]['selected']);
+                               }
+                       }
+ 
+                       return $category_list;
+               }
                function select_category_apartment_list($format='',$selected='')
                {

Index: class.bolookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bolookup.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bolookup.inc.php      2 Jan 2003 22:03:57 -0000       1.2
--- class.bolookup.inc.php      10 Feb 2003 16:46:15 -0000      1.3
***************
*** 103,113 ****
                }
  
                function read_property()
                {
!                       $property = $this->so->read_property(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));
                        $this->total_records = $this->so->total_records;
  
!                       return $property;
                }
  
--- 103,158 ----
                }
  
+               function read_location()
+               {
+                       $location = $this->so->read_location(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));
+                       $this->total_records = $this->so->total_records;
+ 
+                       return $location;
+               }
+ 
                function read_property()
                {
!                       $location = $this->so->read_property(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));
!                       $this->total_records = $this->so->total_records;
! 
!                       return $location;
!               }
! 
!               function read_building()
!               {
!                       $location = $this->so->read_building(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));
!                       $this->total_records = $this->so->total_records;
! 
!                       return $location;
!               }
! 
!               function read_entrance()
!               {
!                       $location = $this->so->read_entrance(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));
!                       $this->total_records = $this->so->total_records;
! 
!                       return $location;
!               }
! 
!               function read_apartment()
!               {
!                       $location = $this->so->read_apartment(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));
!                       $this->total_records = $this->so->total_records;
! 
!                       return $location;
!               }
! 
!               function read_tenant()
!               {
!                       $location = $this->so->read_tenant(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));
                        $this->total_records = $this->so->total_records;
  
!                       return $location;
                }
  

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.socommon.inc.php      7 Feb 2003 11:18:44 -0000       1.5
--- class.socommon.inc.php      10 Feb 2003 16:46:15 -0000      1.6
***************
*** 93,106 ****
                }
  
                function select_category_apartment_list()
                {
  
!                       $this->db->query("SELECT formaal_id, navnpaaformaal 
FROM boei_formaal where formaal_id >'0' ORDER BY navnpaaformaal ");
  
                        $i = 0;
                        while ($this->db->next_record())
                        {
!                               $categories[$i]['id']                           
= $this->db->f('formaal_id');
!                               $categories[$i]['name']                         
= stripslashes($this->db->f('navnpaaformaal'));
                                $i++;
                        }
--- 93,148 ----
                }
  
+               function select_category_property_list()
+               {
+ 
+                       $this->db->query("SELECT id, num FROM fm_property_type 
where id >'0' ORDER BY num ");
+ 
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $categories[$i]['id']                           
= $this->db->f('id');
+                               $categories[$i]['name']                         
= stripslashes($this->db->f('num'));
+                               $i++;
+                       }
+                       return $categories;
+               }
+               function select_category_building_list()
+               {
+ 
+                       $this->db->query("SELECT id, num FROM fm_building_type 
where id >'0' ORDER BY num ");
+ 
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $categories[$i]['id']                           
= $this->db->f('id');
+                               $categories[$i]['name']                         
= stripslashes($this->db->f('num'));
+                               $i++;
+                       }
+                       return $categories;
+               }
+               function select_category_entrance_list()
+               {
+ 
+                       $this->db->query("SELECT id, num FROM fm_entrance_type 
where id >'0' ORDER BY num ");
+ 
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $categories[$i]['id']                           
= $this->db->f('id');
+                               $categories[$i]['name']                         
= stripslashes($this->db->f('num'));
+                               $i++;
+                       }
+                       return $categories;
+               }
                function select_category_apartment_list()
                {
  
!                       $this->db->query("SELECT id, num FROM boei_formaal 
where id >'0' ORDER BY num ");
  
                        $i = 0;
                        while ($this->db->next_record())
                        {
!                               $categories[$i]['id']                           
= $this->db->f('id');
!                               $categories[$i]['name']                         
= stripslashes($this->db->f('num'));
                                $i++;
                        }

Index: class.solookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solookup.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.solookup.inc.php      20 Jan 2003 10:35:28 -0000      1.4
--- class.solookup.inc.php      10 Feb 2003 16:46:15 -0000      1.5
***************
*** 119,122 ****
--- 119,235 ----
                }
  
+               function read_location($data)
+               {
+ //_debug_array($data);
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
+                               $query = 
(isset($data['query'])?$data['query']:'');
+                               $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $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);
+                       }
+ 
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by 
boei_leieobjekt.objekt_id DESC';
+                       }
+ 
+                       if ($filter == 'none')
+                       {
+                               $filtermethod = ' ( boei_leieobjekt.owner=' . 
$this->account;
+                               if (is_array($this->grants))
+                               {
+                                       $grants = $this->grants;
+                                       while (list($user) = each($grants))
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       reset($public_user_list);
+                                       $filtermethod .= " OR 
(boei_leieobjekt.access='public' OR boei_leieobjekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
+                               }
+                               else
+                               {
+                                       $filtermethod .= ' )';
+                               }
+                       }
+                       elseif ($filter == 'yours')
+                       {
+                               $filtermethod = " boei_leieobjekt.owner='" . 
$this->account . "'";
+                       }
+                       else
+                       {
+                               $filtermethod = " boei_leieobjekt.owner='" . 
$this->account . "' AND boei_leieobjekt.access='private'";
+                       }
+ 
+                       if ($cat_id > 0)
+                       {
+                               $filtermethod .= " AND 
boei_leieobjekt.cat_id='$cat_id' ";
+                       }
+                       else
+                       {
+                               $filtermethod .= " AND  
boei_leieobjekt.cat_id!='99' ";
+                       }
+ 
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " AND 
omraade_id='$district_id' ";
+                       }
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+ 
+                               $querymethod = " AND ( gatenavn LIKE '%$query%' 
OR boei_leieobjekt.location_code LIKE '%$query%' OR fornavn LIKE '%$query%' OR 
etternavn LIKE '%$query%')";
+                       }
+ 
+ 
+                       $sql = "SELECT 
boei_leieobjekt.objekt_id,bygg_id,seksjons_id,etasje,leie_id,gatenr,gatenavn,num,boei_leieobjekt.leietaker_id,
 fornavn, etternavn"
+                       . "     FROM boei_leieobjekt $this->join"
+                       . " boei_objekt ON boei_leieobjekt.objekt_id = 
boei_objekt.objekt_id $this->join"
+                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id $this->join"
+                       . " boei_leietaker ON boei_leieobjekt.leietaker_id = 
boei_leietaker.leietaker_id $this->join"
+                       . " boei_gateadresse ON boei_leieobjekt.gateadresse_id 
= boei_gateadresse.gateadresse_id $this->join"
+                       . " boei_formaal ON boei_leieobjekt.cat_id = 
boei_formaal.id "
+                       . " WHERE  $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__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $location[] = array
+                               (
+                                       'property_id'   => 
$this->db->f('objekt_id'),
+                                       'building_id'   => 
$this->db->f('bygg_id'),
+                                       'entrance_id'   => 
$this->db->f('seksjons_id'),
+                                       'floor'                 => 
$this->db->f('etasje'),
+                                       'apartment_id'  => 
$this->db->f('leie_id'),
+                                       'street_name'   => 
$this->db->f('gatenavn'),
+                                       'street_number' => 
$this->db->f('gatenr'),
+                                       'category'              => 
$this->db->f('num'),
+                                       'tenant_id'             => 
$this->db->f('leietaker_id'),
+                                       'firstname'             => 
$this->db->f('fornavn'),
+                                       'lastname'              => 
$this->db->f('etternavn')
+                                       );
+                       }
+ 
+                       return $location;
+               }
                function read_property($data)
                {
***************
*** 140,143 ****
--- 253,675 ----
                        }
  
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by boei_objekt.objekt_id 
DESC';
+                       }
+ 
+                       if ($filter == 'none')
+                       {
+                               $filtermethod = ' ( boei_objekt.owner=' . 
$this->account;
+                               if (is_array($this->grants))
+                               {
+                                       $grants = $this->grants;
+                                       while (list($user) = each($grants))
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       reset($public_user_list);
+                                       $filtermethod .= " OR 
(boei_objekt.access='public' OR boei_objekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
+                               }
+                               else
+                               {
+                                       $filtermethod .= ' )';
+                               }
+                       }
+                       elseif ($filter == 'yours')
+                       {
+                               $filtermethod = " boei_objekt.owner='" . 
$this->account . "'";
+                       }
+                       else
+                       {
+                               $filtermethod = " boei_objekt.owner='" . 
$this->account . "' AND boei_objekt.access='private'";
+                       }
+ 
+                       if ($cat_id > 0)
+                       {
+                               $filtermethod .= " AND 
boei_objekt.cat_id='$cat_id' ";
+                       }
+                       else
+                       {
+                               $filtermethod .= " AND  
boei_objekt.cat_id!='99' ";
+                       }
+ 
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " AND 
omraade_id='$district_id' ";
+                       }
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+ 
+                               $querymethod = " AND ( navn LIKE '%$query%' OR 
location_code LIKE '%$query%' )";
+                       }
+ 
+                       $sql = "SELECT * FROM boei_objekt $this->join 
boei_bydel on boei_objekt.bydel_id = boei_bydel.bydel_id "
+                       . " WHERE  $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__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $location[] = array
+                               (
+                                       'property_id'   => 
$this->db->f('objekt_id'),
+                                       'category'              => 
$this->db->f('num'),
+                                       'property_name'         => 
$this->db->f('navn')
+                                       );
+                       }
+ 
+                       return $location;
+               }
+ 
+               function read_building($data)
+               {
+ //_debug_array($data);
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
+                               $query = 
(isset($data['query'])?$data['query']:'');
+                               $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $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);
+                       }
+ 
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by boei_bygg.objekt_id 
DESC';
+                       }
+ 
+                       if ($filter == 'none')
+                       {
+                               $filtermethod = ' ( boei_bygg.owner=' . 
$this->account;
+                               if (is_array($this->grants))
+                               {
+                                       $grants = $this->grants;
+                                       while (list($user) = each($grants))
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       reset($public_user_list);
+                                       $filtermethod .= " OR 
(boei_bygg.access='public' OR boei_bygg.owner IN(" . 
implode(',',$public_user_list) . ")))";
+                               }
+                               else
+                               {
+                                       $filtermethod .= ' )';
+                               }
+                       }
+                       elseif ($filter == 'yours')
+                       {
+                               $filtermethod = " boei_bygg.owner='" . 
$this->account . "'";
+                       }
+                       else
+                       {
+                               $filtermethod = " boei_bygg.owner='" . 
$this->account . "' AND boei_bygg.access='private'";
+                       }
+ 
+                       if ($cat_id > 0)
+                       {
+                               $filtermethod .= " AND 
boei_bygg.cat_id='$cat_id' ";
+                       }
+                       else
+                       {
+                               $filtermethod .= " AND  boei_bygg.cat_id!='99' 
";
+                       }
+ 
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " AND 
omraade_id='$district_id' ";
+                       }
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+ 
+                               $querymethod = " AND ( gatenavn LIKE '%$query%' 
OR boei_bygg.location_code LIKE '%$query%' OR boei_objekt.navn LIKE '%$query%' 
";
+                       }
+ 
+                       $sql = "SELECT 
boei_objekt.objekt_id,boei_objekt.navn,bygg_id"
+                       . "     FROM boei_bygg $this->join"
+                       . " boei_objekt ON boei_bygg.objekt_id = 
boei_objekt.objekt_id $this->join"
+                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id "
+                       . " WHERE  $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__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $location[] = array
+                               (
+                                       'property_id'   => 
$this->db->f('objekt_id'),
+                                       'property_name' => $this->db->f('navn'),
+                                       'building_id'   => 
$this->db->f('bygg_id'),
+                                       'category'              => 
$this->db->f('num'),
+                                       );
+                       }
+ 
+                       return $location;
+               }
+ 
+               function read_entrance($data)
+               {
+ //_debug_array($data);
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
+                               $query = 
(isset($data['query'])?$data['query']:'');
+                               $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $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);
+                       }
+ 
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by boei_objekt.objekt_id 
DESC';
+                       }
+ 
+                       if ($filter == 'none')
+                       {
+                               $filtermethod = ' ( boei_objekt.owner=' . 
$this->account;
+                               if (is_array($this->grants))
+                               {
+                                       $grants = $this->grants;
+                                       while (list($user) = each($grants))
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       reset($public_user_list);
+                                       $filtermethod .= " OR 
(boei_objekt.access='public' OR boei_objekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
+                               }
+                               else
+                               {
+                                       $filtermethod .= ' )';
+                               }
+                       }
+                       elseif ($filter == 'yours')
+                       {
+                               $filtermethod = " boei_objekt.owner='" . 
$this->account . "'";
+                       }
+                       else
+                       {
+                               $filtermethod = " boei_objekt.owner='" . 
$this->account . "' AND boei_objekt.access='private'";
+                       }
+ 
+                       if ($cat_id > 0)
+                       {
+                               $filtermethod .= " AND 
boei_seksjon.cat_id='$cat_id' ";
+                       }
+                       else
+                       {
+                               $filtermethod .= " AND  boei_seksjon.cat_id != 
'99' ";
+                       }
+ 
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " AND 
omraade_id='$district_id' ";
+                       }
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+ 
+                               $querymethod = " AND ( gatenavn LIKE '%$query%' 
OR boei_objekt.location_code LIKE '%$query%' OR boei_objekt.navn LIKE 
'%$query%')";
+                       }
+ 
+ 
+                       $sql = "SELECT 
boei_objekt.objekt_id,boei_objekt.navn,bygg_id,seksjons_id,beskrivelse"
+                       . "     FROM boei_seksjon $this->join"
+                       . " boei_objekt ON boei_seksjon.objekt_id = 
boei_objekt.objekt_id $this->join"
+                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id "
+                       . " WHERE  $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__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $location[] = array
+                               (
+                                       'property_id'   => 
$this->db->f('objekt_id'),
+                                       'property_name' => $this->db->f('navn'),
+                                       'building_id'   => 
$this->db->f('bygg_id'),
+                                       'entrance_id'   => 
$this->db->f('seksjons_id'),
+                                       'floor'                 => 
$this->db->f('etasje'),
+                                       'street_name'   => 
$this->db->f('beskrivelse'),
+                                       'category'              => 
$this->db->f('num'),
+                                       );
+                       }
+ 
+                       return $location;
+               }
+ 
+               function read_apartment($data)
+               {
+ //_debug_array($data);
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
+                               $query = 
(isset($data['query'])?$data['query']:'');
+                               $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $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);
+                       }
+ 
+                       if ($order)
+                       {
+                               $ordermethod = " order by $order $sort";
+                       }
+                       else
+                       {
+                               $ordermethod = ' order by 
boei_leieobjekt.objekt_id DESC';
+                       }
+ 
+                       if ($filter == 'none')
+                       {
+                               $filtermethod = ' ( boei_leieobjekt.owner=' . 
$this->account;
+                               if (is_array($this->grants))
+                               {
+                                       $grants = $this->grants;
+                                       while (list($user) = each($grants))
+                                       {
+                                               $public_user_list[] = $user;
+                                       }
+                                       reset($public_user_list);
+                                       $filtermethod .= " OR 
(boei_leieobjekt.access='public' OR boei_leieobjekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
+                               }
+                               else
+                               {
+                                       $filtermethod .= ' )';
+                               }
+                       }
+                       elseif ($filter == 'yours')
+                       {
+                               $filtermethod = " boei_leieobjekt.owner='" . 
$this->account . "'";
+                       }
+                       else
+                       {
+                               $filtermethod = " boei_leieobjekt.owner='" . 
$this->account . "' AND boei_leieobjekt.access='private'";
+                       }
+ 
+                       if ($cat_id > 0)
+                       {
+                               $filtermethod .= " AND 
boei_leieobjekt.cat_id='$cat_id' ";
+                       }
+                       else
+                       {
+                               $filtermethod .= " AND  
boei_leieobjekt.cat_id!='99' ";
+                       }
+ 
+                       if ($district_id > 0)
+                       {
+                               $filtermethod .= " AND 
omraade_id='$district_id' ";
+                       }
+                       if($query)
+                       {
+                               $query = ereg_replace("'",'',$query);
+                               $query = ereg_replace('"','',$query);
+ 
+                               $querymethod = " AND ( gatenavn LIKE '%$query%' 
OR boei_leieobjekt.location_code LIKE '%$query%' OR fornavn LIKE '%$query%' OR 
etternavn LIKE '%$query%')";
+                       }
+ 
+ 
+                       $sql = "SELECT 
boei_leieobjekt.objekt_id,boei_objekt.navn,bygg_id,seksjons_id,etasje,leie_id,gatenr,gatenavn,num"
+                       . "     FROM boei_leieobjekt $this->join"
+                       . " boei_objekt ON boei_leieobjekt.objekt_id = 
boei_objekt.objekt_id $this->join"
+                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id $this->join"
+                       . " boei_gateadresse ON boei_leieobjekt.gateadresse_id 
= boei_gateadresse.gateadresse_id $this->join"
+                       . " boei_formaal ON boei_leieobjekt.cat_id = 
boei_formaal.id "
+                       . " WHERE  $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__);
+ 
+                       while ($this->db->next_record())
+                       {
+                               $location[] = array
+                               (
+                                       'property_id'   => 
$this->db->f('objekt_id'),
+                                       'property_name' => $this->db->f('navn'),
+                                       'building_id'   => 
$this->db->f('bygg_id'),
+                                       'entrance_id'   => 
$this->db->f('seksjons_id'),
+                                       'floor'                 => 
$this->db->f('etasje'),
+                                       'apartment_id'  => 
$this->db->f('leie_id'),
+                                       'street_name'   => 
$this->db->f('gatenavn'),
+                                       'street_number' => 
$this->db->f('gatenr'),
+                                       'category'              => 
$this->db->f('num')
+                                       );
+                       }
+ 
+                       return $location;
+               }
+ 
+               function read_tenant($data)
+               {
+ //_debug_array($data);
+                       if(is_array($data))
+                       {
+                               if ($data['start'])
+                               {
+                                       $start=$data['start'];
+                               }
+                               else
+                               {
+                                       $start=0;
+                               }
+                               $filter = 
(isset($data['filter'])?$data['filter']:'none');
+                               $query = 
(isset($data['query'])?$data['query']:'');
+                               $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
+                               $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);
+                       }
  
                        if ($order)
***************
*** 179,187 ****
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
boei_leieobjekt.formaal_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
boei_leieobjekt.formaal_id!='99' ";
                        }
  
--- 711,719 ----
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
boei_leieobjekt.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
boei_leieobjekt.cat_id!='99' ";
                        }
  
***************
*** 199,203 ****
  
  
!                       $sql = "SELECT 
boei_leieobjekt.objekt_id,bygg_id,seksjons_id,etasje,leie_id,gatenr,gatenavn,navnpaaformaal,boei_leieobjekt.leietaker_id,
 fornavn, etternavn"
                        . "     FROM boei_leieobjekt $this->join"
                        . " boei_objekt ON boei_leieobjekt.objekt_id = 
boei_objekt.objekt_id $this->join"
--- 731,735 ----
  
  
!                       $sql = "SELECT 
boei_leieobjekt.objekt_id,boei_objekt.navn,bygg_id,seksjons_id,etasje,leie_id,gatenr,gatenavn,num,boei_leieobjekt.leietaker_id,
 fornavn, etternavn,contact_phone "
                        . "     FROM boei_leieobjekt $this->join"
                        . " boei_objekt ON boei_leieobjekt.objekt_id = 
boei_objekt.objekt_id $this->join"
***************
*** 205,209 ****
                        . " boei_leietaker ON boei_leieobjekt.leietaker_id = 
boei_leietaker.leietaker_id $this->join"
                        . " boei_gateadresse ON boei_leieobjekt.gateadresse_id 
= boei_gateadresse.gateadresse_id $this->join"
!                       . " boei_formaal ON boei_leieobjekt.formaal_id = 
boei_formaal.formaal_id "
                        . " WHERE  $filtermethod $querymethod  ";
  
--- 737,741 ----
                        . " boei_leietaker ON boei_leieobjekt.leietaker_id = 
boei_leietaker.leietaker_id $this->join"
                        . " boei_gateadresse ON boei_leieobjekt.gateadresse_id 
= boei_gateadresse.gateadresse_id $this->join"
!                       . " boei_formaal ON boei_leieobjekt.cat_id = 
boei_formaal.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 215,221 ****
                        while ($this->db->next_record())
                        {
!                               $property[] = array
                                (
                                        'property_id'   => 
$this->db->f('objekt_id'),
                                        'building_id'   => 
$this->db->f('bygg_id'),
                                        'entrance_id'   => 
$this->db->f('seksjons_id'),
--- 747,754 ----
                        while ($this->db->next_record())
                        {
!                               $location[] = array
                                (
                                        'property_id'   => 
$this->db->f('objekt_id'),
+                                       'property_name' => $this->db->f('navn'),
                                        'building_id'   => 
$this->db->f('bygg_id'),
                                        'entrance_id'   => 
$this->db->f('seksjons_id'),
***************
*** 224,229 ****
                                        'street_name'   => 
$this->db->f('gatenavn'),
                                        'street_number' => 
$this->db->f('gatenr'),
!                                       'category'              => 
$this->db->f('navnpaaformaal'),
                                        'tenant_id'             => 
$this->db->f('leietaker_id'),
                                        'firstname'             => 
$this->db->f('fornavn'),
                                        'lastname'              => 
$this->db->f('etternavn')
--- 757,763 ----
                                        'street_name'   => 
$this->db->f('gatenavn'),
                                        'street_number' => 
$this->db->f('gatenr'),
!                                       'category'              => 
$this->db->f('num'),
                                        'tenant_id'             => 
$this->db->f('leietaker_id'),
+                                       'tenant_phone'  => 
$this->db->f('contact_phone'),
                                        'firstname'             => 
$this->db->f('fornavn'),
                                        'lastname'              => 
$this->db->f('etternavn')
***************
*** 231,235 ****
                        }
  
!                       return $property;
                }
  
--- 765,769 ----
                        }
  
!                       return $location;
                }
  

Index: class.sostandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_entity.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.sostandard_entity.inc.php     14 Dec 2002 19:02:18 -0000      1.3
--- class.sostandard_entity.inc.php     10 Feb 2003 16:46:15 -0000      1.4
***************
*** 100,103 ****
--- 100,112 ----
                                        $table='fm_property_type';
                                        break;
+                               case 'building':
+                                       $table='fm_building_type';
+                                       break;
+                               case 'entrance':
+                                       $table='fm_entrance_type';
+                                       break;
+                               case 'apartment':
+                                       $table='boei_formaal';
+                                       break;
                        }
  
***************
*** 115,118 ****
--- 124,136 ----
                                case 'property':
                                        $table='fm_property_type_attrib';
+                                       break;
+                               case 'building':
+                                       $table='fm_building_type_attrib';
+                                       break;
+                               case 'entrance':
+                                       $table='fm_entrance_type_attrib';
+                                       break;
+                               case 'apartment':
+                                       $table='fm_apartment_type_attrib';
                                        break;
                        }

Index: class.uibuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uibuilding.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.uibuilding.inc.php    7 Feb 2003 11:18:44 -0000       1.4
--- class.uibuilding.inc.php    10 Feb 2003 16:46:15 -0000      1.5
***************
*** 138,142 ****
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('selected' => 
$this->cat_id,'globals' => True)),
                                'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibuilding.index'),
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
--- 138,142 ----
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => 
$this->bocommon->select_category_building_list('filter',$this->cat_id),
                                'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uibuilding.index'),
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
***************
*** 161,165 ****
                        $property_id = get_var('property_id',array('GET'));
                        $building_id = 
get_var('building_id',array('POST','GET'));
!                       $err            = 
get_var('building_id',array('POST','GET'));
                        $values         = get_var('values',array('POST','GET'));
  
--- 161,165 ----
                        $property_id = get_var('property_id',array('GET'));
                        $building_id = 
get_var('building_id',array('POST','GET'));
!                       $err            = get_var('err',array('POST','GET'));
                        $values         = get_var('values',array('POST','GET'));
  
***************
*** 185,189 ****
  
  //_debug_array($values);
- //print_($menu);
                                $receipt = 
$this->bo->save($values,$action,$err);
                        }
--- 185,188 ----
***************
*** 214,218 ****
                        }
  
!                       if($receipt['error'])
                        {
                                $err=true;
--- 213,217 ----
                        }
  
!                       if($receipt['error'] && !$action=='edit')
                        {
                                $err=true;
***************
*** 226,229 ****
--- 225,229 ----
                                'err'                   => $err
                        );
+ //_debug_array($link_data);
  
                        $data = array
***************
*** 264,268 ****
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('format' => 
'select','selected' => $this->cat_id,'globals' => True)),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'values[part_of_town_id]',
--- 264,268 ----
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => 
$this->bocommon->select_category_building_list('select',$this->cat_id),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'values[part_of_town_id]',

Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uilookup.inc.php      27 Jan 2003 10:40:31 -0000      1.5
--- class.uilookup.inc.php      10 Feb 2003 16:46:15 -0000      1.6
***************
*** 24,28 ****
                (
                        'addressbook'  => True,
!                       'property'   => True,
                        'equipment'   => True
                );
--- 24,28 ----
                (
                        'addressbook'  => True,
!                       'location'   => True,
                        'equipment'   => True
                );
***************
*** 178,182 ****
                }
  
!               function property()
                {
  
--- 178,182 ----
                }
  
!               function location()
                {
  
***************
*** 189,209 ****
  
                        $sub = get_var('sub',array('POST','GET'));
  
-                       $property_list = $this->bo->read_property();
  
!                       while (is_array($property_list) && 
list(,$property_entry) = each($property_list))
                        {
                                $content[] = array
                                (
!                                       'property_id'                           
=> $property_entry['property_id'],
!                                       'building_id'                           
=> $property_entry['building_id'],
!                                       'entrance_id'                           
=> $property_entry['entrance_id'],
!                                       'floor'                                 
        => $property_entry['floor'],
!                                       'apartment_id'                          
=> $property_entry['apartment_id'],
!                                       'street_name'                           
=> $property_entry['street_name'],
!                                       'street_number'                         
=> $property_entry['street_number'],
!                                       'tenant_id'                             
        => $property_entry['tenant_id'],
!                                       'tenant'                                
        => $property_entry['lastname'].', '.$property_entry['firstname'],
!                                       'category'                              
        => $property_entry['category']
                                );
                        }
--- 189,244 ----
  
                        $sub = get_var('sub',array('POST','GET'));
+                       $list = get_var('list',array('POST','GET'));
  
  
!                               switch ($list)
!                               {
!                                       case 'property':
!                                               $location_list = 
$this->bo->read_property();
!                                               $cat_list = 
$this->bocommon->select_category_property_list('filter',$this->cat_id);
!                                               $function_msg = lang('list 
property');
!                                       break;
!                                       case 'building':
!                                               $location_list = 
$this->bo->read_building();
!                                               $cat_list = 
$this->bocommon->select_category_building_list('filter',$this->cat_id);
!                                               $function_msg = lang('list 
building');
!                                       break;
!                                       case 'entrance':
!                                               $location_list = 
$this->bo->read_entrance();
!                                               $cat_list = 
$this->bocommon->select_category_entrance_list('filter',$this->cat_id);
!                                               $function_msg = lang('list 
entrance');
!                                       break;
!                                       case 'apartment':
!                                               $location_list = 
$this->bo->read_apartment();
!                                               $cat_list = 
$this->bocommon->select_category_apartment_list('filter',$this->cat_id);
!                                               $function_msg = lang('list 
apartment');
!                                       break;
!                                       case 'tenant':
!                                               $location_list = 
$this->bo->read_tenant();
!                                               $cat_list = 
$this->bocommon->select_category_apartment_list('filter',$this->cat_id);
!                                               $function_msg = lang('list 
tenant');
!                                       break;
!                                       default: break;
!                               }
! 
! 
! //                    $location_list = $this->bo->read_location($list);
! 
!                       while (is_array($location_list) && 
list(,$location_entry) = each($location_list))
                        {
                                $content[] = array
                                (
!                                       'property_id'                           
=> $location_entry['property_id'],
!                                       'property_name'                         
=> $location_entry['property_name'],
!                                       'building_id'                           
=> $location_entry['building_id'],
!                                       'entrance_id'                           
=> $location_entry['entrance_id'],
!                                       'floor'                                 
        => $location_entry['floor'],
!                                       'apartment_id'                          
=> $location_entry['apartment_id'],
!                                       'street_name'                           
=> $location_entry['street_name'],
!                                       'street_number'                         
=> $location_entry['street_number'],
!                                       'tenant_id'                             
        => $location_entry['tenant_id'],
!                                       'tenant_name'                           
=> $location_entry['lastname'].', '.$location_entry['firstname'],
!                                       'category'                              
        => $location_entry['category'],
!                                       'tenant_phone'                          
=> $location_entry['tenant_phone']
                                );
                        }
***************
*** 216,224 ****
                                                                                
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.property',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id)
                                                                                
)),
                                'lang_property'         => lang('Property'),
                                'lang_building'         => lang('Building'),
                                'lang_entrance'         => lang('Entrance'),
--- 251,261 ----
                                                                                
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'list'                  
        => $list)
                                                                                
)),
                                'lang_property'         => lang('Property'),
+                               'lang_property_name'=> lang('Property name'),
                                'lang_building'         => lang('Building'),
                                'lang_entrance'         => lang('Entrance'),
***************
*** 230,236 ****
                                                                                
        'var'   =>      'gatenavn',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.property',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id)
                                                                                
)),
                                'lang_street_name'              => lang('Street 
Name'),
--- 267,274 ----
                                                                                
        'var'   =>      'gatenavn',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'list'                  
        => $list)
                                                                                
)),
                                'lang_street_name'              => lang('Street 
Name'),
***************
*** 241,247 ****
                                                                                
        'var'   =>      'etternavn',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.property',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id)
                                                                                
)),
                                'lang_tenant'           => lang('Tenant'),
--- 279,286 ----
                                                                                
        'var'   =>      'etternavn',
                                                                                
        'order' =>      $this->order,
!                                                                               
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
                                                                                
                                                        'cat_id'                
=>$this->cat_id,
!                                                                               
                                                        'district_id'   => 
$this->district_id,
!                                                                               
                                                        'list'                  
        => $list)
                                                                                
)),
                                'lang_tenant'           => lang('Tenant'),
***************
*** 257,261 ****
                        $link_select = array
                        (
!                               'menuaction'            => 
$this->currentapp.'.uilookup.property',
                                'order'                         => $this->order,
                                'sort'                          => $this->sort,
--- 296,300 ----
                        $link_select = array
                        (
!                               'menuaction'            => 
$this->currentapp.'.uilookup.location',
                                'order'                         => $this->order,
                                'sort'                          => $this->sort,
***************
*** 263,267 ****
                                'district_id'           => $this->district_id,
                                'query'                         => $this->query,
!                               'filter'                        => $this->filter
                        );
  
--- 302,307 ----
                                'district_id'           => $this->district_id,
                                'query'                         => $this->query,
!                               'filter'                        => 
$this->filter,
!                               'list'                          => $list
                        );
  
***************
*** 271,284 ****
                                'start_record'                                  
=> $this->start,
                                'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
!                               'num_records'                                   
=> count($property_list),
                                'all_records'                                   
=> $this->bo->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_select),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
!       //                      'appname'                                       
        => lang($this->currentapp),
!                               'function_msg'                                  
=> lang('list property'),
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => 
$this->bocommon->select_category_apartment_list('filter',$this->cat_id),
                                'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
--- 311,324 ----
                                'start_record'                                  
=> $this->start,
                                'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
!                               'num_records'                                   
=> count($location_list),
                                'all_records'                                   
=> $this->bo->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_select),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
!                               'appname'                                       
        => lang($this->currentapp),
!                               'function_msg'                                  
=> $function_msg,
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the building belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => $cat_list,
                                'district_list'                                 
=> $this->bocommon->select_district_list('filter',$this->district_id),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_select),
***************
*** 293,302 ****
                                'query'                                         
        => $this->query,
                                'lang_submit'                                   
=> lang('submit'),
!                               'table_header_property'                 => 
$table_header,
!                               'values_property'                               
=> $content,
                                'table_done'                                    
=> $table_done
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_property' => $data));
                        $this->save_sessiondata();
                }
--- 333,343 ----
                                'query'                                         
        => $this->query,
                                'lang_submit'                                   
=> lang('submit'),
!                               'lang_select'                                   
=> lang('Select'),
!                               'table_header_'.$list                   => 
$table_header,
!                               'values_'.$list                                 
=> $content,
                                'table_done'                                    
=> $table_done
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_'.$list => $data));
                        $this->save_sessiondata();
                }

Index: class.uiproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproperty.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiproperty.inc.php    7 Feb 2003 11:18:44 -0000       1.5
--- class.uiproperty.inc.php    10 Feb 2003 16:46:15 -0000      1.6
***************
*** 156,160 ****
                                'lang_cat_statustext'                   => 
lang('Select the category the property belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('selected' => 
$this->cat_id,'globals' => True)),
                                'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproperty.index'),
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
--- 156,161 ----
                                'lang_cat_statustext'                   => 
lang('Select the category the property belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
!       //                      'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('selected' => 
$this->cat_id,'globals' => True)),
!                               'cat_list'                                      
        => 
$this->bocommon->select_category_property_list('filter',$this->cat_id),
                                'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproperty.index'),
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
***************
*** 257,261 ****
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => $this->cats->formatted_xslt_list(array('format' => 
'select','selected' => $this->cat_id,'globals' => True)),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'values[part_of_town_id]',
--- 258,262 ----
                                'lang_part_of_town'                             
=> lang('Part of town'),
                                'lang_no_part_of_town'                  => 
lang('No part of town'),
!                               'cat_list'                                      
        => 
$this->bocommon->select_category_property_list('select',$this->cat_id),
                                'part_of_town_list'                             
=> $this->bocommon->select_part_of_town('select',$this->part_of_town_id),
                                'select_name_part_of_town'              => 
'values[part_of_town_id]',

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uitts.inc.php 7 Feb 2003 11:18:44 -0000       1.5
--- class.uitts.inc.php 10 Feb 2003 16:46:15 -0000      1.6
***************
*** 255,259 ****
  
                        
$location_data=$this->bocommon->initiate_ui_location(array('equipment'          
=> False,
!                                                                               
                                                                'tenant'        
        => False,
                                                                                
                                                                'property_id'   
=> $values['property_id'],
                                                                                
                                                                'building_id'   
=> $values['building_id'],
--- 255,259 ----
  
                        
$location_data=$this->bocommon->initiate_ui_location(array('equipment'          
=> False,
!                                                                               
                                                                'tenant'        
        => True,
                                                                                
                                                                'property_id'   
=> $values['property_id'],
                                                                                
                                                                'building_id'   
=> $values['building_id'],

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** hook_admin.inc.php  7 Feb 2003 11:18:44 -0000       1.12
--- hook_admin.inc.php  10 Feb 2003 16:46:15 -0000      1.13
***************
*** 24,28 ****
                                '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'),
!       //                      'Property type'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=property'),
        //                      'Property type attributes class'=> 
$GLOBALS['phpgw']->link('/property/list_property_type_attribute_class.php'),
                                'Building Part'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building_part'),
--- 24,31 ----
                                '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'),
!                               'Property Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=property'),
!                               'Building Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=building'),
!                               'Entrance Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=entrance'),
!                               'Apartment Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_entity.index&type=apartment'),
        //                      'Property type attributes class'=> 
$GLOBALS['phpgw']->link('/property/list_property_type_attribute_class.php'),
                                'Building Part'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building_part'),





reply via email to

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