Added mode to mkdir and quoted brightness SQL.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1270 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-01-31 12:08:49 +00:00
parent 9dc4db04d2
commit 79ade4ee4f
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ if ( isset($action) )
if ( !$result )
die( mysql_error() );
//$view = 'none';
mkdir( ZM_DIR_EVENTS."/".$mid );
mkdir( ZM_DIR_EVENTS."/".$mid, 0755 );
chdir( ZM_DIR_EVENTS );
symlink( $mid, $new_monitor['Name'] );
chdir( ".." );
@ -290,7 +290,7 @@ if ( isset($action) )
$zmu_command = getZmuCommand( "-m $mid -B$new_brightness -C$new_contrast -H$new_hue -O$new_colour" );
$zmu_output = exec( escapeshellcmd( $zmu_command ) );
list( $brightness, $contrast, $hue, $colour ) = split( ' ', $zmu_output );
$sql = "update Monitors set Brightness = $brightness, Contrast = $contrast, Hue = $hue, Colour = $colour where Id = '$mid'";
$sql = "update Monitors set Brightness = '$brightness', Contrast = '$contrast', Hue = '$hue', Colour = '$colour' where Id = '$mid'";
$result = mysql_query( $sql );
if ( !$result )
die( mysql_error() );