--- a/admin/partialdata/import.php
+++ b/admin/partialdata/import.php
@@ -1,5 +1,6 @@
"agencyName",
"CN ID" => "CNID",
"Publish Date" => "publishDate",
@@ -67,7 +69,6 @@
if (in_array(($datamapping0507[$headers[$c]]) , $contractNoticeFields)) {
if (($datamapping0507[$headers[$c]]) == "parentCN" || ($datamapping0507[$headers[$c]]) == "CNID") {
$data[$c] = substr($data[$c], 2); // take off the "CN" prefix
- $data[$c] = str_replace("-A", "00", $data[$c]); // make amendments really big numbers
if (!is_numeric($data[$c]) && $data[$c] != "") die($data[$c] . " is not numeric");
if ($data[$c] > 0) {
$contractNoticeInsert[] = $data[$c];
@@ -136,8 +137,8 @@
if ($dhandle) {
// loop through all of the files
while (false !== ($fname = readdir($dhandle))) {
- if (($fname != '.') && ($fname != '..')) {
- echo "$fname " . filesize($path . $fname) . " " . date("c", filemtime($path . $fname)) . "
";
+ if (($fname != '.') && ($fname != '..') && (!isset($_REQUEST["filter"]) || strpos($fname,$_REQUEST["filter"]) != false)) {
+ echo "$fname " . filesize($path . $fname) . " " . date("c", filemtime($path . $fname)) . "
";
processFile($path . $fname, "contractnotice");
}
}
@@ -150,5 +151,6 @@
$success+= processFile($path . $fname, "contractnotice");
}
+}
?>