Data['id'] > 1 ){ $MID = intval( $_POST['MID'] ); $QS = "SELECT * FROM `metro_modules` WHERE `id`={$MID}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $CR = $Result[0]; $TTPL=<<GetLabel('_SMM_DEL_MODULE_')}', handler: function(){ Ext.Msg.show({ title:'{$Labels->GetLabel('_REMOVE_MODULE_')}', msg: '{$Labels->GetLabel('_REMOVE_MODU_QUES_')}', buttons: Ext.Msg.YESNO, fn: function(btn){ if( btn == 'yes' ){ SelectedModule = 0; doModuleOperation( {$CR['id']}, 200, '', true ); }; }, icon: Ext.MessageBox.QUESTION }); } }], items:[%%%ITEMS%%%] } DATA_BOUNDARY; $ITEMS = array(); $INFO = '
'.$Labels->GetLabel('_STATUS_').':'.((0)?'Online':'Offline').'
'.$Labels->GetLabel('_VERSION_').':'.(($CR['tls_version']!='')?$CR['tls_version']:'No Version Info').'
'; $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '
{$INFO}

'}"; $ITEMS[1] =<<GetLabel('_OP_MODULE_CTRL_')}', width: '100%', iconCls: 'srv_op_modctrl', scale: 'large', handler: moduleControl },{ xtype: 'button', text: '{$Labels->GetLabel('_OP_CAMERA_CTRL_')}', width: '100%', iconCls: 'srv_op_camctrl', scale: 'large', handler: moduleCamControl },{ xtype: 'button', text: 'Open Host Control', width: '100%', iconCls: 'srv_op_hostctrl', scale: 'large', handler: moduleHostControl }] },{ title: 'Connection Settings', xtype: 'form', labelWidth: 200, border: false, frame: false, labelAlign: 'right', items:[{ xtype: 'combo', fieldLabel: "{$Labels->GetLabel( '_STATUS_' )}", id: 'mod_stst', width: 200, lazyRender: true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['val','disp'], data: [['E','Enabled'], ['D','Disabled']] }), valueField: 'val', displayField: 'disp', value: '{$CR['status']}', listeners:{ select: function( t, r, i ){ doModuleOperation( {$CR['id']}, 14, r.data.val, true ); } } },{ xtype: 'textfield', fieldLabel: 'IP Address', value: '{$CR['IP4']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 4, c, true ); } } },{ xtype: 'textfield', fieldLabel: 'Identity', value: '{$CR['identity']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 5, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Module Login', value: '{$CR['m_login']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 6, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Module Password', value: '{$CR['m_password']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 7, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Host Login', value: '{$CR['h_login']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 10, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Host Password', value: '{$CR['h_password']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 11, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Camera Login', value: '{$CR['c_login']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 12, c, false ); } } },{ xtype: 'textfield', fieldLabel: 'Camera Password', value: '{$CR['c_password']}', listeners:{ change: function( a, c, b ){ doModuleOperation( {$CR['id']}, 13, c, false ); } } }] }] } DATA_BOUNDARY; $CONTENT = implode(',',$ITEMS); $TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL ); echo $TTPL; } else { echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}'; }; } else { header('location: /'); }; ?>