about summary refs log tree commit diff
path: root/sourcecodes/bn_file_load_gom.php
diff options
context:
space:
mode:
authorziejd22021-02-24 15:19:03 -0600
committerziejd22021-02-24 15:19:03 -0600
commit1427e9bf4f85823164b4573a3bcf1ba3ba6b04d0 (patch)
treed4356879a9b0a3d44063a6b292ef0197173697af /sourcecodes/bn_file_load_gom.php
parenta2b306b10fb07f07c63235861ccfe460153e8609 (diff)
downloadBNW-1427e9bf4f85823164b4573a3bcf1ba3ba6b04d0.tar.gz
Moving final GENENET8 version to master
Diffstat (limited to 'sourcecodes/bn_file_load_gom.php')
-rw-r--r--sourcecodes/bn_file_load_gom.php29
1 files changed, 11 insertions, 18 deletions
diff --git a/sourcecodes/bn_file_load_gom.php b/sourcecodes/bn_file_load_gom.php
index d2480cd4..6509cdeb 100644
--- a/sourcecodes/bn_file_load_gom.php
+++ b/sourcecodes/bn_file_load_gom.php
@@ -13,7 +13,7 @@ include("runtime_check.php");
 include("input_validate.php");
 $searchID="";
 $UploadValue="NO";
-$TextFile=$_FILES["MyFile"]["name"];
+$TextFile=$HTTP_POST_FILES["MyFile"]["name"];
 
 
 /////////////Generate a random key/////////////////////
@@ -34,17 +34,15 @@ if($_POST["My_key"]!="")
 
 $sid=$keyval."continuous_input";
 //$dir="./data/";
-//$dir="/tmp/bnw/";
-$dir="/var/lib/genenet/bnw/";
-//$input_table_file="./data/".$keyval."input_table.txt";
-$input_table_file=$dir.$keyval."input_table.txt";
+$dir="/tmp/bnw/";
+$input_table_file="./data/".$keyval."input_table.txt";
 
 $TextinFile=$dir.$sid."_orig.txt";
 
 
-if(isset($_POST["searchkey"]))
+if(isset($HTTP_POST_VARS["searchkey"]))
 {
-   $searchID=$_POST["searchkey"];
+   $searchID=$HTTP_POST_VARS["searchkey"];
 
 }
 
@@ -64,15 +62,15 @@ if($searchID=="")
 }
 
 
-if(isset($_POST["MyUpload"]))
+if(isset($HTTP_POST_VARS["MyUpload"]))
 {
-   $UploadValue=$_POST["MyUpload"];
+   $UploadValue=$HTTP_POST_VARS["MyUpload"];
    if ($UploadValue=="YES")
    {
         if($TextFile!="")
         {
 	  //	  $TextFile = valid_input($TextFile);
-            $sta=move_uploaded_file($_FILES['MyFile']['tmp_name'],$TextinFile);
+            $sta=move_uploaded_file($HTTP_POST_FILES['MyFile']['tmp_name'],$TextinFile);
             if(!$sta)
             {
                  echo "<script type='text/javascript'> window.alert ('Sorry, error uploading $TextFile.')</script>";
@@ -167,17 +165,12 @@ if($searchID!="")
 <br>
 <p><h3>The uploaded data file has the following properties:
 <br></h3>
-<?php 
-$table_text = json_encode(file("file://".$input_table_file));
-?>
   <div class="d3_table" id="table_div1">
   <script type="text/javascript">
-   d3.text("", function(error, raw_temp){
+   d3.text("<?php print($input_table_file);?>", function(error, raw){
        var dsv = d3.dsvFormat("\t")
-	var data1 = <?php echo $table_text?> 
-        var data2 = data1.join("")
- 	var data = dsv.parse(data2)
-	var caption_text = data.pop()
+	 var data = dsv.parse(raw)
+	 var caption_text = data.pop();
        if (error) throw error;
        tabulate_caption("#table_div1",data,caption_text.Variable);
      });