Browse Source

LA added Width Editor

master
Evgeny Gagua 2 years ago
parent
commit
e414b315e7
  1. 2
      lib/1.json
  2. 2
      lib/controller/dash/node_2.js
  3. 4
      lib/controller/downloadVideo.php
  4. 16
      lib/controller/getDashBoardItems.php
  5. 361
      lib/controller/getMetroBottomSensorEditor.php
  6. 359
      lib/controller/getMetroUpperSensorEditor.php
  7. 377
      lib/controller/getReportLayout.php
  8. 51
      lib/controller/getSensorDetectionEditor.php
  9. 9
      lib/controller/getSensorEditor.php
  10. 2
      lib/controller/report/node_2.js
  11. 4
      lib/controller/validateUserSession.php

2
lib/1.json
File diff suppressed because it is too large
View File

2
lib/controller/dash/node_2.js

@ -24,7 +24,7 @@
var W = p.getWidth();
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 1 ){
if( %%%APPTYPE%%% == 1 || %%%APPTYPE%%% == 4 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;

4
lib/controller/downloadVideo.php

@ -19,11 +19,11 @@
$FPS = intval( $_POST['FPS'] );
if( file_exists( $SRC ) ){
//$DST = '../tmp/' . md5_file( $SRC ) . '.mp4';
$DST = '../tmp/' . $MD5 . '.mp4';
$DST = '../tmp/' . $MD5 . '.avi';
//echo $SRC . "->" . $DST . "\n\n"; exit();
//$COM = "ffmpeg -hide_banner -loglevel error -y -r {$FPS} -i {$SRC} -pix_fmt yuvj420p -b:v 4000k -c:v libx264 {$DST} 2>&1";
$COM = "ffmpeg -hide_banner -loglevel error -y -r {$FPS} -i {$SRC} -vcodec copy {$DST} 2>&1";
$JUJA = `rm -f ../tmp/*`;
$JUJA = `rm -f ../tmp/*`;//*/
$JUJA = `$COM`;
if( file_exists( $DST ) ){
//header( 'location: /lib/tmp/' . $MD5 . '.mp4' );

16
lib/controller/getDashBoardItems.php

@ -576,11 +576,11 @@ _DATA_BOUNDARY;
break;
};
case 4:{
$STA[0]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .4, stylse:'padding:10px 0 10px 10px', items:[";
$STA[4]="{ columnWidth: .6, stylde:'padding:10px 0 10px 10px', items:[";
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[4]="{ columnWidth: 1, stylse:'padding:10px 0 10px 10px', items:[";
$idx = 0;
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
@ -666,12 +666,6 @@ _DATA_BOUNDARY;
} else break;
$idx++;
};
/*if( $idx < 2 ){
for( ;$idx<2;$idx++ ){
$T = str_replace( '%%ID%%', 1+$idx , $DUMMY['camera'] );
$OUT[]= $STA[3+$idx] . $T . $END;
};
};*/
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );

361
lib/controller/getMetroBottomSensorEditor.php

@ -6,6 +6,10 @@
$RZ = $DATABASE->Query( $QS, false );
$SOK = false;
$FOK = false;
$DD['dc_auto'] = 0;
$DD['dc_no'] = 0;
$DD['dc_window'] = 0;
$SI = 0;
if( count( $RZ ) ){
$FL = $RZ[0];
$FOK = true;
@ -19,18 +23,26 @@
$QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 AND `master`=1";
$JJR = $DATABASE->Query( $QS, false );
$SD = $JJR[0];
if( $SD['type'] == 1 ){
// Dual LRF Device (ALS)
$AD = $JJR[1];
$DUDU = true;
};
$DD['dc_auto'] = intval( $SD['dc_auto'] );
$DD['dc_no'] = intval( $SD['dc_no'] );
$DD['dc_window'] = intval( $SD['dc_window'] );
$SOK = true;
} else {
$MSG = 'Bottom Sensor is not defined in the Train Filter';
$MSG = 'Upper Sensor is not defined in the Train Filter';
};
} else {
$MSG = 'The Train Filter is not defined in the System';
};
$LILI=<<<lskdjflsdsdf
$LILI=<<<_DATA_BOUNDARY
,listeners:{
afterrender: function(){
Ext.Msg.show({
title: 'Information',
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$MSG}',
buttons: Ext.Msg.OK,
fn: function(){
@ -42,97 +54,262 @@
});
}
}
lskdjflsdsdf;
$TPL=<<<JOJOKA
{
xtype: 'panel',
id: 'up_se_popanel',
border: true,
title: 'Bottom Sensor Detection Settings',
frame: true,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH,
bbar:[{
text: 'Apply Detection Settings',
handler: function(){
var oder = Ext.getCmp('ups_order').getValue();
var oset = Ext.getCmp('ups_offset').getValue();
var odel = Ext.getCmp('ups_delta').getValue();
var ofli = Ext.getCmp('ups_flip').getValue();
var owid = Ext.getCmp('ups_width').getValue();
var osst = Ext.getCmp('ups_sst').getValue();
var osun = Ext.getCmp('ups_sun').getValue();
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: oset,
MORD: oder,
MDEL: odel,
MFLI: ofli,
MWIZ: owid,
MSST: osst,
MSUN: osun
},
success: function( response, opts ){
Ext.Msg.show({
title: 'Information',
msg: 'Settings are Saved',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
_DATA_BOUNDARY;
$SLRFDET=<<<_DATA_BOUNDARY
,{
xtype: 'panel',
id: 'up_sse_popanel',
border: true,
title: '{$Labels->GetLabel('_SLV_LRF_DET_SET_')}',
frame: false,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
items:[{
xtype: 'numberfield',
id: 's_order',
fieldLabel: 'Order',
value: '{$AD['order']}'
},{
xtype: 'numberfield',
id: 's_offset',
fieldLabel: 'Offset',
value: '{$AD['offset']}'
},{
xtype: 'numberfield',
id: 's_delta',
fieldLabel: 'Delta',
value: '{$AD['delta']}'
},{
xtype: 'numberfield',
id: 's_flip',
fieldLabel: 'Flip',
value: '{$AD['flip']}'
},{
xtype: 'numberfield',
id: 's_width',
fieldLabel: 'Width',
value: '{$AD['width']}'
},{
xtype: 'numberfield',
id: 's_sst',
fieldLabel: 'SST',
value: '{$AD['sst']}'
},{
xtype: 'numberfield',
id: 's_sun',
fieldLabel: 'Sun',
value: '{$AD['sun']}'
}]
}
_DATA_BOUNDARY;
$SLRFVARS=<<<_DATA_BOUNDARY
var soder = Ext.getCmp('s_order').getValue();
var soset = Ext.getCmp('s_offset').getValue();
var sodel = Ext.getCmp('s_delta').getValue();
var sofli = Ext.getCmp('s_flip').getValue();
var sowid = Ext.getCmp('s_width').getValue();
var sosst = Ext.getCmp('s_sst').getValue();
var sosun = Ext.getCmp('s_sun').getValue();
_DATA_BOUNDARY;
$SLRFDEFS=<<<_DATA_BOUNDARY
,
SOFF: soset,
SORD: soder,
SDEL: sodel,
SFLI: sofli,
SWIZ: sowid,
SSST: sosst,
SSUN: sosun
_DATA_BOUNDARY;
$TPL=<<<_DATA_BOUNDARY
{
xtype: 'tabpanel',
activeTab: 0,
frame: true,
border: true,
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
}
}],
items:[{
xtype: 'numberfield',
id: 'ups_order',
fieldLabel: 'Order',
value: '{$SD['order']}'
},{
xtype: 'numberfield',
id: 'ups_offset',
fieldLabel: 'Offset',
value: '{$SD['offset']}'
},{
xtype: 'numberfield',
id: 'ups_delta',
fieldLabel: 'Delta',
value: '{$SD['delta']}'
},{
xtype: 'numberfield',
id: 'ups_flip',
fieldLabel: 'Flip',
value: '{$SD['flip']}'
},{
xtype: 'numberfield',
id: 'ups_width',
fieldLabel: 'Width',
value: '{$SD['width']}'
},{
xtype: 'numberfield',
id: 'ups_sst',
fieldLabel: 'SST',
value: '{$SD['sst']}'
},{
xtype: 'numberfield',
id: 'ups_sun',
fieldLabel: 'Sun',
value: '{$SD['sun']}'
}]
%%%JUMPAPA%%%
},
failure: failureAJAXFunction
});
}
}],
items:[{
xtype: 'panel',
id: 'up_se_popanel',
border: true,
title: '{$Labels->GetLabel('_MAS_LRF_DET_SET_')}',
frame: false,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
items:[{
xtype: 'numberfield',
id: 'm_order',
fieldLabel: 'Order',
value: '{$SD['order']}'
},{
xtype: 'numberfield',
id: 'm_offset',
fieldLabel: 'Offset',
value: '{$SD['offset']}'
},{
xtype: 'numberfield',
id: 'm_delta',
fieldLabel: 'Delta',
value: '{$SD['delta']}'
},{
xtype: 'numberfield',
id: 'm_flip',
fieldLabel: 'Flip',
value: '{$SD['flip']}'
},{
xtype: 'numberfield',
id: 'm_width',
fieldLabel: 'Width',
value: '{$SD['width']}'
},{
xtype: 'numberfield',
id: 'm_sst',
fieldLabel: 'SST',
value: '{$SD['sst']}'
},{
xtype: 'numberfield',
id: 'm_sun',
fieldLabel: 'Sun',
value: '{$SD['sun']}'
}]
}%%%SLAVE_LRF_DET%%%,{
title: '{$Labels->GetLabel('_DET_SET_WIDTH_T_')}',
height: PanelH-42,
tbar:[{
text: '{$Labels->GetLabel('_EDIT_')}',
id: 'edit_btn_width_table',
disabled: true,
handler: editWidthTableRecord
}],
layout:'fit',
items:{
xtype: 'grid',
border: false,
frame: false,
autoScroll: true,
//width: '100%',
lazyRender: true,
//height: 210,
ds: targetWidthTable_store,
cm: new Ext.grid.ColumnModel( targetWidthTableColModel_ops ),
sm: new Ext.grid.RowSelectionModel( widthTableSelModel_ops ),
viewConfig: {
// forceFit: true
},
},
listeners:{
afterrender: function(){
loadWidthTable({$SI});
}
}
JOJOKA;
},{
title: '{$Labels->GetLabel('_DC_CONTROL_SET_')}',
height: PanelH-42,
labelWidth: 200,
labelAlign: 'right',
layout: 'form',
items:[{
xtype: 'checkbox',
id: 'dc_ena',
fieldLabel: '{$Labels->GetLabel('_DC_AUTO_ENA_')}',
checked: {$DD['dc_auto']},
listeners:{
check: function( a, c ){
if( c ){
doSensorOperation( {$SI}, 27, 1, true );
} else {
doSensorOperation( {$SI}, 27, 0, true );
};
}
}
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_DC_WORK_MODE_')}',
id: 'dc_mode',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,'{$Labels->GetLabel('_DC_WM_NC_')}'], [1,'{$Labels->GetLabel('_DC_WM_NO_')}']]
}),
value: {$DD['dc_no']},
valueField: 'sid',
displayField: 'snam',listeners:{
select: function( a, c, b ){
doSensorOperation( {$SI}, 28, b, true );
}
}
},{
xtype: 'numberfield',
id: 'dc_window',
fieldLabel: '{$Labels->GetLabel('_DC_TIME_WINDOW_')}',
value: {$DD['dc_window']},
listeners:{
change: function( a, c, b ){
doSensorOperation( {$SI}, 29, c, true );
}
}
}]
}]
%%%JUMPAPA%%%
}
_DATA_BOUNDARY;
if( $DUDU ){
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', $SLRFDET, $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', $SLRFVARS, $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', $SLRFDEFS, $TPL );
} else {
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', '', $TPL );
};
if( $FOK && $SOK ){
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL );
} else {

359
lib/controller/getMetroUpperSensorEditor.php

@ -6,6 +6,10 @@
$RZ = $DATABASE->Query( $QS, false );
$SOK = false;
$FOK = false;
$DD['dc_auto'] = 0;
$DD['dc_no'] = 0;
$DD['dc_window'] = 0;
$SI = 0;
if( count( $RZ ) ){
$FL = $RZ[0];
$FOK = true;
@ -19,6 +23,14 @@
$QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 AND `master`=1";
$JJR = $DATABASE->Query( $QS, false );
$SD = $JJR[0];
if( $SD['type'] == 1 ){
// Dual LRF Device (ALS)
$AD = $JJR[1];
$DUDU = true;
};
$DD['dc_auto'] = intval( $SD['dc_auto'] );
$DD['dc_no'] = intval( $SD['dc_no'] );
$DD['dc_window'] = intval( $SD['dc_window'] );
$SOK = true;
} else {
$MSG = 'Upper Sensor is not defined in the Train Filter';
@ -26,11 +38,11 @@
} else {
$MSG = 'The Train Filter is not defined in the System';
};
$LILI=<<<lskdjflsdsdf
$LILI=<<<_DATA_BOUNDARY
,listeners:{
afterrender: function(){
Ext.Msg.show({
title: 'Information',
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$MSG}',
buttons: Ext.Msg.OK,
fn: function(){
@ -42,97 +54,262 @@
});
}
}
lskdjflsdsdf;
$TPL=<<<JOJOKA
{
xtype: 'panel',
id: 'up_se_popanel',
border: true,
title: 'Upper Sensor Detection Settings',
frame: true,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH,
bbar:[{
text: 'Apply Detection Settings',
handler: function(){
var oder = Ext.getCmp('ups_order').getValue();
var oset = Ext.getCmp('ups_offset').getValue();
var odel = Ext.getCmp('ups_delta').getValue();
var ofli = Ext.getCmp('ups_flip').getValue();
var owid = Ext.getCmp('ups_width').getValue();
var osst = Ext.getCmp('ups_sst').getValue();
var osun = Ext.getCmp('ups_sun').getValue();
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: oset,
MORD: oder,
MDEL: odel,
MFLI: ofli,
MWIZ: owid,
MSST: osst,
MSUN: osun
},
success: function( response, opts ){
Ext.Msg.show({
title: 'Information',
msg: 'Settings are Saved',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
},
failure: failureAJAXFunction
_DATA_BOUNDARY;
$SLRFDET=<<<_DATA_BOUNDARY
,{
xtype: 'panel',
id: 'up_sse_popanel',
border: true,
title: '{$Labels->GetLabel('_SLV_LRF_DET_SET_')}',
frame: false,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
items:[{
xtype: 'numberfield',
id: 's_order',
fieldLabel: 'Order',
value: '{$AD['order']}'
},{
xtype: 'numberfield',
id: 's_offset',
fieldLabel: 'Offset',
value: '{$AD['offset']}'
},{
xtype: 'numberfield',
id: 's_delta',
fieldLabel: 'Delta',
value: '{$AD['delta']}'
},{
xtype: 'numberfield',
id: 's_flip',
fieldLabel: 'Flip',
value: '{$AD['flip']}'
},{
xtype: 'numberfield',
id: 's_width',
fieldLabel: 'Width',
value: '{$AD['width']}'
},{
xtype: 'numberfield',
id: 's_sst',
fieldLabel: 'SST',
value: '{$AD['sst']}'
},{
xtype: 'numberfield',
id: 's_sun',
fieldLabel: 'Sun',
value: '{$AD['sun']}'
}]
}
_DATA_BOUNDARY;
$SLRFVARS=<<<_DATA_BOUNDARY
var soder = Ext.getCmp('s_order').getValue();
var soset = Ext.getCmp('s_offset').getValue();
var sodel = Ext.getCmp('s_delta').getValue();
var sofli = Ext.getCmp('s_flip').getValue();
var sowid = Ext.getCmp('s_width').getValue();
var sosst = Ext.getCmp('s_sst').getValue();
var sosun = Ext.getCmp('s_sun').getValue();
_DATA_BOUNDARY;
$SLRFDEFS=<<<_DATA_BOUNDARY
,
SOFF: soset,
SORD: soder,
SDEL: sodel,
SFLI: sofli,
SWIZ: sowid,
SSST: sosst,
SSUN: sosun
_DATA_BOUNDARY;
$TPL=<<<_DATA_BOUNDARY
{
xtype: 'tabpanel',
activeTab: 0,
frame: true,
border: true,
bbar:[{
text: 'Apply Settings',
handler: function(){
var moder = Ext.getCmp('m_order').getValue();
var moset = Ext.getCmp('m_offset').getValue();
var model = Ext.getCmp('m_delta').getValue();
var mofli = Ext.getCmp('m_flip').getValue();
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
SNID: '{$SI}',
OPID: 19,
MOFF: moset,
MORD: moder,
MDEL: model,
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
title: '{$Labels->GetLabel('_INFO_')}',
msg: '{$Labels->GetLabel('_SARE_SAVED_')}',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.INFO
});
}
}],
items:[{
xtype: 'numberfield',
id: 'ups_order',
fieldLabel: 'Order',
value: '{$SD['order']}'
},{
xtype: 'numberfield',
id: 'ups_offset',
fieldLabel: 'Offset',
value: '{$SD['offset']}'
},{
xtype: 'numberfield',
id: 'ups_delta',
fieldLabel: 'Delta',
value: '{$SD['delta']}'
},{
xtype: 'numberfield',
id: 'ups_flip',
fieldLabel: 'Flip',
value: '{$SD['flip']}'
},{
xtype: 'numberfield',
id: 'ups_width',
fieldLabel: 'Width',
value: '{$SD['width']}'
},{
xtype: 'numberfield',
id: 'ups_sst',
fieldLabel: 'SST',
value: '{$SD['sst']}'
},{
xtype: 'numberfield',
id: 'ups_sun',
fieldLabel: 'Sun',
value: '{$SD['sun']}'
}]
%%%JUMPAPA%%%
},
failure: failureAJAXFunction
});
}
}],
items:[{
xtype: 'panel',
id: 'up_se_popanel',
border: true,
title: '{$Labels->GetLabel('_MAS_LRF_DET_SET_')}',
frame: false,
labelWidth: 150,
labelAlign: 'right',
layout: 'form',
height: PanelH-42,
items:[{
xtype: 'numberfield',
id: 'm_order',
fieldLabel: 'Order',
value: '{$SD['order']}'
},{
xtype: 'numberfield',
id: 'm_offset',
fieldLabel: 'Offset',
value: '{$SD['offset']}'
},{
xtype: 'numberfield',
id: 'm_delta',
fieldLabel: 'Delta',
value: '{$SD['delta']}'
},{
xtype: 'numberfield',
id: 'm_flip',
fieldLabel: 'Flip',
value: '{$SD['flip']}'
},{
xtype: 'numberfield',
id: 'm_width',
fieldLabel: 'Width',
value: '{$SD['width']}'
},{
xtype: 'numberfield',
id: 'm_sst',
fieldLabel: 'SST',
value: '{$SD['sst']}'
},{
xtype: 'numberfield',
id: 'm_sun',
fieldLabel: 'Sun',
value: '{$SD['sun']}'
}]
}%%%SLAVE_LRF_DET%%%,{
title: '{$Labels->GetLabel('_DET_SET_WIDTH_T_')}',
height: PanelH-42,
tbar:[{
text: '{$Labels->GetLabel('_EDIT_')}',
id: 'edit_btn_width_table',
disabled: true,
handler: editWidthTableRecord
}],
layout:'fit',
items:{
xtype: 'grid',
border: false,
frame: false,
autoScroll: true,
//width: '100%',
lazyRender: true,
//height: 210,
ds: targetWidthTable_store,
cm: new Ext.grid.ColumnModel( targetWidthTableColModel_ops ),
sm: new Ext.grid.RowSelectionModel( widthTableSelModel_ops ),
viewConfig: {
// forceFit: true
},
},
listeners:{
afterrender: function(){
loadWidthTable({$SI});
}
}
JOJOKA;
},{
title: '{$Labels->GetLabel('_DC_CONTROL_SET_')}',
height: PanelH-42,
labelWidth: 200,
labelAlign: 'right',
layout: 'form',
items:[{
xtype: 'checkbox',
id: 'dc_ena',
fieldLabel: '{$Labels->GetLabel('_DC_AUTO_ENA_')}',
checked: {$DD['dc_auto']},
listeners:{
check: function( a, c ){
if( c ){
doSensorOperation( {$SI}, 27, 1, true );
} else {
doSensorOperation( {$SI}, 27, 0, true );
};
}
}
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_DC_WORK_MODE_')}',
id: 'dc_mode',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,'{$Labels->GetLabel('_DC_WM_NC_')}'], [1,'{$Labels->GetLabel('_DC_WM_NO_')}']]
}),
value: {$DD['dc_no']},
valueField: 'sid',
displayField: 'snam',listeners:{
select: function( a, c, b ){
doSensorOperation( {$SI}, 28, b, true );
}
}
},{
xtype: 'numberfield',
id: 'dc_window',
fieldLabel: '{$Labels->GetLabel('_DC_TIME_WINDOW_')}',
value: {$DD['dc_window']},
listeners:{
change: function( a, c, b ){
doSensorOperation( {$SI}, 29, c, true );
}
}
}]
}]
%%%JUMPAPA%%%
}
_DATA_BOUNDARY;
if( $DUDU ){
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', $SLRFDET, $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', $SLRFVARS, $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', $SLRFDEFS, $TPL );
} else {
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', '', $TPL );
};
if( $FOK && $SOK ){
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL );
} else {

377
lib/controller/getReportLayout.php

@ -132,170 +132,259 @@ _DATA_BOUNDARY;
$STA = array();
$END="]}";
$OUT = array();
if( $SP['type'] == 1 ) {
//Metro
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .50, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
switch( $SP['type'] ){
case 1:{
//Metro
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .50, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 2 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 2 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 2 ){
for( ;$idx<2;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
} else {
for( ;$idx<2;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
} else {
for( ;$idx<2;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 1 ){
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[2+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[2+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[2+$idx] . $T . $END;
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
break;
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
} else {
$STA[0]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
if( $UP['width'] > 1.6* $UP['height'] ){
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .67, stylse:'padding:10px 0 10px 10px', items:[";
} else {
$STA[2]="{ columnWidth: .45, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .55, stylse:'padding:10px 0 10px 10px', items:[";
};
$OUT[]= $STA[0] . $DUMMY['map'] . $END;
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[1+$idx] . $TPL . $END;
} else break;
$idx++;
case 4:{
//Metro
$STA[0]="{ columnWidth: .20, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .20, stylse:'padding:10px 0 10px 10px', items:[";
$STA[2]="{ columnWidth: .20, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .40, stylse:'padding:10px 0 10px 10px', items:[";
$STA[4]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:[";
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 3 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 3 ){
for( ;$idx<3;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
} else {
for( ;$idx<3;$idx++ ){
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END;
};
};
if( $idx < 1 ){
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[3+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 1 ){
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[3+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[2+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
};
$OUT[]= $STA[4] . $DUMMY['log'] . $END;
break;
};
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 2 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;
default:{
$STA[0]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
$STA[1]="{ columnWidth: .5, stylse:'padding:10px 0 10px 10px', items:[";
if( $UP['width'] > 1.6* $UP['height'] ){
$STA[2]="{ columnWidth: .33, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .67, stylse:'padding:10px 0 10px 10px', items:[";
} else {
$STA[2]="{ columnWidth: .45, stylse:'padding:10px 0 10px 10px', items:[";
$STA[3]="{ columnWidth: .55, stylse:'padding:10px 0 10px 10px', items:[";
};
} else {
for( ;$idx<1;$idx++ ){
$OUT[]= $STA[2+$idx] . $DUMMY['sensor'] . $END;
$OUT[]= $STA[0] . $DUMMY['map'] . $END;
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 1 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
$S=$DATABASE->Query( $QS );
$MODULE_DATA = $S[0];
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL );
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter'];
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']';
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL );
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL );
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL );
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL );
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width'];
$W = 244;
$H = $W * $FK;
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL );
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL );
$OUT[]= $STA[1+$idx] . $TPL . $END;
} else break;
$idx++;
};
if( $idx < 1 ){
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
} else {
for( ;$idx<1;$idx++ ){
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] );
$OUT[]= $STA[1+$idx] . $T . $END;
};
};
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1";
$R = $DATABASE->Query( $QS );
$idx = 0;
if( count( $R ) ){
foreach( $R as $DD ){
if( $idx < 2 ){
$TFN = 'report/node_' . $DD['type'] . '.js';
if(!file_exists( $TFN )) continue;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;
};
} else {
for( ;$idx<1;$idx++ ){
$OUT[]= $STA[2+$idx] . $DUMMY['sensor'] . $END;
};
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
break;
};
$OUT[]= $STA[3] . $DUMMY['log'] . $END;
};
$Data = '[' . implode( ',' , $OUT ) . ']';
} else {

51
lib/controller/getSensorDetectionEditor.php

@ -10,6 +10,7 @@
$FOK = true;
$QS = "SELECT * FROM `lrf_sensors` WHERE `id`={$SI}";
$JJR = $DATABASE->Query( $QS, false );
$DUDU = false;
if( count( $JJR ) ){
$DD = $JJR[0];
//$QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 AND `master`=1";
@ -19,6 +20,7 @@
if( $DD['type'] == 1 ){
// Dual LRF Device (ALS)
$AD = $JJR[1];
$DUDU = true;
};
$DD['dc_auto'] = intval( $DD['dc_auto'] );
$DD['dc_no'] = intval( $DD['dc_no'] );
@ -95,7 +97,26 @@ _DATA_BOUNDARY;
value: '{$AD['sun']}'
}]
}
_DATA_BOUNDARY;
_DATA_BOUNDARY;
$SLRFVARS=<<<_DATA_BOUNDARY
var soder = Ext.getCmp('s_order').getValue();
var soset = Ext.getCmp('s_offset').getValue();
var sodel = Ext.getCmp('s_delta').getValue();
var sofli = Ext.getCmp('s_flip').getValue();
var sowid = Ext.getCmp('s_width').getValue();
var sosst = Ext.getCmp('s_sst').getValue();
var sosun = Ext.getCmp('s_sun').getValue();
_DATA_BOUNDARY;
$SLRFDEFS=<<<_DATA_BOUNDARY
,
SOFF: soset,
SORD: soder,
SDEL: sodel,
SFLI: sofli,
SWIZ: sowid,
SSST: sosst,
SSUN: sosun
_DATA_BOUNDARY;
$TPL=<<<_DATA_BOUNDARY
{
xtype: 'tabpanel',
@ -112,13 +133,7 @@ _DATA_BOUNDARY;
var mowid = Ext.getCmp('m_width').getValue();
var mosst = Ext.getCmp('m_sst').getValue();
var mosun = Ext.getCmp('m_sun').getValue();
var soder = Ext.getCmp('s_order').getValue();
var soset = Ext.getCmp('s_offset').getValue();
var sodel = Ext.getCmp('s_delta').getValue();
var sofli = Ext.getCmp('s_flip').getValue();
var sowid = Ext.getCmp('s_width').getValue();
var sosst = Ext.getCmp('s_sst').getValue();
var sosun = Ext.getCmp('s_sun').getValue();
%%%SLAVE_VARS%%%
Ext.Ajax.request({
url: '/lib/controller/doSensorOperation.php',
params: {
@ -132,14 +147,8 @@ _DATA_BOUNDARY;
MFLI: mofli,
MWIZ: mowid,
MSST: mosst,
MSUN: mosun,
SOFF: soset,
SORD: soder,
SDEL: sodel,
SFLI: sofli,
SWIZ: sowid,
SSST: sosst,
SSUN: sosun
MSUN: mosun
%%%SLAVE_DEFS%%%
},
success: function( response, opts ){
Ext.Msg.show({
@ -286,10 +295,14 @@ _DATA_BOUNDARY;
%%%JUMPAPA%%%
}
_DATA_BOUNDARY;
if( $DD['type'] != 1 ){
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', '', $TPL );
} else {
if( $DUDU ){
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', $SLRFDET, $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', $SLRFVARS, $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', $SLRFDEFS, $TPL );
} else {
$TPL = str_replace('%%%SLAVE_LRF_DET%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_VARS%%%', '', $TPL );
$TPL = str_replace('%%%SLAVE_DEFS%%%', '', $TPL );
};
if( $FOK && $SOK ){
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL );

9
lib/controller/getSensorEditor.php

@ -637,6 +637,15 @@ JOJOKA;
handler: function(){
doDeviceOperation( {$CR['node_id']}, 1,'', true );
}
},{
xtype: 'button',
text: '{$Labels->GetLabel('_SENS_DO_FULLDRAW_')}',
width: '100%',
iconCls: 'srv_op_fth_frozen',
scale: 'large',
handler: function(){
doDeviceOperation( {$CR['node_id']}, 5,'', true );
}
},{
xtype: 'button',
text: '{$Labels->GetLabel('_SENS_DO_READALL_')}',

2
lib/controller/report/node_2.js

@ -21,7 +21,7 @@
var W = p.getWidth();
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 1 ){
if( %%%APPTYPE%%% == 1 || %%%APPTYPE%%% == 4 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > W + 60 ){
H = W + 60;

4
lib/controller/validateUserSession.php

@ -1,7 +1,8 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
//Check Time Sync
//Check Time Sync - disabled
/*
$MTS = time();
$CTS = intval( $_POST['CTS'] );
// If difference more then 2 minutes
@ -14,6 +15,7 @@
echo "{'sessionIsValid': false }";
exit();
};
*/
echo "{'sessionIsValid': true }";
} else {
echo "{'sessionIsValid': false }";

Loading…
Cancel
Save