phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bometer.inc.php,NONE,1.1 clas


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bometer.inc.php,NONE,1.1 class.someter.inc.php,NONE,1.1 class.uimeter.inc.php,NONE,1.1 class.bocommon.inc.php,1.31,1.32 class.socommon.inc.php,1.15,1.16 class.solookup.inc.php,1.14,1.15 class.soproperty.inc.php,1.13,1.14 class.sostandard_2.inc.php,1.8,1.9 class.soXport.inc.php,1.16,1.17 class.uiapartment.inc.php,1.2,1.3 class.uibuilding.inc.php,1.10,1.11 class.uientrance.inc.php,1.3,1.4 class.uiequipment.inc.php,1.10,1.11class.uiinvestment.inc.php,1.10,1.11 class.uiproject.inc.php,1.6,1.7 class.uiproperty.inc.php,1.14,1.15 class.uitts.inc.php,1.13,1.14 hook_admin.inc.php,1.22,1.23
Date: Tue, 08 Apr 2003 08:38:12 -0400

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

Modified Files:
        class.bocommon.inc.php class.socommon.inc.php 
        class.solookup.inc.php class.soproperty.inc.php 
        class.sostandard_2.inc.php class.soXport.inc.php 
        class.uiapartment.inc.php class.uibuilding.inc.php 
        class.uientrance.inc.php class.uiequipment.inc.php 
        class.uiinvestment.inc.php class.uiproject.inc.php 
        class.uiproperty.inc.php class.uitts.inc.php 
        hook_admin.inc.php 
Added Files:
        class.bometer.inc.php class.someter.inc.php 
        class.uimeter.inc.php 
Log Message:
no message

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * This program is free software; you can redistribute it and/or modify 
it   *
        * under the terms of the GNU General Public License as published by the 
    *
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/

        class bometer
        {
                var $start;
                var $query;
                var $filter;
                var $sort;
                var $order;
                var $cat_id;

                var $public_functions = array
                (
                        'read'                          => True,
                        'read_single'           => True,
                        'save'                          => True,
                        'delete'                        => True,
                        'check_perms'           => True
                );

                var $soap_functions = array(
                        'list' => array(
                                'in'  => 
array('int','int','struct','string','int'),
                                'out' => array('array')
                        ),
                        'read' => array(
                                'in'  => array('int','struct'),
                                'out' => array('array')
                        ),
                        'save' => array(
                                'in'  => array('int','struct'),
                                'out' => array()
                        ),
                        'delete' => array(
                                'in'  => array('int','struct'),
                                'out' => array()
                        )
                );

                function bometer($session=False)
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->so               = 
CreateObject($this->currentapp.'.someter');
                        $this->bocommon = 
CreateObject($this->currentapp.'.bocommon');
                        $this->socommon = 
CreateObject($this->currentapp.'.socommon');

                        $start  = get_var('start',array('POST','GET'));
                        $query  = get_var('query',array('POST','GET'));
                        $sort   = get_var('sort',array('POST','GET'));
                        $order  = get_var('order',array('POST','GET'));
                        $filter = get_var('filter',array('POST','GET'));
                        $cat_id = get_var('cat_id',array('POST','GET'));

                        if ($start)
                        {
                                $this->start=$start;
                        }
                        else
                        {
                                $this->start=0;
                        }

                        if(isset($query))
                        {
                                $this->query = $query;
                        }
                        if(!empty($filter))
                        {
                                $this->filter = $filter;
                        }
                        if(isset($sort))
                        {
                                $this->sort = $sort;
                        }
                        if(isset($order))
                        {
                                $this->order = $order;
                        }
                        if(isset($cat_id))
                        {
                                $this->cat_id = $cat_id;
                        }
                }

                function get_category_list($format='',$selected='')
                {
                        switch($format)
                        {
                                case 'select':
                                        
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
                                        break;
                                case 'filter':
                                        
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
                                        break;
                        }

                        $categories= $this->so->get_category_list();

                        while (is_array($categories) && list(,$category) = 
each($categories))
                        {
                                $sel_category = '';
                                if ($category['id']==$selected)
                                {
                                        $sel_category = 'selected';
                                }

                                $category_list[] = array
                                (
                                        'cat_id'        => $category['id'],
                                        'name'          => $category['name'],
                                        'selected'      => $sel_category
                                );
                        }

                        for ($i=0;$i<count($category_list);$i++)
                        {
                                if ($category_list[$i]['selected'] != 
'selected')
                                {
                                        unset($category_list[$i]['selected']);
                                }
                        }

                        return $category_list;
                }

                function read()
                {
                        $meter = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'filter' => $this->filter,'cat_id' => $this->cat_id));
                        $this->total_records = $this->so->total_records;

                        for ($i=0; $i<count($meter); $i++)
                        {
                                $meter[$i]['entry_date']        = 
$GLOBALS['phpgw']->common->show_date($meter[$i]['entry_date']);
                                $meter[$i]['owner']             = 
$GLOBALS['phpgw']->accounts->id2name($meter[$i]['owner']);
                        }
                        return $meter;
                }

                function read_single($meter_id)
                {
                        $meter= $this->so->read_single($meter_id);

                        
$location_data=$this->socommon->read_location_data($meter['location_code']);

                        $meter=$meter + $location_data;

//_debug_array($meter);

                        return $meter;
                }

                function check_meter_id($meter_id)
                {
                        return $this->so->check_meter_id($meter_id);
                }

                function save($values,$action='')
                {
                        $values['location_code'] = 
$this->bocommon->location_code($values['property_id'],$values['building_id'],$values['entrance_id'],$values['apartment_id']);

                        if ($action=='edit')
                        {
                                $receipt = $this->so->edit($values);
                        }
                        else
                        {
                                $receipt = $this->so->add($values);
                        }
                        return $receipt;
                }

                function delete($params)
                {
                        if (is_array($params))
                        {
                                $this->so->delete($params[0]);
                        }
                        else
                        {
                                $this->so->delete($params);
                        }
                }

        }
?>

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * This program is free software; you can redistribute it and/or modify 
it   *
        * under the terms of the GNU General Public License as published by the 
    *
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/

        class someter
        {
                var $grants;

                function someter()
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
                        $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];

                        if 
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
                        {
                                $this->join = " JOIN ";
                        }
                        else
                        {
                                $this->join = " LEFT JOIN ";
                        }


                }

                function get_category_list()
                {

                        $this->db->query("SELECT id, descr FROM 
fm_meter_category ORDER BY descr ");

                        $i = 0;
                        while ($this->db->next_record())
                        {
                                $categories[$i]['id']                           
= $this->db->f('id');
                                $categories[$i]['name']                         
= stripslashes($this->db->f('descr'));
                                $i++;
                        }
                        return $categories;
                }

                function check_meter_id($meter_id='')
                {
                        $this->db->query("SELECT count(*) FROM fm_meter where 
id='$meter_id'");

                        $this->db->next_record();

                        if ( $this->db->f(0))
                        {
                                return True;
                        }
                }

                function read($data)
                {
                        if(is_array($data))
                        {
                                if ($data['start'])
                                {
                                        $start=$data['start'];
                                }
                                else
                                {
                                        $start=0;
                                }
                                $filter = 
(isset($data['filter'])?$data['filter']:'none');
                                $query = 
(isset($data['query'])?$data['query']:'');
                                $sort = 
(isset($data['sort'])?$data['sort']:'DESC');
                                $order = 
(isset($data['order'])?$data['order']:'');
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:0);
                        }

                        if ($order)
                        {
                                $ordermethod = " order by $order $sort";
                        }
                        else
                        {
                                $ordermethod = ' order by property_id asc';
                        }


                        $where = 'WHERE';
                        if ($cat_id)
                        {
                                $filtermethod .= " $where 
fm_meter.type='$cat_id' ";
                                $where = 'AND';
                        }

                        if($query)
                        {
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);

                                $querymethod = " $where (fm_meter.name LIKE 
'%$query%' or fm_meter.id LIKE '%$query%')";
                        }

                        $sql = "SELECT fm_meter.* , fm_location.type as 
location_type FROM fm_meter $this->join fm_location on fm_meter.location_code = 
fm_location.location_code "
                                . " $filtermethod $querymethod";

                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
                        $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);

                        while ($this->db->next_record())
                        {
                                $ngrants = 
(int)$this->grants[$this->db->f('meter_owner')];
                                $meter[] = array
                                (
                                        'meter_id'                      => 
$this->db->f('id'),
                                        'owner'                         => 
$this->db->f('owner'),
                                        'name'                          => 
$this->db->f('name'),
                                        'entry_date'            => 
$this->db->f('entry_date'),
                                        'type'                          => 
$this->db->f('type'),
                                        'address'                       => 
$this->db->f('address'),
                                        'location_type'         => 
$this->db->f('location_type'),
                                        'grants'                        => 
$ngrants
                                );
                        }
                        return $meter;
                }

                function read_single($meter_id)
                {
                        $sql = "SELECT * FROM fm_meter where id='$meter_id'";

                        $this->db->query($sql,__LINE__,__FILE__);

                        if ($this->db->next_record())
                        {
                                $meter['meter_id']                      = 
$this->db->f('id');
                                $meter['name']                          = 
stripslashes($this->db->f('name'));
                                $meter['remark']                        = 
stripslashes($this->db->f('remark'));
                                $meter['type']                          = 
$this->db->f('type');
                                $meter['location_code']         = 
$this->db->f('location_code');
                        }
                        return $meter;
                }

                function add($meter)
                {
                        $meter['remark'] = 
$this->db->db_addslashes($meter['remark']);

                        if($meter['street_number'])
                        {
                                $address= $meter['street_name'] . ' ' . 
$meter['street_number'];
                        }
                        else
                        {
                                $address= $meter['street_name'];
                        }

                        $this->db->query("INSERT INTO fm_meter (location_code, 
id,owner,entry_date,name,address,type,remark) "
                                . "VALUES ('" . $meter['location_code'] . "','" 
. $meter['meter_id'] . "','" . $this->account . "','" . time() . "','" . 
$meter['name']
                                . "','" . $address ."','" . $meter['cat_id'] 
."','" . $meter['remark']. "')",__LINE__,__FILE__);

                        $receipt['message'][]=array('msg'=>lang('Meter %1 has 
been saved',$meter['meter_id']));
                        return $receipt;
                }

                function edit($meter)
                {
                        $meter['remark'] = 
$this->db->db_addslashes($meter['remark']);

                        if($meter['street_number'])
                        {
                                $address= $meter['street_name'] . ' ' . 
$meter['street_number'];
                        }
                        else
                        {
                                $address= $meter['street_name'];
                        }

                        $this->db->query("UPDATE fm_meter set name='" . 
$meter['name'] . "', entry_date='" . time() . "', type='"
                                                        . $meter['cat_id'] . 
"', location_code='" . $meter['location_code'] . "', address='" . $address . 
"', remark='" . $meter['remark']
                                                        . "' WHERE id='" . 
$meter['meter_id'] . "'",__LINE__,__FILE__);

                        $receipt['message'][]=array('msg'=>lang('Meter %1 has 
been edited',$meter['meter_id']));
                        return $receipt;
                }

                function delete($meter_id)
                {
                        $this->db->query("DELETE FROM fm_meter WHERE id='" . 
$meter_id ."'",__LINE__,__FILE__);
                }

        }
?>

--- NEW FILE ---
<?php
        
/***************************************************************************\
        * -------------------------------------------------                     
    *
        * This program is free software; you can redistribute it and/or modify 
it   *
        * under the terms of the GNU General Public License as published by the 
    *
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/
        class uimeter
        {
                var $grants;
                var $cat_id;
                var $start;
                var $query;
                var $sort;
                var $order;
                var $filter;
                var $part_of_town_id;
                var $sub;
                var $currentapp;

                var $public_functions = array
                (
                        'index'  => True,
                        'view'   => True,
                        'edit'   => True,
                        'delete' => True,
                );

                function uimeter()
                {
                        $this->currentapp                       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->nextmatchs                       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];

                        $this->grants                           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->grants[$this->account] = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
                        $this->bo                                       = 
CreateObject($this->currentapp.'.bometer');
                        $this->bocommon                         = 
CreateObject($this->currentapp.'.bocommon',True);

                        $this->start                            = 
$this->bo->start;
                        $this->query                            = 
$this->bo->query;
                        $this->sort                                     = 
$this->bo->sort;
                        $this->order                            = 
$this->bo->order;
                        $this->filter                           = 
$this->bo->filter;
                        $this->cat_id                           = 
$this->bo->cat_id;

                        
$GLOBALS['phpgw']->session->appsession('sub',$this->currentapp,'equipment');
                }

                function save_sessiondata()
                {
                        $data = array
                        (
                                'start'         => $this->start,
                                'query'         => $this->query,
                                'sort'          => $this->sort,
                                'order'         => $this->order,
                                'filter'        => $this->filter,
                                'cat_id'        => $this->cat_id
                        );
                        $this->bocommon->save_sessiondata($data);
                }

                function index()
                {

                        $GLOBALS['phpgw']->xslttpl->add_file(array('meter',
                                                                                
'menu',
                                                                                
'nextmatchs',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'filter_select',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'search_field'));

                        $links = $this->bocommon->menu();

                        $meter_list = $this->bo->read();

                        while (is_array($meter_list) && list(,$meter) = 
each($meter_list))
                        {

                                $content[] = array
                                (
                                        'meter_id'                              
        => $meter['meter_id'],
                                        'name'                                  
        => $meter['name'],
                                        'type'                                  
        => $meter['type'],
                                        'location_type'                         
=> lang($meter['location_type']),
                                        'type'                                  
        => $meter['type'],
                                        'address'                               
        => $meter['address'],
                                        'entry_date'                            
=> $meter['entry_date'],
                                        'owner'                                 
        => $meter['owner'],
                                        'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.view&meter_id='
 . $meter['meter_id']),
                                        'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit&meter_id='
 . $meter['meter_id']),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.delete&meter_id='
 . $meter['meter_id']),
                                        'lang_view_statustext'          => 
lang('view the meter'),
                                        'lang_edit_statustext'          => 
lang('edit the meter'),
                                        'lang_delete_statustext'        => 
lang('delete the meter'),
                                        'text_view'                             
        => lang('view'),
                                        'text_edit'                             
        => lang('edit'),
                                        'text_delete'                           
=> lang('delete')
                                );
                        }

                        $table_header[] = array
                        (

                                'sort_address'  => 
$this->nextmatchs->show_sort_order(array
                                                                                
(
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'address',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uimeter.index',
                                                                                
                                                        'query'         
=>$this->query,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
)),

                                'lang_address'          => lang('Address'),
                                'lang_name'                     => lang('Name'),
                                'lang_location_type'=> lang('Location type'),
                                'lang_meter_type'       => lang('Meter type'),
                                'lang_view'                     => lang('view'),
                                'lang_edit'                     => lang('edit'),
                                'lang_delete'           => lang('delete'),
                                'sort_meter_id' => 
$this->nextmatchs->show_sort_order(array
                                                                                
(
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'id',
                                                                                
        'order' =>      $this->order,
                                                                                
        'extra'         => array('menuaction'   => 
$this->currentapp.'.uimeter.index',
                                                                                
                                                        'query'         
=>$this->query,
                                                                                
                                                        'cat_id'        
=>$this->cat_id)
                                                                                
)),
                                'lang_meter_id' => lang('meter id'),
                                'lang_owner'            => lang('owner')
                        );

                        $table_add[] = array
                        (
                                'lang_add'                              => 
lang('add'),
                                'lang_add_statustext'   => lang('add a meter'),
                                'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit')
                        );

                        $link_data = array
                        (
                                'menuaction'    => 
$this->currentapp.'.uimeter.index',
                                                'start'                 => 
$this->start,
                                                'sort'                  
=>$this->sort,
                                                'order'                 
=>$this->order,
                                                'cat_id'                
=>$this->cat_id,
                                                'filter'                
=>$this->filter,
                                                'query'                 
=>$this->query
                        );


                        $data = array
                        (
                                'links'                                         
        => $links,
                                'allow_allrows'                                 
=> False,
                                'start_record'                                  
=> $this->start,
                                'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
                                'num_records'                                   
=> count($meter_list),
                                'all_records'                                   
=> $this->bo->total_records,
                                'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                'appname'                                       
        => lang($this->currentapp),
                                'function_msg'                                  
=> lang('list meter'),
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the meter belongs to. To do not use a category select 
NO CATEGORY'),
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->get_category_list('filter',$this->cat_id),
                                'select_action'                                 
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.index'),
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter,'yours' => 
'yes')),
                                'lang_filter_statustext'                => 
lang('Select the filter. To show all entries select SHOW ALL'),
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
                                'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
                                'query'                                         
        => $this->query,
                                'lang_submit'                                   
=> lang('submit'),
                                'table_header'                                  
=> $table_header,
                                'values'                                        
        => $content,
                                'table_add'                                     
        => $table_add
                        );

                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
                        $this->save_sessiondata();
                }

                function edit()
                {
                        $meter_id                                       = 
get_var('meter_id',array('POST','GET'));
                        $values                                         = 
get_var('values',array('POST'));

                        
$GLOBALS['phpgw']->xslttpl->add_file(array('meter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));

                        if($values)
                        {
                                $values = $values + 
$this->bocommon->get_location();
                        }

                        if ($values['save'])
                        {
                                if($meter_id)
                                {
                                        $values['meter_id']=$meter_id;
                                        $action='edit';
                                }
                                else
                                {
                                        
if($this->bo->check_meter_id($values['meter_id']))
                                        {
                                                
$receipt['error'][]=array('msg'=>lang('This meter id is already registered!') . 
'[ '.$values['meter_id'].' ]');
                                                $error_id=true;
                                        }
                                        else
                                        {
                                                $meter_id =     
$values['meter_id'];
                                        }
                                }

                                if(!$values['property_id'])
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
                                        return $receipt;
                                }

                                if(!$values['cat_id'])
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please select a category !'));
                                        $error_id=true;
                                }

                                if(!$receipt['error'])
                                {
                                        $receipt = 
$this->bo->save($values,$action);
                                }
                        }

                        if ($meter_id)
                        {
                                $values = $this->bo->read_single($meter_id);
//                      _debug_array($meter);
                                $function_msg = lang('edit meter');
                                $action='edit';
                        }
                        else
                        {
                                $function_msg = lang('add meter');
                                $action='add';
                        }

                        if ($values['type'])
                        {
                                $this->cat_id = $values['type'];
                        }

                        $link_data = array
                        (
                                'menuaction'    => 
$this->currentapp.'.uimeter.edit',
                                'meter_id'      => $meter_id
                        );

                        
$location_data=$this->bocommon->initiate_ui_location(array(
                                                'location_type' => 'form',
                                                'equipment'             => 
false,
                                                'apartment'             => true,
                                                'address'               => 
false,
                                                'equipment_id'  => 
$values['equipment_id'],
                                                'property_id'   => 
$values['property_id'],
                                                'property_name' => 
$values['property_name'],
                                                'building_id'   => 
$values['building_id'],
                                                'entrance_id'   => 
$values['entrance_id'],
                                                'floor'                 => 
$values['floor'],
                                                'street_name'   => 
$values['street_name'],
                                                'street_number' => 
$values['street_number'],
                                                'tenant_id'             => 
$values['tenant_id'],
                                                'tenant_name'   => 
$values['tenant_name'],
                                                'tenant_phone'  => 
$values['tenant_phone'],
                                                'apartment_id'  => 
$values['apartment_id']));


                        $data = array
                        (
                                'appname'                                       
        => lang('meter'),
                                'location_data'                                 
=> $location_data,
                                'function_msg'                                  
=> $function_msg,
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.index'),
                                'lang_meter_id'                                 
=> lang('meter ID'),
                                'lang_name'                                     
        => lang('name'),
                                'lang_remark'                                   
=> lang('Remark'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_access'                                   
=> lang('private'),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
                                'value_meter_id'                                
=> $meter_id,
                                'value_name'                                    
=> $values['name'],
                                'value_remark'                                  
=> $values['remark'],
                                'message'                                       
        => $receipt['message'],
                                'error'                                         
        => $receipt['error'],
                                'lang_meter_id_statustext'              => 
lang('Enter the meter ID'),
                                'lang_name_statustext'                  => 
lang('Enter the name of the meter'),
                                'lang_remark_statustext'                => 
lang('Enter a remark - if any'),
                                'lang_done_statustext'                  => 
lang('Back to the list'),
                                'lang_save_statustext'                  => 
lang('Save the meter'),
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the meter belongs to. To do not use a category select 
NO CATEGORY'),
                                'select_name'                                   
=> 'values[cat_id]',
                                'cat_list'                                      
        => $this->bo->get_category_list('select',$this->cat_id),

                                'location_code'                                 
=> $values['location_code'],
                                'value_generellinfo'                    => 
$values['generellinfo']
                        );

                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                }

                function delete()
                {
                        $meter_id       = 
get_var('meter_id',array('POST','GET'));
                        $confirm        = get_var('confirm',array('POST'));

                        $link_data = array
                        (
                                'menuaction' => 
$this->currentapp.'.uimeter.index'
                        );

                        if (get_var('confirm',array('POST')))
                        {
                                $this->bo->delete($meter_id);
                                Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                        }

                        
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_delete',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));

                        $data = array
                        (
                                'appname'                               => 
lang('meter'),
                                'function_msg'                  => lang('delete 
meter'),
                                'done_action'                   => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
                                'delete_action'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.delete&meter_id='
 . $meter_id),
                                'lang_confirm_msg'              => lang('do you 
really want to delete this entry'),
                                'lang_yes'                              => 
lang('yes'),
                                'lang_yes_statustext'   => lang('Delete the 
entry'),
                                'lang_no_statustext'    => lang('Back to the 
list'),
                                'lang_no'                               => 
lang('no')
                        );

                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }

                function view()
                {
                        $meter_id                                       = 
get_var('meter_id',array('POST','GET'));

                        
$GLOBALS['phpgw']->xslttpl->add_file(array('meter',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));


                        $values = $this->bo->read_single($meter_id);
                        $function_msg = lang('View meter');

                        if ($values['type'])
                        {
                                $this->cat_id = $values['type'];
                        }

                        $link_data = array
                        (
                                'menuaction'    => 
$this->currentapp.'.uimeter.edit',
                                'meter_id'      => $meter_id
                        );

                        
$location_data=$this->bocommon->initiate_ui_location(array(
                                                'location_type' => 'view',
                                                'equipment'             => 
false,
                                                'apartment'             => true,
                                                'address'               => 
false,
                                                'equipment_id'  => 
$values['equipment_id'],
                                                'property_id'   => 
$values['property_id'],
                                                'property_name' => 
$values['property_name'],
                                                'building_id'   => 
$values['building_id'],
                                                'entrance_id'   => 
$values['entrance_id'],
                                                'floor'                 => 
$values['floor'],
                                                'street_name'   => 
$values['street_name'],
                                                'street_number' => 
$values['street_number'],
                                                'tenant_id'             => 
$values['tenant_id'],
                                                'tenant_name'   => 
$values['tenant_name'],
                                                'tenant_phone'  => 
$values['tenant_phone'],
                                                'apartment_id'  => 
$values['apartment_id']
                                                )
                                        );

                        $data = array
                        (
                                'appname'                                       
        => lang('meter'),
                                'location_data'                                 
=> $location_data,
                                'function_msg'                                  
=> $function_msg,
                                'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.index'),
                                'edit_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uimeter.edit&meter_id='
 . $meter_id),
                                'lang_done_statustext'                  => 
lang('Back to the list'),
                                'lang_edit_statustext'                  => 
lang('Edit this meter'),
                                'lang_done'                                     
        => lang('done'),
                                'lang_edit'                                     
        => lang('edit'),
                                'lang_meter_id'                                 
=> lang('meter ID'),
                                'lang_name'                                     
        => lang('name'),
                                'lang_remark'                                   
=> lang('Remark'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_access'                                   
=> lang('private'),
                                'value_meter_id'                                
=> $meter_id,
                                'value_name'                                    
=> $values['name'],
                                'value_remark'                                  
=> $values['remark'],
                                'message'                                       
        => $receipt['message'],
                                'error'                                         
        => $receipt['error'],
                                'cat_list'                                      
        => $this->bo->get_category_list('',$this->cat_id),
                        );

                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
                }

        }
?>

Index: class.bocommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** class.bocommon.inc.php      7 Apr 2003 07:21:56 -0000       1.31
--- class.bocommon.inc.php      8 Apr 2003 12:38:09 -0000       1.32
***************
*** 191,194 ****
--- 191,212 ----
                }
  
+               function get_location()
+               {
+                       $location                                               
= array();
+                       $location['equipment_id']               = 
get_var('equipment_id',array('POST','GET'));
+                       $location['property_id']                = 
get_var('property_id',array('POST','GET'));
+                       $location['property_name']              = 
get_var('property_name',array('POST','GET'));
+                       $location['building_id']                = 
get_var('building_id',array('POST','GET'));
+                       $location['entrance_id']                = 
get_var('entrance_id',array('POST','GET'));
+                       $location['floor']                              = 
get_var('floor',array('POST','GET'));
+                       $location['apartment_id']               = 
get_var('apartment_id',array('POST','GET'));
+                       $location['street_name']                = 
get_var('street_name',array('POST','GET'));
+                       $location['street_number']              = 
get_var('street_number',array('POST','GET'));
+                       $location['tenant_id']                  = 
get_var('tenant_id',array('POST','GET'));
+                       $location['tenant_name']                = 
get_var('tenant_name',array('POST','GET'));
+                       $location['tenant_phone']               = 
get_var('tenant_phone',array('POST','GET'));
+ 
+                       return $location;
+               }
  
                function initiate_ui_location($data)
***************
*** 488,491 ****
--- 506,511 ----
                                
$menu['sublink_equipment']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiequipment.index');
                                $menu['sublang_equipment']=lang('Equipment');
+                               
$menu['sublink_meter']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uimeter.index');
+                               $menu['sublang_meter']=lang('Meter');
                                if ($this->acl2->check('.equipment',16))
                                {
***************
*** 544,552 ****
                                
$menu['sub_invoice_list']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvoice.index');
                                
$menu['sub_invoice_paid']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvoice.index&paid=true');
- //                            
$menu['sub_invoice_powermeter']=$GLOBALS['phpgw']->link('/property/list_power_meter.php');
                                
$menu['sub_invoice_consume']=$GLOBALS['phpgw']->link('/index.php','menuaction='.$currentapp.'.uiinvoice.consume');
                                $menu['sublang_invoice_list']=lang('Invoice');
                                $menu['sublang_invoice_paid']=lang('Paid');
- //                            $menu['sublang_invoice_powermeter']=lang('Power 
meter');
                                
$menu['sublang_invoice_consume']=lang('consume');
                                if ($this->acl2->check('.invoice',16))
--- 564,570 ----

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.socommon.inc.php      4 Apr 2003 19:07:33 -0000       1.15
--- class.socommon.inc.php      8 Apr 2003 12:38:09 -0000       1.16
***************
*** 30,38 ****
                }
  
!               function read_single_tenant($tenant_id)
                {
  
  
!                       $this->db->query("SELECT * FROM fm_tenant WHERE 
tenant_id ='$tenant_id'");
  
                        $this->db->next_record();
--- 30,88 ----
                }
  
!               function read_location_data($location_code)
                {
  
+                       $location_key   = split("-", $location_code);
+                       $sql    =       array(
+                               0 => "select name from fm_property where  
property_id='" .$location_key[0] . "'",
+                               1 => "select name from fm_building where 
property_id='" .$location_key[0] . "' and building_id='" .$location_key[1] . 
"'",
+                               2 => "select descr from fm_entrance where 
property_id='" .$location_key[0] . "' and building_id='" .$location_key[1] . "' 
and entrance_id='" .$location_key[2] . "'",
+                               3 => "select 
floor,fm_apartment.street_id,street_number,street_name from fm_apartment 
$this->join fm_streetaddress on fm_apartment.street_id = 
fm_streetaddress.street_id where property_id='" .$location_key[0] . "' and 
building_id='" .$location_key[1] . "' and entrance_id='" .$location_key[2] . "' 
and apartment_id='" .$location_key[3] . "'"
+                       );
+ 
+                       $this->db->query($sql[0],__LINE__,__FILE__);
+ 
+                       $this->db->next_record();
+                       $location['property_id']        = $location_key[0];
+                       $location['property_name']      = $this->db->f('name');
+ 
+                       if($location_key[1])
+                       {
+                               $this->db->query($sql[1],__LINE__,__FILE__);
+ 
+                               $this->db->next_record();
+                               $location['building_id']        = 
$location_key[1];
+                               $location['building_name']      = 
$this->db->f('name');
+                       }
+ 
+                       if($location_key[2])
+                       {
+                               $this->db->query($sql[2],__LINE__,__FILE__);
+ 
+                               $this->db->next_record();
+                               $location['entrance_id']        = 
$location_key[2];
+                               $location['street_name']        = 
$this->db->f('descr');
+                       }
+ 
+                       if($location_key[3])
+                       {
+                               $this->db->query($sql[3],__LINE__,__FILE__);
+ 
+                               $this->db->next_record();
+                               $location['apartment_id']       = 
$location_key[3];
+                               $location['floor']                      = 
$this->db->f('floor');
+                               $location['street_id']          = 
$this->db->f('street_id');
+                               $location['street_name']        = 
$this->db->f('street_name');
+                               $location['street_number']      = 
$this->db->f('street_number');
+                       }
+ 
+                       unset($sql);
+                       return $location;
+               }
+ 
+               function read_single_tenant($tenant_id)
+               {
  
!                       $this->db->query("SELECT * FROM fm_tenant WHERE 
tenant_id ='$tenant_id'",__LINE__,__FILE__);
  
                        $this->db->next_record();

Index: class.solookup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solookup.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.solookup.inc.php      4 Apr 2003 19:07:33 -0000       1.14
--- class.solookup.inc.php      8 Apr 2003 12:38:09 -0000       1.15
***************
*** 472,476 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( name LIKE '%$query%' OR 
location_code LIKE '%$query%' )";
                        }
  
--- 472,476 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND ( fm_property.name LIKE 
'%$query%' OR location_code LIKE '%$query%' )";
                        }
  

Index: class.soproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproperty.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.soproperty.inc.php    4 Apr 2003 19:07:33 -0000       1.13
--- class.soproperty.inc.php    8 Apr 2003 12:38:09 -0000       1.14
***************
*** 186,190 ****
  
                        $this->db->query("UPDATE fm_property set name='" . 
$property['name'] . "', entry_date='" . time() . "', cat_id='"
!                                                       . $property['cat_id'] . 
"', general_address='" . $property['general_address'] . "', access='" . 
$property['access'] . "', bydel_id='" . $property['part_of_town_id']. "', 
generellinfo='" . $property['generellinfo']
                                                        . "' WHERE 
property_id='" . $property['property_id'] . "'",__LINE__,__FILE__);
  
--- 186,190 ----
  
                        $this->db->query("UPDATE fm_property set name='" . 
$property['name'] . "', entry_date='" . time() . "', cat_id='"
!                                                       . $property['cat_id'] . 
"', general_address='" . $property['general_address'] . "', access='" . 
$property['access'] . "', part_of_town_id='" . $property['part_of_town_id']. 
"', generellinfo='" . $property['generellinfo']
                                                        . "' WHERE 
property_id='" . $property['property_id'] . "'",__LINE__,__FILE__);
  

Index: class.sostandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.sostandard_2.inc.php  12 Mar 2003 21:37:32 -0000      1.8
--- class.sostandard_2.inc.php  8 Apr 2003 12:38:09 -0000       1.9
***************
*** 146,149 ****
--- 146,152 ----
                                        $table='fm_standard_unit';
                                        break;
+                               case 'meter':
+                                       $table='fm_meter_category';
+                                       break;
  
                        }

Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.soXport.inc.php       4 Apr 2003 19:07:33 -0000       1.16
--- class.soXport.inc.php       8 Apr 2003 12:38:09 -0000       1.17
***************
*** 68,83 ****
                function anleggsnr_to_objekt($anleggsnr)
                {
!                       $this->db->query("select 
fm_meter.point_name,fm_meter.property_id,fm_meter.building_id,fm_meter.entrance_id,fm_part_of_town.district_id
 "
                        . " from fm_meter $this->join fm_property ON 
fm_meter.property_id = fm_property.property_id $this->join "
              . " fm_part_of_town ON fm_property.part_of_town_id = 
fm_part_of_town.id where fm_meter.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;
--- 68,86 ----
                function anleggsnr_to_objekt($anleggsnr)
                {
!                       $this->db->query("select 
fm_meter.name,fm_meter.location_code,fm_part_of_town.district_id "
                        . " from fm_meter $this->join fm_property ON 
fm_meter.property_id = fm_property.property_id $this->join "
              . " fm_part_of_town ON fm_property.part_of_town_id = 
fm_part_of_town.id where fm_meter.id='$anleggsnr'");
  
                        $this->db->next_record();
! 
!                       $location       = split("-", 
$this->db->f('location_code'));
! 
!                       $property_id = $location[0];
!                       $building_id = $location[1];
!                       $entrance_id = $location[2];
                        $dima=$property_id.$building_id.$entrance_id;
  
                        $maalerinfo['dima']=$dima;
!                       $maalerinfo['maalernr']=$this->db->f('name');
                        $maalerinfo['district']=$this->db->f('district_id');
                        return $maalerinfo;

Index: class.uiapartment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiapartment.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.uiapartment.inc.php   27 Feb 2003 09:53:37 -0000      1.2
--- class.uiapartment.inc.php   8 Apr 2003 12:38:09 -0000       1.3
***************
*** 194,201 ****
  
                        $values                                 = 
get_var('values',array('POST','GET'));
!                       $values['property_id']  = 
get_var('property_id',array('POST'));
!                       $values['property_name']        = 
get_var('property_name',array('POST'));
!                       $values['building_id']  = 
get_var('building_id',array('POST'));
!                       $values['entrance_id']  = 
get_var('entrance_id',array('POST'));
                        $values['street_idd']   = 
get_var('street_idd',array('POST'));
  
--- 194,202 ----
  
                        $values                                 = 
get_var('values',array('POST','GET'));
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
! 
                        $values['street_idd']   = 
get_var('street_idd',array('POST'));
  

Index: class.uibuilding.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uibuilding.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uibuilding.inc.php    23 Feb 2003 21:45:34 -0000      1.10
--- class.uibuilding.inc.php    8 Apr 2003 12:38:09 -0000       1.11
***************
*** 188,193 ****
                        $building_id                    = 
get_var('building_id',array('POST','GET'));
                        $values                                 = 
get_var('values',array('POST','GET'));
!                       $values['property_id']  = 
get_var('property_id',array('POST'));
!                       $values['property_name']        = 
get_var('property_name',array('POST'));
                        $values_attribute               = 
get_var('values_attribute',array('POST','GET'));
  
--- 188,198 ----
                        $building_id                    = 
get_var('building_id',array('POST','GET'));
                        $values                                 = 
get_var('values',array('POST','GET'));
! 
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
! 
! 
                        $values_attribute               = 
get_var('values_attribute',array('POST','GET'));
  

Index: class.uientrance.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uientrance.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uientrance.inc.php    27 Feb 2003 09:53:37 -0000      1.3
--- class.uientrance.inc.php    8 Apr 2003 12:38:09 -0000       1.4
***************
*** 186,192 ****
  
                        $values                                 = 
get_var('values',array('POST','GET'));
!                       $values['property_id']  = 
get_var('property_id',array('POST'));
!                       $values['property_name']        = 
get_var('property_name',array('POST'));
!                       $values['building_id']  = 
get_var('building_id',array('POST'));
  
                        $values_attribute               = 
get_var('values_attribute',array('POST','GET'));
--- 186,195 ----
  
                        $values                                 = 
get_var('values',array('POST','GET'));
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
! 
! //_debug_array($values);
  
                        $values_attribute               = 
get_var('values_attribute',array('POST','GET'));

Index: class.uiequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiequipment.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uiequipment.inc.php   4 Apr 2003 19:07:33 -0000       1.10
--- class.uiequipment.inc.php   8 Apr 2003 12:38:09 -0000       1.11
***************
*** 230,242 ****
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
                        $values['equipment_id']         = 
get_var('equipment_idd',array('POST'));
!                       $values['property_id']          = 
get_var('property_id',array('POST'));
!                       $values['property_name']        = 
get_var('property_name',array('POST'));
!                       $values['building_id']          = 
get_var('building_id',array('POST'));
!                       $values['entrance_id']          = 
get_var('entrance_id',array('POST'));
!                       $values['floor']                        = 
get_var('floor',array('POST'));
!                       $values['apartment_id']         = 
get_var('apartment_id',array('POST'));
!                       $values['street_name']          = 
get_var('street_name',array('POST'));
!                       $values['street_number']        = 
get_var('street_number',array('POST'));
                        $values['vendor_id']            = 
get_var('vendor_id',array('POST'));
                        $values['vendor_name']          = 
get_var('vendor_name',array('POST'));
--- 230,240 ----
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('equipment',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
+                       if($values)
+                       {
+                               $values = $values + 
$this->bocommon->get_location();
+                       }
+ 
                        $values['equipment_id']         = 
get_var('equipment_idd',array('POST'));
! 
                        $values['vendor_id']            = 
get_var('vendor_id',array('POST'));
                        $values['vendor_name']          = 
get_var('vendor_name',array('POST'));

Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uiinvestment.inc.php  28 Feb 2003 19:39:00 -0000      1.10
--- class.uiinvestment.inc.php  8 Apr 2003 12:38:09 -0000       1.11
***************
*** 434,442 ****
                        $values                                 = 
get_var('values',array('POST'));
                        $values['date']                 = 
get_var('date',array('POST'));
!                       $values['property_id']  = 
get_var('property_id',array('POST'));
!                       $values['building_id']  = 
get_var('building_id',array('POST'));
!                       $values['entrance_id']  = 
get_var('entrance_id',array('POST'));
!                       $values['apartment_id'] = 
get_var('apartment_id',array('POST'));
!                       $values['equipment_id'] = 
get_var('equipment_id',array('POST'));
  
                        
$location_data=$this->bocommon->initiate_ui_location(array('equipment'          
=> True,
--- 434,442 ----
                        $values                                 = 
get_var('values',array('POST'));
                        $values['date']                 = 
get_var('date',array('POST'));
! 
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
  
                        
$location_data=$this->bocommon->initiate_ui_location(array('equipment'          
=> True,

Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uiproject.inc.php     4 Apr 2003 19:07:33 -0000       1.6
--- class.uiproject.inc.php     8 Apr 2003 12:38:09 -0000       1.7
***************
*** 245,260 ****
                        $bypass                         = 
get_var('bypass',array('POST','GET'));
  
!                       $values['equipment_id']         = 
get_var('equipment_id',array('POST','GET'));
!                       $values['property_id']          = 
get_var('property_id',array('POST','GET'));
!                       $values['property_name']        = 
get_var('property_name',array('POST','GET'));
!                       $values['building_id']          = 
get_var('building_id',array('POST','GET'));
!                       $values['entrance_id']          = 
get_var('entrance_id',array('POST','GET'));
!                       $values['floor']                        = 
get_var('floor',array('POST','GET'));
!                       $values['apartment_id']         = 
get_var('apartment_id',array('POST','GET'));
!                       $values['street_name']          = 
get_var('street_name',array('POST','GET'));
!                       $values['street_number']        = 
get_var('street_number',array('POST','GET'));
!                       $values['tenant_id']            = 
get_var('tenant_id',array('POST','GET'));
!                       $values['tenant_name']          = 
get_var('tenant_name',array('POST','GET'));
!                       $values['tenant_phone']         = 
get_var('tenant_phone',array('POST','GET'));
                        $values['start_date']           = 
get_var('start_date',array('POST'));
                        $values['end_date']                     = 
get_var('end_date',array('POST'));
--- 245,253 ----
                        $bypass                         = 
get_var('bypass',array('POST','GET'));
  
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
! 
                        $values['start_date']           = 
get_var('start_date',array('POST'));
                        $values['end_date']                     = 
get_var('end_date',array('POST'));

Index: class.uiproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproperty.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uiproperty.inc.php    4 Apr 2003 19:07:33 -0000       1.14
--- class.uiproperty.inc.php    8 Apr 2003 12:38:09 -0000       1.15
***************
*** 223,227 ****
                        {
                                $property = 
$this->bo->read_single($property_id);
!                       _debug_array($property);
                                $function_msg = lang('edit property');
                                $action='edit';
--- 223,227 ----
                        {
                                $property = 
$this->bo->read_single($property_id);
! //                    _debug_array($property);
                                $function_msg = lang('edit property');
                                $action='edit';

Index: class.uitts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.uitts.inc.php 7 Apr 2003 09:01:58 -0000       1.13
--- class.uitts.inc.php 8 Apr 2003 12:38:09 -0000       1.14
***************
*** 250,265 ****
                        $sub            = get_var('sub',array('POST','GET'));
  
!                       $values['property_id']  = 
get_var('property_id',array('POST'));
!                       $values['property_name']        = 
get_var('property_name',array('POST'));
!                       $values['building_id']  = 
get_var('building_id',array('POST'));
!                       $values['entrance_id']  = 
get_var('entrance_id',array('POST'));
!                       $values['floor']        = 
get_var('floor',array('POST'));
!                       $values['apartment_id'] = 
get_var('apartment_id',array('POST'));
!                       $values['equipment_id'] = 
get_var('equipment_id',array('POST'));
!                       $values['street_name']  = 
get_var('street_name',array('POST'));
!                       $values['street_number']        = 
get_var('street_number',array('POST'));
!                       $values['tenant_id']    = 
get_var('tenant_id',array('POST'));
!                       $values['tenant_name']  = 
get_var('tenant_name',array('POST'));
!                       $values['tenant_phone'] = 
get_var('tenant_phone',array('POST'));
  
                        
$location_data=$this->bocommon->initiate_ui_location(array(
--- 250,257 ----
                        $sub            = get_var('sub',array('POST','GET'));
  
!                       if($values)
!                       {
!                               $values = $values + 
$this->bocommon->get_location();
!                       }
  
                        
$location_data=$this->bocommon->initiate_ui_location(array(

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** hook_admin.inc.php  12 Mar 2003 21:37:32 -0000      1.22
--- hook_admin.inc.php  8 Apr 2003 12:38:09 -0000       1.23
***************
*** 27,30 ****
--- 27,31 ----
                                'Entrance Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=entrance'),
                                'Apartment Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=apartment'),
+                               'Meter Categories'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=meter'),
        //                      'Property type attributes class'=> 
$GLOBALS['phpgw']->link('/property/list_property_type_attribute_class.php'),
                                'Building Part'=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uistandard_2.index&type=building_part'),





reply via email to

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