} fclose($file); //print '20'.substr($fileDat['Produktionsdatum'],0,2).'-'.substr($fileDat['Produktionsdatum'],2,2).'-'.substr($fileDat['Produktionsdatum'],4,2)."<br/>"; $imp = array( 'Date' => '20'.substr($fileDat['Produktionsdatum'],0,2).'-'.substr($fileDat['Produktionsdatum'],2,2).'-'.substr($fileDat['Produktionsdatum'],4,2), 'AccountNr' => $fileDat['AccountNr'], 'AccountName' => $fileDat['AccountName'], 'Fname' => basename($target), 'Src' => json_encode($fileDat), 'Rows'=>count($OCRRows) ); $f->addOCRImport($imp); foreach($OCRRows as $row) { $row['GiverId'] = substr($row['Kundreferens'],0,5); $f->addOCRRow($row); ob_flush();flush(); } $report = "<table class='EditTable' border='1'> <tr><th colspan=9>"; $report .= $_FILES[$upload_name]['name'] . " - "; $report .= '20'.substr($fileDat['Produktionsdatum'],0,2).'-'.substr($fileDat['Produktionsdatum'],2,2).'-'.substr($fileDat['Produktionsdatum'],4,2); $report .= "</th></tr> <tr><th>GiverId</th><th>Givare</th><th>Belopp</th><th>Payments</th><th>Status</th></tr> "; print $report; function result($progress) { global $report; $out = ''; $dir = dirname(dirname($_SERVER['REQUEST_URI'])); $out .= "<tr class='{$progress['Status']}'>