phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.boXport.inc.php,1.7,1.8 class.uiXport.inc.php,1.23,1.24
Date: Fri, 09 May 2003 05:05:33 -0400

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

Modified Files:
        class.boXport.inc.php class.uiXport.inc.php 
Log Message:
no message

Index: class.boXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boXport.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.boXport.inc.php       9 Jan 2003 23:10:22 -0000       1.7
--- class.boXport.inc.php       9 May 2003 09:05:30 -0000       1.8
***************
*** 1,8 ****
  <?php
    /**************************************************************************\
-   * phpGroupWare - addressbook                                               *
-   * http://www.phpgroupware.org                                              *
-   * Written by Joseph Engo <address@hidden>                          *
-   * --------------------------------------------                             *
    *  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   *
--- 1,4 ----
***************
*** 20,28 ****
                );
  
-               var $so;
-               var $contacts;
- 
                var $start;
-               var $limit;
                var $query;
                var $sort;
--- 16,20 ----
***************
*** 36,41 ****
                {
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->contacts         = $GLOBALS['phpgw']->contacts;
-                       $this->so                       = 
CreateObject('addressbook.soaddressbook');
                        $this->config           = 
CreateObject('phpgwapi.config',$this->currentapp);
  
--- 28,31 ----
***************
*** 45,52 ****
                                $this->use_session = True;
                        }
!                       global 
$start,$limit,$query,$sort,$order,$filter,$cat_id;
  
                        if($start || $start == 0)  { $this->start = $start; }
-                       if($limit)  { $this->limit  = $limit;  }
                        if($query)  { $this->query  = $query;  }
                        if($sort)   { $this->sort   = $sort;   }
--- 35,47 ----
                                $this->use_session = True;
                        }
! 
!                       $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 || $start == 0)  { $this->start = $start; }
                        if($query)  { $this->query  = $query;  }
                        if($sort)   { $this->sort   = $sort;   }
***************
*** 58,76 ****
                function save_sessiondata()
                {
-                       global 
$start,$limit,$query,$sort,$order,$filter,$cat_id;
  
                        if ($this->use_session)
                        {
                                $data = array(
!                                       'start'  => $start,
!                                       'limit'  => $limit,
!                                       'query'  => $query,
!                                       'sort'   => $sort,
!                                       'order'  => $order,
!                                       'filter' => $filter,
!                                       'cat_id' => $cat_id
                                );
                                if($this->debug) { echo '<br>Save:'; 
_debug_array($data); }
!                               
$GLOBALS['phpgw']->session->appsession('session_data','addressbook',$data);
                        }
                }
--- 53,69 ----
                function save_sessiondata()
                {
  
                        if ($this->use_session)
                        {
                                $data = array(
!                                       'start'  => $this->start,
!                                       'query'  => $this->query,
!                                       'sort'   => $this->sort,
!                                       'order'  => $this->order,
!                                       'filter' => $this->filter,
!                                       'cat_id' => $this->cat_id
                                );
                                if($this->debug) { echo '<br>Save:'; 
_debug_array($data); }
!                               
$GLOBALS['phpgw']->session->appsession('session_data',$this->currentapp,$data);
                        }
                }
***************
*** 78,86 ****
                function read_sessiondata()
                {
!                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data','addressbook');
                        if($this->debug) { echo '<br>Read:'; 
_debug_array($data); }
  
                        $this->start  = $data['start'];
-                       $this->limit  = $data['limit'];
                        $this->query  = $data['query'];
                        $this->sort   = $data['sort'];
--- 71,78 ----
                function read_sessiondata()
                {
!                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data',$this->currentapp);
                        if($this->debug) { echo '<br>Read:'; 
_debug_array($data); }
  
                        $this->start  = $data['start'];
                        $this->query  = $data['query'];
                        $this->sort   = $data['sort'];
***************
*** 195,199 ****
                        }
                        closedir($dir_handle);
!                       sort($myfilearray);
  
                        for ($i=0;$i<count($myfilearray);$i++)
--- 187,191 ----
                        }
                        closedir($dir_handle);
!                       @sort($myfilearray);
  
                        for ($i=0;$i<count($myfilearray);$i++)
***************
*** 244,252 ****
                                        );
                        }
- 
                        return $buffer;
- 
                }
- 
  
                /*!
--- 236,241 ----

Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.uiXport.inc.php       8 May 2003 13:56:29 -0000       1.23
--- class.uiXport.inc.php       9 May 2003 09:05:31 -0000       1.24
***************
*** 26,35 ****
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->cat      = CreateObject('phpgwapi.categories');
                        $this->bo       = 
CreateObject($this->currentapp.'.boXport',True);
-                       $this->browser  = CreateObject('phpgwapi.browser');
                        $this->invoice  = 
CreateObject($this->currentapp.'.boinvoice');
                        $this->bocommon  = 
CreateObject($this->currentapp.'.bocommon');
!                       $this->$config = 
CreateObject('phpgwapi.config','property');
  
                        $this->start    = $this->bo->start;
--- 26,33 ----
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
                        $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->bo       = 
CreateObject($this->currentapp.'.boXport',True);
                        $this->invoice  = 
CreateObject($this->currentapp.'.boinvoice');
                        $this->bocommon  = 
CreateObject($this->currentapp.'.bocommon');
!                       $this->contacts         = 
CreateObject('phpgwapi.contacts');
  
                        $this->start    = $this->bo->start;
***************
*** 70,79 ****
                        $download                       = 
get_var('download',array('POST','GET'));
  
!                       global $tsvfile;
  
  
!                       $links = $this->bocommon->menu($sub);
! //echo 'tsvfile: '.$tsvfile.'<br>';
! 
  
  //_debug_array($values);
--- 68,79 ----
                        $download                       = 
get_var('download',array('POST','GET'));
  
!                       $tsvfile = $_FILES['tsvfile']['tmp_name'];
  
+                       if(!$tsvfile)
+                       {
+                               $tsvfile                        = 
get_var('tsvfile',array('POST','GET'));
+                       }
  
!                       $links = $this->bocommon->menu();
  
  //_debug_array($values);
***************
*** 157,160 ****
--- 157,165 ----
                                }
  
+                               if (!file_exists($tsvfile))
+                               {
+                                       $error[$errorcount++] = 
array('msg'=>lang('The file is empty or removed!'));
+                               }
+ 
                                if (!$error)
                                {
***************
*** 184,188 ****
                                        $old = $tsvfile;
                                        $tsvfile = 
$GLOBALS['phpgw_info']['server']['temp_dir'].'/invoice_import_'.basename($tsvfile);
- //echo 'tsvfile: '.$tsvfile.'<br>';
                                        rename($old,$tsvfile);
  
--- 189,192 ----
***************
*** 218,223 ****
                                        if(!$download)
                                        {
-                                               unlink ($tsvfile);
                                                $message = $buffer;
                                        }
                                        else
--- 222,242 ----
                                        if(!$download)
                                        {
                                                $message = $buffer;
+                                               unlink ($tsvfile);
+                                               unset($invoice_common);
+                                               unset($art);
+                                               unset($type);
+                                               unset($dim_b);
+                                               unset($invoice_num);
+                                               unset($kid_nr);
+                                               unset($vendor_id);
+                                               unset($vendor_name);
+                                               unset($janitor);
+                                               unset($supervisor);
+                                               unset($budget_responsible);
+                                               unset($invoice_date);
+                                               unset($num_days);
+                                               unset($payment_date);
+                                               unset($conv_type);
                                        }
                                        else
***************
*** 308,312 ****
                                'value_merknad'                                 
=> $merknad,
                                'value_num_days'                                
=> $num_days,
!                               'value_tsvfile'                                 
=> $tsvfile,
  
                                'lang_file'                                     
        => lang('File'),
--- 327,331 ----
                                'value_merknad'                                 
=> $merknad,
                                'value_num_days'                                
=> $num_days,
! //                            'value_tsvfile'                                 
=> $tsvfile,
  
                                'lang_file'                                     
        => lang('File'),
***************
*** 434,444 ****
                        );
  
                        $data = array
                        (
                                'lang_type'                                     
        => lang('Type'),
                                'artid'                                         
        => $table[1]['artid'],
                                'lang_bilagsnr'                                 
=> lang('bilagsnr'),
                                'bilagsnr'                                      
        => $table[1]['bilagsnr'],
!                               'lang_spvend_code'                              
=> lang('Vendor ID'),
                                'spvend_code'                                   
=> $table[1]['spvend_code'],
                                'lang_fakturadato'                              
=> lang('invoice date'),
--- 453,467 ----
                        );
  
+                       $vendor                                         = 
$this->contacts->read_single_entry($table[1]['spvend_code'],array('org_name'=>'org_name'));
+ 
                        $data = array
                        (
+                               'artid'                                         
        => $table[1]['artid'],
                                'lang_type'                                     
        => lang('Type'),
                                'artid'                                         
        => $table[1]['artid'],
                                'lang_bilagsnr'                                 
=> lang('bilagsnr'),
                                'bilagsnr'                                      
        => $table[1]['bilagsnr'],
!                               'lang_vendor'                                   
=> lang('Vendor'),
!                               'vendor_name'                                   
=> $vendor[0]['org_name'],
                                'spvend_code'                                   
=> $table[1]['spvend_code'],
                                'lang_fakturadato'                              
=> lang('invoice date'),
***************
*** 462,465 ****
--- 485,490 ----
                        unset($table);
  //_debug_array($table);
+ 
+ 
  //_debug_array($data);
  





reply via email to

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