<% sub showMiniSearch '**************************************************************** ' VP-ASP 6.50 ' Nov 11, 2005 Use languages variables. Fix error in captionstring is empty '**************************************************************** %>
" class="submitbtn" />
<%=getlang("langadvancedsearchAdvanced")%>
<% end sub ' Advanced search table reorganised by Joseph (01/11/2006) ' table.std_table gives border to table and blue/grey background ' Second table has each element floated so that they will shift ' and balance when settings are removed sub showAdvancedSearch Dim othercount,i,stroOther Dim OtherTypes(50), othercaptions(50), othercaptioncount dim sortupdownnames(2),sortupdownvalues(2),sortupdowncount dim strsearchsort, strsearchsortupdown %>

<%=getlang("LangSearch01")%>

<%=getlang("langSearchAllWords")%>
<%=getlang("langSearchExactPhrase")%>
<%=getlang("langSearchAtLeast")%>
<%=getlang("langSearchWithoutWords")%>
<% makeFieldChooser %>
<%=getlang("langitemsperpage")%>

<% If getconfig("xSearchDisplayCategories")="Yes" then %>
<% makeCategoryDropdown %>
<% End If If getconfig("xSearchSortFields")<>"" then %>
<% parserecord getconfig("xSearchSortFields"),OtherTypes,othercount,"," 'debugwrite getconfig("xSearchSortCaptions") If getconfig("xSearchSortCaptions")<>"" then parserecord getconfig("xSearchSortCaptions"),OtherCaptions,othercaptioncount,"," end if for i = 0 to othercount-1 If othercaptions(i)="" then Othercaptions(i)=othertypes(i) end if next Sortupdownnames(0)=getlang("langAscending") Sortupdownnames(1)=getlang("langDescending") Sortupdownvalues(0)="ASC" Sortupdownvalues(1)="DESC" SortUpDowncount=2 If othercount>0 then %> <%=getlang("langEditSort")%>
<%GenerateSelectV OtherCaptions,OtherTypes,strsearchsort,"strsearchsort",OtherCount,"" %> <%GenerateSelectV Sortupdownnames,sortupdownvalues,strsearchsortupdown,"strsearchsortupdown",sortupdowncount,"" %> <% end if %>
<% End If %> <% IF getconfig("xsearchbyprice")="Yes" THEN %>
<%=getlang("langsearchlowprice")%>
<%=getlang("langsearchhighprice")%>
<% end if %>
<% shopbutton Getconfig("xbuttonsearch"),getlang("langCommonSearch"),"action"%>
<% end sub sub makeCategoryDropdown Dim rscat Dim dbc Dim SQL If getconfig("xSearchDisplayCategories")="Yes" then ShopOpenDatabaseP dbc SQL = "SELECT * from categories " sql= sql & " where highercategoryid=0 " if getconfig("xproductmatch")="Yes" then 'VP-ASP 6.50 - enhanced product matching sql=sql & " and " GenerateProductmatchsqlsubs sql ' in shopproductsubs 'sql=sql & " and productmatch='" & xproductmatch & "'" end if if getconfig("xproductmatchcustomer")="Yes" then if GetSess("CustomerProductGroup")<>"" then sql=sql & " and customermatch='" & getsess("customerProductgroup") & "'" end if end if If getconfig("xselectproductsbylanguage")="Yes" and getsess("language")<>"" then sql=sql & " and (catlanguage='" & getsess("language") & "'" sql=sql & " or catlanguage is null)" end if sql= sql & " order by " & getconfig("xsortcategories") Set rscat = dbc.Execute(SQL) %> <%=getlang("langcat01")%>
<% end if end sub sub makeFieldChooser dim fieldString, fieldLength, captionString fieldString = getconfig("xsearchfields") captionString = getconfig("xsearchsortcaptions") if captionstring="" then captionstring=fieldstring end if dim fieldArray, captionArray fieldArray = Split(fieldString,",") captionArray = Split(captionString,",") %> <%=getlang("langcommonsearch")%> <%=getlang("langSearchFields")%> <% Dim i For i = 0 to Ubound(fieldArray) %> <% Next %>
<%=captionArray(i)%>
<% end sub %>