CanZoom() ) { if ( $monitor->CanZoomCon() ) $cmds['ZoomRoot'] = 'zoomCon'; elseif ( $monitor->CanZoomRel() ) $cmds['ZoomRoot'] = 'zoomRel'; elseif ( $monitor->CanZoomAbs() ) $cmds['ZoomRoot'] = 'zoomAbs'; $cmds['ZoomTele'] = $cmds['ZoomRoot'].'Tele'; $cmds['ZoomWide'] = $cmds['ZoomRoot'].'Wide'; $cmds['ZoomStop'] = 'zoomStop'; $cmds['ZoomAuto'] = 'zoomAuto'; $cmds['ZoomMan'] = 'zoomMan'; } if ( $monitor->CanFocus() ) { if ( $monitor->CanFocusCon() ) $cmds['FocusRoot'] = 'focusCon'; elseif ( $monitor->CanFocusRel() ) $cmds['FocusRoot'] = 'focusRel'; elseif ( $monitor->CanFocusAbs() ) $cmds['FocusRoot'] = 'focusAbs'; $cmds['FocusFar'] = $cmds['FocusRoot'].'Far'; $cmds['FocusNear'] = $cmds['FocusRoot'].'Near'; $cmds['FocusStop'] = 'focusStop'; $cmds['FocusAuto'] = 'focusAuto'; $cmds['FocusMan'] = 'focusMan'; } if ( $monitor->CanIris() ) { if ( $monitor->CanIrisCon() ) $cmds['IrisRoot'] = 'irisCon'; elseif ( $monitor->CanIrisRel() ) $cmds['IrisRoot'] = 'irisRel'; elseif ( $monitor->CanIrisAbs() ) $cmds['IrisRoot'] = 'irisAbs'; $cmds['IrisOpen'] = $cmds['IrisRoot'].'Open'; $cmds['IrisClose'] = $cmds['IrisRoot'].'Close'; $cmds['IrisStop'] = 'irisStop'; $cmds['IrisAuto'] = 'irisAuto'; $cmds['IrisMan'] = 'irisMan'; } if ( $monitor->CanWhite() ) { if ( $monitor->CanWhiteCon() ) $cmds['WhiteRoot'] = 'whiteCon'; elseif ( $monitor->CanWhiteRel() ) $cmds['WhiteRoot'] = 'whiteRel'; elseif ( $monitor->CanWhiteAbs() ) $cmds['WhiteRoot'] = 'whiteAbs'; $cmds['WhiteIn'] = $cmds['WhiteRoot'].'In'; $cmds['WhiteOut'] = $cmds['WhiteRoot'].'Out'; $cmds['WhiteAuto'] = 'whiteAuto'; $cmds['WhiteMan'] = 'whiteMan'; } if ( $monitor->CanGain() ) { if ( $monitor->CanGainCon() ) $cmds['GainRoot'] = 'gainCon'; elseif ( $monitor->CanGainRel() ) $cmds['GainRoot'] = 'gainRel'; elseif ( $monitor->CanGainAbs() ) $cmds['GainRoot'] = 'gainAbs'; $cmds['GainUp'] = $cmds['GainRoot'].'Up'; $cmds['GainDown'] = $cmds['GainRoot'].'Down'; $cmds['GainAuto'] = 'gainAuto'; $cmds['GainMan'] = 'gainMan'; } if ( $monitor->CanMove() ) { if ( $monitor->CanMoveCon() ) { $cmds['MoveRoot'] = 'moveCon'; $cmds['Center'] = 'moveStop'; } elseif ( $monitor->CanMoveRel() ) { $cmds['MoveRoot'] = 'moveRel'; $cmds['Center'] = $cmds['PresetHome']; } elseif ( $monitor->CanMoveAbs() ) { $cmds['MoveRoot'] = 'moveAbs'; $cmds['Center'] = $cmds['PresetHome']; } else { $cmds['MoveRoot'] = ''; } $cmds['MoveUp'] = $cmds['MoveRoot'].'Up'; $cmds['MoveDown'] = $cmds['MoveRoot'].'Down'; $cmds['MoveLeft'] = $cmds['MoveRoot'].'Left'; $cmds['MoveRight'] = $cmds['MoveRoot'].'Right'; $cmds['MoveUpLeft'] = $cmds['MoveRoot'].'UpLeft'; $cmds['MoveUpRight'] = $cmds['MoveRoot'].'UpRight'; $cmds['MoveDownLeft'] = $cmds['MoveRoot'].'DownLeft'; $cmds['MoveDownRight'] = $cmds['MoveRoot'].'DownRight'; } return( $cmds ); } function controlFocus( $monitor, $cmds ) { ob_start(); ?>
CanAutoFocus() ) { ?>
CanAutoZoom() ) { ?>
CanAutoIris() ) { ?>
CanAutoWhite() ) { ?>
CanPan(); $hasTilt = $monitor->CanTilt(); $hasDiag = $hasPan && $hasTilt && $monitor->CanMoveDiag(); ?>
Id() ) ) as $row ) { $labels[$row['Preset']] = $row['Label']; } $presetBreak = (int)(($monitor->NumPresets()+1)/((int)(($monitor->NumPresets()-1)/MAX_PRESETS)+1)); ob_start(); ?>
NumPresets(); $i++ ) { ?>
HasHomePreset() ) { ?>
CanWake() ) { ?> CanSleep() ) { ?> CanReset() ) { ?>
CanFocus() ) echo controlFocus($monitor, $cmds); if ( $monitor->CanZoom() ) echo controlZoom($monitor, $cmds); if ( $monitor->CanIris() ) echo controlIris($monitor, $cmds); if ( $monitor->CanWhite() ) echo controlWhite($monitor, $cmds); if ( $monitor->CanMove() ) { ?>
CanWake() || $monitor->CanSleep() || $monitor->CanReset() ) echo controlPower($monitor, $cmds); if ( $monitor->HasPresets() ) echo controlPresets($monitor, $cmds); ?>