diff options
| author | ziejd2 | 2021-02-24 14:36:59 -0600 |
|---|---|---|
| committer | ziejd2 | 2021-02-24 14:36:59 -0600 |
| commit | 25b843f6bbacb1937bdb960777b73acbece64115 (patch) | |
| tree | 88645b9d1d8a0eea19d7229555bf8805571bc8b7 /sourcecodes/input_check.php | |
| parent | 33cedf36248f616aa37d1462c69a4a3058a5d92e (diff) | |
| download | BNW-25b843f6bbacb1937bdb960777b73acbece64115.tar.gz | |
GENENET8 update
Diffstat (limited to 'sourcecodes/input_check.php')
| -rw-r--r-- | sourcecodes/input_check.php | 86 |
1 files changed, 75 insertions, 11 deletions
diff --git a/sourcecodes/input_check.php b/sourcecodes/input_check.php index b3c0a421..832b8faa 100644 --- a/sourcecodes/input_check.php +++ b/sourcecodes/input_check.php @@ -1,16 +1,80 @@ -<?php $keyval=$_GET["My_key"]; ?> +<head> +<meta charset="utf-8"> +<script src="./scripts/d3.v4.min.js"></script> +<script src="./scripts/create_table.js"></script> +<?php +include("header_new.inc"); +include("input_validate.php"); +if($_GET["My_key"]!="") + $keyval=valid_keyval($_GET["My_key"]); +if($_POST["My_key"]!="") + $keyval=valid_keyval($_POST["My_key"]); -<h3> <a href=<?php $d="./data/".$keyval."input_desc.txt"; print($d);?>>View variable descriptions</a></h3> -<br> +$dir = "/var/lib/genenet/bnw/"; + +$input_table_file=$keyval."input_table.txt"; +$input_data_file=$keyval."continuous_input_orig.txt"; + + +?> + +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> + + +<!-- Site navigation menu --> +<ul class="navbar2"> + <li class="noHover"><p>Network ID:<br><?php print($keyval);?></p></li> + <li><a href="about_this_page.php#input_check">About this page</a> + <li><a href="help.php">Help</a> + <li><a href="home.php">Home</a> +</ul> +<body> + <div class="table_div"> + <p class=basic_header>Description of network variables:</p> + <div class="d3_table" id="table_div1"> + <?php + $table_text = json_encode(file("file://".$dir.$input_table_file)); + ?> +<script type="text/javascript"> + d3.text("", 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(); + if (error) throw error; + tabulate_caption("#table_div1",data,caption_text.Variable); + }); +</script> +</div> <br> + <div class="d3_table" id="table_div2"> -<?php -$filename="./data/".$keyval."continuous_input_orig.txt"; -if(file_exists($filename)) -{?> -<h3> <a href=<?php $d="./data/".$keyval."continuous_input_orig.txt"; print($d);?>>View uploaded data file</a></h3> + <?php + $table_text = json_encode(file("file://".$dir.$input_data_file)); + ?> + <script type="text/javascript"> + + d3.text("", 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 = "Input data file:"; + if (error) throw error; + tabulate_caption("#table_div2",data,caption_text); + }); + +</script> + </div> + + + + <a class=button2 href="<?php print("reroute.php?".$input_data_file);?>">Download original input file<br></a> <br> -<?php -} -?> +<br><br> +</div> +</body> + |
