--- a/admin/import.php +++ b/admin/import.php @@ -86,8 +86,7 @@ "Agency Postcode" => "contactPostcode", "" => "" ); - - $headers; + while (($data = fgetcsv($handle, 1000, "\t")) !== false) { $num = count($data); @@ -172,7 +171,7 @@ } ksort($files); foreach ($files as $date => $fname) { - echo "$fname " . filesize($path . $fname) . " " . $date . "
"; + echo "$fname " . filesize($path . $fname) . " " . $date . "
"; } } else { $success = 0; @@ -186,11 +185,16 @@ flush(); // run post import data processing -// cn + // + if ($success > 0) { +$conn->exec("update datasets set \"lastUpdated\" = NOW() where title = 'Contract Notices'"); echo "link amend
"; include ("linkAmendments.php"); echo "update UNSPSC
"; include ("updateUNSPSC.php"); + } +// cn + // agency //include ("setAgencyStatus.php"); //include ("setAgencyURLABN.php");