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.

201 lines
5.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $Data['status'] = 'error';
  5. if( $CUser->Data['access'] > 5 ){
  6. $QS = "SELECT * FROM `system_props` WHERE `id`=1";
  7. $Result = $DATABASE->Query( $QS );
  8. $CS = $Result[0];
  9. $SKEL=<<<DATABOUNDARY
  10. {
  11. xtype: 'panel',
  12. border: false,
  13. frame: false,
  14. items:[{
  15. xtype: 'form',
  16. labelAlign: 'right',
  17. labelWidth: 180,
  18. //height: PanelH - 30,
  19. items:[{
  20. xtype:'panel',
  21. border: false,
  22. frame: false,
  23. html: '<table width="100%" border=0 class="setEd_infoPanel" id="LIBAV_LOGO"><tr><td width="200px"><div class="appis_logo_img"></div></td><td valign="middle">Application Settings</td></tr><tr><td colspan=2></td></tr></table><br/>'
  24. },{
  25. xtype: 'spacer',
  26. height: 10
  27. },{
  28. xtype: 'combo',
  29. id: 'db_loging',
  30. fieldLabel: '{$Labels->GetLabel('_DB_LOGGING_')}',
  31. editable: false,
  32. typeAhead: true,
  33. triggerAction: 'all',
  34. width: '100%',
  35. lazyRender:true,
  36. mode: 'local',
  37. store: new Ext.data.ArrayStore({
  38. fields: ['cid', 'cnam'],
  39. data: [['0',"Disabled"], ['1',"Enabled"]]
  40. }),
  41. valueField: 'cid',
  42. displayField: 'cnam',
  43. listeners:{
  44. focus: function( t ){
  45. loadHelpTopic( 'application_op_small', 32 );
  46. },
  47. select: function( t, r, i ){
  48. //alert('buba');
  49. doApplicationOperation( 41, r.data.cid );
  50. }
  51. },
  52. value: '{$CS['use_db_logging']}'
  53. },{
  54. xtype: 'spacer',
  55. height: 10
  56. },{
  57. xtype: 'combo',
  58. id: 'ses_window',
  59. fieldLabel: '{$Labels->GetLabel('_APP_SESS_WND_')}',
  60. editable: false,
  61. typeAhead: true,
  62. triggerAction: 'all',
  63. width: '100%',
  64. lazyRender:true,
  65. mode: 'local',
  66. store: new Ext.data.ArrayStore({
  67. fields: ['cid', 'cnam'],
  68. data: [['1',"1 Minute"], ['2',"2 Minutes"], ['3',"3 Minutes"], ['4',"4 Minutes"],['5',"5 Minutes"]]
  69. }),
  70. valueField: 'cid',
  71. displayField: 'cnam',
  72. listeners:{
  73. focus: function( t ){
  74. loadHelpTopic( 'application_op_small', 33 );
  75. },
  76. select: function( t, r, i ){
  77. //alert('buba');
  78. //doApplicationOperation( 1, i );
  79. }
  80. },
  81. value: 1//'{$CS['menc_container']}'
  82. },{
  83. xtype: 'spacer',
  84. height: 10
  85. },{
  86. xtype: 'combo',
  87. id: 'menc_cnt',
  88. fieldLabel: '{$Labels->GetLabel('_APP_MENC_COUNT_')}',
  89. editable: false,
  90. typeAhead: true,
  91. triggerAction: 'all',
  92. width: '100%',
  93. lazyRender:true,
  94. mode: 'local',
  95. store: new Ext.data.ArrayStore({
  96. fields: ['cid', 'cnam'],
  97. data: [['1',"1"], ['2',"2"], ['3',"3"], ['4',"4"],['5',"5"],['6',"6"],['7',"7"],['8',"8"]]
  98. }),
  99. valueField: 'cid',
  100. displayField: 'cnam',
  101. listeners:{
  102. focus: function( t ){
  103. loadHelpTopic( 'application_op_small', 34 );
  104. },
  105. select: function( t, r, i ){
  106. //alert('buba');
  107. //doApplicationOperation( 1, i );
  108. }
  109. },
  110. value: '{$CS['encoder_limit']}'
  111. },{
  112. xtype: 'spacer',
  113. height: 10
  114. },{
  115. xtype: 'numberfield',
  116. fieldLabel: 'SCADA Auto Time',
  117. editable: true,
  118. width: 250,
  119. value: '{$CS['modbus_auto_rise']}',
  120. listeners:{
  121. focus: function( t ){
  122. loadHelpTopic( 'application_op_small', 35 );
  123. },
  124. change: function( t, r, i ){
  125. //alert('buba');
  126. doApplicationOperation( 43, r );
  127. }
  128. }
  129. },{
  130. xtype: 'spacer',
  131. height: 10
  132. },{
  133. xtype: 'combo',
  134. fieldLabel: 'SCADA Manual Activation',
  135. editable: false,
  136. typeAhead: true,
  137. triggerAction: 'all',
  138. width: '100%',
  139. lazyRender:true,
  140. mode: 'local',
  141. store: new Ext.data.ArrayStore({
  142. fields: ['cid', 'cnam'],
  143. data: [['0',"Disabled"], ['3',"Alert"], ['4',"Hazard"]]
  144. }),
  145. valueField: 'cid',
  146. displayField: 'cnam',
  147. listeners:{
  148. focus: function( t ){
  149. loadHelpTopic( 'application_op_small', 36 );
  150. },
  151. select: function( t, r, i ){
  152. //alert('buba');
  153. doApplicationOperation( 44, r.data.cid, true );
  154. }
  155. },
  156. value: '{$CS['modbus_hazard_level']}'
  157. },{
  158. xtype: 'spacer',
  159. height: 10
  160. },{
  161. xtype: 'combo',
  162. fieldLabel: 'SCADA Health Level',
  163. editable: false,
  164. typeAhead: true,
  165. triggerAction: 'all',
  166. width: '100%',
  167. lazyRender:true,
  168. mode: 'local',
  169. store: new Ext.data.ArrayStore({
  170. fields: ['cid', 'cnam'],
  171. data: [['0',"Disabled"],['1',"Camera Failure"],['2',"LRF Failure"],['3',"Sensor Communication"],['4',"Module SW Failure"],['5',"Module Network Failure"]]
  172. }),
  173. valueField: 'cid',
  174. displayField: 'cnam',
  175. listeners:{
  176. focus: function( t ){
  177. loadHelpTopic( 'application_op_small', 37 );
  178. },
  179. select: function( t, r, i ){
  180. //alert('buba');
  181. doApplicationOperation( 45, r.data.cid, true );
  182. }
  183. },
  184. value: '{$CS['modbus_health_level']}'
  185. },{
  186. xtype: 'spacer',
  187. height: 10
  188. }]
  189. }]
  190. }
  191. DATABOUNDARY;
  192. $Data['status']= 'ok';
  193. $Data['content']=$SKEL;
  194. } else {
  195. $Data['msg']='Access Denied!';
  196. };
  197. echo json_encode( $Data );
  198. } else {
  199. header('location: /');
  200. };
  201. ?>