phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.sogab.inc.php, 1.11 class.uigab.in


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.sogab.inc.php, 1.11 class.uigab.inc.php, 1.11 class.bogab.inc.php, 1.6
Date: Thu, 18 Aug 2005 15:23:00 +0200

Update of property/inc

Modified Files:
     Branch: MAIN
            class.sogab.inc.php lines: +8 -2
            class.uigab.inc.php lines: +98 -72
            class.bogab.inc.php lines: +4 -3

Log Message:
no message

====================================================
Index: property/inc/class.sogab.inc.php
diff -u property/inc/class.sogab.inc.php:1.10 
property/inc/class.sogab.inc.php:1.11
--- property/inc/class.sogab.inc.php:1.10       Thu May 12 21:26:28 2005
+++ property/inc/class.sogab.inc.php    Thu Aug 18 13:23:16 2005
@@ -55,7 +55,8 @@
                                $bruksnr = 
(isset($data['bruksnr'])?$data['bruksnr']:'');
                                $feste_nr = 
(isset($data['feste_nr'])?$data['feste_nr']:'');
                                $seksjons_nr = 
(isset($data['seksjons_nr'])?$data['seksjons_nr']:'');
-                               $allrows                = 
(isset($data['allrows'])?$data['allrows']:'');
+                               $allrows        = 
(isset($data['allrows'])?$data['allrows']:'');
+                               $address        = 
(isset($data['address'])?$data['address']:'');
                        }

                        if ($order)
@@ -81,6 +82,11 @@
                                $where = 'AND';
                        }

+                       if ($address)
+                       {
+                               $filtermethod .= " $where 
fm_gab_location.address $this->like '%$address%' ";
+                               $where = 'AND';
+                       }
                        if ($loc1)
                        {
                                $filtermethod .= " $where 
fm_gab_location.loc1='$loc1' ";

====================================================
Index: property/inc/class.uigab.inc.php
diff -u property/inc/class.uigab.inc.php:1.10 
property/inc/class.uigab.inc.php:1.11
--- property/inc/class.uigab.inc.php:1.10       Thu May 12 21:26:28 2005
+++ property/inc/class.uigab.inc.php    Thu Aug 18 13:23:16 2005
@@ -96,6 +96,7 @@
                                                                                
'menu',
                                                                                
'nextmatchs'));

+                       $address                = 
get_var('address',array('POST','GET'));
                        $location_code          = 
get_var('location_code',array('POST','GET'));
                        $gaards_nr              = 
get_var('gaards_nr',array('POST','GET'));
                        $bruksnr                = 
get_var('bruksnr',array('POST','GET'));
@@ -105,6 +106,7 @@

                        if($reset_query)
                        {
+                               unset($address);
                                unset($location_code);
                                unset($gaards_nr);
                                unset($bruksnr);
@@ -114,7 +116,7 @@

                        $links = $this->menu->links('gab');

-                       $gab_list = 
$this->bo->read($location_code,$gaards_nr,$bruksnr,$feste_nr,$seksjons_nr);
+                       $gab_list = 
$this->bo->read($location_code,$gaards_nr,$bruksnr,$feste_nr,$seksjons_nr,$address);

                        if($this->acl_read)
                        {
@@ -131,32 +133,40 @@
                                $text_map=lang('Map');
                                $lang_map_statustext    = lang('View map');
                        }
-
+                       $link_to_gab = $config->config_data['gab_url'];
+                       if($link_to_gab)
+                       {
+                               $text_gab=lang('GAB');
+                               $lang_gab_statustext    = lang('View gab-info');
+                       }

                        while (is_array($gab_list) && list(,$gab) = 
each($gab_list))
                        {

-                               $value_gaards_nr                = 
substr($gab['gab_id'],4,5);
+                               $value_gaards_nr        = 
substr($gab['gab_id'],4,5);
                                $value_bruks_nr         = 
substr($gab['gab_id'],9,4);
                                $value_feste_nr         = 
substr($gab['gab_id'],13,4);
                                $value_seksjons_nr      = 
substr($gab['gab_id'],17,3);

                                $content[] = array
                                (
-                                       'owner'                                 
        => lang($gab['owner']),
-                                       'hits'                                  
        => $gab['hits'],
-                                       'address'                               
        => $gab['address'],
-                                       'gaards_nr'                             
        => $value_gaards_nr,
-                                       'bruks_nr'                              
        => $value_bruks_nr,
-                                       'feste_nr'                              
        => $value_feste_nr,
-                                       'seksjons_nr'                           
=> $value_seksjons_nr,
-                                       'location_code'                         
=> $gab['location_code'],
-                                       'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uigab.list_detail&gab_id='
 . $gab['gab_id']),
+                                       'owner'                         => 
lang($gab['owner']),
+                                       'hits'                          => 
$gab['hits'],
+                                       'address'                       => 
$gab['address'],
+                                       'gaards_nr'                     => 
$value_gaards_nr,
+                                       'bruks_nr'                      => 
$value_bruks_nr,
+                                       'feste_nr'                      => 
$value_feste_nr,
+                                       'seksjons_nr'                   => 
$value_seksjons_nr,
+                                       'location_code'                 => 
$gab['location_code'],
+                                       'link_view'                     => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uigab.list_detail&gab_id='
 . $gab['gab_id']),
                                        'lang_view_statustext'          => 
$lang_view_statustext,
-                                       'text_view'                             
        => $text_view,
-                                       'link_map'                              
        => $link_to_map . '?maptype=Eiendomskart&gnr=' . (int)$value_gaards_nr 
. '&bnr=' . (int)$value_bruks_nr . '&fnr=' . (int)$value_feste_nr,
+                                       'text_view'                     => 
$text_view,
+                                       'link_map'                      => 
$link_to_map . '?maptype=Eiendomskart&gnr=' . (int)$value_gaards_nr . '&bnr=' . 
(int)$value_bruks_nr . '&fnr=' . (int)$value_feste_nr,
                                        'lang_map_statustext'           => 
$lang_map_statustext,
-                                       'text_map'                              
        => $text_map
+                                       'text_map'                      => 
$text_map,
+                                       'link_gab'                      => 
$link_to_gab . '?type=eiendom&Gnr=' . (int)$value_gaards_nr . '&Bnr=' . 
(int)$value_bruks_nr . '&Fnr=' . (int)$value_feste_nr . '&Snr=' . 
(int)$value_seksjons_nr,
+                                       'lang_gab_statustext'           => 
$lang_gab_statustext,
+                                       'text_gab'                      => 
$text_gab
                                );
                        }

@@ -168,12 +178,18 @@
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'gab_id',
                                                                                
        'order' =>      $this->order,
-                                                                               
        'extra' => array('menuaction'           => 
$this->currentapp.'.uigab.index',
-                                                                               
                                                        'cat_id'                
=>$this->cat_id,
-                                                                               
                                                        'district_id'   => 
$this->district_id,
-                                                                               
                                                        'filter'                
=>$this->filter,
-                                                                               
                                                        'allrows'               
=> $this->allrows,
-                                                                               
                                                        'query'                 
=>$this->query)
+                                                                               
        'extra' => array('menuaction'=> $this->currentapp.'.uigab.index',
+                                                                               
                                'cat_id'        =>$this->cat_id,
+                                                                               
                                'district_id'   => $this->district_id,
+                                                                               
                                'filter'        =>$this->filter,
+                                                                               
                                'allrows'       => $this->allrows,
+                                                                               
                                'query'         =>$this->query,
+                                                                               
                                'location_code' =>$location_code,
+                                                                               
                                'gaards_nr'     =>$gaards_nr,
+                                                                               
                                'bruksnr'       =>$bruksnr,
+                                                                               
                                'feste_nr'      =>$feste_nr,
+                                                                               
                                'seksjons_nr'   =>$seksjons_nr,
+                                                                               
                                'address'       =>$address)
                                                                                
)),
                                'lang_gab'      => lang('gab'),
                                'sort_hits'     => 
$this->nextmatchs->show_sort_order(array
@@ -181,24 +197,36 @@
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'hits',
                                                                                
        'order' =>      $this->order,
-                                                                               
        'extra' => array('menuaction'           => 
$this->currentapp.'.uigab.index',
-                                                                               
                                                        'cat_id'                
=>$this->cat_id,
-                                                                               
                                                        'district_id'   => 
$this->district_id,
-                                                                               
                                                        'filter'                
=>$this->filter,
-                                                                               
                                                        'allrows'               
=> $this->allrows,
-                                                                               
                                                        'query'                 
=>$this->query)
+                                                                               
        'extra' => array('menuaction'=> $this->currentapp.'.uigab.index',
+                                                                               
                                'cat_id'        =>$this->cat_id,
+                                                                               
                                'district_id'   => $this->district_id,
+                                                                               
                                'filter'        =>$this->filter,
+                                                                               
                                'allrows'       => $this->allrows,
+                                                                               
                                'query'         =>$this->query,
+                                                                               
                                'location_code' =>$location_code,
+                                                                               
                                'gaards_nr'     =>$gaards_nr,
+                                                                               
                                'bruksnr'       =>$bruksnr,
+                                                                               
                                'feste_nr'      =>$feste_nr,
+                                                                               
                                'seksjons_nr'   =>$seksjons_nr,
+                                                                               
                                'address'       =>$address)
                                                                                
)),
                                'sort_location_code'    => 
$this->nextmatchs->show_sort_order(array
                                                                                
(
                                                                                
        'sort'  => $this->sort,
                                                                                
        'var'   =>      'location_code',
                                                                                
        'order' =>      $this->order,
-                                                                               
        'extra' => array('menuaction'           => 
$this->currentapp.'.uigab.index',
-                                                                               
                                                        'cat_id'                
=>$this->cat_id,
-                                                                               
                                                        'district_id'   => 
$this->district_id,
-                                                                               
                                                        'filter'                
=>$this->filter,
-                                                                               
                                                        'allrows'               
=> $this->allrows,
-                                                                               
                                                        'query'                 
=>$this->query)
+                                                                               
        'extra' => array('menuaction'=> $this->currentapp.'.uigab.index',
+                                                                               
                                'cat_id'        =>$this->cat_id,
+                                                                               
                                'district_id'   => $this->district_id,
+                                                                               
                                'filter'        =>$this->filter,
+                                                                               
                                'allrows'       => $this->allrows,
+                                                                               
                                'query'         =>$this->query,
+                                                                               
                                'location_code' =>$location_code,
+                                                                               
                                'gaards_nr'     =>$gaards_nr,
+                                                                               
                                'bruksnr'       =>$bruksnr,
+                                                                               
                                'feste_nr'      =>$feste_nr,
+                                                                               
                                'seksjons_nr'   =>$seksjons_nr,
+                                                                               
                                'address'       =>$address)
                                                                                
)),
                                'lang_owner'            => lang('owner'),
                                'lang_hits'                     => 
lang('number'),
@@ -234,15 +262,16 @@
                        $link_data = array
                        (
                                'menuaction'    => 
$this->currentapp.'.uigab.index',
-                                               'sort'                  
=>$this->sort,
-                                               'order'                 
=>$this->order,
-                                               'cat_id'                
=>$this->cat_id,
-                                               'filter'                
=>$this->filter,
-                                               'location_code' 
=>$location_code,
-                                               'gaards_nr'             
=>$gaards_nr,
-                                               'bruksnr'               
=>$bruksnr,
-                                               'feste_nr'              
=>$feste_nr,
-                                               'seksjons_nr'   =>$seksjons_nr
+                                       'sort'          =>$this->sort,
+                                       'order'         =>$this->order,
+                                       'cat_id'        =>$this->cat_id,
+                                       'filter'        =>$this->filter,
+                                       'location_code' =>$location_code,
+                                       'gaards_nr'     =>$gaards_nr,
+                                       'bruksnr'       =>$bruksnr,
+                                       'feste_nr'      =>$feste_nr,
+                                       'seksjons_nr'   =>$seksjons_nr,
+                                       'address'       =>$address
                        );

                        if(!$this->allrows)
@@ -254,39 +283,36 @@
                                $record_limit   = $this->bo->total_records;
                        }

-
                        $data = array
                        (
                                'search_field_header'                   => 
$search_field_header,
-                               'links'                                         
        => $links,
-
-                               'allrows'                                       
        => $this->allrows,
-                               'allow_allrows'                                 
=> true,
-                               'start_record'                                  
=> $this->start,
-                               'record_limit'                                  
=> $record_limit,
-
-                               'num_records'                                   
=> count($gab_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','default'),
-                               'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
-
-                               'location_code'                                 
=> $location_code,
-                               'gaards_nr'                                     
        => $gaards_nr,
-                               'bruksnr'                                       
        => $bruksnr,
-                               'feste_nr'                                      
        => $feste_nr,
-                               'seksjons_nr'                                   
=> $seksjons_nr,
+                               'links'                                 => 
$links,
+                               'allrows'                               => 
$this->allrows,
+                               'allow_allrows'                         => true,
+                               'start_record'                          => 
$this->start,
+                               'record_limit'                          => 
$record_limit,
+                               'num_records'                           => 
count($gab_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','default'),
+                               'select_action'                         => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'address'                               => 
$address,
+                               'location_code'                         => 
$location_code,
+                               'gaards_nr'                             => 
$gaards_nr,
+                               'bruksnr'                               => 
$bruksnr,
+                               'feste_nr'                              => 
$feste_nr,
+                               'seksjons_nr'                           => 
$seksjons_nr,
                                'lang_search_location_statustext'       => 
lang('search by location_code. To show all entries, empty all fields and press 
the SUBMIT button again'),
-                               'lang_search_gaard_statustext'  => lang('search 
by gaards nr. To show all entries, empty all fields and press the SUBMIT button 
again'),
-                               'lang_search_bruk_statustext'   => lang('search 
by bruk. To show all entries, empty all fields and press the SUBMIT button 
again'),
-                               'lang_search_feste_statustext'  => lang('search 
by feste. To show all entries, empty all fields and press the SUBMIT button 
again'),
-                               'lang_search_seksjon_statustext'=> lang('search 
by seksjon. To show all entries, empty all fields and press the SUBMIT button 
again'),
-                               'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
-                               'lang_reset_query_statustext'   => lang('check 
to reset the query'),
-                               'lang_search'                                   
=> lang('search'),
-                               'table_header_gab'                              
=> $table_header,
-                               'values_gab'                                    
=> $content,
-                               'table_add'                                     
        => $table_add
+                               'lang_search_gaard_statustext'          => 
lang('search by gaards nr. To show all entries, empty all fields and press the 
SUBMIT button again'),
+                               'lang_search_bruk_statustext'           => 
lang('search by bruk. To show all entries, empty all fields and press the 
SUBMIT button again'),
+                               'lang_search_feste_statustext'          => 
lang('search by feste. To show all entries, empty all fields and press the 
SUBMIT button again'),
+                               'lang_search_seksjon_statustext'        => 
lang('search by seksjon. To show all entries, empty all fields and press the 
SUBMIT button again'),
+                               'lang_searchbutton_statustext'          => 
lang('Submit the search string'),
+                               'lang_reset_query_statustext'           => 
lang('check to reset the query'),
+                               'lang_search'                           => 
lang('search'),
+                               'table_header_gab'                      => 
$table_header,
+                               'values_gab'                            => 
$content,
+                               'table_add'                             => 
$table_add
                        );

                        $appname                = lang('gab');

====================================================
Index: property/inc/class.bogab.inc.php
diff -u property/inc/class.bogab.inc.php:1.5 
property/inc/class.bogab.inc.php:1.6
--- property/inc/class.bogab.inc.php:1.5        Thu May 12 21:26:28 2005
+++ property/inc/class.bogab.inc.php    Thu Aug 18 13:23:16 2005
@@ -126,11 +126,12 @@
                }


-               function 
read($loc1='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='')
+               function 
read($loc1='',$gaards_nr='',$bruksnr='',$feste_nr='',$seksjons_nr='',$address='')
                {
                        $gab = $this->so->read(array('start' => 
$this->start,'sort' => $this->sort,'order' => 
$this->order,'allrows'=>$this->allrows,
                                                                                
        'cat_id' => $this->cat_id,'loc1' => $loc1,
-                                                                               
        'gaards_nr' => $gaards_nr,'bruksnr' => $bruksnr,'feste_nr' => 
$feste_nr,'seksjons_nr' => $seksjons_nr,));
+                                                                               
        'gaards_nr' => $gaards_nr,'bruksnr' => $bruksnr,'feste_nr' => $feste_nr,
+                                                                               
        'seksjons_nr' => $seksjons_nr,'address' => $address));
                        $this->total_records = $this->so->total_records;
                        return $gab;
                }






reply via email to

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