Data['id'] > 1 ){ $EID = intval( $_POST['MID'] ); $QS = "SELECT * FROM modules WHERE id = {$EID}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $CR = $Result[0]; switch( $CR['type'] ){ case 0: //ZLMedia $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_edit_btn', disabled: false, width: '100%', text: 'Edit Module Config', handler: function(){ showModuleSettingsEditor({$EID}); } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ZL_MEDIA_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ZL_MEDIA_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 1: //DCB USB break; case 2: //Kafka $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}"; $II = $DATABASE->Query( $QS ); $CI = $II[0]; $R_nfo = 'Broker Node:'. $CI['brocker_address'].':'.$CI['brocker_port'].((intval($CI['use_ssl'])>0)?'':''); $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_edit_btn', disabled: false, width: '100%', text: 'Edit Module Config', handler: function(){ showModuleSettingsEditor({$EID}); } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_KAFKA_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_KAFKA_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 6: // SSDP //$QS = "SELECT * FROM `module_ssdp` WHERE `module_id`={$CR['aux_id']}"; //$ZZ = $DATABASE->Query( $QS ); $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_SSDP_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_SSDP_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 7: // Onvif $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ONVIF_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ONVIF_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 8://Embed Video Encoder $QS="SELECT * FROM `network_interfaces` WHERE `id`={$CR['aux_id']}"; $II = $DATABASE->Query( $QS ); $CI = $II[0]; $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_edit_btn', disabled: false, width: '100%', text: 'Edit Module Config', handler: function(){ showModuleSettingsEditor({$EID}); } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_EVE_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_EVE_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 9: //Modem $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}"; $II = $DATABASE->Query( $QS ); $CI = $II[0]; $R_nfo = 'Broker Node:'. $CI['brocker_address'].':'.$CI['brocker_port'].((intval($CI['use_ssl'])>0)?'':''); $TPL =<<%%%NAME%%%%%%INFO%%%' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '
%%%LOINFO%%%
' },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', fieldLabel: 'Module Status', id: 'mod_ena', lazyRender:true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['status_val','status_txt'], data: [[0,'Disabled'],[1,'Enabled']] }), value: %%%ENA_VAL%%%, valueField: 'status_val', displayField: 'status_txt', listeners:{ select: function( t, r, i ){ if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID}); } } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_edit_btn', disabled: false, width: '100%', text: 'Edit Module Config', handler: function(){ } },{ xtype: 'spacer', height: 5 },{ xtype: 'button', id: 'mo_del_btn', disabled: false, width: '100%', text: 'Remove Module', handler: function(){ removeModule({$EID}); } }] } EFUFU; $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_KAFKA_DESC_SHO_') , $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_KAFKA_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; }; } else { echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}'; }; } else { header('location: /'); }; ?>