Data['id'] > 1 ){ $EID = intval( $_POST['CID'] ); $QS = "SELECT * FROM `metro_stations` WHERE `id`={$EID}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $CR = $Result[0]; $TTPL=<<GetLabel('_SMM_UNB_STATION_')}', handler: function(){ Ext.Msg.show({ title:'{$Labels->GetLabel('_UNBIND_STATION_')}?', msg: '{$Labels->GetLabel('_UNBIND_STATION_QUES_')}?', buttons: Ext.Msg.YESNO, fn: function(btn){ if( btn == 'yes' ){ SelectedModule = 0; doStationOperation( {$EID}, 4, SelectedLine, true ); }; }, icon: Ext.MessageBox.QUESTION }); } },{ id: 'btn_del_station', text: '{$Labels->GetLabel('_SMM_DEL_STATION_')}', handler: function(){ Ext.Msg.show({ title:'{$Labels->GetLabel('_REMOVE_STATION_')}?', msg: '{$Labels->GetLabel('_REMOVE_STATION_QUES_')}?', buttons: Ext.Msg.YESNO, fn: function(btn){ if( btn == 'yes' ){ SelectedModule = 0; doStationOperation( {$EID}, 4, SelectedLine, true ); }; }, icon: Ext.MessageBox.QUESTION }); } }], items:[%%%ITEMS%%%] } JOJOKA; $ITEMS = array(); $QS = "SELECT count(`id`) cnt FROM `metro_platforms` WHERE `station_id`={$EID}"; $Rt = $DATABASE->Query( $QS, false ); $PCO = $Rt[0]['cnt']; $NAME =$CR['name'] .'
'; $INFO = '
'.$Labels->GetLabel('_LBL_PLATFORMS_').':'.$PCO.'
'.$Labels->GetLabel('_MODULES_').':'."0" .'
'; $QS = "SELECT `ln`.`short`,`ln`.`color`,`ln`.`name` FROM `metro_lines` `ln` LEFT JOIN `metro_stations_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`station_id`={$EID} ORDER BY `ln`.`short`"; $Rz = $DATABASE->Query( $QS, false ); if( count( $Rz ) ){ $LINES=''; foreach( $Rz as $Z ) $LINES.=""; $LINES.='
{$Z['short']}
'; } else { $LINES=$Labels->GetLabel('_NOBI_LINE_'); }; //$ITEMS[0]="{ xtype: 'spacer', height: 28 }"; $ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '
{$NAME}
{$INFO}
{$LINES}
'}"; $ED =<<GetLabel('_GENERAL_')}', items: [{ xtype: 'form', id: 'st_general_map', height: PanelH - 190, labelWidth: 200, labelAlign: 'right', width: '100%', items:[{ xtype: 'textfield', width: '70%', fieldLabel: '{$Labels->GetLabel('_STATION_NAME_')}', id: 'st_long_name', value: '{$CR['name']}', listeners:{ change: function( a, c, b ){ doStationOperation( {$CR['id']}, 6, c, true ); } } },{ xtype: 'textfield', width: '70%', fieldLabel: '{$Labels->GetLabel('_STATION_NAME_SHORT_')}', id: 'st_short_name', value: '{$CR['short']}', listeners:{ change: function( a, c, b ){ doStationOperation( {$CR['id']}, 7, c, true ); } } }], listeners:{ afterrender: function(){ // inintSchematicEditor('schematic_map',{$CR['y']},{$CR['x']}); } } }] },{ xtype: 'panel', title: '{$Labels->GetLabel('_SMM_SCH_LOCATION_')}', items: [{ xtype: 'panel', id: 'schematic_map', height: PanelH - 190, listeners:{ afterrender: function(){ inintSchematicEditor('schematic_map',{$CR['y']},{$CR['x']}); } } }] },{ xtype: 'panel', title: '{$Labels->GetLabel('_SMM_GEO_LOCATION_')}', items: [{ xtype: 'panel', id: 'gis_map', height: PanelH - 190, listeners:{ afterrender: function(){ inintGisEditor('gis_map',{$CR['lat']},{$CR['lon']}); } } }] }], } 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: /'); }; ?>