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.

657 lines
17 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $EID = intval( $_POST['MID'] );
  5. $QS = "SELECT * FROM modules WHERE id = {$EID}";
  6. $Result = $DATABASE->Query( $QS, false );
  7. if( count( $Result ) ){
  8. $CR = $Result[0];
  9. switch( $CR['type'] ){
  10. case 0: //ZLMedia
  11. $TPL =<<<EFUFU
  12. {
  13. xtype: 'form',
  14. labelAlign: 'right',
  15. autoScroll: 'auto',
  16. labelWidth: 120,
  17. items:[{
  18. border: false,
  19. frame: false,
  20. xtype: 'panel',
  21. html: '<table width="100%" border=0 class="setEd_infoPanel" id="UART"><tr><td width="65px"><img width="64px" src="/style/assets/ZL_logo.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  22. },{
  23. xtype: 'spacer',
  24. height: 5
  25. },{
  26. border: false,
  27. frame: false,
  28. xtype: 'panel',
  29. html: '<table width="100%" border=0 class="setEd_infoPanel" id="UART"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  30. },{
  31. xtype: 'spacer',
  32. height: 5
  33. },{
  34. xtype: 'combo',
  35. fieldLabel: 'Module Status',
  36. id: 'mod_ena',
  37. lazyRender:true,
  38. mode: 'local',
  39. forceSelection: true,
  40. triggerAction: 'all',
  41. editable: false,
  42. disableKeyFilter: true,
  43. store: new Ext.data.ArrayStore({
  44. fields: ['status_val','status_txt'],
  45. data: [[0,'Disabled'],[1,'Enabled']]
  46. }),
  47. value: %%%ENA_VAL%%%,
  48. valueField: 'status_val',
  49. displayField: 'status_txt',
  50. listeners:{
  51. select: function( t, r, i ){
  52. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  53. }
  54. }
  55. },{
  56. xtype: 'spacer',
  57. height: 5
  58. },{
  59. xtype: 'button',
  60. id: 'mo_edit_btn',
  61. disabled: false,
  62. width: '100%',
  63. text: 'Edit Module Config',
  64. handler: function(){
  65. showModuleSettingsEditor({$EID});
  66. }
  67. },{
  68. xtype: 'spacer',
  69. height: 5
  70. },{
  71. xtype: 'button',
  72. id: 'mo_del_btn',
  73. disabled: false,
  74. width: '100%',
  75. text: 'Remove Module',
  76. handler: function(){
  77. removeModule({$EID});
  78. }
  79. }]
  80. }
  81. EFUFU;
  82. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ZL_MEDIA_DESC_SHO_') , $TPL );
  83. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ZL_MEDIA_DESC_LOO_'), $TPL );
  84. $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL );
  85. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  86. echo $TPL;
  87. break;
  88. case 1: //DCB USB
  89. break;
  90. case 2: //Kafka
  91. $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}";
  92. $II = $DATABASE->Query( $QS );
  93. $CI = $II[0];
  94. $R_nfo = 'Broker Node:'. $CI['brocker_address'].':'.$CI['brocker_port'].((intval($CI['use_ssl'])>0)?'<img title="SSL Encription" src="/style/icons/icons/rosette.png">':'<img title="NO Encription" src="/style/icons/icons/flag_green.png">');
  95. $TPL =<<<EFUFU
  96. {
  97. xtype: 'form',
  98. labelAlign: 'right',
  99. autoScroll: 'auto',
  100. labelWidth: 120,
  101. items:[{
  102. border: false,
  103. frame: false,
  104. xtype: 'panel',
  105. html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td width="65px"><img width="64px" src="/style/assets/Kafka.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  106. },{
  107. xtype: 'spacer',
  108. height: 5
  109. },{
  110. border: false,
  111. frame: false,
  112. xtype: 'panel',
  113. html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  114. },{
  115. xtype: 'spacer',
  116. height: 5
  117. },{
  118. xtype: 'combo',
  119. fieldLabel: 'Module Status',
  120. id: 'mod_ena',
  121. lazyRender:true,
  122. mode: 'local',
  123. forceSelection: true,
  124. triggerAction: 'all',
  125. editable: false,
  126. disableKeyFilter: true,
  127. store: new Ext.data.ArrayStore({
  128. fields: ['status_val','status_txt'],
  129. data: [[0,'Disabled'],[1,'Enabled']]
  130. }),
  131. value: %%%ENA_VAL%%%,
  132. valueField: 'status_val',
  133. displayField: 'status_txt',
  134. listeners:{
  135. select: function( t, r, i ){
  136. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  137. }
  138. }
  139. },{
  140. xtype: 'spacer',
  141. height: 5
  142. },{
  143. xtype: 'button',
  144. id: 'mo_edit_btn',
  145. disabled: false,
  146. width: '100%',
  147. text: 'Edit Module Config',
  148. handler: function(){
  149. showModuleSettingsEditor({$EID});
  150. }
  151. },{
  152. xtype: 'spacer',
  153. height: 5
  154. },{
  155. xtype: 'button',
  156. id: 'mo_del_btn',
  157. disabled: false,
  158. width: '100%',
  159. text: 'Remove Module',
  160. handler: function(){
  161. removeModule({$EID});
  162. }
  163. }]
  164. }
  165. EFUFU;
  166. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_KAFKA_DESC_SHO_') , $TPL );
  167. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_KAFKA_DESC_LOO_'), $TPL );
  168. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  169. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  170. echo $TPL;
  171. break;
  172. case 6: // SSDP
  173. //$QS = "SELECT * FROM `module_ssdp` WHERE `module_id`={$CR['aux_id']}";
  174. //$ZZ = $DATABASE->Query( $QS );
  175. $TPL =<<<EFUFU
  176. {
  177. xtype: 'form',
  178. labelAlign: 'right',
  179. autoScroll: 'auto',
  180. labelWidth: 120,
  181. items:[{
  182. border: false,
  183. frame: false,
  184. xtype: 'panel',
  185. html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td width="65px"><img width="64px" src="/style/assets/upnp.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  186. },{
  187. xtype: 'spacer',
  188. height: 5
  189. },{
  190. border: false,
  191. frame: false,
  192. xtype: 'panel',
  193. html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  194. },{
  195. xtype: 'spacer',
  196. height: 5
  197. },{
  198. xtype: 'combo',
  199. fieldLabel: 'Module Status',
  200. id: 'mod_ena',
  201. lazyRender:true,
  202. mode: 'local',
  203. forceSelection: true,
  204. triggerAction: 'all',
  205. editable: false,
  206. disableKeyFilter: true,
  207. store: new Ext.data.ArrayStore({
  208. fields: ['status_val','status_txt'],
  209. data: [[0,'Disabled'],[1,'Enabled']]
  210. }),
  211. value: %%%ENA_VAL%%%,
  212. valueField: 'status_val',
  213. displayField: 'status_txt',
  214. listeners:{
  215. select: function( t, r, i ){
  216. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  217. }
  218. }
  219. },{
  220. xtype: 'spacer',
  221. height: 5
  222. },{
  223. xtype: 'button',
  224. id: 'mo_del_btn',
  225. disabled: false,
  226. width: '100%',
  227. text: 'Remove Module',
  228. handler: function(){
  229. removeModule({$EID});
  230. }
  231. }]
  232. }
  233. EFUFU;
  234. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_SSDP_DESC_SHO_') , $TPL );
  235. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_SSDP_DESC_LOO_'), $TPL );
  236. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  237. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  238. echo $TPL;
  239. break;
  240. case 7: // Onvif
  241. $TPL =<<<EFUFU
  242. {
  243. xtype: 'form',
  244. labelAlign: 'right',
  245. autoScroll: 'auto',
  246. labelWidth: 120,
  247. items:[{
  248. border: false,
  249. frame: false,
  250. xtype: 'panel',
  251. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td width="65px"><img width="64px" src="/style/assets/onvif.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  252. },{
  253. xtype: 'spacer',
  254. height: 5
  255. },{
  256. border: false,
  257. frame: false,
  258. xtype: 'panel',
  259. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  260. },{
  261. xtype: 'spacer',
  262. height: 5
  263. },{
  264. xtype: 'combo',
  265. fieldLabel: 'Module Status',
  266. id: 'mod_ena',
  267. lazyRender:true,
  268. mode: 'local',
  269. forceSelection: true,
  270. triggerAction: 'all',
  271. editable: false,
  272. disableKeyFilter: true,
  273. store: new Ext.data.ArrayStore({
  274. fields: ['status_val','status_txt'],
  275. data: [[0,'Disabled'],[1,'Enabled']]
  276. }),
  277. value: %%%ENA_VAL%%%,
  278. valueField: 'status_val',
  279. displayField: 'status_txt',
  280. listeners:{
  281. select: function( t, r, i ){
  282. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  283. }
  284. }
  285. },{
  286. xtype: 'spacer',
  287. height: 5
  288. },{
  289. xtype: 'button',
  290. id: 'mo_del_btn',
  291. disabled: false,
  292. width: '100%',
  293. text: 'Remove Module',
  294. handler: function(){
  295. removeModule({$EID});
  296. }
  297. }]
  298. }
  299. EFUFU;
  300. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ONVIF_DESC_SHO_') , $TPL );
  301. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ONVIF_DESC_LOO_'), $TPL );
  302. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  303. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  304. echo $TPL;
  305. break;
  306. case 8://Embed Video Encoder
  307. //$QS="SELECT * FROM `network_interfaces` WHERE `id`={$CR['aux_id']}";
  308. //$II = $DATABASE->Query( $QS );
  309. //$CI = $II[0];
  310. $TPL =<<<EFUFU
  311. {
  312. xtype: 'form',
  313. labelAlign: 'right',
  314. autoScroll: 'auto',
  315. labelWidth: 120,
  316. items:[{
  317. border: false,
  318. frame: false,
  319. xtype: 'panel',
  320. html: '<table width="100%" border=0 class="setEd_infoPanel" id="EVE"><tr><td width="65px"><img width="64px" src="/style/assets/ffmpeg.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  321. },{
  322. xtype: 'spacer',
  323. height: 5
  324. },{
  325. border: false,
  326. frame: false,
  327. xtype: 'panel',
  328. html: '<table width="100%" border=0 class="setEd_infoPanel" id="EVE"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  329. },{
  330. xtype: 'spacer',
  331. height: 5
  332. },{
  333. xtype: 'combo',
  334. fieldLabel: 'Module Status',
  335. id: 'mod_ena',
  336. lazyRender:true,
  337. mode: 'local',
  338. forceSelection: true,
  339. triggerAction: 'all',
  340. editable: false,
  341. disableKeyFilter: true,
  342. store: new Ext.data.ArrayStore({
  343. fields: ['status_val','status_txt'],
  344. data: [[0,'Disabled'],[1,'Enabled']]
  345. }),
  346. value: %%%ENA_VAL%%%,
  347. valueField: 'status_val',
  348. displayField: 'status_txt',
  349. listeners:{
  350. select: function( t, r, i ){
  351. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  352. }
  353. }
  354. },{
  355. xtype: 'spacer',
  356. height: 5
  357. },{
  358. xtype: 'button',
  359. id: 'mo_edit_btn',
  360. disabled: false,
  361. width: '100%',
  362. text: 'Edit Module Config',
  363. handler: function(){
  364. showModuleSettingsEditor({$EID});
  365. }
  366. },{
  367. xtype: 'spacer',
  368. height: 5
  369. },{
  370. xtype: 'button',
  371. id: 'mo_del_btn',
  372. disabled: false,
  373. width: '100%',
  374. text: 'Remove Module',
  375. handler: function(){
  376. removeModule({$EID});
  377. }
  378. }]
  379. }
  380. EFUFU;
  381. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_EVE_DESC_SHO_') , $TPL );
  382. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_EVE_DESC_LOO_'), $TPL );
  383. // Embedded MediaMTX summary (live view / recording)
  384. $R_nfo = '';
  385. $QS = "SELECT * FROM `module_eve` WHERE `id`=".intval( $CR['aux_id'] );
  386. $II = $DATABASE->Query( $QS, false );
  387. if( count( $II ) ){
  388. $CI = $II[0];
  389. $LV_MODE = isset( $CI['live_mode'] ) ? intval( $CI['live_mode'] ) : 1;
  390. $LV_PORT = isset( $CI['live_port'] ) ? intval( $CI['live_port'] ) : 8889;
  391. $LV_REC = isset( $CI['live_record'] ) ? intval( $CI['live_record'] ) : 1;
  392. $LV_SEG = isset( $CI['live_record_segment'] ) ? intval( $CI['live_record_segment'] ) : 60;
  393. $LV_MODES = array( 0 => '_EVE_LIVE_OFF_', 1 => '_EVE_LIVE_PASS_', 2 => '_EVE_LIVE_ENC_' );
  394. $R_nfo = $Labels->GetLabel('_EVE_LIVE_MODE_').': <b>'.$Labels->GetLabel( isset( $LV_MODES[$LV_MODE] ) ? $LV_MODES[$LV_MODE] : '_EVE_LIVE_PASS_' ).'</b>';
  395. if( $LV_MODE > 0 ) $R_nfo .= '<br>'.$Labels->GetLabel('_EVE_LIVE_PORT_').': <b>'.$LV_PORT.'</b>';
  396. $R_nfo .= '<br>'.$Labels->GetLabel('_EVE_LIVE_RECORD_').': <b>'.( $LV_REC ? $Labels->GetLabel('___ENABLED__').' ('.$LV_SEG.' s)' : $Labels->GetLabel('__DISABLED__') ).'</b>';
  397. };
  398. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  399. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  400. echo $TPL;
  401. break;
  402. case 9: //Modem
  403. $R_nfo = '';
  404. $TPL =<<<EFUFU
  405. {
  406. xtype: 'form',
  407. labelAlign: 'right',
  408. autoScroll: 'auto',
  409. labelWidth: 120,
  410. items:[{
  411. border: false,
  412. frame: false,
  413. xtype: 'panel',
  414. html: '<table width="100%" border=0 class="setEd_infoPanel" id="MODEM"><tr><td width="65px"><img width="64px" src="/style/assets/modem.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  415. },{
  416. xtype: 'spacer',
  417. height: 5
  418. },{
  419. border: false,
  420. frame: false,
  421. xtype: 'panel',
  422. html: '<table width="100%" border=0 class="setEd_infoPanel" id="MODEM"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  423. },{
  424. xtype: 'spacer',
  425. height: 5
  426. },{
  427. xtype: 'combo',
  428. fieldLabel: 'Module Status',
  429. id: 'mod_ena',
  430. lazyRender:true,
  431. mode: 'local',
  432. forceSelection: true,
  433. triggerAction: 'all',
  434. editable: false,
  435. disableKeyFilter: true,
  436. store: new Ext.data.ArrayStore({
  437. fields: ['status_val','status_txt'],
  438. data: [[0,'Disabled'],[1,'Enabled']]
  439. }),
  440. value: %%%ENA_VAL%%%,
  441. valueField: 'status_val',
  442. displayField: 'status_txt',
  443. listeners:{
  444. select: function( t, r, i ){
  445. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  446. }
  447. }
  448. },{
  449. xtype: 'spacer',
  450. height: 5
  451. },{
  452. xtype: 'button',
  453. id: 'mo_edit_btn',
  454. disabled: false,
  455. width: '100%',
  456. text: 'Edit Module Config',
  457. handler: function(){
  458. showModuleSettingsEditor({$EID});
  459. }
  460. },{
  461. xtype: 'spacer',
  462. height: 5
  463. },{
  464. xtype: 'button',
  465. id: 'mo_del_btn',
  466. disabled: false,
  467. width: '100%',
  468. text: 'Remove Module',
  469. handler: function(){
  470. removeModule({$EID});
  471. }
  472. }]
  473. }
  474. EFUFU;
  475. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_MODEM_DESC_SHO_'), $TPL );
  476. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_MODEM_DESC_LOO_'), $TPL );
  477. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  478. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  479. echo $TPL;
  480. break;
  481. case 12: //Bosch VMS Proxy
  482. $R_nfo = '';
  483. $TPL =<<<EFUFU
  484. {
  485. xtype: 'form',
  486. labelAlign: 'right',
  487. autoScroll: 'auto',
  488. labelWidth: 120,
  489. items:[{
  490. border: false,
  491. frame: false,
  492. xtype: 'panel',
  493. html: '<table width="100%" border=0 class="setEd_infoPanel" id="BOSCH"><tr><td width="65px"><img width="64px" src="/style/assets/bosch.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  494. },{
  495. xtype: 'spacer',
  496. height: 5
  497. },{
  498. border: false,
  499. frame: false,
  500. xtype: 'panel',
  501. html: '<table width="100%" border=0 class="setEd_infoPanel" id="BOSCH"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  502. },{
  503. xtype: 'spacer',
  504. height: 5
  505. },{
  506. xtype: 'combo',
  507. fieldLabel: 'Module Status',
  508. id: 'mod_ena',
  509. lazyRender:true,
  510. mode: 'local',
  511. forceSelection: true,
  512. triggerAction: 'all',
  513. editable: false,
  514. disableKeyFilter: true,
  515. store: new Ext.data.ArrayStore({
  516. fields: ['status_val','status_txt'],
  517. data: [[0,'Disabled'],[1,'Enabled']]
  518. }),
  519. value: %%%ENA_VAL%%%,
  520. valueField: 'status_val',
  521. displayField: 'status_txt',
  522. listeners:{
  523. select: function( t, r, i ){
  524. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  525. }
  526. }
  527. },{
  528. xtype: 'spacer',
  529. height: 5
  530. },{
  531. xtype: 'button',
  532. id: 'mo_edit_btn',
  533. disabled: false,
  534. width: '100%',
  535. text: 'Edit Module Config',
  536. handler: function(){
  537. showModuleSettingsEditor({$EID});
  538. }
  539. },{
  540. xtype: 'spacer',
  541. height: 5
  542. },{
  543. xtype: 'button',
  544. id: 'mo_del_btn',
  545. disabled: false,
  546. width: '100%',
  547. text: 'Remove Module',
  548. handler: function(){
  549. removeModule({$EID});
  550. }
  551. }]
  552. }
  553. EFUFU;
  554. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_BVMS_DESC_SHO_'), $TPL );
  555. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_BVMS_DESC_LOO_'), $TPL );
  556. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  557. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  558. echo $TPL;
  559. break;
  560. case 13: //Attention Cloud
  561. $R_nfo = '';
  562. $TPL =<<<EFUFU
  563. {
  564. xtype: 'form',
  565. labelAlign: 'right',
  566. autoScroll: 'auto',
  567. labelWidth: 120,
  568. items:[{
  569. border: false,
  570. frame: false,
  571. xtype: 'panel',
  572. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ATTEN"><tr><td width="65px"><img width="64px" src="/style/assets/1203179.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  573. },{
  574. xtype: 'spacer',
  575. height: 5
  576. },{
  577. border: false,
  578. frame: false,
  579. xtype: 'panel',
  580. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ATTEN"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  581. },{
  582. xtype: 'spacer',
  583. height: 5
  584. },{
  585. xtype: 'combo',
  586. fieldLabel: 'Module Status',
  587. id: 'mod_ena',
  588. lazyRender:true,
  589. mode: 'local',
  590. forceSelection: true,
  591. triggerAction: 'all',
  592. editable: false,
  593. disableKeyFilter: true,
  594. store: new Ext.data.ArrayStore({
  595. fields: ['status_val','status_txt'],
  596. data: [[0,'Disabled'],[1,'Enabled']]
  597. }),
  598. value: %%%ENA_VAL%%%,
  599. valueField: 'status_val',
  600. displayField: 'status_txt',
  601. listeners:{
  602. select: function( t, r, i ){
  603. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  604. }
  605. }
  606. },{
  607. xtype: 'spacer',
  608. height: 5
  609. },{
  610. xtype: 'button',
  611. id: 'mo_edit_btn',
  612. disabled: false,
  613. width: '100%',
  614. text: 'Edit Module Config',
  615. handler: function(){
  616. showModuleSettingsEditor({$EID});
  617. }
  618. },{
  619. xtype: 'spacer',
  620. height: 5
  621. },{
  622. xtype: 'button',
  623. id: 'mo_del_btn',
  624. disabled: false,
  625. width: '100%',
  626. text: 'Remove Module',
  627. handler: function(){
  628. removeModule({$EID});
  629. }
  630. }]
  631. }
  632. EFUFU;
  633. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_MOATTEN_DESC_SHO_'), $TPL );
  634. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_MOATTEN_DESC_LONG_'), $TPL );
  635. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  636. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  637. echo $TPL;
  638. break;
  639. };
  640. } else {
  641. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  642. };
  643. } else {
  644. header('location: /');
  645. };
  646. ?>