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.

145 lines
3.6 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
4 years ago
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
​
4 years ago
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $QS = "SELECT * FROM `target_filters` WHERE `type`=1";
  5. $RZ = $DATABASE->Query( $QS, false );
  6. $FOK = false;
  7. if( count( $RZ ) ){
  8. $FL = $RZ[0];
  9. $FOK = true;
  10. $QS = "SELECT * FROM `target_filter_train` WHERE `id`={$FL['aux_id']}";
  11. $RK = $DATABASE->Query( $QS, false );
  12. $SD = $RK[0];
  13. } else {
  14. $MSG = 'The Train Filter is not defined in the System';
  15. };
  16. $LILI=<<<lskdjflsdsdf
  17. ,listeners:{
  18. afterrender: function(){
  19. Ext.Msg.show({
  20. title: 'Information',
  21. msg: '{$MSG}',
  22. buttons: Ext.Msg.OK,
  23. fn: function(){
  24. var tt = Ext.getCmp('up_se_popanel');
  25. tt.removeAll( true );
  26. tt.doLayout();
  27. },
  28. icon: Ext.MessageBox.INFO
  29. });
  30. }
  31. }
  32. lskdjflsdsdf;
  33. $TPL=<<<JOJOKA
  34. {
  35. xtype: 'panel',
  36. id: 'up_se_popanel',
  37. border: true,
  38. title: 'Train Filter Fusion Engine Settings',
  39. frame: true,
  40. labelWidth: 200,
  41. labelAlign: 'right',
  42. layout: 'form',
  43. height: PanelH,
  44. bbar:[{
  45. text: 'Apply Filter Settings',
  46. handler: function(){
  47. var odtr = (Ext.getCmp('ups_tdetect').getValue())?1:0;
  48. var odtm = Ext.getCmp('ups_dtime').getValue();
  49. var ostm = Ext.getCmp('ups_stime').getValue();
  50. var oatm = Ext.getCmp('ups_atime').getValue();
  51. var omrg = Ext.getCmp('ups_mrange').getValue();
  52. var ottr = (Ext.getCmp('ups_ttrain').getValue())?1:0;
  53. var owid = Ext.getCmp('ups_width').getValue();
  54. var odbg = (Ext.getCmp('ups_dbg').getValue())?1:0;
  55. Ext.Ajax.request({
  56. url: '/lib/controller/doFilterOperation.php',
  57. params: {
  58. UID: {$UserID},
  59. SID: '{$Session}',
  60. FID: {$FL['id']},
  61. OPID: 9,
  62. DTR: odtr,
  63. DTM: odtm,
  64. STM: ostm,
  65. TTR: ottr,
  66. WIZ: owid,
  67. DBG: odbg,
  68. ATM: oatm,
  69. MRG: omrg
  70. },
  71. success: function( response, opts ){
  72. Ext.Msg.show({
  73. title: 'Information',
  74. msg: 'Settings are Saved',
  75. buttons: Ext.Msg.OK,
  76. icon: Ext.MessageBox.INFO
  77. });
  78. },
  79. failure: failureAJAXFunction
  80. });
  81. }
  82. }],
  83. items:[{
  84. xtype: 'checkbox',
  85. id: 'ups_dbg',
  86. fieldLabel: 'Debugging Mode',
  87. checked: parseInt('{$SD['DEBUG']}')
  88. },{
  89. xtype: 'checkbox',
  90. id: 'ups_tdetect',
  91. fieldLabel: 'Detect Train',
  92. checked: parseInt('{$SD['TRAIN_DETECT']}')
  93. },{
  94. xtype: 'checkbox',
  95. id: 'ups_ttrain',
  96. fieldLabel: 'Track Train',
  97. checked: parseInt('{$SD['TRACK_TRAIN']}')
  98. },{
  99. xtype: 'spacer',
  100. html: '<hr/>'
  101. },{
  102. xtype: 'numberfield',
  103. id: 'ups_dtime',
  104. fieldLabel: '[UTF] No Train Time',
  105. value: '{$SD['DECISION_TIME']}'
  106. },{
  107. xtype: 'numberfield',
  108. id: 'ups_atime',
  109. fieldLabel: '[UTF] Restart Senor Hours',
  110. value: '{$SD['UPPER_RESTART']}'
  111. },{
  112. xtype: 'spacer',
  113. html: '<hr/>'
  114. },{
  115. xtype: 'numberfield',
  116. id: 'ups_stime',
  117. fieldLabel: '[LTF] Suspect Time',
  118. value: '{$SD['SUSPECT_TIME']}'
  119. },{
  120. xtype: 'numberfield',
  121. id: 'ups_width',
  122. fieldLabel: '[LTF] Suspicious Width',
  123. value: '{$SD['TRAIN_WIDTH']}'
  124. },{
  125. xtype: 'numberfield',
  126. id: 'ups_mrange',
  127. fieldLabel: '[LTF] Minimal Range',
  128. value: '{$SD['MINIMAL_RANGE']}'
  129. }]
  130. %%%JUMPAPA%%%
  131. }
  132. JOJOKA;
  133. if( $FOK ){
  134. $TPL = str_replace('%%%JUMPAPA%%%', '', $TPL );
  135. } else {
  136. $TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL );
  137. };
  138. echo $TPL;
  139. } else {
  140. header('location: /');
  141. };
  142. ?>