about summary refs log tree commit diff
path: root/sourcecodes/violin.php
blob: 5733dff3c8978b3b83e50d888b2f09b896d9ec1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?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"]);

$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>




<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?> 
 </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);
    {?>
 <object width="100%" height="500" data=<?=$ev_file_data?>
 </object>
<?php
    }
?>

</div>
</body>