public function ShowTempltList($extFlightId)
 {
     $flightId = $extFlightId;
     $Fl = new Flight();
     $flightInfo = $Fl->GetFlightInfo($flightId);
     $bruType = $flightInfo['bruType'];
     $apTableName = $flightInfo['apTableName'];
     $bpTableName = $flightInfo['bpTableName'];
     $exTableName = $flightInfo['exTableName'];
     unset($Fl);
     $Bru = new Bru();
     $bruInfo = $Bru->GetBruInfo($bruType);
     $paramSetTemplateListTableName = $bruInfo['paramSetTemplateListTableName'];
     $cycloApTableName = $bruInfo['gradiApTableName'];
     $cycloBpTableName = $bruInfo['gradiBpTableName'];
     $stepLength = $bruInfo['stepLength'];
     //$this->info = array_merge($this->info, $flightInfo, $bruInfo);
     $prefixArr = $Bru->GetBruApCycloPrefixes($bruType);
     unset($Bru);
     $Frame = new Frame();
     $framesCount = $Frame->GetFramesCount($apTableName, $prefixArr[0]);
     //giving just some prefix
     unset($Frame);
     $PSTempl = new PSTempl();
     //if no template table - create it
     $PSTTableName = $paramSetTemplateListTableName;
     if ($PSTTableName == "") {
         $dummy = substr($cycloApTableName, 0, -3);
         $paramSetTemplateListTableName = $dummy . "_pst";
         $PSTTableName = $paramSetTemplateListTableName;
         $PSTempl->CreatePSTTable($PSTTableName);
         $PSTempl->AddPSTTable($bruType, $PSTTableName);
     }
     //if isset excListTable create list to add template
     $excEventsParamsList = array();
     if ($exTableName != "") {
         $FEx = new FlightException();
         $excEventsList = $FEx->GetFlightEventsParamsList($exTableName);
         unset($FEx);
     }
     $flightTplsStr = "<select id='tplList' size='10' class='TplListSelect is-scrollable' multiple>";
     //here builds template options list
     $flightTplsStr .= $this->BuildTplOptionList($paramSetTemplateListTableName, $bruType);
     $foundedEventsTplName = $this->lang->foundedEventsTplName;
     //if performed exception search and isset events
     if (!empty($excEventsList)) {
         $params = "";
         $paramsToAdd = array();
         for ($i = 0; $i < count($excEventsList); $i++) {
             $params .= $excEventsList[$i] . ", ";
             $paramsToAdd[] = $excEventsList[$i];
         }
         $params = substr($params, 0, -2);
         $Bru = new Bru();
         $paramNamesStr = $Bru->GetParamNames($bruType, $paramsToAdd);
         $flightTplsStr .= "<option id='tplOption' " . "name='" . EVENTS_TPL_NAME . "'  " . "data-comment='" . $paramNamesStr . "'  " . "data-params='" . $params . "'  " . "data-defaulttpl='true'  " . "selected> " . $foundedEventsTplName . " - " . $params . "</option>";
         $this->CreateTemplate($flightId, $paramsToAdd, EVENTS_TPL_NAME);
     }
     unset($PSTempl);
     $flightTplsStr .= "</select><br><br>\r\n            <textarea id='tplComment' class='TplListTextareaComment is-scrollable'\r\n                rows='10' readonly/></textarea>";
     return $flightTplsStr;
 }