about summary refs log tree commit diff
path: root/sourcecodes/violin.php
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/violin.php')
-rw-r--r--sourcecodes/violin.php40
1 files changed, 17 insertions, 23 deletions
diff --git a/sourcecodes/violin.php b/sourcecodes/violin.php
index 5733dff3..2e9c6c49 100644
--- a/sourcecodes/violin.php
+++ b/sourcecodes/violin.php
@@ -1,25 +1,28 @@
 <?php 
 include("header_new.inc");
 include("input_validate.php");
-include("reroute_image.php");
 if($_GET["My_key"]!="")
   $keyval=valid_keyval($_GET["My_key"]);
-//if($_POST["My_key"]!="")
-//  $keyval=valid_keyval($_POST["My_key"]);
+if($_POST["My_key"]!="")
+  $keyval=valid_keyval($_POST["My_key"]);
+
+$plotly_file_data="./data/".$keyval."violin_plotly.html";
+$plotly_ev_file_data="./data/".$keyval."violin_plotly_evidence.html";
+$plotly_file_tmp="/tmp/bnw/".$keyval."violin_plotly.html";
+$plotly_ev_file_tmp="/tmp/bnw/".$keyval."violin_plotly_evidence.html";
 
-$dir="/var/lib/genenet/bnw/";
-$plotly_file=$keyval."violin_plotly.html";
-$plotly_ev_file=$keyval."violin_plotly_evidence.html";
-//$plotly_file_tmp="/tmp/bnw/".$keyval."violin_plotly.html";
-//$plotly_ev_file_tmp="/tmp/bnw/".$keyval."violin_plotly_evidence.html";
 
 ?>
 
+
+
 <!-- Site navigation menu -->
 <ul class="navbar2">
   <li class="noHover"><p>Network ID:<br><?php print($keyval);?></p></li>
   <li><a href="help.php">Help</a>
   <li><a href="home.php">Home</a>
+
+
 </ul>
 
 
@@ -28,24 +31,15 @@ $plotly_ev_file=$keyval."violin_plotly_evidence.html";
 <div id="violin_div">
 <!-- Main content -->
 <?php
-  if(file_exists($dir.$plotly_file))
-    {
-   $file_data=file_get_contents($dir.$plotly_file); 
-?>
-
- <object width="100%" height="500" data=<?=$file_data?> 
+  if(file_exists($plotly_file_tmp))
+    {?>
+ <object type="text/html" data=<?php print($plotly_file_data);?> width="100%" height="500">
  </object>
 <?php
-    } else {
-?>
-   <div id="outernew">
-   <h3> No violin plot data file found. </h3>
-<?php
-}
-  if(file_exists($dir.$plotly_ev_file))
-    $ev_file_data=file_get_contents($dir.$plotly_ev_file);
+    }
+  if(file_exists($plotly_ev_file_tmp))
     {?>
- <object width="100%" height="500" data=<?=$ev_file_data?>
+ <object type="text/html" data=<?php print($plotly_ev_file_data);?> width="100%" height="500">
  </object>
 <?php
     }