about summary refs log tree commit diff
path: root/sourcecodes/network_layout_evd.php
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/network_layout_evd.php')
-rw-r--r--sourcecodes/network_layout_evd.php30
1 files changed, 22 insertions, 8 deletions
diff --git a/sourcecodes/network_layout_evd.php b/sourcecodes/network_layout_evd.php
index 27e4fb06..661caebc 100644
--- a/sourcecodes/network_layout_evd.php
+++ b/sourcecodes/network_layout_evd.php
@@ -1,5 +1,7 @@
 <?php 
 include("structuremap.php");
+include("header_batchsearch.inc");
+include("input_validate.php");
 
 //This function is used to transfer between the integral
 //  levels for discrete nodes that required by BNT and
@@ -29,7 +31,7 @@ foreach($leve_l as $l)
 $dir="./data/";
 
 
-$keyval=$_GET["My_key"];
+$keyval=valid_keyval($_GET["My_key"]);
 
 $matfile=$dir."$keyval"."net_figure.txt";
 
@@ -323,9 +325,15 @@ for($i=0;$i<$nnode;$i++)
           if (selectedItem) {
             var topping = data.getValue(selectedItem.row, 0);
             
-            var s = window.prompt('Selected evidence ' + topping + ' for ' + cnode + '. Enter new evidence ', topping );
-           
-            window.location.href = "add_evd.php?name=" + cnode + "&evidence=" + s + "&My_key="  + keyv;
+            var s = window.prompt('Selected evidence ' + topping + ' for ' + cnode + '. Enter new evidence ', topping );	    
+	    if (input_check(s)) 
+	      {
+		window.location.href = "add_evd.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv;  
+	      }
+	    else
+	      {
+		window.location.href = "input_error_no_menu.php";
+	      }
           }
         } 
          chart.draw(data,
@@ -388,10 +396,16 @@ for($i=0;$i<$nnode;$i++)
            
             var topping = data.getValue(selectedItem.row, 0);
             var s = window.prompt('Selected evidence ' + topping + ' for ' + cnode + '. Enter new evidence ', topping );
-            window.location.href = "add_evd.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv;  
-
-          }
-        }
+	    if (input_check(s)) 
+	      {
+		window.location.href = "add_evd.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv;  
+	      }
+	    else
+	      {
+		window.location.href = "input_error_no_menu.php";
+	      }
+	  }
+       }
             chart.draw(data, {curveType: "function",
                   title:"<?php print($name);?>", titleTextStyle: {fontSize: <?php print($font);?>},
 			legend: {position: 'none'},