Data['id'] > 1 ){ $SI = 0; $SOK = false; $FOK = false; if( isset( $_POST['SEN'] ) ) $SI = intval( $_POST['SEN'] ); if( $SI ){ $FOK = true; $QS = "SELECT * FROM `lrf_sensors` WHERE `id`={$SI}"; $JJR = $DATABASE->Query( $QS, 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"; $QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 ORDER BY `master` DESC"; $JJR = $DATABASE->Query( $QS, false ); $SD = $JJR[0]; if( $DD['type'] == 1 ){ // Dual LRF Device (ALS) $AD = $JJR[1]; }; $SOK = true; } else { $MSG = 'The Sensor ID is Wrong!'; }; } else { $MSG = 'The Sensor ID not Set!'; }; $LILI=<<<_DATA_BOUNDARY ,listeners:{ afterrender: function(){ Ext.Msg.show({ title: '{$Labels->GetLabel('_INFO_')}', msg: '{$MSG}', buttons: Ext.Msg.OK, fn: function(){ var tt = Ext.getCmp('up_se_popanel'); tt.removeAll( true ); tt.doLayout(); }, icon: Ext.MessageBox.INFO }); } } _DATA_BOUNDARY; $TPL=<<<_DATA_BOUNDARY { xtype: 'tabpanel', activeTab: 0, frame: true, border: true, bbar:[{ text: 'Apply 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, OFF: oset, ORD: oder, DEL: odel, FLI: ofli, WIZ: owid, SST: osst, SUN: osun }, success: function( response, opts ){ Ext.Msg.show({ title: 'Information', msg: 'Settings are Saved', buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO }); }, 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']}' }] },{ 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: '{$SD['order']}' },{ xtype: 'numberfield', id: 's_offset', fieldLabel: 'Offset', value: '{$SD['offset']}' },{ xtype: 'numberfield', id: 's_delta', fieldLabel: 'Delta', value: '{$SD['delta']}' },{ xtype: 'numberfield', id: 's_flip', fieldLabel: 'Flip', value: '{$SD['flip']}' },{ xtype: 'numberfield', id: 's_width', fieldLabel: 'Width', value: '{$SD['width']}' },{ xtype: 'numberfield', id: 's_sst', fieldLabel: 'SST', value: '{$SD['sst']}' },{ xtype: 'numberfield', id: 's_sun', fieldLabel: 'Sun', value: '{$SD['sun']}' }] },{ title: '{$Labels->GetLabel('_DET_SET_WIDTH_T_')}', height: PanelH-42, tbar:[{ text: '{$Labels->GetLabel('__ADD__')}', id: 'add_btn_width_table', handler: function(){ addWidthTableRecord({$SI}); } },{ text: '{$Labels->GetLabel('_DEL_SELECTED_')}', disabled: true, id: 'del_btn_width_table', handler: function(){ } }], 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( fileUploadsSelModel_ops ), viewConfig: { // forceFit: true }, } },{ 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: 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_NO_')}'], [1,'{$Labels->GetLabel('_DC_WM_NC_')}']] }), value: 0, valueField: 'sid', displayField: 'snam' },{ xtype: 'numberfield', id: 'dc_window', fieldLabel: '{$Labels->GetLabel('_DC_TIME_WINDOW_')}', value: 2 }] }] %%%JUMPAPA%%% } _DATA_BOUNDARY; if( $FOK && $SOK ){ $TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); } else { $TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); }; echo $TPL; } else { header('location: /'); }; ?>