[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/import/Import_fra_BKK, 1.1.1.5
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/import/Import_fra_BKK, 1.1.1.5 |
Date: |
Sun, 23 May 2004 09:04:39 -0000 |
Update of /property/import
Modified Files:
Branch:
Import_fra_BKK
date: 2004/05/06 12:07:13; author: sigurdne; state: Exp; lines: +4 -28
Log Message:
no message
=====================================================================
Index: property/import/Import_fra_BKK
diff -u property/import/Import_fra_BKK:1.1.1.4
property/import/Import_fra_BKK:1.1.1.5
--- property/import/Import_fra_BKK:1.1.1.4 Wed May 5 07:13:28 2004
+++ property/import/Import_fra_BKK Thu May 6 12:07:13 2004
@@ -84,29 +84,19 @@
}
$valid_data= False;
$buffer = array();
- $buffer = $this->import_start_file($buffer);
$fp = fopen($tsvfile,'rb');
-//print_r($buffer);
-//print_r($header);
-//echo '<br>';
for ($i = 0; $i < $this->header_count &&
fgets($fp,8000); ++$i);
while ($data = fgets($fp,8000))
{
-//print_r($data);
$num = count($this->import_bkk);
-//echo 'data :'.$data.'<br>';
- $buffer = $this->import_start_record($buffer);
-//print_r($buffer);
+ $this->import_start_record();
for ($c=0; $c<$num; $c++ )
{
//Send name/value pairs along with the
buffer
if ($this->import_bkk[$c] != '' &&
substr($data,5,10) !='')
{
-//echo 'len :'.$this->import_bkk_len[$this->import_bkk[$c]].'<br>';
-//print_r(fread($data,$this->import_bkk_len[$this->import_bkk[$c]]));
-//print_r($this->import_bkk[$c]);
$value=substr($data,$this->import_bkk_offset[$this->import_bkk[$c]],$this->import_bkk_len[$this->import_bkk[$c]]);
$name=$this->import_bkk[$c];
if ($name=='installasjonsnr')
@@ -120,11 +110,8 @@
$value=(floatval(substr($data,157,14)) + floatval(substr($data,172,14)))/100;
$valid_data= True;
}
-//echo 'name :'.$name;
-//echo ' value :'.$value.'<br>';
-//print_r($buffer);
- $buffer =
$this->import_new_attrib($buffer,$name,$value,$invoice_common);
+
$this->import_new_attrib($name,$value,$invoice_common);
}
}
if ($valid_data)
@@ -134,10 +121,8 @@
}
}
fclose($fp);
-//print_r($buffer);
-//echo 'download'.$download.'<br>';
if(!$download)
{
@@ -148,21 +133,14 @@
}
- function import_start_file($buffer)
+ function import_start_record()
{
- return $buffer;
- }
-
- function import_start_record($buffer)
- {
-//print_r($buffer);
$top=array();
++$this->id;
$this->currentrecord = $top;
- return $buffer;
}
- function import_new_attrib($buffer,$name,$value,$invoice_common)
+ function import_new_attrib($name,$value,$invoice_common)
{
$value = trim($value);
@@ -170,8 +148,6 @@
// $value = str_replace('\r','',$value);
$this->currentrecord += array($name => $value);
-//print_r($buffer);
- return $buffer;
}
function import_end_record($buffer,$invoice_common)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/import/Import_fra_BKK, 1.1.1.5,
nomail <=