phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.boinvestment.inc.php,1.7,1.8


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.boinvestment.inc.php,1.7,1.8 class.boinvoice.inc.php,1.14,1.15class.soinvestment.inc.php,1.10,1.11 class.uiinvestment.inc.php,1.16,1.17
Date: Thu, 15 May 2003 14:46:39 -0400

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

Modified Files:
        class.boinvestment.inc.php class.boinvoice.inc.php 
        class.soinvestment.inc.php class.uiinvestment.inc.php 
Log Message:
no message

Index: class.boinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvestment.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.boinvestment.inc.php  23 Apr 2003 07:21:34 -0000      1.7
--- class.boinvestment.inc.php  15 May 2003 18:46:36 -0000      1.8
***************
*** 52,55 ****
--- 52,61 ----
                        $this->socommon = 
CreateObject($this->currentapp.'.socommon');
  
+                       if ($session)
+                       {
+                               $this->read_sessiondata();
+                               $this->use_session = True;
+                       }
+ 
                        $start                          = 
get_var('start',array('POST','GET'));
                        $query                          = 
get_var('query',array('POST','GET'));
***************
*** 86,94 ****
                                $this->order = $order;
                        }
!                       if(isset($cat_id))
                        {
                                $this->cat_id = $cat_id;
                        }
!                       if(isset($part_of_town_id))
                        {
                                $this->part_of_town_id = $part_of_town_id;
--- 92,100 ----
                                $this->order = $order;
                        }
!                       if(!empty($cat_id))
                        {
                                $this->cat_id = $cat_id;
                        }
!                       if(!empty($part_of_town_id))
                        {
                                $this->part_of_town_id = $part_of_town_id;
***************
*** 101,115 ****
                }
  
  
                function read()
                {
                        $investment = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'part_of_town_id' 
=> $this->part_of_town_id));
                        $this->total_records = $this->so->total_records;
  
!                       for ($i=0; $i<count($investment); $i++)
                        {
!       //                      $investment[$i]['date']  = 
$GLOBALS['phpgw']->common->show_date($investment[$i]['date']);
                        }
                        return $investment;
                }
--- 107,144 ----
                }
  
+               function read_sessiondata()
+               {
+                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data','investment');
+ 
+ //                    _debug_array($data);
+ 
+                       $this->start    = $data['start'];
+                       $this->query    = $data['query'];
+                       $this->filter   = $data['filter'];
+                       $this->sort             = $data['sort'];
+                       $this->order    = $data['order'];
+                       $this->cat_id   = $data['cat_id'];
+                       $this->part_of_town_id  = $data['part_of_town_id'];
+               }
+ 
+               function save_sessiondata($data)
+               {
+                       if ($this->use_session)
+                       {
+                               
$GLOBALS['phpgw']->session->appsession('session_data','investment',$data);
+                       }
+               }
  
                function read()
                {
                        $investment = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
!                                                                               
        'filter' => $this->filter,'cat_id' => $this->cat_id,'part_of_town_id' 
=> $this->part_of_town_id,'allrows'=>$this->allrows));
                        $this->total_records = $this->so->total_records;
  
!       /*              for ($i=0; $i<count($investment); $i++)
                        {
!                               $investment[$i]['date']  = 
$GLOBALS['phpgw']->common->show_date($investment[$i]['date']);
                        }
+       */
                        return $investment;
                }

Index: class.boinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.boinvoice.inc.php     25 Apr 2003 09:46:14 -0000      1.14
--- class.boinvoice.inc.php     15 May 2003 18:46:36 -0000      1.15
***************
*** 91,96 ****
                                $this->allrows = $allrows;
                        }
- 
- 
                }
  
--- 91,94 ----

Index: class.soinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvestment.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.soinvestment.inc.php  15 May 2003 11:18:21 -0000      1.10
--- class.soinvestment.inc.php  15 May 2003 18:46:36 -0000      1.11
***************
*** 64,67 ****
--- 64,68 ----
                                $cat_id = 
(isset($data['cat_id'])?$data['cat_id']:'');
                                $part_of_town_id = 
(isset($data['part_of_town_id'])?$data['part_of_town_id']:'');
+                               $allrows                = 
(isset($data['allrows'])?$data['allrows']:'');
  
                        }
***************
*** 122,128 ****
                        }
  
!                       $this->db2->query($sql,__LINE__,__FILE__);
!                       $this->total_records = $this->db2->num_rows();
!                       $this->db->query($sql . $ordermethod,__LINE__,__FILE__);
  
                        $i=0;
--- 123,141 ----
                        }
  
!                       if($cat_id)
!                       {
!                               $this->db2->query($sql,__LINE__,__FILE__);
!                               $this->total_records = $this->db2->num_rows();
! 
!                               if(!$allrows)
!                               {
!                                       $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
!                               }
!                               else
!                               {
!                                       $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
!                               }
!                       }
! 
  
                        $i=0;

Index: class.uiinvestment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uiinvestment.inc.php  15 May 2003 11:18:21 -0000      1.16
--- class.uiinvestment.inc.php  15 May 2003 18:46:36 -0000      1.17
***************
*** 21,28 ****
                var $public_functions = array
                (
!                       'index'  => True,
!                       'history'   => True,
!                       'add'   => True,
!                       'delete' => True
                );
  
--- 21,28 ----
                var $public_functions = array
                (
!                       'index'         => True,
!                       'history'       => True,
!                       'add'           => True,
!                       'delete'        => True
                );
  
***************
*** 64,68 ****
                                'this->allrows'         => $this->allrows
                        );
!                       $this->bocommon->save_sessiondata($data);
                }
  
--- 64,68 ----
                                'this->allrows'         => $this->allrows
                        );
!                       $this->bo->save_sessiondata($data);
                }
  
***************
*** 185,189 ****
                                'cat_id'                        => 
$this->cat_id,
                                'part_of_town_id'       => 
$this->part_of_town_id,
-                               'sub'                           => $this->sub,
                                'query'                         => $this->query,
                                'start'                         => $this->start,
--- 185,188 ----
***************
*** 191,194 ****
--- 190,204 ----
                        );
  
+ 
+                       if(!$this->allrows)
+                       {
+                               $record_limit   = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $record_limit   = $this->bo->total_records;
+                       }
+ 
+ 
                        $data = array
                        (
***************
*** 198,212 ****
                                'lang_search'                                   
=> lang('Search'),
                                'lang_search_statustext'                => 
lang('Search for investment entries'),
!                               'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'lang_select_all'                               
=> lang('Select All'),
                                'img_check'                                     
        => 
$GLOBALS['phpgw']->common->get_image_path($this->currentapp).'/check.gif',
                                'check_source'                                  
=> './'.$this->currentapp.'/inc/check.js',
! 
!                               'allow_allrows'                                 
=> false,
                                'start_record'                                  
=> $this->start,
!                               'record_limit'                                  
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
                                'num_records'                                   
=> count($investment_list),
                                'all_records'                                   
=> $this->bo->total_records,
!                               'link_url'                                      
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.index'),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                'lang_no_cat'                                   
=> lang('no category'),
--- 208,223 ----
                                'lang_search'                                   
=> lang('Search'),
                                'lang_search_statustext'                => 
lang('Search for investment entries'),
! //                            'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'form_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvestment.index'),
                                'lang_select_all'                               
=> lang('Select All'),
                                'img_check'                                     
        => 
$GLOBALS['phpgw']->common->get_image_path($this->currentapp).'/check.gif',
                                'check_source'                                  
=> './'.$this->currentapp.'/inc/check.js',
!                               'allow_allrows'                                 
=> true,
!                               'allrows'                                       
        => $this->allrows,
                                'start_record'                                  
=> $this->start,
!                               'record_limit'                                  
=> $record_limit,
                                'num_records'                                   
=> count($investment_list),
                                'all_records'                                   
=> $this->bo->total_records,
!                               'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi'),
                                'lang_no_cat'                                   
=> lang('no category'),
***************
*** 311,315 ****
                                $content[] = array
                                (
!                                       'date'                                  
        => date($dateformat,strtotime($investment['date'])),
                                        'initial_value_ex'                      
=> $investment['initial_value'],
                                        'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ' '),
--- 322,326 ----
                                $content[] = array
                                (
!                                       'date'                                  
        => @date($dateformat,strtotime($investment['date'])),
                                        'initial_value_ex'                      
=> $investment['initial_value'],
                                        'initial_value'                         
=> number_format($investment['initial_value'], 0, ',', ' '),
***************
*** 427,431 ****
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('history' => $data));
!                       $this->save_sessiondata();
                }
  
--- 438,442 ----
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('history' => $data));
! //                    $this->save_sessiondata();
                }
  





reply via email to

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