2011 AT2.1 update
[contractdashboard.git] / admin / import.php
blob:a/admin/import.php -> blob:b/admin/import.php
--- a/admin/import.php
+++ b/admin/import.php
@@ -11,7 +11,7 @@
           // loop through all of the files
           while (false !== ($fname = readdir($dhandle))) {
               if (($fname != '.') && ($fname != '..')) {
-                  echo "<a href=\"import.php?fname=$fname\">$fname</a>" . filesize($path . $fname) . "<br/>";
+                  echo "<a href=\"import.php?fname=$fname\">$fname</a>&nbsp;" . filesize($path . $fname) . "&nbsp;" . date("c",filemtime($path . $fname)) . "<br/>";
               }
           }
       }
@@ -52,7 +52,8 @@
                   
                   if (in_array(($datamapping0709[$headers[$c]]), $contractNoticeFields)) {
                       if (($datamapping0709[$headers[$c]]) == "parentCN" || ($datamapping0709[$headers[$c]]) == "CNID") {
-                          $data[$c] = substr($data[$c], 2);
+                          $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 ($data[$c] > 0) {
                               $contractNoticeInsert .= ($firstCN ? "" : ",") . mysql_real_escape_string($data[$c]);
                           } else {
@@ -111,3 +112,4 @@
       fclose($handle);
   }
 ?>
+