2020-08-05 05:05:58 +08:00
|
|
|
<?php
|
|
|
|
global $monIdx;
|
|
|
|
global $nextMid;
|
|
|
|
global $options;
|
|
|
|
global $monitors;
|
|
|
|
?>
|
2019-03-05 02:35:40 +08:00
|
|
|
var monIdx = '<?php echo $monIdx; ?>';
|
2014-12-05 07:44:23 +08:00
|
|
|
var nextMid = "<?php echo isset($nextMid)?$nextMid:'' ?>";
|
2019-03-05 02:35:40 +08:00
|
|
|
var mode = "<?php echo $options['mode'] ?>";
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2014-12-05 07:44:23 +08:00
|
|
|
var cycleRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_CYCLE ?>;
|
2019-03-05 02:35:40 +08:00
|
|
|
var monitorData = new Array();
|
|
|
|
<?php
|
|
|
|
foreach ( $monitors as $monitor ) {
|
|
|
|
?>
|
|
|
|
monitorData[monitorData.length] = {
|
|
|
|
'id': <?php echo $monitor->Id() ?>,
|
2019-11-23 01:18:30 +08:00
|
|
|
'width': <?php echo $monitor->ViewWidth() ?>,
|
|
|
|
'height':<?php echo $monitor->ViewHeight() ?>,
|
2019-03-05 02:35:40 +08:00
|
|
|
'url': '<?php echo $monitor->UrlToIndex() ?>',
|
2020-10-13 01:37:23 +08:00
|
|
|
'onclick': function(){window.location.assign( '?view=watch&mid=<?php echo $monitor->Id() ?>' );},
|
2019-03-05 02:35:40 +08:00
|
|
|
'type': '<?php echo $monitor->Type() ?>',
|
2022-01-13 12:46:26 +08:00
|
|
|
'refresh': '<?php echo $monitor->Refresh() ?>',
|
|
|
|
'janusEnabled': <?php echo $monitor->JanusEnabled() ?>
|
2019-03-05 02:35:40 +08:00
|
|
|
};
|
|
|
|
<?php
|
|
|
|
} // end foreach monitor
|
|
|
|
?>
|
|
|
|
|
|
|
|
var SCALE_BASE = <?php echo SCALE_BASE ?>;
|