// var winW = =intval($CUser->Data['width']);?>; var winH = =intval($CUser->Data['height']);?>; var initView = =intval($CUser->Data['last_content_view']);?>; var PanelW = winW; var PanelH = winH-90; var SelectedSite = =$SiteID;?>; var SettingsLidar3D = null; var SelectedNodeID = 0; var StatusTS = -1; var LoadTS = =time();?>; var SoundEnable = =intval($CUser->Data['sound_enable']);?>; var nodeDashboardStatuses = new Array(); var nodeTHREEviewers = new Array(); var nodeTHREEanimationId = 0; var sndBeep = new Howl({ src: [ '/style/assets/audio/beep-07a.mp3', '/style/assets/audio/beep-07a.wav' ], loop: false, volume: 0.99, onend: function() { //console.log('Finished!'); } }); var sndExcl = new Howl({ src: [ '/style/assets/audio/button-42.mp3', '/style/assets/audio/button-42.wav' ], loop: false, volume: 0.99 }); function playSound( t ){ if( SoundEnable ){ switch( t ){ case 1:{ sndBeep.play(); break; }; default:{ sndExcl.play(); }; }; }; }; function doRefresh(){ window.location="/?t="+123; }; function doLogout(){ window.location = '/login.php?UID=1'; }; function failureAJAXFunction( responce, opts ){ if( tlInterval!= null ){ window.clearInterval( tlInterval ); tlInterval = null; }; playSound(); Ext.Msg.show({ title:'=$Labels->GetLabel('_REQ_FAILURE_');?>', msg: '=$Labels->GetLabel('_AJX_REQFAILURE_');?>', buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); doLogout(); }; function updateUserScreenResolution( x, y ){ Ext.Ajax.request({ url: '/lib/controller/updateUserSettings.php', params: { UID: =$UserID;?>, SID: '=$Session;?>', SSS: 15, WID: x, HEI: y }, success: function( response, opts ){ doRefresh(); }, failure: failureAJAXFunction }); }; function setUserContent( c_id ){ Ext.Ajax.request({ url: '/lib/controller/updateUserSettings.php', params: { UID: =$UserID;?>, SID: '=$Session;?>', SSS: 26, CID: c_id }, failure: failureAJAXFunction }); }; var gSessionValidatorInterval = null; function sessionValidator(){ Ext.Ajax.request({ url: '/lib/controller/updateUserSssion.php', params: { UID: =$UserID;?>, SID: '=$Session;?>' }, success: function( response, opts ){ var data = Ext.decode(response.responseText); if( !data.sessionIsValid ){ playSound(); Ext.Msg.show({ title:'=$Labels->GetLabel('_REQ_FAILURE_');?>', msg: '=$Labels->GetLabel('_AJX_REQFAILURE_');?>', buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); doLogout(); }; }, failure: failureAJAXFunction }); }; function doCheckWindowSize(){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW2 = window.innerWidth; winH2 = window.innerHeight; if ( winH2<700 ) winH2=700; }; if (navigator.appName.indexOf("Microsoft")!=-1) { winW2 = document.body.offsetWidth; winH2 = document.body.offsetHeight; if ( winH2<700 ) winH2=700; }; }; if ( winW2 != winW || winH2!=winH ){ updateUserScreenResolution( winW2, winH2 ); }; }; var NotificationStack = null; Ext.onReady(function(){ doCheckWindowSize(); gSessionValidatorInterval = window.setInterval( sessionValidator, 1000 ); NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25}); //window.onresize = doCheckWindowSize; Ext.QuickTips.init(); var viewport = new Ext.Viewport({ id: 'main_viewport', layout:'border', items: [{ xtype: 'panel', region: 'north', baseCls: 'x-plain', height: 50, items:[{ xtype: 'panel', id:'top', baseCls: 'x-plain', html: '
=$Labels->GetLabel('_APP_TITLE_');?>
Panel content!
' } Data['access'] > 5 ){ ?>,{ title: '=$Labels->GetLabel('_ADM_SETTINGS_');?>', items:[{ xtype: 'button', width: '100%', id:'adm_acc', text: '=$Labels->GetLabel('_USERS_MNGMT_');?>', handler: function( b, e ){ loadUserEditor(); } },{ xtype: 'button', width: '100%', id:'adm_acclog', text: '=$Labels->GetLabel('_ACC_LOG_');?>', handler: function( b, e ){ loadAccessLog(); } },{ xtype: 'button', width: '100%', id:'adm_servlog', text: '=$Labels->GetLabel('_SERV_LOG_');?>', handler: function( b, e ){ loadServerLog(); } }] } ] },{ xtype: 'panel', region:'center', margins: '5 5 5 0', id: 'main_content', title: '=$Labels->GetLabel('_SYS_DASHBOARD_');?>', items:[{ xtype: 'portal', id: 'main_portal', frame: false, border: false, items:{ html: '' }, listeners:{ drop: function( a ){ updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position ); } } }] }] }); switch( =intval($CUser->Data['last_content_view']);?> ){ case 0: loadDashBoard(); break; case 1: loadMonitoring(); break; case 2: loadArchive(); break; case 3: loadSystemEditor(); break; case 4: loadLocationEditor(); break; case 5: loadUpgradeManagmenet(); break; default: loadDashBoard(); }; });