예제 #1
0
function ptzControls($monitor)
{
    $cmds = getControlCommands($monitor);
    ob_start();
    ?>
        <div class="controlsPanel">
<?php 
    if ($monitor['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'] || ($monitor['CanWake'] || $monitor['CanSleep'] || $monitor['CanReset'])) {
        ?>
          <div class="pantiltPanel">
<?php 
        if ($monitor['CanMove']) {
            echo controlPanTilt($monitor, $cmds);
        }
        if ($monitor['CanWake'] || $monitor['CanSleep'] || $monitor['CanReset']) {
            echo controlPower($monitor, $cmds);
        }
        ?>
          </div>
<?php 
    }
    ?>
        </div>
<?php 
    if ($monitor['HasPresets']) {
        echo controlPresets($monitor, $cmds);
    }
    return ob_get_clean();
}
function ptzControls($monitor)
{
    $cmds = getControlCommands($monitor);
    if ($monitor['HasPresets']) {
        echo controlPresets($monitor, $cmds);
    }
    return ob_get_clean();
}