translate('auto'), '100%' => '100%', '160px' => '160px', '320px' => '320px', '352px' => '352px', '640px' => '640px', '1280px' => '1280px', '1920px' => '1920px' ); $heights = array( 'auto' => translate('auto'), '240px' => '240px', '480px' => '480px', '720px' => '720px', '1080px' => '1080px', ); session_start(); if ( isset($_REQUEST['scale']) ) { $options['scale'] = validInt($_REQUEST['scale']); ZM\Logger::Debug('Setting scale from request to '.$options['scale']); } else if ( isset($_COOKIE['zmCycleScale']) ) { $options['scale'] = $_COOKIE['zmCycleScale']; ZM\Logger::Debug('Setting scale from cookie to '.$options['scale']); } if ( !(isset($options['scale']) and $options['scale']) ) $options['scale'] = 100; if ( isset($_COOKIE['zmCycleWidth']) and $_COOKIE['zmCycleWidth'] ) { $_SESSION['zmCycleWidth'] = $options['width'] = $_COOKIE['zmCycleWidth']; #} elseif ( isset($_SESSION['zmCycleWidth']) and $_SESSION['zmCycleWidth'] ) { #$options['width'] = $_SESSION['zmCycleWidth']; } else $options['width'] = ''; if ( isset($_COOKIE['zmCycleHeight']) and $_COOKIE['zmCycleHeight'] ) $_SESSION['zmCycleHeight'] = $options['height'] = $_COOKIE['zmCycleHeight']; #else if ( isset($_SESSION['zmCycleHeight']) and $_SESSION['zmCycleHeight'] ) #$options['height'] = $_SESSION['zmCycleHeight']; else $options['height'] = ''; session_write_close(); $monIdx = 0; $monitors = array(); $monitor = NULL; foreach( $displayMonitors as &$row ) { if ( $row['Function'] == 'None' ) continue; if ( isset($_REQUEST['mid']) && ($row['Id'] == $_REQUEST['mid']) ) $monIdx = count($monitors); $row['ScaledWidth'] = reScale($row['Width'], $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE); $row['ScaledHeight'] = reScale($row['Height'], $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE); $row['PopupScale'] = reScale(SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE); if ( !isset($widths[$row['Width'].'px']) ) { $widths[$row['Width'].'px'] = $row['Width'].'px'; } if ( ! isset($heights[$row['Height'].'px']) ) { $heights[$row['Height'].'px'] = $row['Height'].'px'; } $row['connKey'] = generateConnKey(); $monitors[] = new ZM\Monitor($row); unset($row); } # end foreach Monitor if ( $monitors ) { $monitor = $monitors[$monIdx]; $nextMid = $monIdx==(count($monitors)-1)?$monitors[0]->Id():$monitors[$monIdx+1]->Id(); } ZM\Logger::Debug(print_r($options,true)); noCacheHeaders(); xhtmlHeaders(__FILE__, translate('CycleWatch')); ?>