Web UI for ARGUS server
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.

211 lines
4.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $NodeID = intval($_POST['NID']);
  5. $SiteID = intval($_POST['SITE']);
  6. $QS = "SELECT * FROM nodes WHERE id={$NodeID}";
  7. $Data = array();
  8. $result = $DATABASE->Query( $QS, false );
  9. if( count( $result ) ){
  10. $T = $result[0];
  11. $AID = $T['aux_id'];
  12. $QS = "SELECT * FROM lrf_sensors WHERE id={$AID}";
  13. $result = $DATABASE->Query( $QS, false );
  14. if( count($result) ){
  15. $CS = $result[0];
  16. $K['name'] = $T['name'];
  17. $K['data_status'] = intval( $CS['data_status'] );
  18. $K['online'] = intval( $T['online']);
  19. switch( intval( $CS['type_id'] ) ){
  20. case 3:{
  21. $K['profile_id'] = intval( $CS['detection_profile_id'] );
  22. $K['profiles'] = array();
  23. $QS = "SELECT DISTINCT `profile_id` as `id` FROM `lrf_detection_profiles` WHERE `aux_id`={$AID} ORDER BY `profile_id`";
  24. foreach( $DATABASE->Query( $QS ) as $Z ) $K['profiles'][] = intval($Z['id']);
  25. $K['additional'] = <<<KAKA
  26. {
  27. xtype: 'panel',
  28. title: 'kaka-panel',
  29. height: 40,
  30. frame: true
  31. }
  32. KAKA;
  33. break;
  34. };
  35. case 5: {
  36. $K['additional'] = <<<KAKU
  37. {
  38. xtype: 'panel',
  39. layout: 'table',
  40. width: '100%',
  41. border: false,
  42. disabled: false,
  43. defaults: {
  44. border: false,
  45. frame: false
  46. },
  47. layoutConfig: {
  48. columns: 9
  49. },
  50. items:[{
  51. html: 'Draw Master LRF:'
  52. },{
  53. xtype: 'button',
  54. text: '1',
  55. id: 'DMTH1',
  56. width: 16,
  57. enableToggle: true,
  58. toggleGroup: 'sh_mdraw_btn_grp',
  59. handler: function(){
  60. doDeviceOperation( deviceCtrlNode, 3, '0:0' );
  61. }
  62. },{
  63. xtype: 'button',
  64. text: '2',
  65. id: 'DMTH2',
  66. width: 16,
  67. enableToggle: true,
  68. toggleGroup: 'sh_mdraw_btn_grp',
  69. handler: function(){
  70. doDeviceOperation( deviceCtrlNode, 3, '0:1' );
  71. }
  72. },{
  73. xtype: 'button',
  74. text: '3',
  75. id: 'DMTH3',
  76. width: 16,
  77. enableToggle: true,
  78. toggleGroup: 'sh_mdraw_btn_grp',
  79. handler: function(){
  80. doDeviceOperation( deviceCtrlNode, 3, '0:2' );
  81. }
  82. },{
  83. xtype: 'button',
  84. text: '4',
  85. id: 'DMTH4',
  86. width: 16,
  87. enableToggle: true,
  88. toggleGroup: 'sh_mdraw_btn_grp',
  89. handler: function(){
  90. doDeviceOperation( deviceCtrlNode, 3, '0:3' );
  91. }
  92. },{
  93. xtype: 'button',
  94. text: '5',
  95. id: 'DMTH5',
  96. width: 16,
  97. enableToggle: true,
  98. toggleGroup: 'sh_mdraw_btn_grp',
  99. handler: function(){
  100. doDeviceOperation( deviceCtrlNode, 3, '0:4' );
  101. }
  102. },{
  103. xtype: 'button',
  104. text: '6',
  105. id: 'DMTH6',
  106. width: 16,
  107. enableToggle: true,
  108. toggleGroup: 'sh_mdraw_btn_grp',
  109. handler: function(){
  110. doDeviceOperation( deviceCtrlNode, 3, '0:5' );
  111. }
  112. },{
  113. xtype: 'button',
  114. text: '7',
  115. id: 'DMTH7',
  116. width: 18,
  117. enableToggle: true,
  118. toggleGroup: 'sh_mdraw_btn_grp',
  119. handler: function(){
  120. doDeviceOperation( deviceCtrlNode, 3, '0:6' );
  121. }
  122. },{
  123. xtype: 'button',
  124. text: '8',
  125. id: 'DMTH8',
  126. width: 18,
  127. enableToggle: true,
  128. toggleGroup: 'sh_mdraw_btn_grp',
  129. handler: function(){
  130. doDeviceOperation( deviceCtrlNode, 3, '0:7' );
  131. }
  132. },{
  133. html: 'Draw Slave LRF:'
  134. },{
  135. xtype: 'button',
  136. text: '1',
  137. id: 'DSTH1',
  138. width: 16,
  139. enableToggle: true,
  140. toggleGroup: 'sh_sdraw_btn_grp'
  141. },{
  142. xtype: 'button',
  143. text: '2',
  144. id: 'DSTH2',
  145. width: 16,
  146. enableToggle: true,
  147. toggleGroup: 'sh_sdraw_btn_grp'
  148. },{
  149. xtype: 'button',
  150. text: '3',
  151. id: 'DSTH3',
  152. width: 16,
  153. enableToggle: true,
  154. toggleGroup: 'sh_sdraw_btn_grp'
  155. },{
  156. xtype: 'button',
  157. text: '4',
  158. id: 'DSTH4',
  159. width: 16,
  160. enableToggle: true,
  161. toggleGroup: 'sh_sdraw_btn_grp'
  162. },{
  163. xtype: 'button',
  164. text: '5',
  165. id: 'DSTH5',
  166. width: 16,
  167. enableToggle: true,
  168. toggleGroup: 'sh_sdraw_btn_grp'
  169. },{
  170. xtype: 'button',
  171. text: '6',
  172. id: 'DSTH6',
  173. width: 16,
  174. enableToggle: true,
  175. toggleGroup: 'sh_sdraw_btn_grp'
  176. },{
  177. xtype: 'button',
  178. text: '7',
  179. id: 'DSTH7',
  180. width: 18,
  181. enableToggle: true,
  182. toggleGroup: 'sh_sdraw_btn_grp'
  183. },{
  184. xtype: 'button',
  185. text: '8',
  186. id: 'DSTH8',
  187. width: 18,
  188. enableToggle: true,
  189. toggleGroup: 'sh_sdraw_btn_grp'
  190. },{
  191. colspan: 9,
  192. xtype: 'button',
  193. text: 'Mask Editor',
  194. id: 'DMED',
  195. width: '100%',
  196. handler: function(){
  197. showMaskEditor( true, 1, deviceCtrlNode );
  198. }
  199. }]
  200. }
  201. KAKU;
  202. break;
  203. };
  204. };
  205. $Data = $K;
  206. };
  207. };
  208. echo json_encode( $Data );
  209. exit();
  210. };
  211. header('location: /');
  212. ?>