; if(!isset($TOPDIR)) { $TOPDIR="..";} require_once "$TOPDIR/lib/security.php"; require_once "$TOPDIR/lib/functions.php"; require_once "$TOPDIR/lib/display.php"; require_once "$TOPDIR/lib/monitor_display.php"; $cond = '"' . $_REQUEST['c'] . '"'; $node = '"' . $_REQUEST['n'] . '"'; $resp = '"' . $_REQUEST['r'] . '"'; $action = $_REQUEST['a']; if($action == "start") { $xml = docmd("webrun", "", array("startcondresp $cond $resp")); }else if($action == "stop") { $xml = docmd("webrun", "", array("stopcondresp $cond $resp")); } if(getXmlErrors($xml,$errors)) { echo "
",implode(' ', $errors), "
"; exit; } //the following code is copied from displayAssociation() in the file: monitor_display.php echo <<Condition | Response | Node | State | Action |
$cond | "; echo "$resp | "; echo "$node | "; echo "$state | "; echo ""; if($state == "Active") { insertButtons(array('label'=>'DeActivate', 'id'=>'deactivate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"stop\")")); }else if($state == "Not active"){ insertButtons(array('label'=>'Activate', 'id'=>'activate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"start\")")); } echo " | "; echo "