|
|
<?php require_once('../ajax_asm.php'); if( $CUser->Data['id'] > 1 ){ $QS = "SELECT * FROM `target_filters` WHERE `type`=1"; $RZ = $DATABASE->Query( $QS, false ); $SOK = false; $FOK = false; if( count( $RZ ) ){ $FL = $RZ[0]; $FOK = true; $QS = "SELECT * FROM `target_filter_train` WHERE `id`={$FL['aux_id']}"; $RK = $DATABASE->Query( $QS, false ); $FD = $RK[0]; if( $FD['UPPER_SENSOR'] ){ $QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$FD['UPPER_SENSOR']}"; $JJR = $DATABASE->Query( $QS, false ); $SI = $JJR[0]['aux_id']; $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]; $SOK = true; } else { $MSG = 'Upper Sensor is not defined in the Train Filter'; }; } else { $MSG = 'The Train Filter is not defined in the System'; }; $LILI=<<<lskdjflsdsdf ,listeners:{ afterrender: function(){ Ext.Msg.show({ title: 'Information', msg: '{$MSG}', buttons: Ext.Msg.OK, fn: function(){ var tt = Ext.getCmp('up_se_popanel'); tt.removeAll( true ); tt.doLayout(); }, icon: Ext.MessageBox.INFO }); } }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 }); } }], 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%%% }JOJOKA; if( $FOK && $SOK ){ $TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); } else { $TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); }; echo $TPL; } else { header('location: /'); };?>
|