Added rate and scale.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@656 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-10-16 09:02:07 +00:00
parent 44cf2fc964
commit cc0c6666e6
1 changed files with 10 additions and 5 deletions

View File

@ -29,6 +29,8 @@
if ( !isset( $rate ) ) if ( !isset( $rate ) )
$rate = 1; $rate = 1;
if ( !isset( $scale ) )
$scale = 1;
?> ?>
<html> <html>
<head> <head>
@ -78,6 +80,7 @@ function newWindow(Url,Name,Width,Height)
<input type="hidden" name="eid" value="<?= $eid ?>"> <input type="hidden" name="eid" value="<?= $eid ?>">
<input type="text" size="16" name="event_name" value="<?= $event[Name] ?>" class="form"> <input type="text" size="16" name="event_name" value="<?= $event[Name] ?>" class="form">
<input type="submit" value="Rename" class="form"<?php if ( !canEdit( 'Events' ) ) { ?> disabled<?php } ?>></form></td> <input type="submit" value="Rename" class="form"<?php if ( !canEdit( 'Events' ) ) { ?> disabled<?php } ?>></form></td>
<?php if ( 0 ) { ?>
<td colspan="2" align="right" class="text"> <td colspan="2" align="right" class="text">
<form name="learn_form" method="get" action="<?= $PHP_SELF ?>"> <form name="learn_form" method="get" action="<?= $PHP_SELF ?>">
<input type="hidden" name="view" value="<?= $view ?>"> <input type="hidden" name="view" value="<?= $view ?>">
@ -89,13 +92,15 @@ function newWindow(Url,Name,Width,Height)
Learn Pref:&nbsp;<select name="learn_state" class="form" onChange="learn_form.submit();"><option value=""<?php if ( !$event[LearnState] ) echo " selected" ?>>Ignore</option><option value="-"<?php if ( $event[LearnState]=='-' ) echo " selected" ?>>Exclude</option><option value="+"<?php if ( $event[LearnState]=='+' ) echo " selected" ?>>Include</option></select> Learn Pref:&nbsp;<select name="learn_state" class="form" onChange="learn_form.submit();"><option value=""<?php if ( !$event[LearnState] ) echo " selected" ?>>Ignore</option><option value="-"<?php if ( $event[LearnState]=='-' ) echo " selected" ?>>Exclude</option><option value="+"<?php if ( $event[LearnState]=='+' ) echo " selected" ?>>Include</option></select>
<?php } ?> <?php } ?>
</form></td> </form></td>
<td colspan="1" align="right" class="text"> <?php } ?>
<td colspan="3" align="right" class="text">
<form name="rate_form" method="get" action="<?= $PHP_SELF ?>"> <form name="rate_form" method="get" action="<?= $PHP_SELF ?>">
<input type="hidden" name="view" value="<?= $view ?>"> <input type="hidden" name="view" value="<?= $view ?>">
<input type="hidden" name="action" value="rename"> <input type="hidden" name="action" value="rename">
<input type="hidden" name="mid" value="<?= $mid ?>"> <input type="hidden" name="mid" value="<?= $mid ?>">
<input type="hidden" name="eid" value="<?= $eid ?>"> <input type="hidden" name="eid" value="<?= $eid ?>">
<?php buildSelect( "rate", $rates, "document.rate_form.submit();" ); ?> Rate: <?php buildSelect( "rate", $rates, "document.rate_form.submit();" ); ?>&nbsp;&nbsp;
Scale: <?php buildSelect( "scale", $scales, "document.rate_form.submit();" ); ?>
</form> </form>
</td> </td>
</tr> </tr>
@ -124,17 +129,17 @@ Learn Pref:&nbsp;<select name="learn_state" class="form" onChange="learn_form.su
<?php <?php
if ( $mode == "stream" ) if ( $mode == "stream" )
{ {
$stream_src = ZM_PATH_ZMS."?path=".ZM_PATH_WEB."&event=$eid&rate=$rate"; $stream_src = ZM_PATH_ZMS."?path=".ZM_PATH_WEB."&event=$eid&rate=$rate&scale=$scale";
if ( isNetscape() ) if ( isNetscape() )
{ {
?> ?>
<tr><td colspan="6" align="center"><img src="<?= $stream_src ?>" border="0" width="<?= $event[Width] ?>" height="<?= $event[Height] ?>"></td></tr> <tr><td colspan="6" align="center" valign="middle"><img src="<?= $stream_src ?>" border="0" width="<?= ($scale>=1)?($event[Width]*$scale):($event[Width]/abs($scale)) ?>" height="<?= ($scale>=1)?($event[Height]*$scale):($event[Height]/abs($scale)) ?>"></td></tr>
<?php <?php
} }
else else
{ {
?> ?>
<tr><td colspan="6" align="center"><applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= $event[Width] ?>" height="<?= $event[Height] ?>"><param name="url" value="<?= $stream_src ?>"></applet></td></tr> <tr><td colspan="6" align="center" valign="middle"><applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= ($scale>=1)?($event[Width]*$scale):($event[Width]/abs($scale)) ?>" height="<?= ($scale>=1)?($event[Height]*$scale):($event[Height]/abs($scale)) ?>"><param name="url" value="<?= $stream_src ?>"></applet></td></tr>
<?php <?php
} }
} }