about summary refs log tree commit diff
path: root/home.php
diff options
context:
space:
mode:
authorziejd22017-09-14 15:38:06 -0500
committerGitHub2017-09-14 15:38:06 -0500
commit57ebf49403b75dcf8482d174b59f7fd2a961d98e (patch)
treead7261709b6f7aa1732545f069a49567f2b86949 /home.php
parent539405204802310365614f1ef73cfcd678f4ebe5 (diff)
downloadBNW-57ebf49403b75dcf8482d174b59f7fd2a961d98e.tar.gz
Add files via upload
Diffstat (limited to 'home.php')
-rw-r--r--home.php29
1 files changed, 29 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
+}
+?>