[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/import/Import_fra_Service, 1.1.1.5
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/import/Import_fra_Service, 1.1.1.5 |
Date: |
Sun, 23 May 2004 16:52:28 -0000 |
Update of /property/import
Modified Files:
Branch:
Import_fra_Service
date: 2004/05/06 12:07:13; author: sigurdne; state: Exp; lines: +5 -24
Log Message:
no message
=====================================================================
Index: property/import/Import_fra_Service
diff -u property/import/Import_fra_Service:1.1.1.4
property/import/Import_fra_Service:1.1.1.5
--- property/import/Import_fra_Service:1.1.1.4 Wed May 5 07:13:28 2004
+++ property/import/Import_fra_Service Thu May 6 12:07:13 2004
@@ -42,26 +42,21 @@
$row = 0;
$valid_data= False;
$buffer = array();
- $buffer = $this->import_start_file($buffer);
$fp = fopen($tsvfile,'r');
-//print_r($header);
-//echo '<br>';
+
for ($i = 1; $i < $this->header_count &&
fgetcsv($fp,8000,';'); ++$i);
while ($data = fgetcsv($fp,8000,';'))
{
$num = count($data);
$row++;
- $buffer = $this->import_start_record($buffer);
+ $this->import_start_record();
for ($c=0; $c<$num; $c++ )
{
//Send name/value pairs along with the
buffer
if ($this->import[$this->header[$c]] !=
'' && $data[$c] != '')
{
-
-//echo 'data'.$data[$c].'<br>';
-//echo '<br>'.$c.': '.$this->import[$this->header[$c]].' => '.$data[$c];
- $buffer =
$this->import_new_attrib($buffer,
$this->import[$this->header[$c]],$data[$c],$invoice_common);
+
$this->import_new_attrib($this->import[$this->header[$c]],$data[$c],$invoice_common);
$valid_data= True;
}
}
@@ -73,48 +68,34 @@
}
fclose($fp);
-
-//echo 'download'.$download.'<br>';
-
if(!$download)
{
$buffer =
$this->import_end_file($buffer,$invoice_common['bilagsnr']);
}
-//print_r($buffer);
return $buffer;
}
- function import_start_file($buffer)
- {
- return $buffer;
- }
-
- function import_start_record($buffer)
+ function import_start_record()
{
$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);
$value = str_replace('\n','<BR>',$value);
$value = str_replace('\r','',$value);
$this->currentrecord += array($name => $value);
-
- return $buffer;
}
function import_end_record($buffer,$invoice_common)
{
-//html_print_r($invoice_common);
$buffer[$this->id]='';
while ( list($name, $value) =
each($this->currentrecord))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/import/Import_fra_Service, 1.1.1.5,
nomail <=