phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.soadmin.inc.php,1.1,1.2 class


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.soadmin.inc.php,1.1,1.2 class.sobuilding.inc.php,1.4,1.5 class.socommon.inc.php,1.9,1.10 class.soequipment.inc.php,1.6,1.7class.soinvestment.inc.php,1.5,1.6 class.soinvoice.inc.php,1.12,1.13 class.solookup.inc.php,1.7,1.8 class.soproperty.inc.php,1.4,1.5 class.sotts.inc.php,1.6,1.7 class.soXport.inc.php,1.13,1.14 class.uibuilding.inc.php,1.7,1.8 class.uiequipment.inc.php,1.6,1.7 class.uilookup.inc.php,1.7,1.8 class.uiproperty.inc.php,1.8,1.9
Date: Tue, 18 Feb 2003 15:38:25 -0500

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

Modified Files:
        class.soadmin.inc.php class.sobuilding.inc.php 
        class.socommon.inc.php class.soequipment.inc.php 
        class.soinvestment.inc.php class.soinvoice.inc.php 
        class.solookup.inc.php class.soproperty.inc.php 
        class.sotts.inc.php class.soXport.inc.php 
        class.uibuilding.inc.php class.uiequipment.inc.php 
        class.uilookup.inc.php class.uiproperty.inc.php 
Log Message:
no message

Index: class.soadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.soadmin.inc.php       11 Dec 2002 19:31:22 -0000      1.1
--- class.soadmin.inc.php       18 Feb 2003 20:38:17 -0000      1.2
***************
*** 138,142 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND objekt_id LIKE '%$query%' 
or byggnavn LIKE '%$query%'";
                        }
  
--- 138,142 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND property_id LIKE 
'%$query%' or building_name LIKE '%$query%'";
                        }
  
***************
*** 271,275 ****
                function read_single($property_id,$building_id)
                {
!                       $sql = "SELECT * FROM boei_bygg  where 
objekt_id='$property_id' and bygg_id='$building_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 271,275 ----
                function read_single($property_id,$building_id)
                {
!                       $sql = "SELECT * FROM fm_building  where 
property_id='$property_id' and building_id='$building_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
***************
*** 277,289 ****
                        if ($this->db->next_record())
                        {
!                               $building['property_id']                = 
(int)$this->db->f('objekt_id');
!                               $building['building_id']                = 
(int)$this->db->f('bygg_id');
                                $building['owner']                              
= $this->db->f('owner');
!                               $building['name']                               
= stripslashes($this->db->f('byggnavn'));
!                               $building['generaladdress']             = 
stripslashes($this->db->f('generelladresse'));
                                $building['access']                             
= $this->db->f('access');
                                $building['date']                               
= $this->db->f('entry_date');
                                $building['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $building['omraade_id']                 = 
$this->db->f('omraade_id');
                                $building['part_of_town']               = 
$this->db->f('bydel');
                                $building['building_type_id']   = 
$this->db->f('building_type_id');
--- 277,289 ----
                        if ($this->db->next_record())
                        {
!                               $building['property_id']                = 
(int)$this->db->f('property_id');
!                               $building['building_id']                = 
(int)$this->db->f('building_id');
                                $building['owner']                              
= $this->db->f('owner');
!                               $building['name']                               
= stripslashes($this->db->f('building_name'));
!                               $building['generaladdress']             = 
stripslashes($this->db->f('general_address'));
                                $building['access']                             
= $this->db->f('access');
                                $building['date']                               
= $this->db->f('entry_date');
                                $building['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $building['district_id']                        
= $this->db->f('district_id');
                                $building['part_of_town']               = 
$this->db->f('bydel');
                                $building['building_type_id']   = 
$this->db->f('building_type_id');

Index: class.sobuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sobuilding.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.sobuilding.inc.php    7 Feb 2003 11:18:44 -0000       1.4
--- class.sobuilding.inc.php    18 Feb 2003 20:38:17 -0000      1.5
***************
*** 56,60 ****
                        else
                        {
!                               $ordermethod = ' order by objekt_id DESC';
                        }
  
--- 56,60 ----
                        else
                        {
!                               $ordermethod = ' order by property_id DESC';
                        }
  
***************
*** 96,103 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND objekt_id LIKE '%$query%' 
or byggnavn LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT * FROM boei_bygg WHERE $filtermethod 
$querymethod";
  
                        $this->db2->query($sql,__LINE__,__FILE__);
--- 96,103 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND property_id LIKE 
'%$query%' or building_name LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT * FROM fm_building WHERE $filtermethod 
$querymethod";
  
                        $this->db2->query($sql,__LINE__,__FILE__);
***************
*** 110,115 ****
                                $building[] = array
                                (
!                                       'property_id'   => 
$this->db->f('objekt_id'),
!                                       'building_id'   => 
$this->db->f('bygg_id'),
                                        'owner'         => 
$this->db->f('owner'),
                                        'owner_id'      => 
(int)$this->db->f('owner'),
--- 110,115 ----
                                $building[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
!                                       'building_id'   => 
$this->db->f('building_id'),
                                        'owner'         => 
$this->db->f('owner'),
                                        'owner_id'      => 
(int)$this->db->f('owner'),
***************
*** 117,121 ****
                                        'date'          => 
$this->db->f('entry_date'),
                                        'cat_id'        => 
(int)$this->db->f('cat_id'),
!                                       'name'  => 
stripslashes($this->db->f('byggnavn')),
                                        'grants'        => $ngrants
                                );
--- 117,121 ----
                                        'date'          => 
$this->db->f('entry_date'),
                                        'cat_id'        => 
(int)$this->db->f('cat_id'),
!                                       'name'  => 
stripslashes($this->db->f('building_name')),
                                        'grants'        => $ngrants
                                );
***************
*** 126,130 ****
                function read_single($property_id,$building_id)
                {
!                       $sql = "SELECT * FROM boei_bygg  where 
objekt_id='$property_id' and bygg_id='$building_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 126,130 ----
                function read_single($property_id,$building_id)
                {
!                       $sql = "SELECT * FROM fm_building  where 
property_id='$property_id' and building_id='$building_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
***************
*** 132,144 ****
                        if ($this->db->next_record())
                        {
!                               $building['property_id']                = 
(int)$this->db->f('objekt_id');
!                               $building['building_id']                = 
(int)$this->db->f('bygg_id');
                                $building['owner']                              
= $this->db->f('owner');
!                               $building['name']                               
= stripslashes($this->db->f('byggnavn'));
!                               $building['generaladdress']             = 
stripslashes($this->db->f('generelladresse'));
                                $building['access']                             
= $this->db->f('access');
                                $building['date']                               
= $this->db->f('entry_date');
                                $building['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $building['omraade_id']                 = 
$this->db->f('omraade_id');
                                $building['part_of_town']               = 
$this->db->f('bydel');
                                $building['building_type_id']   = 
$this->db->f('building_type_id');
--- 132,144 ----
                        if ($this->db->next_record())
                        {
!                               $building['property_id']                = 
(int)$this->db->f('property_id');
!                               $building['building_id']                = 
(int)$this->db->f('building_id');
                                $building['owner']                              
= $this->db->f('owner');
!                               $building['name']                               
= stripslashes($this->db->f('building_name'));
!                               $building['generaladdress']             = 
stripslashes($this->db->f('general_address'));
                                $building['access']                             
= $this->db->f('access');
                                $building['date']                               
= $this->db->f('entry_date');
                                $building['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $building['district_id']                        
= $this->db->f('district_id');
                                $building['part_of_town']               = 
$this->db->f('bydel');
                                $building['building_type_id']   = 
$this->db->f('building_type_id');
***************
*** 152,156 ****
                {
  
!                       $this->db->query("INSERT INTO boei_bygg (location_code, 
objekt_id,bygg_id,owner,access,entry_date,byggnavn,generelladresse,cat_id) "
                                . "VALUES ('" . $building['location_code']. 
"','" . $building['property_id'] . "','" . $building['building_id'] . "','" . 
$this->account . "','" . $building['access'] . "','" . time() . "','" . 
$building['name']
                                . "','" . $building['generaladdress'] ."','" . 
$building['cat_id']. "')",__LINE__,__FILE__);
--- 152,156 ----
                {
  
!                       $this->db->query("INSERT INTO fm_building 
(location_code, 
property_id,building_id,owner,access,entry_date,building_name,general_address,cat_id)
 "
                                . "VALUES ('" . $building['location_code']. 
"','" . $building['property_id'] . "','" . $building['building_id'] . "','" . 
$this->account . "','" . $building['access'] . "','" . time() . "','" . 
$building['name']
                                . "','" . $building['generaladdress'] ."','" . 
$building['cat_id']. "')",__LINE__,__FILE__);
***************
*** 167,174 ****
                        $building['content'] = 
$this->db->db_addslashes($building['content']);
  
!                       $this->db->query("UPDATE boei_bygg set byggnavn='" . 
$building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', generelladresse='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE objekt_id= '" . 
$building['property_id']
!                                               . "' AND bygg_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $receipt['message'][] = array('msg'=>lang('Building has 
been edited'));
--- 167,174 ----
                        $building['content'] = 
$this->db->db_addslashes($building['content']);
  
!                       $this->db->query("UPDATE fm_building set 
building_name='" . $building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', general_address='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE property_id= '" . 
$building['property_id']
!                                               . "' AND building_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $receipt['message'][] = array('msg'=>lang('Building has 
been edited'));
***************
*** 178,182 ****
                function delete($property_id,$building_id )
                {
!                       $this->db->query('DELETE FROM boei_bygg WHERE 
objekt_id=' . $property_id . ' and bygg_id=' . $building_id,__LINE__,__FILE__);
                }
        }
--- 178,182 ----
                function delete($property_id,$building_id )
                {
!                       $this->db->query('DELETE FROM fm_building WHERE 
property_id=' . $property_id . ' and building_id=' . 
$building_id,__LINE__,__FILE__);
                }
        }

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.socommon.inc.php      18 Feb 2003 09:13:57 -0000      1.9
--- class.socommon.inc.php      18 Feb 2003 20:38:17 -0000      1.10
***************
*** 104,108 ****
                function check_property($property_id='')
                {
!                       $this->db->query("SELECT count(*) FROM boei_objekt 
where objekt_id='$property_id'");
  
                        $this->db->next_record();
--- 104,108 ----
                function check_property($property_id='')
                {
!                       $this->db->query("SELECT count(*) FROM fm_property 
where property_id='$property_id'");
  
                        $this->db->next_record();
***************
*** 116,120 ****
                function check_building($property_id='',$building_id='')
                {
!                       $this->db->query("SELECT count(*) FROM boei_bygg where 
objekt_id='$property_id' and bygg_id='$building_id'");
  
                        $this->db->next_record();
--- 116,120 ----
                function check_building($property_id='',$building_id='')
                {
!                       $this->db->query("SELECT count(*) FROM fm_building 
where property_id='$property_id' and building_id='$building_id'");
  
                        $this->db->next_record();
***************
*** 127,131 ****
                function 
check_entrance($property_id='',$building_id='',$entrance_id='')
                {
!                       $this->db->query("SELECT count(*) FROM boei_seksjon 
where objekt_id='$property_id' and bygg_id='$building_id' and 
seksjons_id='$entrance_id='");
  
                        $this->db->next_record();
--- 127,131 ----
                function 
check_entrance($property_id='',$building_id='',$entrance_id='')
                {
!                       $this->db->query("SELECT count(*) FROM fm_entrance 
where property_id='$property_id' and building_id='$building_id' and 
entrance_id='$entrance_id='");
  
                        $this->db->next_record();
***************
*** 240,250 ****
                {
  
!                       $this->db->query("SELECT omraade_id, omraade FROM 
boei_omraade where omraade_id >'0' ORDER BY omraade_id ");
  
                        $i = 0;
                        while ($this->db->next_record())
                        {
!                               $district[$i]['id']                             
= $this->db->f('omraade_id');
!                               $district[$i]['name']                           
= stripslashes($this->db->f('omraade'));
                                $i++;
                        }
--- 240,250 ----
                {
  
!                       $this->db->query("SELECT district_id, district FROM 
fm_district where district_id >'0' ORDER BY district_id ");
  
                        $i = 0;
                        while ($this->db->next_record())
                        {
!                               $district[$i]['id']                             
= $this->db->f('district_id');
!                               $district[$i]['name']                           
= stripslashes($this->db->f('district'));
                                $i++;
                        }

Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.soequipment.inc.php   18 Feb 2003 09:13:57 -0000      1.6
--- class.soequipment.inc.php   18 Feb 2003 20:38:17 -0000      1.7
***************
*** 118,122 ****
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND  
omraade_id='$district_id' ";
                        }
  
--- 118,122 ----
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND  
district_id='$district_id' ";
                        }
  
***************
*** 126,136 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND fm_equipment.objekt_id 
LIKE '%$query%' or fm_equipment.descr LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT equipment_id,fm_equipment.descr, 
boei_objekt.navn,fm_equipment.property_id,building_id,entrance_id,floor,apartment_id,street_name,street_number,
 fm_equipment_type.name as category"
                        . "     FROM fm_equipment $this->join"
!                       . " boei_objekt ON fm_equipment.property_id = 
boei_objekt.objekt_id $this->join"
!                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id $this->join"
                        . " fm_equipment_type ON fm_equipment.equipment_type_id 
= fm_equipment_type.id "
                        . " WHERE  $filtermethod $querymethod  ";
--- 126,136 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND fm_equipment.property_id 
LIKE '%$query%' or fm_equipment.descr LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT equipment_id,fm_equipment.descr, 
fm_property.navn,fm_equipment.property_id,building_id,entrance_id,floor,apartment_id,street_name,street_number,
 fm_equipment_type.name as category"
                        . "     FROM fm_equipment $this->join"
!                       . " fm_property ON fm_equipment.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join"
                        . " fm_equipment_type ON fm_equipment.equipment_type_id 
= fm_equipment_type.id "
                        . " WHERE  $filtermethod $querymethod  ";

Index: class.soinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvestment.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.soinvestment.inc.php  12 Feb 2003 19:33:37 -0000      1.5
--- class.soinvestment.inc.php  18 Feb 2003 20:38:17 -0000      1.6
***************
*** 92,105 ****
                        if ($cat_id=='property')
                        {
!                               $sql = "SELECT fm_investment.entity_id as 
entity_id, fm_investment.descr as descr, 
fm_investment_value.invest_id,initial_value, boei_objekt.navn, 
boei_bydel.omraade_id, boei_bydel.bydel,"
                                . " fm_investment_value.value, 
fm_investment_value.date, fm_investment_value.this_index, "
                                . " fm_investment_value.index_count"
!                               . " FROM boei_objekt $this->join "
!                               . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id $this->join "
!                               . " fm_investment_value ON 
boei_objekt.objekt_id = left(fm_investment_value.entity_id,4) $this->join "
                                . " fm_investment ON 
fm_investment_value.entity_id = fm_investment.entity_id AND "
                                . " fm_investment_value.invest_id = 
fm_investment.invest_id "
                                . " WHERE ( current_index = '1'  or (this_index 
= NULL and index_count= '1')) $filtermethod "
!                               . " ORDER BY 
boei_bydel.bydel,boei_objekt.objekt_id ";
  
                        }
--- 92,105 ----
                        if ($cat_id=='property')
                        {
!                               $sql = "SELECT fm_investment.entity_id as 
entity_id, fm_investment.descr as descr, 
fm_investment_value.invest_id,initial_value, fm_property.navn, 
boei_bydel.district_id, boei_bydel.bydel,"
                                . " fm_investment_value.value, 
fm_investment_value.date, fm_investment_value.this_index, "
                                . " fm_investment_value.index_count"
!                               . " FROM fm_property $this->join "
!                               . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join "
!                               . " fm_investment_value ON 
fm_property.property_id = left(fm_investment_value.entity_id,4) $this->join "
                                . " fm_investment ON 
fm_investment_value.entity_id = fm_investment.entity_id AND "
                                . " fm_investment_value.invest_id = 
fm_investment.invest_id "
                                . " WHERE ( current_index = '1'  or (this_index 
= NULL and index_count= '1')) $filtermethod "
!                               . " ORDER BY 
boei_bydel.bydel,fm_property.property_id ";
  
                        }
***************
*** 133,137 ****
                                $investment[$i]['entity_id']            = 
$this->db->f('entity_id');
                                $investment[$i]['investment_id']        = 
$this->db->f('invest_id');
!                               $investment[$i]['district_id']          = 
$this->db->f('omraade_id');
                                $investment[$i]['part_of_town']         = 
$this->db->f('bydel');
                                $investment[$i]['descr']                        
= $this->db->f('descr');
--- 133,137 ----
                                $investment[$i]['entity_id']            = 
$this->db->f('entity_id');
                                $investment[$i]['investment_id']        = 
$this->db->f('invest_id');
!                               $investment[$i]['district_id']          = 
$this->db->f('district_id');
                                $investment[$i]['part_of_town']         = 
$this->db->f('bydel');
                                $investment[$i]['descr']                        
= $this->db->f('descr');
***************
*** 159,167 ****
                                {
  
!                                       $objekt_id = 
substr($investment[$i]['location_code'],0,4);
  
!                                       $this->db->query("select 
bydel,omraade_id from boei_objekt $this->join boei_bydel on 
boei_objekt.bydel_id=boei_bydel.bydel_id Where objekt_id= '$objekt_id'");
                                        $this->db->next_record();
!                                       $investment[$i]['district_id'] = 
$this->db->f('omraade_id');
                                        $investment[$i]['part_of_town'] = 
$this->db->f('bydel');
  
--- 159,167 ----
                                {
  
!                                       $property_id = 
substr($investment[$i]['location_code'],0,4);
  
!                                       $this->db->query("select 
bydel,district_id from fm_property $this->join boei_bydel on 
fm_property.bydel_id=boei_bydel.bydel_id Where property_id= '$property_id'");
                                        $this->db->next_record();
!                                       $investment[$i]['district_id'] = 
$this->db->f('district_id');
                                        $investment[$i]['part_of_town'] = 
$this->db->f('bydel');
  
***************
*** 283,287 ****
                {
  
!                       $this->db->query("INSERT INTO boei_bygg (location_code, 
objekt_id,bygg_id,owner,access,entry_date,byggnavn,generelladresse,cat_id) "
                                . "VALUES ('" . $building['location_code']. 
"','" . $building['property_id'] . "','" . $building['building_id'] . "','" . 
$this->account . "','" . $building['access'] . "','" . time() . "','" . 
$building['name']
                                . "','" . $building['generaladdress'] ."','" . 
$building['cat_id']. "')",__LINE__,__FILE__);
--- 283,287 ----
                {
  
!                       $this->db->query("INSERT INTO fm_building 
(location_code, 
property_id,building_id,owner,access,entry_date,building_name,general_address,cat_id)
 "
                                . "VALUES ('" . $building['location_code']. 
"','" . $building['property_id'] . "','" . $building['building_id'] . "','" . 
$this->account . "','" . $building['access'] . "','" . time() . "','" . 
$building['name']
                                . "','" . $building['generaladdress'] ."','" . 
$building['cat_id']. "')",__LINE__,__FILE__);
***************
*** 298,305 ****
                        $building['content'] = 
$this->db->db_addslashes($building['content']);
  
!                       $this->db->query("UPDATE boei_bygg set byggnavn='" . 
$building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', generelladresse='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE objekt_id= '" . 
$building['property_id']
!                                               . "' AND bygg_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $message = lang('Building has been edited');
--- 298,305 ----
                        $building['content'] = 
$this->db->db_addslashes($building['content']);
  
!                       $this->db->query("UPDATE fm_building set 
building_name='" . $building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', general_address='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE property_id= '" . 
$building['property_id']
!                                               . "' AND building_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $message = lang('Building has been edited');

Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.soinvoice.inc.php     15 Feb 2003 19:51:39 -0000      1.12
--- class.soinvoice.inc.php     18 Feb 2003 20:38:17 -0000      1.13
***************
*** 95,99 ****
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " $where  
omraade_id='$district_id' ";
                                $where= 'AND';
                        }
--- 95,99 ----
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " $where  
district_id='$district_id' ";
                                $where= 'AND';
                        }
***************
*** 465,469 ****
                        if ($district_id)
                        {
!                               $filtermethod.= " $where omraade_id= 
$district_id ";
                                $where= 'AND';
                        }
--- 465,469 ----
                        if ($district_id)
                        {
!                               $filtermethod.= " $where district_id= 
$district_id ";
                                $where= 'AND';
                        }
***************
*** 484,491 ****
                        $filtermethod .= " $where (utbetalingsigndato 
>'$start_date') AND (utbetalingsigndato < '$end_date')";
  
!                       $sql = "SELECT omraade_id,periode,sum(godkjentbelop) as 
consume $select_account_class "
!                               . " FROM  t_ecobilagoverf  $this->join 
boei_objekt ON left(t_ecobilagoverf.dima,4) = boei_objekt.objekt_id $this->join 
"
!                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id "
!                       . " $filtermethod group by omraade_id,periode 
$group_account_class";
  //echo $sql;
  
--- 484,491 ----
                        $filtermethod .= " $where (utbetalingsigndato 
>'$start_date') AND (utbetalingsigndato < '$end_date')";
  
!                       $sql = "SELECT district_id,periode,sum(godkjentbelop) 
as consume $select_account_class "
!                               . " FROM  t_ecobilagoverf  $this->join 
fm_property ON left(t_ecobilagoverf.dima,4) = fm_property.property_id 
$this->join "
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id "
!                       . " $filtermethod group by district_id,periode 
$group_account_class";
  //echo $sql;
  
***************
*** 500,504 ****
                                $consume[$i]['consume']                         
        = $this->db->f('consume');
                                $consume[$i]['period']                          
        = $this->db->f('periode');
!                               $consume[$i]['district_id']                     
        = $this->db->f('omraade_id');
                                $consume[$i]['account_class']                   
= $this->db->f('b_account_class');
  
--- 500,504 ----
                                $consume[$i]['consume']                         
        = $this->db->f('consume');
                                $consume[$i]['period']                          
        = $this->db->f('periode');
!                               $consume[$i]['district_id']                     
        = $this->db->f('district_id');
                                $consume[$i]['account_class']                   
= $this->db->f('b_account_class');
  
***************
*** 570,574 ****
                                {
                                        
$dima_check=substr($values['dima'][$n],0,4);
!                                       $GLOBALS['phpgw']->db->query("select 
count(*) from boei_objekt where objekt_id = $dima_check ");
                                        $GLOBALS['phpgw']->db->next_record();
                                        if ($GLOBALS['phpgw']->db->f(0) == 0)
--- 570,574 ----
                                {
                                        
$dima_check=substr($values['dima'][$n],0,4);
!                                       $GLOBALS['phpgw']->db->query("select 
count(*) from fm_property where property_id = $dima_check ");
                                        $GLOBALS['phpgw']->db->next_record();
                                        if ($GLOBALS['phpgw']->db->f(0) == 0)

Index: class.solookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solookup.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.solookup.inc.php      12 Feb 2003 19:33:37 -0000      1.7
--- class.solookup.inc.php      18 Feb 2003 20:38:18 -0000      1.8
***************
*** 146,155 ****
                        else
                        {
!                               $ordermethod = ' order by 
boei_leieobjekt.objekt_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_leieobjekt.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 146,155 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_apartment.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_apartment.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 160,164 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_leieobjekt.access='public' OR boei_leieobjekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 160,164 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_apartment.access='public' OR fm_apartment.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 169,191 ****
                        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)
--- 169,191 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "' AND fm_apartment.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_apartment.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
fm_apartment.cat_id!='99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 194,208 ****
                                $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,fm_apartment_category.descr
 as category,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"
!                       . " fm_apartment_category ON boei_leieobjekt.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
--- 194,208 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( street_name LIKE 
'%$query%' OR fm_apartment.location_code LIKE '%$query%' OR first_name LIKE 
'%$query%' OR last_name LIKE '%$query%')";
                        }
  
  
!                       $sql = "SELECT 
fm_apartment.property_id,building_id,entrance_id,floor,apartment_id,street_number,street_name,fm_apartment_category.descr
 as category,fm_apartment.tenant_id, first_name, last_name"
!                       . "     FROM fm_apartment $this->join"
!                       . " fm_property ON fm_apartment.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join"
!                       . " fm_tenant ON fm_apartment.tenant_id = 
fm_tenant.tenant_id $this->join"
!                       . " fm_streetaddress ON fm_apartment.street_id = 
fm_streetaddress.street_id $this->join"
!                       . " fm_apartment_category ON fm_apartment.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 216,230 ****
                                $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('category'),
!                                       'tenant_id'             => 
$this->db->f('leietaker_id'),
!                                       'firstname'             => 
$this->db->f('fornavn'),
!                                       'lastname'              => 
$this->db->f('etternavn')
                                        );
                        }
--- 216,230 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
!                                       'building_id'   => 
$this->db->f('building_id'),
!                                       'entrance_id'   => 
$this->db->f('entrance_id'),
!                                       'floor'                 => 
$this->db->f('floor'),
!                                       'apartment_id'  => 
$this->db->f('apartment_id'),
!                                       'street_name'   => 
$this->db->f('street_name'),
!                                       'street_number' => 
$this->db->f('street_number'),
                                        'category'              => 
$this->db->f('category'),
!                                       'tenant_id'             => 
$this->db->f('tenant_id'),
!                                       'firstname'             => 
$this->db->f('first_name'),
!                                       'lastname'              => 
$this->db->f('last_name')
                                        );
                        }
***************
*** 259,268 ****
                        else
                        {
!                               $ordermethod = ' order by boei_objekt.objekt_id 
DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_objekt.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 259,268 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_property.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_property.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 273,277 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_objekt.access='public' OR boei_objekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 273,277 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_property.access='public' OR fm_property.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 282,304 ****
                        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)
--- 282,304 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_property.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_property.owner='" . 
$this->account . "' AND fm_property.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_property.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
fm_property.cat_id!='99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 310,314 ****
                        }
  
!                       $sql = "SELECT * FROM boei_objekt $this->join 
boei_bydel on boei_objekt.bydel_id = boei_bydel.bydel_id "
                        . " WHERE  $filtermethod $querymethod  ";
  
--- 310,314 ----
                        }
  
!                       $sql = "SELECT * FROM fm_property $this->join 
boei_bydel on fm_property.bydel_id = boei_bydel.bydel_id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 322,326 ****
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('objekt_id'),
                                        'property_name'         => 
$this->db->f('navn')
                                        );
--- 322,326 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
                                        'property_name'         => 
$this->db->f('navn')
                                        );
***************
*** 357,366 ****
                        else
                        {
!                               $ordermethod = ' order by boei_bygg.objekt_id 
DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_bygg.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 357,366 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_building.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_building.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 371,375 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_bygg.access='public' OR boei_bygg.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 371,375 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_building.access='public' OR fm_building.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 380,402 ****
                        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)
--- 380,402 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_building.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_building.owner='" . 
$this->account . "' AND fm_building.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_building.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
fm_building.cat_id!='99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 405,415 ****
                                $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  ";
  
--- 405,415 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( street_name LIKE 
'%$query%' OR fm_building.location_code LIKE '%$query%' OR fm_property.navn 
LIKE '%$query%' ";
                        }
  
!                       $sql = "SELECT 
fm_property.property_id,fm_property.navn,building_id"
!                       . "     FROM fm_building $this->join"
!                       . " fm_property ON fm_building.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 423,429 ****
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('objekt_id'),
                                        'property_name' => $this->db->f('navn'),
!                                       'building_id'   => 
$this->db->f('bygg_id')
                                        );
                        }
--- 423,429 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
                                        'property_name' => $this->db->f('navn'),
!                                       'building_id'   => 
$this->db->f('building_id')
                                        );
                        }
***************
*** 459,468 ****
                        else
                        {
!                               $ordermethod = ' order by boei_objekt.objekt_id 
DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_objekt.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 459,468 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_property.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_property.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 473,477 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_objekt.access='public' OR boei_objekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 473,477 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_property.access='public' OR fm_property.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 482,504 ****
                        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)
--- 482,504 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_property.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_property.owner='" . 
$this->account . "' AND fm_property.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_entrance.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  fm_entrance.cat_id != 
'99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 507,518 ****
                                $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  ";
  
--- 507,518 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( street_name LIKE 
'%$query%' OR fm_property.location_code LIKE '%$query%' OR fm_property.navn 
LIKE '%$query%')";
                        }
  
  
!                       $sql = "SELECT 
fm_property.property_id,fm_property.navn,building_id,entrance_id,description"
!                       . "     FROM fm_entrance $this->join"
!                       . " fm_property ON fm_entrance.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 526,534 ****
                                $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'),
!                                       'street_name'   => 
$this->db->f('beskrivelse')
                                        );
                        }
--- 526,534 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
                                        'property_name' => $this->db->f('navn'),
!                                       'building_id'   => 
$this->db->f('building_id'),
!                                       'entrance_id'   => 
$this->db->f('entrance_id'),
!                                       'street_name'   => 
$this->db->f('description')
                                        );
                        }
***************
*** 564,573 ****
                        else
                        {
!                               $ordermethod = ' order by 
boei_leieobjekt.objekt_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_leieobjekt.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 564,573 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_apartment.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_apartment.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 578,582 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_leieobjekt.access='public' OR boei_leieobjekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 578,582 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_apartment.access='public' OR fm_apartment.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 587,609 ****
                        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)
--- 587,609 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "' AND fm_apartment.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_apartment.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
fm_apartment.cat_id!='99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 612,625 ****
                                $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,descr"
!                       . "     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"
!                       . " fm_apartment_category ON boei_leieobjekt.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
--- 612,625 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( street_name LIKE 
'%$query%' OR fm_apartment.location_code LIKE '%$query%' OR first_name LIKE 
'%$query%' OR last_name LIKE '%$query%')";
                        }
  
  
!                       $sql = "SELECT 
fm_apartment.property_id,fm_property.navn,building_id,entrance_id,floor,apartment_id,street_number,street_name,descr"
!                       . "     FROM fm_apartment $this->join"
!                       . " fm_property ON fm_apartment.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join"
!                       . " fm_streetaddress ON fm_apartment.street_id = 
fm_streetaddress.street_id $this->join"
!                       . " fm_apartment_category ON fm_apartment.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 633,644 ****
                                $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('descr')
                                        );
--- 633,644 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
                                        'property_name' => $this->db->f('navn'),
!                                       'building_id'   => 
$this->db->f('building_id'),
!                                       'entrance_id'   => 
$this->db->f('entrance_id'),
!                                       'floor'                 => 
$this->db->f('floor'),
!                                       'apartment_id'  => 
$this->db->f('apartment_id'),
!                                       'street_name'   => 
$this->db->f('street_name'),
!                                       'street_number' => 
$this->db->f('street_number'),
                                        'category'              => 
$this->db->f('descr')
                                        );
***************
*** 675,684 ****
                        else
                        {
!                               $ordermethod = ' order by 
boei_leieobjekt.objekt_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( boei_leieobjekt.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
--- 675,684 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_apartment.property_id DESC';
                        }
  
                        if ($filter == 'none')
                        {
!                               $filtermethod = ' ( fm_apartment.owner=' . 
$this->account;
                                if (is_array($this->grants))
                                {
***************
*** 689,693 ****
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(boei_leieobjekt.access='public' OR boei_leieobjekt.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
--- 689,693 ----
                                        }
                                        reset($public_user_list);
!                                       $filtermethod .= " OR 
(fm_apartment.access='public' OR fm_apartment.owner IN(" . 
implode(',',$public_user_list) . ")))";
                                }
                                else
***************
*** 698,720 ****
                        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)
--- 698,720 ----
                        elseif ($filter == 'yours')
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "'";
                        }
                        else
                        {
!                               $filtermethod = " fm_apartment.owner='" . 
$this->account . "' AND fm_apartment.access='private'";
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_apartment.cat_id='$cat_id' ";
                        }
                        else
                        {
!                               $filtermethod .= " AND  
fm_apartment.cat_id!='99' ";
                        }
  
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND 
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 723,737 ****
                                $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,fm_apartment_category.descr,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"
!                       . " 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"
!                       . " fm_apartment_category ON boei_leieobjekt.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
--- 723,737 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( street_name LIKE 
'%$query%' OR fm_apartment.location_code LIKE '%$query%' OR first_name LIKE 
'%$query%' OR last_name LIKE '%$query%')";
                        }
  
  
!                       $sql = "SELECT 
fm_apartment.property_id,fm_property.navn,building_id,entrance_id,floor,apartment_id,street_number,street_name,fm_apartment_category.descr,fm_apartment.tenant_id,
 first_name, last_name,contact_phone "
!                       . "     FROM fm_apartment $this->join"
!                       . " fm_property ON fm_apartment.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join"
!                       . " fm_tenant ON fm_apartment.tenant_id = 
fm_tenant.tenant_id $this->join"
!                       . " fm_streetaddress ON fm_apartment.street_id = 
fm_streetaddress.street_id $this->join"
!                       . " fm_apartment_category ON fm_apartment.cat_id = 
fm_apartment_category.id "
                        . " WHERE  $filtermethod $querymethod  ";
  
***************
*** 745,761 ****
                                $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('descr'),
!                                       'tenant_id'             => 
$this->db->f('leietaker_id'),
                                        'tenant_phone'  => 
$this->db->f('contact_phone'),
!                                       'firstname'             => 
$this->db->f('fornavn'),
!                                       'lastname'              => 
$this->db->f('etternavn')
                                        );
                        }
--- 745,761 ----
                                $location[] = array
                                (
!                                       'property_id'   => 
$this->db->f('property_id'),
                                        'property_name' => $this->db->f('navn'),
!                                       'building_id'   => 
$this->db->f('building_id'),
!                                       'entrance_id'   => 
$this->db->f('entrance_id'),
!                                       'floor'                 => 
$this->db->f('floor'),
!                                       'apartment_id'  => 
$this->db->f('apartment_id'),
!                                       'street_name'   => 
$this->db->f('street_name'),
!                                       'street_number' => 
$this->db->f('street_number'),
                                        'category'              => 
$this->db->f('descr'),
!                                       'tenant_id'             => 
$this->db->f('tenant_id'),
                                        'tenant_phone'  => 
$this->db->f('contact_phone'),
!                                       'firstname'             => 
$this->db->f('first_name'),
!                                       'lastname'              => 
$this->db->f('last_name')
                                        );
                        }
***************
*** 791,795 ****
                        else
                        {
!                               $ordermethod = ' order by 
fm_equipment.objekt_id DESC';
                        }
  
--- 791,795 ----
                        else
                        {
!                               $ordermethod = ' order by 
fm_equipment.property_id DESC';
                        }
  
***************
*** 828,832 ****
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND  
omraade_id='$district_id' ";
                        }
                        if($query)
--- 828,832 ----
                        if ($district_id > 0)
                        {
!                               $filtermethod .= " AND  
district_id='$district_id' ";
                        }
                        if($query)
***************
*** 835,846 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( fm_equipment.descr LIKE 
'%$query%' OR street LIKE '%$query%' OR fm_equipment.location_code LIKE 
'%$query%' OR equipment_id LIKE '%$query%' )";
                        }
  
  
!                       $sql = "SELECT equipment_id,fm_equipment.descr 
,fm_equipment.objekt_id,bygg_id,seksjons_id,etasje,leie_id,street, 
fm_equipment_type.name as category"
                        . "     FROM fm_equipment $this->join"
!                       . " boei_objekt ON fm_equipment.objekt_id = 
boei_objekt.objekt_id $this->join"
!                       . " boei_bydel ON boei_objekt.bydel_id = 
boei_bydel.bydel_id $this->join"
                        . " fm_equipment_type ON fm_equipment.equipment_type_id 
= fm_equipment_type.id "
                        . " WHERE  $filtermethod $querymethod  ";
--- 835,846 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( fm_equipment.descr LIKE 
'%$query%' OR street_name LIKE '%$query%' OR fm_equipment.location_code LIKE 
'%$query%' OR equipment_id LIKE '%$query%' )";
                        }
  
  
!                       $sql = "SELECT equipment_id,fm_equipment.descr 
,fm_equipment.property_id,building_id,entrance_id,floor,apartment_id,street_name,
 fm_equipment_type.name as category"
                        . "     FROM fm_equipment $this->join"
!                       . " fm_property ON fm_equipment.property_id = 
fm_property.property_id $this->join"
!                       . " boei_bydel ON fm_property.bydel_id = 
boei_bydel.bydel_id $this->join"
                        . " fm_equipment_type ON fm_equipment.equipment_type_id 
= fm_equipment_type.id "
                        . " WHERE  $filtermethod $querymethod  ";
***************
*** 856,867 ****
                                (
                                        'equipment_id'  => 
$this->db->f('equipment_id'),
!                                       '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'                => 
$this->db->f('street'),
                                        'category'              => 
$this->db->f('category'),
!                                       'descr'         => 
$this->db->f('descr'),
                                        );
                        }
--- 856,867 ----
                                (
                                        'equipment_id'  => 
$this->db->f('equipment_id'),
!                                       'property_id'   => 
$this->db->f('property_id'),
!                                       'building_id'   => 
$this->db->f('building_id'),
!                                       'entrance_id'   => 
$this->db->f('entrance_id'),
!                                       'floor'                 => 
$this->db->f('floor'),
!                                       'apartment_id'  => 
$this->db->f('apartment_id'),
!                                       'street'                => 
$this->db->f('street_name'),
                                        'category'              => 
$this->db->f('category'),
!                                       'descr'                 => 
$this->db->f('descr'),
                                        );
                        }

Index: class.soproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproperty.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.soproperty.inc.php    18 Feb 2003 19:29:00 -0000      1.4
--- class.soproperty.inc.php    18 Feb 2003 20:38:18 -0000      1.5
***************
*** 63,67 ****
                        else
                        {
!                               $ordermethod = ' order by objekt_id asc';
                        }
  
--- 63,67 ----
                        else
                        {
!                               $ordermethod = ' order by property_id asc';
                        }
  
***************
*** 103,110 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND objekt_id LIKE '%$query%' 
or navn LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT * FROM boei_objekt $this->join 
boei_bydel on boei_objekt.bydel_id = boei_bydel.bydel_id "
                                . " WHERE $filtermethod $querymethod";
  
--- 103,110 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND property_id LIKE 
'%$query%' or navn LIKE '%$query%'";
                        }
  
!                       $sql = "SELECT * FROM fm_property $this->join 
boei_bydel on fm_property.bydel_id = boei_bydel.bydel_id "
                                . " WHERE $filtermethod $querymethod";
  
***************
*** 118,122 ****
                                $property[] = array
                                (
!                                       'property_id'   => 
(int)$this->db->f('objekt_id'),
                                        'owner'                 => 
$this->db->f('owner'),
                                        'owner_id'              => 
(int)$this->db->f('owner'),
--- 118,122 ----
                                $property[] = array
                                (
!                                       'property_id'   => 
(int)$this->db->f('property_id'),
                                        'owner'                 => 
$this->db->f('owner'),
                                        'owner_id'              => 
(int)$this->db->f('owner'),
***************
*** 125,129 ****
                                        'cat_id'                => 
(int)$this->db->f('cat_id'),
                                        'name'                  => 
stripslashes($this->db->f('navn')),
!                                       'district_id'   => 
$this->db->f('omraade_id'),
                                        'part_of_town'  => 
$this->db->f('bydel'),
                                        'grants'                => $ngrants
--- 125,129 ----
                                        'cat_id'                => 
(int)$this->db->f('cat_id'),
                                        'name'                  => 
stripslashes($this->db->f('navn')),
!                                       'district_id'   => 
$this->db->f('district_id'),
                                        'part_of_town'  => 
$this->db->f('bydel'),
                                        'grants'                => $ngrants
***************
*** 135,139 ****
                function read_single($property_id)
                {
!                       $sql = "SELECT * FROM boei_objekt $this->join 
boei_bydel on boei_objekt.bydel_id = boei_bydel.bydel_id where 
objekt_id='$property_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 135,139 ----
                function read_single($property_id)
                {
!                       $sql = "SELECT * FROM fm_property $this->join 
boei_bydel on fm_property.bydel_id = boei_bydel.bydel_id where 
property_id='$property_id'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
***************
*** 141,152 ****
                        if ($this->db->next_record())
                        {
!                               $property['property_id']                        
                = (int)$this->db->f('objekt_id');
                                $property['owner']                              
= $this->db->f('owner');
                                $property['name']                               
= stripslashes($this->db->f('navn'));
!                               $property['generaladdress']             = 
stripslashes($this->db->f('generelladresse'));
                                $property['access']                             
= $this->db->f('access');
                                $property['date']                               
= $this->db->f('entry_date');
                                $property['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $property['district_id']                = 
$this->db->f('omraade_id');
                                $property['part_of_town']               = 
$this->db->f('bydel');
                                $property['part_of_town_id']    = 
$this->db->f('bydel_id');
--- 141,152 ----
                        if ($this->db->next_record())
                        {
!                               $property['property_id']                        
                = (int)$this->db->f('property_id');
                                $property['owner']                              
= $this->db->f('owner');
                                $property['name']                               
= stripslashes($this->db->f('navn'));
!                               $property['generaladdress']             = 
stripslashes($this->db->f('general_address'));
                                $property['access']                             
= $this->db->f('access');
                                $property['date']                               
= $this->db->f('entry_date');
                                $property['cat_id']                             
= (int)$this->db->f('cat_id');
!                               $property['district_id']                = 
$this->db->f('district_id');
                                $property['part_of_town']               = 
$this->db->f('bydel');
                                $property['part_of_town_id']    = 
$this->db->f('bydel_id');
***************
*** 164,168 ****
                        $property['generellinfo'] = 
$this->db->db_addslashes($property['generellinfo']);
  
!                       $this->db->query("INSERT INTO boei_objekt 
(location_code, 
objekt_id,bydel_id,owner,access,entry_date,navn,generelladresse,cat_id,generellinfo)
 "
                                . "VALUES ('" . $property['property_id'] . 
"','" . $property['property_id'] . "','" . $property['part_of_town_id'] . "','" 
. $this->account . "','" . $property['access'] . "','" . time() . "','" . 
$property['name']
                                . "','" . $property['generaladdress'] ."','" . 
$property['cat_id'] ."','" . $property['generellinfo']. "')",__LINE__,__FILE__);
--- 164,168 ----
                        $property['generellinfo'] = 
$this->db->db_addslashes($property['generellinfo']);
  
!                       $this->db->query("INSERT INTO fm_property 
(location_code, 
property_id,bydel_id,owner,access,entry_date,navn,general_address,cat_id,generellinfo)
 "
                                . "VALUES ('" . $property['property_id'] . 
"','" . $property['property_id'] . "','" . $property['part_of_town_id'] . "','" 
. $this->account . "','" . $property['access'] . "','" . time() . "','" . 
$property['name']
                                . "','" . $property['generaladdress'] ."','" . 
$property['cat_id'] ."','" . $property['generellinfo']. "')",__LINE__,__FILE__);
***************
*** 176,182 ****
                        $property['content'] = 
$this->db->db_addslashes($property['content']);
  
!                       $this->db->query("UPDATE boei_objekt set navn='" . 
$property['name'] . "', entry_date='" . time() . "', cat_id='"
!                                                       . $property['cat_id'] . 
"', generelladresse='" . $property['generaladdress'] . "', access='" . 
$property['access'] . "', bydel_id='" . $property['part_of_town_id']. "', 
generellinfo='" . $property['generellinfo']
!                                                       . "' WHERE objekt_id=" 
. intval($property['property_id']),__LINE__,__FILE__);
  
                        $receipt['message'][]=array('msg'=>lang('Property has 
been edited'));
--- 176,182 ----
                        $property['content'] = 
$this->db->db_addslashes($property['content']);
  
!                       $this->db->query("UPDATE fm_property set navn='" . 
$property['name'] . "', entry_date='" . time() . "', cat_id='"
!                                                       . $property['cat_id'] . 
"', general_address='" . $property['generaladdress'] . "', access='" . 
$property['access'] . "', bydel_id='" . $property['part_of_town_id']. "', 
generellinfo='" . $property['generellinfo']
!                                                       . "' WHERE 
property_id=" . intval($property['property_id']),__LINE__,__FILE__);
  
                        $receipt['message'][]=array('msg'=>lang('Property has 
been edited'));
***************
*** 186,190 ****
                function delete($property_id)
                {
!                       $this->db->query('DELETE FROM boei_objekt WHERE 
objekt_id=' . intval($property_id),__LINE__,__FILE__);
                }
        }
--- 186,190 ----
                function delete($property_id)
                {
!                       $this->db->query('DELETE FROM fm_property WHERE 
property_id=' . intval($property_id),__LINE__,__FILE__);
                }
        }

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.sotts.inc.php 11 Feb 2003 14:19:54 -0000      1.6
--- class.sotts.inc.php 18 Feb 2003 20:38:18 -0000      1.7
***************
*** 236,243 ****
                        $ticket['content'] = 
$this->db->db_addslashes($ticket['content']);
  
!                       $this->db->query("UPDATE boei_bygg set byggnavn='" . 
$building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', generelladresse='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE objekt_id= '" . 
$building['property_id']
!                                               . "' AND bygg_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $message = lang('Building has been edited');
--- 236,243 ----
                        $ticket['content'] = 
$this->db->db_addslashes($ticket['content']);
  
!                       $this->db->query("UPDATE fm_building set 
building_name='" . $building['name'] . "', entry_date='" . time()
!                                               . "', cat_id='" . 
$building['cat_id'] . "', general_address='" . $building['generaladdress'] . 
"', access='" . $building['access']
!                                               . "' WHERE property_id= '" . 
$building['property_id']
!                                               . "' AND building_id=" . 
$building['building_id'],__LINE__,__FILE__);
  
                        $message = lang('Building has been edited');
***************
*** 247,251 ****
                function delete($id )
                {
!                       $this->db->query('DELETE FROM boei_bygg WHERE 
objekt_id=' . $property_id . ' and bygg_id=' . $building_id,__LINE__,__FILE__);
                }
        }
--- 247,251 ----
                function delete($id )
                {
!                       $this->db->query('DELETE FROM fm_building WHERE 
property_id=' . $property_id . ' and building_id=' . 
$building_id,__LINE__,__FILE__);
                }
        }

Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.soXport.inc.php       9 Jan 2003 23:10:22 -0000       1.13
--- class.soXport.inc.php       18 Feb 2003 20:38:18 -0000      1.14
***************
*** 68,84 ****
                function anleggsnr_to_objekt($anleggsnr)
                {
!                       $this->db->query("select 
fm_bms.point_name,fm_bms.objekt_id,fm_bms.bygg_id,fm_bms.seksjons_id,boei_bydel.omraade_id
 "
!                       . " from fm_bms $this->join boei_objekt ON 
fm_bms.objekt_id = boei_objekt.objekt_id $this->join "
!             . " boei_bydel ON boei_objekt.bydel_id = boei_bydel.bydel_id 
where fm_bms.id='$anleggsnr'");
  
                        $this->db->next_record();
!                       $objekt_id = $this->db->f('objekt_id');
!                       $bygg_id = $this->db->f('bygg_id');
!                       $seksjons_id = $this->db->f('seksjons_id');
!                       $dima=$objekt_id.$bygg_id.$seksjons_id;
  
                        $maalerinfo['dima']=$dima;
                        $maalerinfo['maalernr']=$this->db->f('point_name');
!                       $maalerinfo['omraade']=$this->db->f('omraade_id');
                        return $maalerinfo;
                }
--- 68,84 ----
                function anleggsnr_to_objekt($anleggsnr)
                {
!                       $this->db->query("select 
fm_bms.point_name,fm_bms.property_id,fm_bms.building_id,fm_bms.entrance_id,boei_bydel.district_id
 "
!                       . " from fm_bms $this->join fm_property ON 
fm_bms.property_id = fm_property.property_id $this->join "
!             . " boei_bydel ON fm_property.bydel_id = boei_bydel.bydel_id 
where fm_bms.id='$anleggsnr'");
  
                        $this->db->next_record();
!                       $property_id = $this->db->f('property_id');
!                       $building_id = $this->db->f('building_id');
!                       $entrance_id = $this->db->f('entrance_id');
!                       $dima=$property_id.$building_id.$entrance_id;
  
                        $maalerinfo['dima']=$dima;
                        $maalerinfo['maalernr']=$this->db->f('point_name');
!                       $maalerinfo['district']=$this->db->f('district_id');
                        return $maalerinfo;
                }
***************
*** 87,96 ****
                {
                //Finn dima fra Boei
!                       $sql = "select boei_gabnr.objekt_id, 
boei_gabnr.bygg_id, boei_gabnr.seksjons_id from boei_gabnr, boei_objekt, 
boei_eier "
!                       . "where substring(boei_gabnr.gabnr,5,5)='$Gnr' and "
!                       . "      substring(boei_gabnr.gabnr,10,4)='$Bnr' and "
!                       . "      substring(boei_gabnr.gabnr,18,3)='$sekjonnr' 
and "
!                       . "      boei_gabnr.objekt_id=boei_objekt.objekt_id and 
"
!                       . "      boei_objekt.eier_id=boei_eier.eier_id and "
                        . "      (boei_eier.eiertype_id=0 or 
boei_eier.eiertype_id=2)";
  
--- 87,96 ----
                {
                //Finn dima fra Boei
!                       $sql = "select fm_gabnr.property_id, 
fm_gabnr.building_id, fm_gabnr.entrance_id from fm_gabnr, fm_property, 
boei_eier "
!                       . "where substring(fm_gabnr.gabnr,5,5)='$Gnr' and "
!                       . "      substring(fm_gabnr.gabnr,10,4)='$Bnr' and "
!                       . "      substring(fm_gabnr.gabnr,18,3)='$sekjonnr' and 
"
!                       . "      fm_gabnr.property_id=fm_property.property_id 
and "
!                       . "      fm_property.eier_id=boei_eier.eier_id and "
                        . "      (boei_eier.eiertype_id=0 or 
boei_eier.eiertype_id=2)";
  
***************
*** 100,104 ****
  //                    if ($GLOBALS['phpgw']->db->f(0))
                        {
!                               
$dima=$GLOBALS['phpgw']->db->f('objekt_id').$GLOBALS['phpgw']->db->f('bygg_id').$GLOBALS['phpgw']->db->f('seksjons_id');
                        }
  //                    else
--- 100,104 ----
  //                    if ($GLOBALS['phpgw']->db->f(0))
                        {
!                               
$dima=$GLOBALS['phpgw']->db->f('property_id').$GLOBALS['phpgw']->db->f('building_id').$GLOBALS['phpgw']->db->f('entrance_id');
                        }
  //                    else
***************
*** 112,122 ****
                function dima_to_address($dima)
                {
!                       $objekt_id=substr($dima,0,4);
!                       $bygg_id=substr($dima,4,2);
!                       $seksjons_id=substr($dima,6,2);
!                       $sql = "select beskrivelse from boei_seksjon where 
objekt_id = '$objekt_id' and bygg_id= '$bygg_id' and seksjons_id = 
'$seksjons_id' ";
                        $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
                        $GLOBALS['phpgw']->db->next_record();
!                       $adresse=$GLOBALS['phpgw']->db->f('beskrivelse');
                        return $adresse;
  
--- 112,122 ----
                function dima_to_address($dima)
                {
!                       $property_id=substr($dima,0,4);
!                       $building_id=substr($dima,4,2);
!                       $entrance_id=substr($dima,6,2);
!                       $sql = "select description from fm_entrance where 
property_id = '$property_id' and building_id= '$building_id' and entrance_id = 
'$entrance_id' ";
                        $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
                        $GLOBALS['phpgw']->db->next_record();
!                       $adresse=$GLOBALS['phpgw']->db->f('description');
                        return $adresse;
  
***************
*** 739,743 ****
          function select_dimc($pmwrkord_code)
          {
!               $sql= "select formaal_id from boei_leieobjekt,fm_wo_wrkorders 
where boei_leieobjekt.objekt_id=fm_wo_wrkorders.objekt_id and 
boei_leieobjekt.leie_id=fm_wo_wrkorders.leie_id and 
fm_wo_wrkorders.id='$pmwrkord_code'";
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();
--- 739,743 ----
          function select_dimc($pmwrkord_code)
          {
!               $sql= "select formaal_id from fm_apartment,fm_wo_wrkorders 
where fm_apartment.property_id=fm_wo_wrkorders.property_id and 
fm_apartment.apartment_id=fm_wo_wrkorders.apartment_id and 
fm_wo_wrkorders.id='$pmwrkord_code'";
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();

Index: class.uibuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uibuilding.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uibuilding.inc.php    18 Feb 2003 19:29:00 -0000      1.7
--- class.uibuilding.inc.php    18 Feb 2003 20:38:18 -0000      1.8
***************
*** 110,114 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'byggnavn',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uibuilding.index',
--- 110,114 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'building_name',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uibuilding.index',
***************
*** 123,127 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uibuilding.index',
--- 123,127 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'property_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uibuilding.index',
***************
*** 317,321 ****
                                '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]',
!                               'omraade_id'                                    
=> $building['omraade_id'],
                                'part_of_town'                                  
=> $building['part_of_town'],
                                'building_type_id'                              
=> $building['building_type_id'],
--- 317,321 ----
                                '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]',
!                               'district_id'                                   
=> $building['district_id'],
                                'part_of_town'                                  
=> $building['part_of_town'],
                                'building_type_id'                              
=> $building['building_type_id'],

Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uiequipment.inc.php   18 Feb 2003 19:29:00 -0000      1.6
--- class.uiequipment.inc.php   18 Feb 2003 20:38:18 -0000      1.7
***************
*** 130,134 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uiequipment.index',
--- 130,134 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'property_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uiequipment.index',

Index: class.uilookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uilookup.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uilookup.inc.php      11 Feb 2003 14:19:54 -0000      1.7
--- class.uilookup.inc.php      18 Feb 2003 20:38:18 -0000      1.8
***************
*** 249,253 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
--- 249,253 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'property_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
***************
*** 275,279 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'gatenavn',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
--- 275,279 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'street_name',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
***************
*** 287,291 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'etternavn',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
--- 287,291 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'last_name',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.location',
***************
*** 400,404 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.equipment',
--- 400,404 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'property_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'           => 
$this->currentapp.'.uilookup.equipment',

Index: class.uiproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproperty.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uiproperty.inc.php    18 Feb 2003 19:29:00 -0000      1.8
--- class.uiproperty.inc.php    18 Feb 2003 20:38:18 -0000      1.9
***************
*** 121,125 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'omraade_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiproperty.index',
--- 121,125 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'district_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiproperty.index',
***************
*** 134,138 ****
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'objekt_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiproperty.index',
--- 134,138 ----
                                                                                
(
                                                                                
        'sort'  => $this->sort,
!                                                                               
        'var'   =>      'property_id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uiproperty.index',





reply via email to

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