From c80226899f5cdd9f11c163817d59445213f5bef0 Mon Sep 17 00:00:00 2001
From: ziejd2
Date: Wed, 14 Mar 2018 23:19:16 -0500
Subject: Separating Octave and php calculations
---
sourcecodes/bn_file_load_gom.php | 270 +++++----------------------------------
1 file changed, 31 insertions(+), 239 deletions(-)
(limited to 'sourcecodes/bn_file_load_gom.php')
diff --git a/sourcecodes/bn_file_load_gom.php b/sourcecodes/bn_file_load_gom.php
index 342afe02..8f14aa7a 100644
--- a/sourcecodes/bn_file_load_gom.php
+++ b/sourcecodes/bn_file_load_gom.php
@@ -1,5 +1,7 @@
-
- Data formatting guidelines
- Help
@@ -111,7 +82,7 @@ if(isset($HTTP_POST_VARS["MyUpload"]))
else
{
$searchID=file_get_contents("$TextinFile");
- unlink($TextinFile);
+ //unlink($TextinFile);
}
@@ -140,7 +111,7 @@ if(isset($HTTP_POST_VARS["MyUpload"]))
Content of uploaded data file:
-
+
|
@@ -176,220 +147,41 @@ if(isset($HTTP_POST_VARS["MyUpload"]))
-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($data_type[$m]>1)
- {
- $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");
-}
-
-fclose($fpmain);
-
-////////////////empty ban and white list/////////////////////////////
-
-$sid1=$keyval."ban";
-$sid2=$keyval."white";
-$wdir="./data/";
-$Textban=$wdir.$sid1.".txt";
-$Textwhite=$wdir.$sid2.".txt";
-
-$fpb = fopen($Textban,"w");
-$fpw = fopen($Textwhite,"w");
-
-$datpost="From\tTo\n";
+
+