|
|
<?php require_once('../ajax_asm.php'); if( $CUser->Data['id'] > 1 ){ $QS = "SELECT * FROM `target_filters` WHERE `type`=1"; $RZ = $DATABASE->Query( $QS, 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 ); $SD = $RK[0]; } 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: 'Train Filter Fusion Engine Settings', frame: true, labelWidth: 150, labelAlign: 'right', layout: 'form', height: PanelH, bbar:[{ text: 'Apply Filter Settings', handler: function(){ var odtr = (Ext.getCmp('ups_tdetect').getValue())?1:0; var odtm = Ext.getCmp('ups_dtime').getValue(); var ostm = Ext.getCmp('ups_stime').getValue(); var ottr = (Ext.getCmp('ups_ttrain').getValue())?1:0; var owid = Ext.getCmp('ups_width').getValue(); var odbg = (Ext.getCmp('ups_dbg').getValue())?1:0; Ext.Ajax.request({ url: '/lib/controller/doFilterOperation.php', params: { UID: {$UserID}, SID: '{$Session}', FID: {$FL['id']}, OPID: 9, DTR: odtr, DTM: odtm, STM: ostm, TTR: ottr, WIZ: owid, DBG: odbg }, 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_width', fieldLabel: 'Train Width', value: '{$SD['TRAIN_WIDTH']}' },{ xtype: 'checkbox', id: 'ups_tdetect', fieldLabel: 'Detect Train', checked: parseInt('{$SD['TRAIN_DETECT']}') },{ xtype: 'numberfield', id: 'ups_dtime', fieldLabel: 'Decision Time', value: '{$SD['DECISION_TIME']}' },{ xtype: 'numberfield', id: 'ups_stime', fieldLabel: 'Suspect Train Time', value: '{$SD['SUSPECT_TIME']}' },{ xtype: 'checkbox', id: 'ups_ttrain', fieldLabel: 'Track Train', checked: parseInt('{$SD['TRACK_TRAIN']}') },{ xtype: 'checkbox', id: 'ups_dbg', fieldLabel: 'Debugging Mode', checked: parseInt('{$SD['DEBUG']}') }] %%%JUMPAPA%%% }JOJOKA; if( $FOK ){ $TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); } else { $TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); }; echo $TPL; } else { header('location: /'); };?>
|