Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

146 lines
3.6 KiB

<?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: 200,
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 oatm = Ext.getCmp('ups_atime').getValue();
var omrg = Ext.getCmp('ups_mrange').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,
ATM: oatm,
MRG: omrg
},
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: 'checkbox',
id: 'ups_dbg',
fieldLabel: 'Debugging Mode',
checked: parseInt('{$SD['DEBUG']}')
},{
xtype: 'checkbox',
id: 'ups_tdetect',
fieldLabel: 'Detect Train',
checked: parseInt('{$SD['TRAIN_DETECT']}')
},{
xtype: 'checkbox',
id: 'ups_ttrain',
fieldLabel: 'Track Train',
checked: parseInt('{$SD['TRACK_TRAIN']}')
},{
xtype: 'spacer',
html: '<hr/>'
},{
xtype: 'numberfield',
id: 'ups_dtime',
fieldLabel: '[UTF] No Train Time',
value: '{$SD['DECISION_TIME']}'
},{
xtype: 'numberfield',
id: 'ups_atime',
fieldLabel: '[UTF] Restart Senor Hours',
value: '{$SD['UPPER_RESTART']}'
},{
xtype: 'spacer',
html: '<hr/>'
},{
xtype: 'numberfield',
id: 'ups_stime',
fieldLabel: '[LTF] Suspect Time',
value: '{$SD['SUSPECT_TIME']}'
},{
xtype: 'numberfield',
id: 'ups_width',
fieldLabel: '[LTF] Suspicious Width',
value: '{$SD['TRAIN_WIDTH']}'
},{
xtype: 'numberfield',
id: 'ups_mrange',
fieldLabel: '[LTF] Minimal Range',
value: '{$SD['MINIMAL_RANGE']}'
}]
%%%JUMPAPA%%%
}
JOJOKA;
if( $FOK ){
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL );
} else {
$TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL );
};
echo $TPL;
} else {
header('location: /');
};
?>