Guest_imported
New member
- Jan 1, 1970
- 0
this is what i have did...the problem is...it is succesful
if i m using personal web server but if i am using
internet server manager i cant
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
<!--
option explicit
-->
</SCRIPT>
<TITLE>Index Server Search Form</TITLE>
<META NAME="DESCRIPTION" CONTENT=" ASP query form for
Microsoft Index Server">
<META NAME="KEYWORDS" CONTENT="query, content, hit, asp">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=Windows-1252">
<%
NewQuery = FALSE
UseSavedQuery = FALSE
QueryForm = Request.ServerVariables( "PATH_INFO" )
SearchString = ""
if Request.ServerVariables("REQUEST_METHOD"
= "POST" then
SearchString = Request.Form("SearchString"
pg = Request.Form("pg"
if pg <> "" then
NextPageNumber = pg
NewQuery = FALSE
UseSavedQuery = TRUE
else
NewQuery = SearchString <> ""
end if
end if
%>
</HEAD>
<p>
<TABLE width="657">
<TR bgcolor="#336699" bordercolor="#333333">
<TD ALIGN=LEFT width="649" height="31"><font face="Arial, Helvetica, sans-serif" size="-1"><b><font color="#FFFFFF">Search
for: </font></b></font></TD>
</TR>
<TR bgcolor="#336699" bordercolor="#333333">
<TD width="649" height="8">
<FORM ACTION='<%= QueryForm%>' METHOD=POST>
<TABLE width="664">
<TR>
<TD width="310">
<INPUT TYPE="TEXT" NAME="SearchString" SIZE="50"
MAXLENGTH="100" VALUE='<%=SearchString%>'>
</TD>
<TD width="170"> <select name="listdown" size="1">
<option value="1">Entire Site</option>
<option value="2">Home</option>
<option value="3">Announcement</option>
<option value="4">Bussiness</option>
<option value="5">Realtime</option>
<option value="6">Talk</option>
<option value="7">News</option>
<option value="8">Join</option>
<option value="9">Members</option>
<option value="10">Help</option>
</select>
</TD>
<TD width="168">
<%
if SearchString <> "" then
if NewQuery then
set Session("Query"
= nothing
set Session("Recordset"
= nothing
NextRecordNumber = 1
Dim Q
set Q = Server.CreateObject("ixsso.Query"
set util = Server.CreateObject("ixsso.util"
Q.SetQueryFromURL(Request.QueryString)
Q.Query = SearchString
Q.SortBy = "rank[d]"
Q.Columns = "DocTitle, vpath, path, filename, size, write, characterization"
if request("listdown"
= "1" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "2" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "3" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "4" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "5" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "6" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "7" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "8" then
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
= "9" then
util.AddScopeToQuery Q,"D:\inetpub\
else set Q = Server.CreateObject("ixsso.Query"
util.AddScopeToQuery Q,"D:\inetpub\
end if
set RS = Q.CreateRecordSet("nonsequential"
RS.PageSize = 10
ActiveQuery = TRUE
elseif UseSavedQuery then
if IsObject( Session("Query"
) And IsObject( Session("RecordSet"
) then
set Q = Session("Query"
set RS = Session("RecordSet"
if RS.RecordCount <> -1 and NextPageNumber <> -1 then
RS.AbsolutePage = NextPageNumber
NextRecordNumber = RS.AbsolutePosition
end if
ActiveQuery = TRUE
else
Response.Write "ERROR - No saved query"
end if
end if
%>
<input type="SUBMIT" name="Submit" value="Search">
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
<%
if ActiveQuery then
if not RS.EOF then
%>
<p>
<p>
<%
LastRecordOnPage = NextRecordNumber + RS.PageSize - 1
CurrentPage = RS.AbsolutePage
if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then
LastRecordOnPage = RS.RecordCount
end if
Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage
if RS.RecordCount <> -1 then
Response.Write " of " & RS.RecordCount
end if
Response.Write " matching the query " & chr(34) & "<I>"
Response.Write SearchString & "</I>" & chr(34) & "<P>"
%>
<dl>
<!-- BEGIN first row of query results table -->
<% Do While Not RS.EOF and NextRecordNumber <= LastRecordOnPage %>
<%
' This is the detail portion for Title, Abstract, URL, Size, and
' Modification Date.
' If there is a title, display it, otherwise display the virtual path.
%>
<p>
<dt><%= NextRecordNumber%>
<%if VarType(RS("DocTitle"
) = 1 or RS("DocTitle"
= "" then%>
<b><a href="<%=RS("vpath"
%>"><%= Server.HTMLEncode( RS("filename"
)%></a></b>
<%else%>
<b><a href="<%=RS("vpath"
%>"><%= Server.HTMLEncode(RS("DocTitle"
)%></a></b>
<%end if%>
<dd>
<%if VarType(RS("characterization"
) = 8 and RS("characterization"
<> "" then%>
<b><i>Abstract: </I></b><%= Server.HTMLEncode(RS("characterization"
)%>
<br>
<%end if%>
<cite>
<a href="<%=RS("vpath"
%>"> <font size=-1> - <%if RS("size"
= "" then%>(size and time unknown)<%else%>size <%=RS("size"
%> bytes - <%=RS("write"
%> GMT<%end if%></font>
</cite>
<%
RS.MoveNext
NextRecordNumber = NextRecordNumber+1
Loop
%>
</dl>
<P><BR>
<%
else ' NOT RS.EOF
if NextRecordNumber = 1 then
Response.Write "No documents matched the query<P>"
else
Response.Write "No more documents in the query<P>"
end if
end if ' NOT RS.EOF
%>
<!--
If the query was not executed because it needed to enumerate to
resolve the query instead of using the index, but AllowEnumeration
was FALSE, let the user know
-->
<%if Q.QueryIncomplete then%>
<P>
<I><B>The query is too expensive to complete.</B></I><BR>
<%end if%>
<!--
If the query took too long to execute (for example, if too much work
was required to resolve the query), let the user know
-->
<%if Q.QueryTimedOut then%>
<P>
<I><B>The query took too long to complete.</B></I><BR>
<%end if%>
<TABLE>
<!--
This is the "previous" button.
This retrieves the previous page of documents for the query.
-->
<%SaveQuery = FALSE%>
<%if CurrentPage > 1 and RS.RecordCount <> -1 then %>
<td align=left>
<form action="<%= QueryForm%>" method="POST">
<INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
<INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage-1%>" >
<input type="submit" value="Previous <%=RS.PageSize%> documents">
</form>
</td>
<%SaveQuery = TRUE%>
<%end if%>
<!--
This is the "next" button.
This button retrieves the next page of documents for the query.
If the RS.RecordCount is available, the number of
documents on the next page will be displayed.
-->
<%if Not RS.EOF then%>
<td align=right>
<form action="<%= QueryForm%>" method="POST">
<INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
<INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage+1%>" >
<% NextString = "Next "
if RS.RecordCount <> -1 then
NextSet = (RS.RecordCount - NextRecordNumber) + 1
if NextSet > RS.PageSize then
NextSet = RS.PageSize
end if
NextString = NextString & NextSet & " documents"
else
NextString = NextString & " page of documents"
end if
%>
<input type="submit" value="<%=NextString%>">
</form>
</td>
<%SaveQuery = TRUE%>
<%end if%>
</TABLE>
<!-- Display the page number -->
Page <%=CurrentPage%>
<%if RS.PageCount <> -1 then
Response.Write " of " & RS.PageCount
end if %>
<%
' If either of the previous or back buttons were displayed, save the query
' and the recordset in session variables.
if SaveQuery then
set Session("Query"
= Q
set Session("RecordSet"
= RS
else
RS.close
Set RS = Nothing
Set Q = Nothing
set Session("Query"
= Nothing
set Session("RecordSet"
= Nothing
end if
%>
<% end if
elseif not NewQuery then
Response.Write ""
else
Response.Write "Please enter a word or phrase to search for."
end if
%>
if i m using personal web server but if i am using
internet server manager i cant
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
<!--
option explicit
-->
</SCRIPT>
<TITLE>Index Server Search Form</TITLE>
<META NAME="DESCRIPTION" CONTENT=" ASP query form for
Microsoft Index Server">
<META NAME="KEYWORDS" CONTENT="query, content, hit, asp">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=Windows-1252">
<%
NewQuery = FALSE
UseSavedQuery = FALSE
QueryForm = Request.ServerVariables( "PATH_INFO" )
SearchString = ""
if Request.ServerVariables("REQUEST_METHOD"
SearchString = Request.Form("SearchString"
pg = Request.Form("pg"
if pg <> "" then
NextPageNumber = pg
NewQuery = FALSE
UseSavedQuery = TRUE
else
NewQuery = SearchString <> ""
end if
end if
%>
</HEAD>
<p>
<TABLE width="657">
<TR bgcolor="#336699" bordercolor="#333333">
<TD ALIGN=LEFT width="649" height="31"><font face="Arial, Helvetica, sans-serif" size="-1"><b><font color="#FFFFFF">Search
for: </font></b></font></TD>
</TR>
<TR bgcolor="#336699" bordercolor="#333333">
<TD width="649" height="8">
<FORM ACTION='<%= QueryForm%>' METHOD=POST>
<TABLE width="664">
<TR>
<TD width="310">
<INPUT TYPE="TEXT" NAME="SearchString" SIZE="50"
MAXLENGTH="100" VALUE='<%=SearchString%>'>
</TD>
<TD width="170"> <select name="listdown" size="1">
<option value="1">Entire Site</option>
<option value="2">Home</option>
<option value="3">Announcement</option>
<option value="4">Bussiness</option>
<option value="5">Realtime</option>
<option value="6">Talk</option>
<option value="7">News</option>
<option value="8">Join</option>
<option value="9">Members</option>
<option value="10">Help</option>
</select>
</TD>
<TD width="168">
<%
if SearchString <> "" then
if NewQuery then
set Session("Query"
set Session("Recordset"
NextRecordNumber = 1
Dim Q
set Q = Server.CreateObject("ixsso.Query"
set util = Server.CreateObject("ixsso.util"
Q.SetQueryFromURL(Request.QueryString)
Q.Query = SearchString
Q.SortBy = "rank[d]"
Q.Columns = "DocTitle, vpath, path, filename, size, write, characterization"
if request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
elseif request("listdown"
util.AddScopeToQuery Q,"D:\inetpub\
else set Q = Server.CreateObject("ixsso.Query"
util.AddScopeToQuery Q,"D:\inetpub\
end if
set RS = Q.CreateRecordSet("nonsequential"
RS.PageSize = 10
ActiveQuery = TRUE
elseif UseSavedQuery then
if IsObject( Session("Query"
set Q = Session("Query"
set RS = Session("RecordSet"
if RS.RecordCount <> -1 and NextPageNumber <> -1 then
RS.AbsolutePage = NextPageNumber
NextRecordNumber = RS.AbsolutePosition
end if
ActiveQuery = TRUE
else
Response.Write "ERROR - No saved query"
end if
end if
%>
<input type="SUBMIT" name="Submit" value="Search">
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
<%
if ActiveQuery then
if not RS.EOF then
%>
<p>
<p>
<%
LastRecordOnPage = NextRecordNumber + RS.PageSize - 1
CurrentPage = RS.AbsolutePage
if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then
LastRecordOnPage = RS.RecordCount
end if
Response.Write "Documents " & NextRecordNumber & " to " & LastRecordOnPage
if RS.RecordCount <> -1 then
Response.Write " of " & RS.RecordCount
end if
Response.Write " matching the query " & chr(34) & "<I>"
Response.Write SearchString & "</I>" & chr(34) & "<P>"
%>
<dl>
<!-- BEGIN first row of query results table -->
<% Do While Not RS.EOF and NextRecordNumber <= LastRecordOnPage %>
<%
' This is the detail portion for Title, Abstract, URL, Size, and
' Modification Date.
' If there is a title, display it, otherwise display the virtual path.
%>
<p>
<dt><%= NextRecordNumber%>
<%if VarType(RS("DocTitle"
<b><a href="<%=RS("vpath"
<%else%>
<b><a href="<%=RS("vpath"
<%end if%>
<dd>
<%if VarType(RS("characterization"
<b><i>Abstract: </I></b><%= Server.HTMLEncode(RS("characterization"
<br>
<%end if%>
<cite>
<a href="<%=RS("vpath"
</cite>
<%
RS.MoveNext
NextRecordNumber = NextRecordNumber+1
Loop
%>
</dl>
<P><BR>
<%
else ' NOT RS.EOF
if NextRecordNumber = 1 then
Response.Write "No documents matched the query<P>"
else
Response.Write "No more documents in the query<P>"
end if
end if ' NOT RS.EOF
%>
<!--
If the query was not executed because it needed to enumerate to
resolve the query instead of using the index, but AllowEnumeration
was FALSE, let the user know
-->
<%if Q.QueryIncomplete then%>
<P>
<I><B>The query is too expensive to complete.</B></I><BR>
<%end if%>
<!--
If the query took too long to execute (for example, if too much work
was required to resolve the query), let the user know
-->
<%if Q.QueryTimedOut then%>
<P>
<I><B>The query took too long to complete.</B></I><BR>
<%end if%>
<TABLE>
<!--
This is the "previous" button.
This retrieves the previous page of documents for the query.
-->
<%SaveQuery = FALSE%>
<%if CurrentPage > 1 and RS.RecordCount <> -1 then %>
<td align=left>
<form action="<%= QueryForm%>" method="POST">
<INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
<INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage-1%>" >
<input type="submit" value="Previous <%=RS.PageSize%> documents">
</form>
</td>
<%SaveQuery = TRUE%>
<%end if%>
<!--
This is the "next" button.
This button retrieves the next page of documents for the query.
If the RS.RecordCount is available, the number of
documents on the next page will be displayed.
-->
<%if Not RS.EOF then%>
<td align=right>
<form action="<%= QueryForm%>" method="POST">
<INPUT TYPE="HIDDEN" NAME="SearchString" VALUE="<%=SearchString%>">
<INPUT TYPE="HIDDEN" name="pg" VALUE="<%=CurrentPage+1%>" >
<% NextString = "Next "
if RS.RecordCount <> -1 then
NextSet = (RS.RecordCount - NextRecordNumber) + 1
if NextSet > RS.PageSize then
NextSet = RS.PageSize
end if
NextString = NextString & NextSet & " documents"
else
NextString = NextString & " page of documents"
end if
%>
<input type="submit" value="<%=NextString%>">
</form>
</td>
<%SaveQuery = TRUE%>
<%end if%>
</TABLE>
<!-- Display the page number -->
Page <%=CurrentPage%>
<%if RS.PageCount <> -1 then
Response.Write " of " & RS.PageCount
end if %>
<%
' If either of the previous or back buttons were displayed, save the query
' and the recordset in session variables.
if SaveQuery then
set Session("Query"
set Session("RecordSet"
else
RS.close
Set RS = Nothing
Set Q = Nothing
set Session("Query"
set Session("RecordSet"
end if
%>
<% end if
elseif not NewQuery then
Response.Write ""
else
Response.Write "Please enter a word or phrase to search for."
end if
%>