fix global language problems

This commit is contained in:
Isaac Connor 2016-05-06 14:58:41 -04:00
parent 956b971719
commit ed5cb2f3ed
1 changed files with 31 additions and 34 deletions

View File

@ -140,49 +140,46 @@ function xhtmlHeaders( $file, $title )
function getNavBarHTML() { function getNavBarHTML() {
$group = NULL; $group = NULL;
if ( ! empty($_COOKIE['zmGroup']) ) { if ( ! empty($_COOKIE['zmGroup']) ) {
if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) ) if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) )
$groupIds = array_flip(explode( ',', $group['MonitorIds'] )); $groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
} }
$maxWidth = 0; $maxWidth = 0;
$maxHeight = 0; $maxHeight = 0;
# Used to determine if the Cycle button should be made available # Used to determine if the Cycle button should be made available
$cycleCount = 0; $cycleCount = 0;
$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" ); $monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
$displayMonitors = array(); $displayMonitors = array();
for ( $i = 0; $i < count($monitors); $i++ ) for ( $i = 0; $i < count($monitors); $i++ ) {
{ if ( !visibleMonitor( $monitors[$i]['Id'] ) ) {
if ( !visibleMonitor( $monitors[$i]['Id'] ) ) continue;
{
continue;
} }
if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) {
{ continue;
continue;
} }
if ( $monitors[$i]['Function'] != 'None' ) if ( $monitors[$i]['Function'] != 'None' ) {
{ $cycleCount++;
$cycleCount++; $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
$scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
$scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth; if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
} }
$displayMonitors[] = $monitors[$i]; $displayMonitors[] = $monitors[$i];
} }
$cycleWidth = $maxWidth; $cycleWidth = $maxWidth;
$cycleHeight = $maxHeight; $cycleHeight = $maxHeight;
$eventsView = ZM_WEB_EVENTS_VIEW; $eventsView = ZM_WEB_EVENTS_VIEW;
$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW); $eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':'';
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':''; ob_start();
global $CLANG;
ob_start(); global $VLANG;
?> ?>
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">