From 74b673ba4a706085201a5610b938ff98f08f641d Mon Sep 17 00:00:00 2001
From: ziejd2
Date: Wed, 25 Apr 2018 16:43:19 -0500
Subject: Bug fixes, code comments, and minor changes
---
sourcecodes/upload_structure_file.php | 270 ++++++----------------------------
1 file changed, 49 insertions(+), 221 deletions(-)
(limited to 'sourcecodes/upload_structure_file.php')
diff --git a/sourcecodes/upload_structure_file.php b/sourcecodes/upload_structure_file.php
index b876d639..cb59f560 100644
--- a/sourcecodes/upload_structure_file.php
+++ b/sourcecodes/upload_structure_file.php
@@ -1,13 +1,17 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
Upload data file
-
1)
- {
- fprintf($flevel,"%s",$level_arr[$j][0]);
- $m=$data_type[$j];
- for($jj=1;$jj<=$m;$jj++)
- {
- fprintf($flevel,"\t%s",$level_arr[$j][$jj]);
- }
-
- fprintf($flevel,"\n");
- }
-}
-
-fwrite($fptype,"$name_t\n");
-for($j=0;$j<$lcc;$j++)
-{
- fprintf($fptype,"$data_type[$j]\t");
-}
-fwrite($fptype,"\n");
-////////////////////////////////////
-
-
-fwrite($fpmain, "$l_type\n");
-$l_c=0;
-//perform discrete level replacement
-for($m=0;$m<$lcc;$m++) //column
+if($searchID!="")
{
- if($data_type[$m]>1)
+ if ($UploadValue=="NO")
{
- $r=$data_type[$m];
- for($j=1;$j<=$r;$j++)
- {
- $search=$level_arr[$m][$j];
- $replace=$j."#";
- for($n=0;$n<$lc;$n++) //row
- {
- $val=$cont_arr_tmp[$n][$m];
- if($val==$search)
- $cont_arr_tmp[$n][$m]=$replace; //alter levels
- }
- }
- for($n=0;$n<$lc;$n++) //row
- $cont_arr_tmp[$n][$m]=str_replace('#','',$cont_arr_tmp[$n][$m]);
- }
-}
-
-//write data to output file
-for($j=0;$j<$lc;$j++)
-{
- fprintf($fpmain,"%s",$cont_arr_tmp[$j][0]);
- for($jj=1;$jj<$lcc;$jj++)
- fprintf($fpmain,"\t%s",$cont_arr_tmp[$j][$jj]);
- fprintf($fpmain, "\n");
+ $fpdata = fopen($dir.$keyval."continuous_input_orig.txt","w");
+ fwrite($fpdata,$searchID);
+ }
+ shell_exec('./run_prep_input '.$keyval);
+?>
+
+
+
+