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.

484 lines
18 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. require_once('../php/argus/server.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. $EID = intval( $_POST['PID'] );
  6. $QS = "SELECT * FROM `metro_platforms` WHERE `id`={$EID}";
  7. $Result = $DATABASE->Query( $QS, false );
  8. if( count( $Result ) ){
  9. $CR = $Result[0];
  10. $TTPL=<<<JOJOKA
  11. {
  12. xtype: 'panel',
  13. border: false,
  14. frame: false,
  15. tbar:[{
  16. id: 'btn_del_station',
  17. text: '{$Labels->GetLabel('_SMM_DEL_PLATFORM_')}',
  18. handler: function(){
  19. Ext.Msg.show({
  20. title:'{$Labels->GetLabel('_REMOVE_MODULE_')}?',
  21. msg: '{$Labels->GetLabel('_REMOVE_MODU_QUES_')}?',
  22. buttons: Ext.Msg.OKCANCEL,
  23. fn: function(btn){
  24. if( btn == 'ok' ){
  25. SelectedModule = 0;
  26. doModuleOperation( {$CR['id']}, 200, '', true );
  27. };
  28. },
  29. icon: Ext.MessageBox.QUESTION
  30. });
  31. }
  32. }],
  33. items:[%%%ITEMS%%%]
  34. }
  35. JOJOKA;
  36. $ITEMS = array();
  37. $QS = "SELECT count(`id`) cnt FROM `metro_tracks` WHERE `platform_id`={$EID}";
  38. $Rt = $DATABASE->Query( $QS, false );
  39. $TCO = $Rt[0]['cnt'];
  40. $NAME =$CR['name'] .'<br/>';
  41. $PINFO = getPlatformInfo( $CR['id'] );
  42. $QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$CR['id']} ORDER BY `side` ASC";
  43. $TI = $DATABASE->Query( $QS, false );
  44. $TRACKS = '';
  45. if( count( $TI ) ){
  46. $COS = count( $PINFO['PREV'] );
  47. if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
  48. $TRU = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">{$TI[0]['short']}</td>";
  49. $TRACKS = "{ xtype: 'form', border: false, frame: false, labelWidth: 150,labelAlign: 'right',margins: {top:10, right:10, bottom:10, left:10},padding:8,labelAlign:'right', items:[{ xtype: 'panel', bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',html: '".$Labels->GetLabel('_UPPR_TRACK_')."'},{ xtype: 'textfield', fieldLabel:'Name', value: '{$TI[0]['name']}',listeners:{change: function( a, c, b ){doPlatformOperation( {$CR['id']}, 8, c, true );}}},{ xtype: 'textfield', fieldLabel:'Abbreviation', value: '{$TI[0]['short']}',listeners:{change: function( a, c, b ){doPlatformOperation( {$CR['id']}, 9, c, true );}}}]}";
  50. if( count( $TI ) > 1 ){
  51. $COS = count( $PINFO['NEXT'] );
  52. if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
  53. $TRB = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">{$TI[1]['short']}</td>";
  54. $TRACKS .= ",{ xtype: 'form', border: false, frame: false, labelWidth: 150,labelAlign: 'right',margins: {top:10, right:10, bottom:10, left:10},padding:8, labelAlign:'right', items:[{ xtype: 'panel', bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',html: '".$Labels->GetLabel('_BTOM_TRACK_')."'},{ xtype: 'textfield', fieldLabel:'Name', value: '{$TI[1]['name']}',listeners:{change: function( a, c, b ){doPlatformOperation( {$CR['id']}, 10, c, true );}}},{ xtype: 'textfield', fieldLabel:'Abbreviation', value: '{$TI[1]['short']}',listeners:{change: function( a, c, b ){doPlatformOperation( {$CR['id']}, 11, c, true );}}}]}";
  55. };
  56. } else {
  57. $COS = count( $PINFO['PREV'] );
  58. if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
  59. $TRU = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">&nbsp;</td>";
  60. $COS = count( $PINFO['NEXT'] );
  61. if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
  62. $TRB = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">&nbsp;</td>";
  63. };
  64. $INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_SMM_PAT_LEVEL_').':</td><td><div class="level_label">'.$CR['level'].'</div></td></tr><tr><td width="130px" align="right">'.$Labels->GetLabel('_LBL_TRACKS_').':</td><td>'.$TCO.'</td></tr><tr><td align="right">'.$Labels->GetLabel('_MODULES_').':</td><td>'. ( $TCO * 2 ) .'</td></tr></table>';
  65. $QS = "SELECT `sl`.`line_id`, `ln`.`short`,`ln`.`color`,`ln`.`name`,`sl`.`index` FROM `metro_lines` `ln` LEFT JOIN `metro_stations_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`station_id`={$CR['station_id']} ORDER BY `ln`.`short`";
  66. $Sz = $DATABASE->Query( $QS, false );
  67. if( count( $Sz ) ){
  68. $LINE_COLORS = array();
  69. $QS = "SELECT `ln`.`short`,`ln`.`color` FROM `metro_lines` `ln` LEFT JOIN `metro_platforms_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`platform_id`={$EID} ORDER BY `ln`.`short`";
  70. $Rz = $DATABASE->Query( $QS, false );
  71. if( count( $Rz ) ){
  72. $LINES='<table><tr>';
  73. foreach( $Rz as $Z ){
  74. $LINE_COLORS[$Z['short']] = '#'.$Z['color'];
  75. $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
  76. };
  77. $LINES.='</tr></table>';
  78. };
  79. $ROUTING = "{ xtype:'panel', width: '100%', layout: 'table', defaults: {margins: {top:10, right:10, bottom:10, left:10},padding:8},baseCls: 'x-plain', layoutConfig: {columns: 2},frame: false,border: false,items:[{xtype:'panel',border:false,frame:false,colspan:2,html:'{$Labels->GetLabel('_SMM_MET_ROUTE_')}'}";
  80. foreach( $Sz as $Z ){
  81. $AS = 'false';
  82. for( $idx = 0; $idx < $PINFO['INFO_COUNT']; $idx++){
  83. if( $Z['line_id'] == $PINFO[$idx]['id'] ){
  84. $AS = 'true';
  85. break;
  86. };
  87. };
  88. //
  89. $ROUTING .=",{xtype:'panel',width:70, height:60,border:false,frame:false,style:{float:'right'},html: '<div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div>'},{ xtype: 'button',enableToggle:true,pressed:{$AS},text:'{$Labels->GetLabel('_ACTIVE_')}',handler:function(b,e){if(b.pressed){ doPlatformOperation({$CR['id']},3,{$Z['line_id']},true);}else{doPlatformOperation({$CR['id']},4,{$Z['line_id']},true);};}}";
  90. };
  91. $ROUTING .= "]}";
  92. } else {
  93. $ROUTING = "{xtype:'spacer',height:0}";
  94. };
  95. $TOP ="<td><table width=\"100%\" border=0><tr><td><table border=0 width=\"100%\" style=\"border-collapse: collapse; border-spacing: 5px 5px;\">";
  96. if( $PINFO['PREV_IS_MULTI'] ){
  97. foreach( $PINFO['PREV'] as $P ){
  98. $TOP .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold;{$PINFO['PREV'][0]['bg_style']}\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\">{$P['name']}</td></tr></table></td></tr>";
  99. }
  100. } else {
  101. if( count( $PINFO['PREV'] )){
  102. $TOP .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold;{$PINFO['PREV'][0]['bg_style']}\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\">{$PINFO['PREV'][0]['name']}</td></tr></table></td></tr>";
  103. } else {
  104. $TOP .="<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000;\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\">{$Labels->GetLabel('_SMM_NO_NESTA_')}</td></tr></table></td></tr>";
  105. };
  106. };
  107. $TOP .="</table></td>{$TRU}</tr></table></td>";
  108. $BOTTOM ="<td><table width=\"100%\" border=0><tr>{$TRB}<td><table border=0 width=\"100%\" style=\"border-collapse: collapse; border-spacing: 5px 5px;\">";
  109. if( $PINFO['NEXT_IS_MULTI'] ){
  110. foreach( $PINFO['NEXT'] as $P ){
  111. $BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold;{$P['bg_style']}\"><tr><td align=\"right\">{$P['name']}</td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
  112. }
  113. } else {
  114. if( count( $PINFO['NEXT'] )){
  115. $BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold;{$PINFO['NEXT'][0]['bg_style']}\"><tr><td align=\"right\">{$PINFO['NEXT'][0]['name']}</td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
  116. } else {
  117. $BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000;\"><tr><td align=\"right\">{$Labels->GetLabel('_SMM_NO_NESTA_')}</td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
  118. };
  119. };
  120. $BOTTOM .="</table></td></tr></table></td>";
  121. $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '<table border=0 width=\"100%\" class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" width=\"100%\" align=\"left\" colspan=3 style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td colspan=3>{$INFO}</td></tr><tr><td></td>{$TOP}<td></td></tr><tr><td>&nbsp;</td><td width=\"100%\">".createPlatformAnimation( $CR['layout'], array(), $LINE_COLORS )."</td><td>&nbsp;</td></tr><tr><td></td>{$BOTTOM}<td></td></tr></table>'}";
  122. $QS="SELECT * FROM `modbus_modules` WHERE `platform_id`={$CR['id']}";
  123. $JG=$DATABASE->Query( $QS );
  124. if( count( $JG ) ){
  125. $SC=$JG[0];
  126. $CCCV = intval( $SC['values'] );
  127. if( ( $CCCV & 0x01 ) == 0x01 ) $P1 = 'true'; else $P1 = 'false';
  128. if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false';
  129. if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = 'false';
  130. if( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true'; else $P4 = 'false';
  131. $MODBUS=<<<DATA_BOUNDARY
  132. {
  133. xtype: 'combo',
  134. id: 'sca_ena',
  135. fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
  136. lazyRender: true,
  137. mode: 'local',
  138. forceSelection: true,
  139. triggerAction: 'all',
  140. editable: false,
  141. disableKeyFilter: true,
  142. store: new Ext.data.ArrayStore({
  143. fields: ['mode','mode_txt'],
  144. data: [
  145. ['D','{$Labels->GetLabel('__DISABLED__')}'],
  146. ['E','{$Labels->GetLabel('___ENABLED__')}']
  147. ]
  148. }),
  149. valueField: 'mode',
  150. displayField: 'mode_txt',
  151. value: '{$SC['wm']}',
  152. width: 200,
  153. listeners:{
  154. select: function( a, c, b ){
  155. doPlatformOperation( {$CR['id']}, 12, b, true );
  156. }
  157. }
  158. },{
  159. xtype: 'textfield',
  160. id: 'sca_ip',
  161. fieldLabel: '{$Labels->GetLabel('_DEVICE_IP_')}',
  162. maxlength: 64,
  163. value: '{$SC['ip4']}',
  164. listeners:{
  165. change: function( a, c, b ){
  166. doPlatformOperation( {$CR['id']}, 13, c, true );
  167. }
  168. }
  169. },{
  170. xtype: 'textfield',
  171. id: 'sca_port',
  172. fieldLabel: '{$Labels->GetLabel('_DEVICE_PORT_')}',
  173. maxlength: 2,
  174. value: '{$SC['port']}',
  175. listeners:{
  176. change: function( a, c, b ){
  177. doPlatformOperation( {$CR['id']}, 14, c, true );
  178. }
  179. }
  180. },{
  181. xtype: 'panel',
  182. layout: 'table',
  183. border: false,
  184. frame: false,
  185. labelWidth: 150,
  186. labelAlign: 'right',
  187. width: '100%',
  188. defaults: {
  189. // applied to each contained panel
  190. bodyStyle:'padding:10px; text-align: center;'
  191. },
  192. layoutConfig: {
  193. // The total column count must be specified here
  194. columns: 4
  195. },
  196. items:[{
  197. xtype: 'panel',
  198. bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',
  199. html: 'Upper Track'
  200. },{
  201. xtype: 'panel',
  202. bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',
  203. html: 'Bottom Track'
  204. },{
  205. xtype: 'panel',
  206. bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',
  207. html: 'Health Signal'
  208. },{
  209. xtype: 'panel',
  210. bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',
  211. html: 'AUX Signal'
  212. },{
  213. xtype: 'combo',
  214. fieldLabel: "Upper Track",
  215. lazyRender: true,
  216. mode: 'local',
  217. forceSelection: true,
  218. triggerAction: 'all',
  219. editable: false,
  220. disableKeyFilter: true,
  221. store: new Ext.data.ArrayStore({
  222. fields: ['mode','mode_txt'],
  223. data: [
  224. [-1,'{$Labels->GetLabel('__DISABLED__')}'],
  225. [0,'Coil D1'],[1,'Coil D2'],[2,'Coil D3'],[3,'Coil D4']
  226. ]
  227. }),
  228. valueField: 'mode',
  229. displayField: 'mode_txt',
  230. value: '{$SC['crossbar_a']}',
  231. width: 200,
  232. listeners:{
  233. select: function( a, c, b ){
  234. //doPlatformOperation( {$CR['id']}, 12, b, true );
  235. }
  236. }
  237. },{
  238. xtype: 'combo',
  239. fieldLabel: "Upper Track",
  240. lazyRender: true,
  241. mode: 'local',
  242. forceSelection: true,
  243. triggerAction: 'all',
  244. editable: false,
  245. disableKeyFilter: true,
  246. store: new Ext.data.ArrayStore({
  247. fields: ['mode','mode_txt'],
  248. data: [
  249. [-1,'{$Labels->GetLabel('__DISABLED__')}'],
  250. [0,'Coil D1'],[1,'Coil D2'],[2,'Coil D3'],[3,'Coil D4']
  251. ]
  252. }),
  253. valueField: 'mode',
  254. displayField: 'mode_txt',
  255. value: '{$SC['crossbar_b']}',
  256. width: 200,
  257. listeners:{
  258. select: function( a, c, b ){
  259. //doPlatformOperation( {$CR['id']}, 12, b, true );
  260. }
  261. }
  262. },{
  263. xtype: 'combo',
  264. fieldLabel: "Upper Track",
  265. lazyRender: true,
  266. mode: 'local',
  267. forceSelection: true,
  268. triggerAction: 'all',
  269. editable: false,
  270. disableKeyFilter: true,
  271. store: new Ext.data.ArrayStore({
  272. fields: ['mode','mode_txt'],
  273. data: [
  274. [-1,'{$Labels->GetLabel('__DISABLED__')}'],
  275. [0,'Coil D1'],[1,'Coil D2'],[2,'Coil D3'],[3,'Coil D4']
  276. ]
  277. }),
  278. valueField: 'mode',
  279. displayField: 'mode_txt',
  280. value: '{$SC['crossbar_c']}',
  281. width: 200,
  282. listeners:{
  283. select: function( a, c, b ){
  284. //doPlatformOperation( {$CR['id']}, 12, b, true );
  285. }
  286. }
  287. },{
  288. xtype: 'combo',
  289. fieldLabel: "Upper Track",
  290. lazyRender: true,
  291. mode: 'local',
  292. forceSelection: true,
  293. triggerAction: 'all',
  294. editable: false,
  295. disableKeyFilter: true,
  296. store: new Ext.data.ArrayStore({
  297. fields: ['mode','mode_txt'],
  298. data: [
  299. [-1,'{$Labels->GetLabel('__DISABLED__')}'],
  300. [0,'Coil D1'],[1,'Coil D2'],[2,'Coil D3'],[3,'Coil D4']
  301. ]
  302. }),
  303. valueField: 'mode',
  304. displayField: 'mode_txt',
  305. value: '{$SC['crossbar_d']}',
  306. width: 200,
  307. listeners:{
  308. select: function( a, c, b ){
  309. //doPlatformOperation( {$CR['id']}, 12, b, true );
  310. }
  311. }
  312. },{
  313. xtype: 'spacer',
  314. height: 10,
  315. colspan: 4
  316. },{
  317. xtype: 'panel',
  318. colspan: 4,
  319. bodyCssClass:'_infoPanel', bodyStyle: 'background-color: #000; text-align: center;',
  320. html: 'TEST MODBUS MODULE COILS'
  321. },{
  322. xtype: 'spacer',
  323. height: 5,
  324. colspan: 4
  325. },{
  326. xtype: 'button',
  327. enableToggle: true,
  328. allowDepress: true,
  329. width: '80%',
  330. text: 'Test D1',
  331. pressed: {$P1},
  332. handler: function( b, e ){
  333. if( b.pressed ){
  334. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} | 1 ), true );
  335. } else {
  336. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} & ( ~1 ) ), true );
  337. };
  338. }
  339. },{
  340. xtype: 'button',
  341. width: '80%',
  342. enableToggle: true,
  343. allowDepress: true,
  344. text: 'Test D2',
  345. pressed: {$P2},
  346. handler: function( b, e ){
  347. if( b.pressed ){
  348. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} | 2 ), true );
  349. } else {
  350. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} & ( ~2 ) ), true );
  351. };
  352. }
  353. },{
  354. xtype: 'button',
  355. enableToggle: true,
  356. allowDepress: true,
  357. width: '80%',
  358. text: 'Test D3',
  359. pressed: {$P3},
  360. handler: function( b, e ){
  361. if( b.pressed ){
  362. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} | 4 ), true );
  363. } else {
  364. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} & ( ~4 ) ), true );
  365. };
  366. }
  367. },{
  368. xtype: 'button',
  369. enableToggle: true,
  370. allowDepress: true,
  371. width: '80%',
  372. text: 'Test D4',
  373. pressed: {$P4},
  374. handler: function( b, e ){
  375. if( b.pressed ){
  376. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} | 8 ), true );
  377. } else {
  378. doPlatformOperation( {$CR['id']}, 15, ({$CCCV} & ( ~8 ) ), true );
  379. };
  380. }
  381. }]
  382. }
  383. DATA_BOUNDARY;
  384. } else {
  385. $MODBUS='';
  386. };
  387. $ED =<<<kokakskhkajhskr
  388. {
  389. xtype: 'tabpanel',
  390. border: false,
  391. frame: false,
  392. height: PanelH - 283,
  393. activeTab: 0,
  394. items:[{
  395. xtype: 'panel',
  396. title: '{$Labels->GetLabel('_GENERAL_')}',
  397. items: [{
  398. xtype: 'form',
  399. height: PanelH - 283,
  400. labelWidth: 150,
  401. labelAlign: 'right',
  402. margins: {top:10, right:10, bottom:10, left:10},
  403. padding:8,
  404. items: [{
  405. xtype: 'combo',
  406. id: 'sens_se',
  407. fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
  408. lazyRender: true,
  409. mode: 'local',
  410. forceSelection: true,
  411. triggerAction: 'all',
  412. editable: false,
  413. disableKeyFilter: true,
  414. store: new Ext.data.ArrayStore({
  415. fields: ['mode','mode_txt'],
  416. data: [
  417. ['D','{$Labels->GetLabel('__DISABLED__')}'],
  418. ['E','{$Labels->GetLabel('___ENABLED__')}']
  419. ]
  420. }),
  421. valueField: 'mode',
  422. displayField: 'mode_txt',
  423. value: '{$CR['status']}',
  424. width: 200,
  425. listeners:{
  426. select: function( a, c, b ){
  427. doPlatformOperation( {$CR['id']}, 2, b, true );
  428. }
  429. }
  430. },{
  431. xtype: 'textfield',
  432. id: 'plt_name',
  433. fieldLabel: '{$Labels->GetLabel('_SMM_PAT_NAME_')}',
  434. maxlength: 64,
  435. value: '{$CR['name']}',
  436. listeners:{
  437. change: function( a, c, b ){
  438. doPlatformOperation( {$CR['id']}, 6, c, true );
  439. }
  440. }
  441. },{
  442. xtype: 'textfield',
  443. id: 'plt_lvl',
  444. fieldLabel: '{$Labels->GetLabel('_SMM_PAT_LEVEL_')}',
  445. maxlength: 2,
  446. value: '{$CR['level']}',
  447. listeners:{
  448. change: function( a, c, b ){
  449. doPlatformOperation( {$CR['id']}, 7, c, true );
  450. }
  451. }
  452. },{$ROUTING}]
  453. }]
  454. },{
  455. xtype: 'panel',
  456. title: '{$Labels->GetLabel('_LBL_TRACKS_')}',
  457. items: [{$TRACKS}]
  458. },{
  459. xtype: 'panel',
  460. title: '{$Labels->GetLabel('_LBL_SCADA_')}',
  461. items: [{
  462. xtype: 'form',
  463. height: PanelH - 283,
  464. labelWidth: 150,
  465. labelAlign: 'right',
  466. margins: {top:10, right:10, bottom:10, left:10},
  467. padding:8,
  468. items: [{$MODBUS}]
  469. }]
  470. }],
  471. }
  472. kokakskhkajhskr;
  473. $ITEMS[1] = $ED;
  474. $CONTENT = implode(',',$ITEMS);
  475. $TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL );
  476. echo $TTPL;
  477. } else {
  478. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  479. };
  480. } else {
  481. header('location: /');
  482. };
  483. ?>