Data['id'] > 1 ){ $EID = intval( $_POST['LID'] ); $QS = "SELECT * FROM `metro_lines` WHERE `id`={$EID}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $CR = $Result[0]; $TTPL=<<GetLabel( '_SMM_DEL_LINE_' )}", handler: function(){ Ext.Msg.show({ title:'{$Labels->GetLabel('_REMOVE_LINE_')}', msg: '{$Labels->GetLabel('_REMOVE_LINE_QUES_')}', buttons: Ext.Msg.YESNO, fn: function(btn){ if( btn == 'yes' ){ SelectedLine = 0; doLineOperation( {$CR['id']}, 2, {$CR['id']}, true ); }; }, icon: Ext.MessageBox.QUESTION }); } }], items:[%%%ITEMS%%%] } JOJOKA; $QS="SELECT count(`station_id`) cnt FROM `metro_stations_2_lines` WHERE line_id={$EID}"; $RR=$DATABASE->Query( $QS ); if( count( $RR ) ){ $SCO = intval( $RR[0]['cnt'] ); } else { $SCO = 0; }; $ENANO=($CR['status']=='E')?1:0; $ITEMS = array(); switch( $CR['type'] ){ case 1:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_BRT_'); break; case 2:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_LRT_'); break; case 3:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_MRT_'); break; case 4:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_CRT_'); break; case 5:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_LCR_'); break; case 6:$NAME =$CR['name'] .'
'.$Labels->GetLabel('_LNT_HSR_'); break; default: $NAME =$CR['name'] .'
'.$Labels->GetLabel('_UNDEF_TYPE_'); break; }; $INFO = '
'.$Labels->GetLabel('_STATIONS_').':'.$SCO.'
'.$Labels->GetLabel('_MODULES_').':'."0" .'
'; $CL=( $CR['type'] < 2 )?'line_type_64_ground':'line_type_64_rail'; $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '
{$CR['short']}
{$NAME}
{$INFO}

'}"; $ED =<<GetLabel('_LINE_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: {$ENANO}, width: 200, listeners:{ select: function( a, c, b ){ doLineOperation( {$CR['id']}, 7, b, true ); } } },{ xtype: 'combo', id: 'line_type', fieldLabel: "{$Labels->GetLabel('_LINE_TYPE_')}", 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('_UNDEF_TYPE_')}'], [1,'{$Labels->GetLabel('_LNT_BRT_')}'], [2,'{$Labels->GetLabel('_LNT_LRT_')}'], [3,'{$Labels->GetLabel('_LNT_MRT_')}'], [4,'{$Labels->GetLabel('_LNT_CRT_')}'], [5,'{$Labels->GetLabel('_LNT_LCR_')}'], [6,'{$Labels->GetLabel('_LNT_HSR_')}'] ] }), valueField: 'mode', displayField: 'mode_txt', value: {$CR['type']}, width: 200, listeners:{ select: function( a, c, b ){ doLineOperation( {$CR['id']}, 6, b, true ); } } },{ xtype: 'textfield', id: 'line_name', value: '{$CR['name']}', fieldLabel: "{$Labels->GetLabel('_LINE_NAME_')}", },{ xtype: 'textfield', id: 'line_short', value: '{$CR['short']}', fieldLabel: "{$Labels->GetLabel('_LINE_SHORT_')}", },{ xtype: 'textfield', id: 'line_color_picker', value: '#{$CR['color']}', fieldLabel: "{$Labels->GetLabel('_LINE_LBL_COLOR_')}", listeners:{ render: function( t ){ var j = t.getEl(); document.getElementById( j.id ).setAttribute("data-coloris",""); document.getElementById( j.id ).setAttribute("class","x-form-text x-form-field coloris instance1"); //debugger; Coloris.setInstance('.instance1', { theme: 'pill', themeMode: 'dark', formatToggle: false, closeButton: true, clearButton: false, swatches: [ '#0072bc', '#e3131b', '#57a835', '#a05da5', '#f7b618', '#ea6bb1' ], onChange: function( w, c, e ){ doLineOperation( {$CR['id']}, 5, c.value, 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: /'); }; ?>