google code style
parent
09aa3afaac
commit
6bbd4f1083
|
@ -1,40 +1,28 @@
|
|||
<?php
|
||||
define( "MSG_TIMEOUT", 2.0 );
|
||||
define( "MSG_DATA_SIZE", 4+256 );
|
||||
define("MSG_TIMEOUT", 2.0);
|
||||
define("MSG_DATA_SIZE", 4+256);
|
||||
|
||||
if ( canEdit( 'Monitors' ) )
|
||||
{
|
||||
$zmuCommand = getZmuCommand( " -m ".validInt($_REQUEST['id']) );
|
||||
if ( canEdit('Monitors') ) {
|
||||
$zmuCommand = getZmuCommand(' -m '.validInt($_REQUEST['id']));
|
||||
|
||||
switch ( validJsStr($_REQUEST['command']) )
|
||||
{
|
||||
case "disableAlarms" :
|
||||
{
|
||||
$zmuCommand .= " -n";
|
||||
switch ( validJsStr($_REQUEST['command']) ) {
|
||||
case 'disableAlarms' :
|
||||
$zmuCommand .= ' -n';
|
||||
break;
|
||||
}
|
||||
case "enableAlarms" :
|
||||
{
|
||||
$zmuCommand .= " -c";
|
||||
case 'enableAlarms' :
|
||||
$zmuCommand .= ' -c';
|
||||
break;
|
||||
}
|
||||
case "forceAlarm" :
|
||||
{
|
||||
$zmuCommand .= " -a";
|
||||
case 'forceAlarm' :
|
||||
$zmuCommand .= ' -a';
|
||||
break;
|
||||
}
|
||||
case "cancelForcedAlarm" :
|
||||
{
|
||||
$zmuCommand .= " -c";
|
||||
case 'cancelForcedAlarm' :
|
||||
$zmuCommand .= ' -c';
|
||||
break;
|
||||
}
|
||||
default :
|
||||
{
|
||||
ajaxError( "Unexpected command '".validJsStr($_REQUEST['command'])."'" );
|
||||
}
|
||||
ajaxError("Unexpected command '".validJsStr($_REQUEST['command'])."'");
|
||||
}
|
||||
ajaxResponse( exec( escapeshellcmd( $zmuCommand ) ) );
|
||||
ajaxResponse(exec(escapeshellcmd($zmuCommand)));
|
||||
} else {
|
||||
ajaxError( 'Insufficient permissions' );
|
||||
ajaxError('Insufficient permissions');
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue