|
|
<?php require_once('../ajax_asm.php'); if( $CUser->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 =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="UART"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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)?'<img title="SSL Encription" src="/style/icons/icons/rosette.png">':'<img title="NO Encription" src="/style/icons/icons/flag_green.png">');$TPL =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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 =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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 =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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 =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="EVE"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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
$R_nfo = '';$TPL =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="MODEM"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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('_MODEM_DESC_SHO_'), $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_MODEM_DESC_LOO_'), $TPL ); $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL ); $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); echo $TPL; break; case 12: //Bosch VMS Proxy
$R_nfo = '';$TPL =<<<EFUFU{ xtype: 'form', labelAlign: 'right', autoScroll: 'auto', labelWidth: 120, items:[{ border: false, frame: false, xtype: 'panel', 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>' },{ xtype: 'spacer', height: 5 },{ border: false, frame: false, xtype: 'panel', html: '<table width="100%" border=0 class="setEd_infoPanel" id="BOSCH"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' },{ 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('_BVMS_DESC_SHO_'), $TPL ); $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_BVMS_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: /'); };?>
|