google code style

pull/2101/head
Isaac Connor 2018-06-25 14:51:46 -04:00
parent 09aa3afaac
commit 6bbd4f1083
1 changed files with 16 additions and 28 deletions

View File

@ -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');
}
?>