Add globals
This commit is contained in:
parent
dd627d9234
commit
1ab828c110
|
@ -28,6 +28,7 @@ var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||||
|
|
||||||
var monitorData = new Array();
|
var monitorData = new Array();
|
||||||
<?php
|
<?php
|
||||||
|
global $monitors;
|
||||||
foreach ( $monitors as $monitor ) {
|
foreach ( $monitors as $monitor ) {
|
||||||
?>
|
?>
|
||||||
monitorData[monitorData.length] = {
|
monitorData[monitorData.length] = {
|
||||||
|
@ -46,6 +47,7 @@ monitorData[monitorData.length] = {
|
||||||
layouts = new Array();
|
layouts = new Array();
|
||||||
layouts[0] = {}; // reserved, should hold which fields to clear when transitioning
|
layouts[0] = {}; // reserved, should hold which fields to clear when transitioning
|
||||||
<?php
|
<?php
|
||||||
|
global $layouts;
|
||||||
foreach ( $layouts as $layout ) {
|
foreach ( $layouts as $layout ) {
|
||||||
?>
|
?>
|
||||||
layouts[<?php echo $layout->Id() ?>] = {"Name":"<?php echo $layout->Name()?>","Positions":<?php echo $layout->Positions() ?>};
|
layouts[<?php echo $layout->Id() ?>] = {"Name":"<?php echo $layout->Name()?>","Positions":<?php echo $layout->Positions() ?>};
|
||||||
|
|
|
@ -4,6 +4,18 @@ $TimeZone = new DateTimeZone( ini_get('date.timezone') );
|
||||||
$now = new DateTime('now', $TimeZone);
|
$now = new DateTime('now', $TimeZone);
|
||||||
$offset = $TimeZone->getOffset($now);
|
$offset = $TimeZone->getOffset($now);
|
||||||
echo $offset.'; // '.floor($offset / 3600).' hours ';
|
echo $offset.'; // '.floor($offset / 3600).' hours ';
|
||||||
|
|
||||||
|
global $defaultScale;
|
||||||
|
global $liveMode;
|
||||||
|
global $fitMode;
|
||||||
|
global $speeds;
|
||||||
|
global $speedIndex;
|
||||||
|
global $initialDisplayInterval;
|
||||||
|
global $minTimeSecs;
|
||||||
|
global $maxTimeSecs;
|
||||||
|
global $minTime;
|
||||||
|
global $maxTime;
|
||||||
|
global $monitors;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
var currentScale=<?php echo $defaultScale?>;
|
var currentScale=<?php echo $defaultScale?>;
|
||||||
|
@ -146,7 +158,6 @@ foreach ( ZM\Server::find() as $Server ) {
|
||||||
echo 'Servers[' . $Server->Id() . '] = new Server(' . $Server->to_json(). ");\n";
|
echo 'Servers[' . $Server->Id() . '] = new Server(' . $Server->to_json(). ");\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
var monitorName = [];
|
var monitorName = [];
|
||||||
var monitorLoading = [];
|
var monitorLoading = [];
|
||||||
|
|
Loading…
Reference in New Issue