function Render_NoPostBack()
 {
     $this->CallDelegate('PreSearchFormRender');
     include ThemeFilePath($this->Context->Configuration, 'search_form.php');
     if ($this->PostBackAction == 'Search') {
         $this->CallDelegate('PreSearchResultsRender');
         include ThemeFilePath($this->Context->Configuration, 'search_results_top.php');
         if ($this->DataCount > 0) {
             $Alternate = 0;
             $FirstRow = 1;
             $Counter = 0;
             if ($this->Search->Type == 'Topics') {
                 $Discussion = $this->Context->ObjectFactory->NewContextObject($this->Context, 'Discussion');
                 $CurrentUserJumpToLastCommentPref = $this->Context->Session->User->Preference('JumpToLastReadComment');
                 $DiscussionList = '';
                 $ThemeFilePath = ThemeFilePath($this->Context->Configuration, 'discussion.php');
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $Discussion->Clear();
                     $Discussion->GetPropertiesFromDataSet($Row, $this->Context->Configuration);
                     $Discussion->FormatPropertiesForDisplay();
                     if ($Counter < $this->Context->Configuration['SEARCH_RESULTS_PER_PAGE']) {
                         include $ThemeFilePath;
                     }
                     $FirstRow = 0;
                     $Counter++;
                     $Alternate = FlipBool($Alternate);
                 }
                 echo $DiscussionList;
             } elseif ($this->Search->Type == 'Comments') {
                 $Comment = $this->Context->ObjectFactory->NewContextObject($this->Context, 'Comment');
                 $HighlightWords = ParseQueryForHighlighting($this->Context, $this->Search->Query);
                 $CommentList = '';
                 $ThemeFilePath = ThemeFilePath($this->Context->Configuration, 'search_results_comments.php');
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $Comment->Clear();
                     $Comment->GetPropertiesFromDataSet($Row, $this->Context->Session->UserID);
                     $Comment->FormatPropertiesForSafeDisplay();
                     if ($Counter < $this->Context->Configuration['SEARCH_RESULTS_PER_PAGE']) {
                         include $ThemeFilePath;
                     }
                     $FirstRow = 0;
                     $Counter++;
                     $Alternate = FlipBool($Alternate);
                 }
                 echo $CommentList;
             } elseif ($this->Search->Type == 'Users') {
                 $u = $this->Context->ObjectFactory->NewContextObject($this->Context, 'User');
                 $UserList = '';
                 $ThemeFilePath = ThemeFilePath($this->Context->Configuration, 'search_results_users.php');
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $u->Clear();
                     $u->GetPropertiesFromDataSet($Row);
                     $u->FormatPropertiesForDisplay();
                     if ($Counter < $this->Context->Configuration['SEARCH_RESULTS_PER_PAGE']) {
                         include $ThemeFilePath;
                     }
                     $FirstRow = 0;
                     $Counter++;
                     $Alternate = FlipBool($Alternate);
                 }
                 echo $UserList;
             } else {
                 $this->CallDelegate('MidSearchResultsRender');
             }
         }
         include ThemeFilePath($this->Context->Configuration, 'search_results_bottom.php');
     }
 }
 function Render_NoPostBack()
 {
     $this->Render_SearchForm();
     if ($this->PostBackAction == "Search") {
         $this->PageDetails = "<div class=\"PageDetails\">" . ($this->PageDetails ? $this->Context->GetDefinition("Results") . $this->PageDetails : $this->Context->GetDefinition("NoResultsFound")) . ($this->Search->Query == "" ? "" : " " . $this->Context->GetDefinition("for") . " <strong>" . $this->Search->Query . "</strong>") . "</div>";
         // Set up the "save search" form
         $this->PostBackParams->Clear();
         $this->PostBackParams->Add("Type", $this->Search->Type);
         $this->PostBackParams->Add("Keywords", $this->Search->Keywords, 0);
         $this->PostBackParams->Add("SearchID", $this->Search->SearchID);
         $this->PostBackParams->Add("PostBackAction", "SaveSearch");
         $this->Context->Writer->Add("<div class=\"SearchLabelForm\">");
         if ($this->Context->Session->UserID > 0) {
             $this->Render_PostBackForm("frmLabelSearch", "post");
             $this->Context->Writer->Add("<input type=\"text\" name=\"Label\" class=\"SearchLabelInput\" value=\"" . $this->Search->Label . "\" maxlength=\"30\" />\r\n\t\t\t\t\t<input type=\"submit\" name=\"btnLabel\" value=\"" . $this->Context->GetDefinition("SaveSearch") . "\" class=\"SearchLabelButton\" />\r\n\t\t\t\t\t</form>");
         } else {
             $this->Context->Writer->Add("&nbsp;");
         }
         $this->Context->Writer->Add("</div>" . "<div class=\"Title\">" . $this->Context->GetDefinition($this->Search->Type) . "</div>" . $this->PageList . $this->PageDetails);
         if ($this->DataCount > 0) {
             $Switch = 0;
             $FirstRow = 1;
             $Counter = 0;
             if ($this->Search->Type == "Topics") {
                 $Discussion = $this->Context->ObjectFactory->NewObject($this->Context, "Discussion");
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $Discussion->Clear();
                     $Discussion->GetPropertiesFromDataSet($Row);
                     $Discussion->FormatPropertiesForDisplay();
                     $Discussion->ForceNameSpaces();
                     if ($Counter < agSEARCH_RESULTS_PER_PAGE) {
                         $this->Context->Writer->Add(GetDiscussion($this->Context, $Discussion, $FirstRow));
                     }
                     $FirstRow = 0;
                     $Counter++;
                 }
             } elseif ($this->Search->Type == "Comments") {
                 $Comment = $this->Context->ObjectFactory->NewObject($this->Context, "Comment");
                 $HighlightWords = ParseQueryForHighlighting($this->Context, $this->Search->Query);
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $Comment->Clear();
                     $Comment->GetPropertiesFromDataSet($Row, $this->Context->Session->UserID);
                     $Comment->FormatPropertiesForSafeDisplay();
                     if ($Counter < agSEARCH_RESULTS_PER_PAGE) {
                         $this->Context->Writer->Add(GetCommentResult($this->Context, $Comment, $HighlightWords, $FirstRow));
                     }
                     $FirstRow = 0;
                     $Counter++;
                 }
             } else {
                 $u = $this->Context->ObjectFactory->NewContextObject($this->Context, "User");
                 while ($Row = $this->Context->Database->GetRow($this->Data)) {
                     $Switch = $Switch == 1 ? 0 : 1;
                     $u->Clear();
                     $u->GetPropertiesFromDataSet($Row);
                     $u->FormatPropertiesForDisplay();
                     if ($Counter < agSEARCH_RESULTS_PER_PAGE) {
                         $ShowIcon = $u->DisplayIcon != "" && $this->Context->Session->User->Setting("HtmlOn", 1);
                         $this->Context->Writer->Add("<dl class=\"User" . ($Switch == 1 ? "" : "Alternate") . ($FirstRow ? " FirstUser" : "") . "\">\r\n\t\t\t\t\t\t\t\t<dt class=\"DataItemLabel SearchUserLabel\">" . $this->Context->GetDefinition("User") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"DataItem SearchUser" . ($ShowIcon ? " SearchUserWithIcon" : "") . "\">");
                         if ($ShowIcon) {
                             $this->Context->Writer->Add("<span class=\"SearchIcon\" style=\"background-image:url('" . $u->DisplayIcon . "');\"></span>");
                         }
                         $this->Context->Writer->Add("<a href=\"account.php?u=" . $u->UserID . "\">" . $u->Name . "</a> (" . $u->Role . ")\r\n\t\t\t\t\t\t\t\t</dd>\r\n\t\t\t\t\t\t\t\t<dt class=\"MetaItemLabel SearchUserInformationLabel SearchUserAccountCreatedLabel\">" . $this->Context->GetDefinition("AccountCreated") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"MetaItem SearchUserInformation SearchUserAccountCreated\">" . TimeDiff($u->DateFirstVisit, mktime()) . "</dd>\r\n\t\t\t\t\t\t\t\t<dt class=\"MetaItemLabel SearchUserInformationLabel SearchUserLastActiveLabel\">" . $this->Context->GetDefinition("LastActive") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"MetaItem SearchUserInformation SearchUserLastActive\">" . TimeDiff($u->DateLastActive, mktime()) . "</dd>\r\n\t\t\t\t\t\t\t\t<dt class=\"MetaItemLabel SearchUserInformationLabel SearchUserVisitCountLabel\">" . $this->Context->GetDefinition("VisitCount") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"MetaItem SearchUserInformation SearchUserVisitCount\">" . $u->CountVisit . "</dd>\r\n\t\t\t\t\t\t\t\t<dt class=\"MetaItemLabel SearchUserInformationLabel SearchUserDiscussionsCreatedLabel\">" . $this->Context->GetDefinition("DiscussionsCreated") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"MetaItem SearchUserInformation SearchUserDiscussionsCreated\">" . $u->CountDiscussions . "</dd>\r\n\t\t\t\t\t\t\t\t<dt class=\"MetaItemLabel SearchUserInformationLabel SearchUserCommentsAddedLabel\">" . $this->Context->GetDefinition("CommentsAdded") . "</dt>\r\n\t\t\t\t\t\t\t\t<dd class=\"MetaItem SearchUserInformation SearchUserCommentsAdded\">" . $u->CountComments . "</dd>\r\n\t\t\t\t\t\t\t</dl>");
                     }
                     $FirstRow = 0;
                     $Counter++;
                 }
             }
         }
         if ($this->DataCount > 0) {
             $this->Context->Writer->Add($this->PageList . $this->PageDetails . "<a class=\"PageJump Top\" href=\"#pgtop\">" . $this->Context->GetDefinition("TopOfPage") . "</a>");
         }
     }
     $this->Context->Writer->Write();
 }