2009-08-18 03:11:36 +00:00
|
|
|
<?php
|
|
|
|
|
2009-12-11 02:58:43 +00:00
|
|
|
// For RMC Event control;
|
|
|
|
// use "startcondresp" and "stopcondresp" commands to activate/deactivate the specified condition&response;
|
|
|
|
// the file "updateCondRespTable.php" is used to update the contents in the table of "association".
|
|
|
|
|
|
|
|
|
2009-09-01 20:25:18 +00:00
|
|
|
if(!isset($TOPDIR)) { $TOPDIR="..";}
|
2009-08-18 03:11:36 +00:00
|
|
|
|
|
|
|
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'] . '"';
|
2009-12-11 02:58:43 +00:00
|
|
|
$node = $_REQUEST['n'];
|
2009-08-18 03:11:36 +00:00
|
|
|
$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 "<p class=Error>",implode(' ', $errors), "</p>";
|
|
|
|
exit;
|
|
|
|
}
|
2009-12-11 02:58:43 +00:00
|
|
|
else {
|
|
|
|
echo "successful";
|
2009-08-18 03:11:36 +00:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
?>
|