<%
NewQuery = FALSE
UseSavedQuery = FALSE
QueryForm = "/resources/search.asp"
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
' NOTE: this will be true only if the button is actually pushed.
if Request.Form("Action") = "OK" then
NewQuery = TRUE
end if
end if
%>
<%if NewQuery=False and UseSavedQuery=False then %>
"SSS-CA DATABASE SEARCH ENGINE UNDER TECHNICAL UPGRADE, CURRENTLY UNAVAILABLE. FOR MORE INFO INCLUDING THE ENTIRE CONTENTS OF THE DATABASE PLEASE GO HERE"
(View Maritime Transport documents according to category)
Shortsea Shipping
Greek Coastal Shipping
Maritime Safety
Ports and Intermodal
Routing Scheduling and Logistics
Miscellaneous
EU-MOP Project Library
Additional Resources:
(Information related to the department's activities)
Theses
Documents can also browsed under the relevant research project pages.
The Laboratory for Maritime Transport does not necessarily endorse non-NTUA publications.
Those that appear in this library have been uploaded for information purposes only.
<%end if%>
<%
if SearchString <> "" then
if NewQuery then
set Session("Query") = nothing
set Session("Recordset") = nothing
NextRecordNumber = 1
set Q = Server.CreateObject("ixsso.Query")
set util = Server.CreateObject("ixsso.util")
Q.MaxRecords = 300
Q.Query = SearchString
Q.SortBy = "rank[d]"
Q.Columns = "DocTitle, DocAuthor, vpath, path, filename, size, write, characterization"
util.AddScopeToQuery Q, "/", "deep"
set RS = Q.CreateRecordSet("nonsequential")
RS.PageSize = 20
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
if ActiveQuery then
if not RS.EOF then
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 search " & chr(34) & ""
Response.Write SearchString & "" & chr(34) & ". "
%>
<% Do While Not RS.EOF and NextRecordNumber <= LastRecordOnPage %>
- <%= NextRecordNumber%>.
<%if VarType(RS("DocTitle")) = 1 or RS("DocTitle") = "" then%>
"><%= Server.HTMLEncode( RS("filename") )%> (Posted: <%=formatDate(RS("write"))%>)
<%else%>
"><%= Server.HTMLEncode(RS("DocTitle"))%>
-
<%if RS("DocAuthor") <> "" then%>
Author: <%=RS("DocAuthor")%>
<%end if%>
<%if VarType(RS("characterization")) = 8 and RS("characterization") <> "" then%>
Abstract: <%= Server.HTMLEncode(RS("characterization"))%>
Posted: <%=formatDate(RS("write"))%>
<%end if%>
<%end if%>
<%
RS.MoveNext
NextRecordNumber = NextRecordNumber+1
Loop
%>
<%
else ' NOT RS.EOF
if NextRecordNumber = 1 then
Response.Write "No documents matched the query
"
else
Response.Write "No more documents in the query "
end if
end if ' NOT RS.EOF
%>
<%if Q.OutOfDate then%>
Notice: The index may not be complete. Files have been added which are not yet indexed.
<%end if%>
<%if Q.QueryIncomplete then%>
Error: The query requires too many resources to complete. Please be more specific.
<%end if%>
<%if Q.QueryTimedOut then%>
Error: The query took too long to complete.
<%end if%>
|
Page <%=CurrentPage%>
<%if RS.PageCount <> -1 then
Response.Write " of " & RS.PageCount
end if %>
|
<%SaveQuery = FALSE%>
<%if CurrentPage > 1 and RS.RecordCount <> -1 then ' BUGBUG - use RS.Supports(adMovePrevious)%>
|
|
<%SaveQuery = TRUE%>
<%end if%>
<%if Not RS.EOF then%>
|
<%SaveQuery = TRUE%>
<%end if%>
|
<%
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
%>
|