Files
zoneminder/web/ajax/alarm.php
Isaac Connor 8dd8888975 Php namespace (#2537)
* experiment with namespaces on the Server class

* experiment with namespaces on the Server class

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00

29 lines
770 B
PHP

<?php
define('MSG_TIMEOUT', 2.0);
define('MSG_DATA_SIZE', 4+256);
if ( canEdit('Monitors') ) {
$zmuCommand = getZmuCommand(' -m '.validInt($_REQUEST['id']));
switch ( validJsStr($_REQUEST['command']) ) {
case 'disableAlarms' :
$zmuCommand .= ' -n';
break;
case 'enableAlarms' :
$zmuCommand .= ' -c';
break;
case 'forceAlarm' :
$zmuCommand .= ' -a';
break;
case 'cancelForcedAlarm' :
$zmuCommand .= ' -c';
break;
default :
ajaxError("Unexpected command '".validJsStr($_REQUEST['command'])."'");
}
ajaxResponse(exec(escapeshellcmd($zmuCommand)));
} else {
ajaxError('Insufficient permissions');
}
?>