function _displayComment()
 {
     $outputComment = '';
     if ($this->asLog->logcmt && count($this->logIds)) {
         $chkCmt = new AsPhxParser($this->asCfg->cfg['tplComment']);
         if ($this->dbgTpl) {
             $this->asUtil->dbgRecord($chkCmt->getTemplate($this->asCfg->cfg['tplComment']), "tplComment template " . $this->asCfg->cfg['tplComment']);
         }
         $varCmt = array();
         $varCmt['hiddenFieldIntro'] = $this->asCfg->lang['as_cmtHiddenFieldIntro'];
         $varCmt['hiddenField'] = 'ajaxSearch_cmtHField';
         $varCmt['logid'] = array_pop($this->logIds);
         $varCmt['cmtIntroMessage'] = $this->asCfg->lang['as_cmtIntroMessage'];
         $varCmt['cmtSubmitText'] = $this->asCfg->lang['as_cmtSubmitText'];
         $varCmt['cmtResetText'] = $this->asCfg->lang['as_cmtResetText'];
         $varCmt['cmtThksMessage'] = $this->asCfg->lang['as_cmtThksMessage'];
         $chkCmt->AddVar("as", $varCmt);
         $outputComment = $chkCmt->Render();
     }
     return $outputComment;
 }
 function _displayInputForm($msgErr)
 {
     global $modx;
     $varInputForm = array();
     if ($this->asCfg->cfg['showInputForm']) {
         if (!class_exists('AsPhxParser')) {
             include_once AS_PATH . "classes/asPhxParser.class.inc.php";
         }
         $tplInputForm = $this->asCfg->cfg['tplInput'];
         $chkInputForm = new AsPhxParser($tplInputForm);
         if ($this->dbgTpl) {
             $this->asUtil->dbgRecord($chkInputForm->getTemplate($tplInputForm), "tplInputForm template" . $tplInputForm);
         }
         if (isset($this->asCfg->cfg['landingPage']) && !is_bool($this->asCfg->cfg['landingPage'])) {
             $searchAction = "[~" . $this->asCfg->cfg['landingPage'] . "~]";
         } else {
             $searchAction = "[~" . $modx->documentIdentifier . "~]";
         }
         $varInputForm['showInputForm'] = '1';
         $varInputForm['formId'] = $this->asCfg->cfg['asId'] != '' ? $this->asCfg->cfg['asId'] . '_ajaxSearch_form' : 'ajaxSearch_form';
         $varInputForm['formAction'] = $searchAction;
         if ($this->dbg) {
             $this->asUtil->dbgRecord($this->asCtrl->searchString, "displayInputForm - searchString");
         }
         $varInputForm['inputId'] = $this->asCfg->cfg['asId'] != '' ? $this->asCfg->cfg['asId'] . '_ajaxSearch_input' : 'ajaxSearch_input';
         // simple input field - Not used if a multiple input list is used
         $varInputForm['inputValue'] = $this->asCtrl->searchString == '' && $this->asCfg->lang['as_boxText'] != 'init' ? $this->asCfg->lang['as_boxText'] : $this->asCtrl->searchString;
         $varInputForm['inputOptions'] = $this->asCfg->lang['as_boxText'] ? ' onfocus="this.value=(this.value==\'' . $this->asCfg->lang['as_boxText'] . '\')? \'\' : this.value ;"' : '';
         $varInputForm['asfId'] = $this->asCfg->cfg['asId'] != '' ? $this->asCfg->cfg['asId'] . '_asf_form' : 'asf_form';
         //if (($this->asCtrl->searchString == 'init')) $this->asCtrl->setSearchString('');
         if ($this->dbg) {
             $this->asUtil->dbgRecord($this->asCtrl->searchString, "displayInputForm - searchString");
         }
         // Submit button
         if ($this->asCfg->cfg['liveSearch']) {
             $varInputForm['liveSearch'] = 1;
         } else {
             $varInputForm['liveSearch'] = 0;
             $varInputForm['submitId'] = $this->asCfg->cfg['asId'] != '' ? $this->asCfg->cfg['asId'] . '_ajaxSearch_submit' : 'ajaxSearch_submit';
             $varInputForm['submitText'] = $this->asCfg->lang['as_searchButtonText'];
         }
         $varInputForm['advSearch'] = $this->asCtrl->advSearch;
         $varInputForm['radioId'] = $this->asCfg->cfg['asId'] ? $this->asCfg->cfg['asId'] . '_ajaxSearch_radio' : 'ajaxSearch_radio';
         $varInputForm['onewordId'] = $this->asCfg->cfg['asId'] ? $this->asCfg->cfg['asId'] . '_radio_oneword' : 'radio_oneword';
         $varInputForm['oneword'] = ONEWORD;
         $varInputForm['onewordText'] = $this->asCfg->lang[ONEWORD];
         $varInputForm['onewordChecked'] = $this->asCtrl->advSearch == ONEWORD ? 'checked ="checked"' : '';
         $varInputForm['allwordsId'] = $this->asCfg->cfg['asId'] ? $this->asCfg->cfg['asId'] . '_radio_allwords' : 'radio_allwords';
         $varInputForm['allwords'] = ALLWORDS;
         $varInputForm['allwordsText'] = $this->asCfg->lang[ALLWORDS];
         $varInputForm['allwordsChecked'] = $this->asCtrl->advSearch == ALLWORDS ? 'checked ="checked"' : '';
         $varInputForm['exactphraseId'] = $this->asCfg->cfg['asId'] ? $this->asCfg->cfg['asId'] . '_radio_exactphrase' : 'radio_exactphrase';
         $varInputForm['exactphrase'] = EXACTPHRASE;
         $varInputForm['exactphraseText'] = $this->asCfg->lang[EXACTPHRASE];
         $varInputForm['exactphraseChecked'] = $this->asCtrl->advSearch == EXACTPHRASE ? 'checked ="checked"' : '';
         $varInputForm['nowordsId'] = $this->asCfg->cfg['asId'] ? $this->asCfg->cfg['asId'] . '_radio_nowords' : 'radio_nowords';
         $varInputForm['nowords'] = NOWORDS;
         $varInputForm['nowordsText'] = $this->asCfg->lang[NOWORDS];
         $varInputForm['nowordsChecked'] = $this->asCtrl->advSearch == NOWORDS ? 'checked ="checked"' : '';
         if (!$this->asCtrl->searchString) {
             if ($this->asCfg->cfg['showIntro']) {
                 $varInputForm['showIntro'] = 1;
                 $varInputForm['introMessage'] = $this->asCfg->lang['as_introMessage'];
             } else {
                 $varInputForm['showIntro'] = 0;
             }
         }
         if ($this->asCfg->cfg['asId']) {
             $varInputForm['showAsId'] = '1';
             $varInputForm['asName'] = 'asid';
             $varInputForm['asId'] = $this->asCfg->cfg['asId'];
         } else {
             $varInputForm['showAsId'] = '0';
         }
         $chkInputForm->AddVar("as", $varInputForm);
         $this->inputForm = $chkInputForm->Render() . "\n";
         if (isset($this->asCfg->cfg['tplAsf']) && $this->asCfg->cfg['tplAsf']) {
             $tplAsfForm = $this->asCfg->cfg['tplAsf'];
             $chkAsfForm = new AsPhxParser($tplAsfForm);
             if ($this->dbgTpl) {
                 $this->asUtil->dbgRecord($chkAsfForm->getTemplate($tplAsfForm), "tplAsfForm template" . $tplAsfForm);
             }
             $varAsfForm = array();
             $varAsfForm['asfId'] = $this->asCfg->cfg['asId'] != '' ? $this->asCfg->cfg['asId'] . '_asf_form' : 'asf_form';
             $chkAsfForm->AddVar("as", $varAsfForm);
             $this->asfForm = $chkAsfForm->Render() . "\n";
         }
     }
 }