CHange CNID to text
[contractdashboard.git] / admin / partialdata / importamendments.php
blob:a/admin/partialdata/importamendments.php -> blob:b/admin/partialdata/importamendments.php
--- a/admin/partialdata/importamendments.php
+++ b/admin/partialdata/importamendments.php
@@ -1,5 +1,6 @@
 <?php
-include_once ("../../lib/common.inc.php");
+if (php_sapi_name() == "cli") {
+    include_once ("../../lib/common.inc.php");
 /*
 update contractnotice set "supplierABN" = a."supplierABN" 
 from contractnotice as cn inner join (select "supplierABN", 
@@ -309,7 +310,7 @@
 		// loop through all of the files
 		while (false !== ($fname = readdir($dhandle))) {
 			if (($fname != '.') && ($fname != '..') && (strpos($fname,".xls")>0)) {
-				echo "<a href=\"import.php?fname=$fname\">$fname</a>&nbsp;" . filesize($path . $fname) . "&nbsp;" . date("c", filemtime($path . $fname)) . "<br/>";
+				echo "<a href=\"importdatagov.php?fname=$fname\">$fname</a>&nbsp;" . filesize($path . $fname) . "&nbsp;" . date("c", filemtime($path . $fname)) . "<br/>";
 				processFile($path . $fname, "contractnotice");
 			}
 		}
@@ -322,6 +323,6 @@
 	$success+= processFile($path . $fname, "contractnotice");
 
 }
-
+}
 ?>