2014-12-05 07:44:23 +08:00
|
|
|
var consoleRefreshTimeout = <?php echo 1000*ZM_WEB_REFRESH_MAIN ?>;
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
<?php
|
2020-04-04 23:52:40 +08:00
|
|
|
if ( canEdit('System') ) {
|
|
|
|
if ( ZM_CHECK_FOR_UPDATES && ZM_DYN_LAST_VERSION && ( verNum(ZM_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( verNum(ZM_DYN_CURR_VERSION) < verNum(ZM_DYN_LAST_VERSION) ) && ( ZM_DYN_NEXT_REMINDER < time() ) ) {
|
|
|
|
$showVersionPopup = true;
|
|
|
|
$nextReminder = time() + 60*60;
|
|
|
|
// limit popups to one per hour instead of on every console refresh.
|
|
|
|
dbQuery("UPDATE Config SET Value = '".$nextReminder."' WHERE Name = 'ZM_DYN_NEXT_REMINDER'");
|
|
|
|
|
|
|
|
} else if ( ZM_DYN_SHOW_DONATE_REMINDER ) {
|
2017-05-19 01:50:56 +08:00
|
|
|
if ( ZM_DYN_DONATE_REMINDER_TIME > 0 ) {
|
|
|
|
if ( ZM_DYN_DONATE_REMINDER_TIME < time() ) {
|
|
|
|
$showDonatePopup = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$nextReminder = time() + 30*24*60*60;
|
2020-04-04 23:52:40 +08:00
|
|
|
dbQuery("UPDATE Config SET Value = '".$nextReminder."' WHERE Name = 'ZM_DYN_DONATE_REMINDER_TIME'");
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
2017-05-19 01:50:56 +08:00
|
|
|
}
|
2020-04-04 23:52:40 +08:00
|
|
|
} // end if canEdit('System')
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>;
|
|
|
|
var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>;
|
2020-09-04 06:25:00 +08:00
|
|
|
var monitors = new Array();
|
|
|
|
<?php
|
|
|
|
global $monitors;
|
|
|
|
foreach ( $monitors as $monitor ) {
|
|
|
|
?>
|
|
|
|
monitors[<?php echo $monitor->Id() ?>] = {
|
|
|
|
'Id': <?php echo $monitor->Id() ?>,
|
|
|
|
'Name': '<?php echo $monitor->Name() ?>',
|
|
|
|
'ViewWidth': <?php echo $monitor->ViewWidth() ?>,
|
|
|
|
'ViewHeight':<?php echo $monitor->ViewHeight() ?>,
|
|
|
|
'Url': '<?php echo $monitor->UrlToIndex( ZM_MIN_STREAMING_PORT ? ($monitor->Id() + ZM_MIN_STREAMING_PORT) : '') ?>',
|
|
|
|
'Type': '<?php echo $monitor->Type() ?>',
|
|
|
|
'Function': '<?php echo $monitor->Function() ?>',
|
|
|
|
'Enabled': '<?php echo $monitor->Enabled() ?>'
|
|
|
|
};
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|