spaces/quotes
parent
84fd80b242
commit
81c2216eb6
|
@ -1,18 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) ) {
|
if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) ) {
|
||||||
ajaxError( "No event id(s) supplied" );
|
ajaxError( 'No event id(s) supplied' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( canView( 'Events' ) ) {
|
if ( canView( 'Events' ) ) {
|
||||||
switch ( $_REQUEST['action'] ) {
|
switch ( $_REQUEST['action'] ) {
|
||||||
case 'video' : {
|
case 'video' :
|
||||||
|
{
|
||||||
if ( empty($_REQUEST['videoFormat']) ) {
|
if ( empty($_REQUEST['videoFormat']) ) {
|
||||||
ajaxError( "Video Generation Failure, no format given" );
|
ajaxError( 'Video Generation Failure, no format given' );
|
||||||
} elseif ( empty($_REQUEST['rate']) ) {
|
} elseif ( empty($_REQUEST['rate']) ) {
|
||||||
ajaxError( "Video Generation Failure, no rate given" );
|
ajaxError( 'Video Generation Failure, no rate given' );
|
||||||
} elseif ( empty($_REQUEST['scale']) ) {
|
} elseif ( empty($_REQUEST['scale']) ) {
|
||||||
ajaxError( "Video Generation Failure, no scale given" );
|
ajaxError( 'Video Generation Failure, no scale given' );
|
||||||
} else {
|
} else {
|
||||||
$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'.monitorLimitSql();
|
$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'.monitorLimitSql();
|
||||||
if ( !($event = dbFetchOne( $sql, NULL, array( $_REQUEST['id'] ) )) )
|
if ( !($event = dbFetchOne( $sql, NULL, array( $_REQUEST['id'] ) )) )
|
||||||
|
@ -33,7 +34,7 @@ if ( canView( 'Events' ) ) {
|
||||||
ajaxResponse();
|
ajaxResponse();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "export" :
|
case 'export' :
|
||||||
{
|
{
|
||||||
require_once( ZM_SKIN_PATH.'/includes/export_functions.php' );
|
require_once( ZM_SKIN_PATH.'/includes/export_functions.php' );
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ if ( canView( 'Events' ) ) {
|
||||||
if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
|
if ( $exportFile = exportEvents( $exportIds, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc, $exportFormat ) )
|
||||||
ajaxResponse( array( 'exportFile'=>$exportFile ) );
|
ajaxResponse( array( 'exportFile'=>$exportFile ) );
|
||||||
else
|
else
|
||||||
ajaxError( "Export Failed" );
|
ajaxError( 'Export Failed' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +98,7 @@ if ( canEdit( 'Events' ) ) {
|
||||||
case 'archive' :
|
case 'archive' :
|
||||||
case 'unarchive' :
|
case 'unarchive' :
|
||||||
{
|
{
|
||||||
$archiveVal = ($_REQUEST['action'] == "archive")?1:0;
|
$archiveVal = ($_REQUEST['action'] == 'archive')?1:0;
|
||||||
dbQuery( 'UPDATE Events SET Archived = ? WHERE Id = ?', array( $archiveVal, $_REQUEST['id']) );
|
dbQuery( 'UPDATE Events SET Archived = ? WHERE Id = ?', array( $archiveVal, $_REQUEST['id']) );
|
||||||
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>false ) );
|
ajaxResponse( array( 'refreshEvent'=>true, 'refreshParent'=>false ) );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue