about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--sourcecodes/bn_after_upload_gom.php35
1 files changed, 13 insertions, 22 deletions
diff --git a/sourcecodes/bn_after_upload_gom.php b/sourcecodes/bn_after_upload_gom.php
index 63795759..d06954fd 100644
--- a/sourcecodes/bn_after_upload_gom.php
+++ b/sourcecodes/bn_after_upload_gom.php
@@ -21,28 +21,19 @@ $UploadValue="NO";
 $TextFile=$_FILES["MyFile"]["name"];
 
 
-/////////////Generate a random key/////////////////////
-//$alphas=array();
-//$alphas = array_merge(range('A', 'Z'), range('a', 'z'));
-
-//$al1=rand(0,51);
-//$al2=rand(0,51);
-//$al3=rand(0,51);
-
-//$alpha="$alphas[$al1]"."$alphas[$al2]"."$alphas[$al3]";
-//$keyval=$alpha;
-
-
-//if($_POST["My_key"]!="")
-//  $keyval=$_POST["My_key"];
-//  $keyval=valid_keyval($keyval);
-
-//$sid=$keyval."continuous_input";
-////$dir="./data/";
-//$dir="/tmp/bnw/";
-//$input_table_file="./data/".$keyval."input_table.txt";
-
-//$TextinFile=$dir.$sid."_orig.txt";
+/////////////Reuse the key established by the calling page/////////////////////
+// Unlike bn_file_load_gom.php (a fresh upload entry point that mints a new
+// random key), this page is only reached via a redirect from
+// modify_structure_learning.php with an existing My_key in the query string,
+// so $keyval is read from $_GET here instead of being generated.
+$keyval=valid_keyval($_GET["My_key"]);
+
+$sid=$keyval."continuous_input";
+//$dir="./data/";
+$dir="/tmp/bnw/";
+$input_table_file="./data/".$keyval."input_table.txt";
+
+$TextinFile=$dir.$sid."_orig.txt";
 
 
 if(isset($_POST["searchkey"]))