Data['id'] > 1 ){ $EID = intval( $_POST['CID'] ); $QS = "SELECT `sen`.*, `no`.`enable`, `no`.`name` FROM `lrf_sensors` `sen` LEFT JOIN `nodes` `no` ON( `no`.`aux_id`=`sen`.`id` AND `no`.`type`=`sen`.`type`) WHERE `sen`.`id`={$EID}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $CR = $Result[0]; $TTPL=<<
ALS ' . $Labels->getLabel('SENSOR'); break; case 2: $NAME = ''.$CR['name'].'
LGS ' . $Labels->getLabel('SENSOR'); break; case 3: $NAME = ''.$CR['name'].'
PLS200 ' . $Labels->getLabel('SENSOR'); break; case 4: $NAME = ''.$CR['name'].'
PLS360 ' . $Labels->getLabel('SENSOR'); break; default: $NAME = ''.$CR['name'].'
Unknown Sensor'; }; $INFO = '
Serial:'.(($CR['serial']!='')?$CR['serial']:'No Serial Defined').'
Version:'.(($CR['version']!='')?$CR['version']:'No Version Info').'
'; $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '
{$NAME}
{$INFO}

'}"; $QS="SELECT aux_id, device FROM resources WHERE ( type=1 OR type=129 )"; $RR=$DATABASE->Query( $QS ); if( count( $RR ) ){ $RE=array(); foreach( $RR as $R ){ $RE[] = "[ {$R['aux_id']}, '{$R['device']}']"; }; $UARTS = implode( ',', $RE ); } else { $UARTS = "[0, \"".$Labels->GetLabel('_NO_UARTS_DEF_')."\"]"; }; $ED =<<GetLabel('_SENS_STATUS_')}", lazyRender: true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['mode','mode_txt'], data: [ [0,'{$Labels->GetLabel('__DISABLED__')}'], [1,'{$Labels->GetLabel('___ENABLED__')}'] ] }), valueField: 'mode', displayField: 'mode_txt', value: {$CR['enable']}, width: 200, listeners:{ select: function( a, c, b ){ doSensorOperation( {$CR['id']}, 1, b, true ); } } },{ xtype: 'combo', id: 'sens_range', fieldLabel: "{$Labels->GetLabel('SENS_RANGE')}", lazyRender: true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['range','range_txt'], data: [ [15,'15 Meters'], [35,'35 Meters'], [45,'45 Meters'], [65,'65 Meters'], [75,'75 Meters'], [150,'150 Meters'], [200,'200 Meters'], [300,'300 Meters'] ] }), valueField: 'range', displayField: 'range_txt', value: {$CR['max_range']}, width: 200, listeners:{ select: function( a, c, b ){ doSensorOperation( {$CR['id']}, 2, b, true ); } } },{ xtype: 'numberfield', id: 'sens_id', fieldLabel: '{$Labels->GetLabel('_PROTO_DEVICE_ID_')}', width: 200, value: {$CR['device_id']}, listeners:{ change: function( a, c, b ){ doSensorOperation( {$CR['id']}, 3, c, true ); } } },{ xtype: 'combo', fieldLabel: '{$Labels->GetLabel('_UART_PORT_')}', lazyRender: true, id: 'uart_id', mode: 'local', disabled: false, forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['uart','uart_txt'], data: [{$UARTS}] }), valueField: 'uart', displayField: 'uart_txt', value: {$CR['uart_id']}, width: 200, listeners:{ select: function( a, c, b ){ doSensorOperation( {$CR['id']}, 4, c.data.uart, true ); } } },{ xtype: 'combo', id: 'ad_se', fieldLabel: "{$Labels->GetLabel('AUTO_DRAW')}", lazyRender: true, mode: 'local', forceSelection: true, triggerAction: 'all', editable: false, disableKeyFilter: true, store: new Ext.data.ArrayStore({ fields: ['ad','ad_txt'], data: [ [0,'{$Labels->GetLabel('__DISABLED__')}'], [10,'Each 10 Flips'], [20,'Each 20 Flips'], [30,'Each 30 Flips'], [40,'Each 40 Flips'], [50,'Each 50 Flips'], [100,'Each 100 Flips'], [200,'Each 200 Flips'] ] }), valueField: 'ad', displayField: 'ad_txt', value: {$CR['auto_draw']}, width: 200, listeners:{ select: function( a, c, b ){ doSensorOperation( {$CR['id']}, 5, b, true ); } } },{ xtype: 'numberfield', id: 'basesh_id', fieldLabel: '{$Labels->GetLabel('__ZERO_SHIFT__')}', width: 200, value: {$CR['base_shift']}, listeners:{ change: function( a, c, b ){ doSensorOperation( {$CR['id']}, 6, c, true ); } } }] } kokakskhkajhskr; $ITEMS[1] = $ED; $CONTENT = implode(',',$ITEMS); $TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL ); echo $TTPL; } else { echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}'; }; } else { header('location: /'); }; ?>