diff options
| author | ziejd2 | 2017-09-14 15:38:06 -0500 |
|---|---|---|
| committer | GitHub | 2017-09-14 15:38:06 -0500 |
| commit | 57ebf49403b75dcf8482d174b59f7fd2a961d98e (patch) | |
| tree | ad7261709b6f7aa1732545f069a49567f2b86949 | |
| parent | 539405204802310365614f1ef73cfcd678f4ebe5 (diff) | |
| download | BNW-57ebf49403b75dcf8482d174b59f7fd2a961d98e.tar.gz | |
Add files via upload
| -rw-r--r-- | home.php | 29 | ||||
| -rw-r--r-- | index.html | 6 |
2 files changed, 35 insertions, 0 deletions
diff --git a/home.php b/home.php new file mode 100644 index 00000000..7fcd4f14 --- /dev/null +++ b/home.php @@ -0,0 +1,29 @@ +<?php +//$cmd="/usr/bin/dot -Tpng -o $figfile $grfilenametemp"; +//system($cmd); +$cmd="top -b -n 2 -u apache|grep ^Cpu|cut -d',' -f1|cut -d':' -f2|cut -d'%' -f1>datafile"; +system($cmd); + +$cpu=file_get_contents("datafile"); +$str_arrmat=array(); +$str_arrmat=explode("\n",$cpu); + +if($str_arrmat[1]>70.0) +{ + +?> +<script> +window.open("http://bnw.genenetwork.org/BNW_1.01/sourcecodes/home.php",'_self',false); +</script> +<?php +} +else +{ +?> +<script> +window.open("http://compbio.uthsc.edu/BNW_1.01/sourcecodes/home.php",'_self',false); +</script> + +<?php +} +?> diff --git a/index.html b/index.html new file mode 100644 index 00000000..b0e33f6e --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ +<html> +<head> +<title>Bayesian Network Web Server</title> +<meta HTTP-EQUIV="REFRESH" content="0; url=home.php"> +</head> +</html> |
