%@ Language=VBScript %>
<%
'************************************************************************************
'Spaces Browse
'************************************************************************************
%>
<%dim metatag, terms
metatag = chr(13) & ""
metatag = metatag & chr(13) & ""
Call Header("Catalhoyuk Research Project: On-line Database Facility",metatag,terms, "")
%>
A space number is allocated to internal and external areas as defined within the
area of excavation. It can, for example, describe a room, a storage room, an
external area, a street or an alley.
<%
if Request.QueryString("ListBy") = "" AND Request.form = "" AND request.querystring("whichpage") = "" then
session("sql") = ""
Session("nav") = "browse"%>
<%
else
if Request.QueryString("ListBy") <> "" AND Request.querystring("id") = "" AND Request.Form = "" then
'this is a browse call
session("sql") = ""
Session("nav") = "browse"
%>
Return to the Space Browse options
<%
if lcase(Request.QueryString("ListBy")) = "area" then
call ShowAreaListForSpaces()
elseif lcase(Request.QueryString("ListBy")) = "building" then
call ShowBuildingListForSpaces()
elseif lcase(Request.QueryString("ListBy")) = "level" then
call ShowLevelCertainListForSpaces()
elseif lcase(Request.QueryString("ListBy")) = "uncertainlevelstart" then
call ShowLevelUncertainStartListForSpaces()
else
Call SpaceList(Request.QueryString("ListBy"), "", "", "List By " & Request.QueryString("ListBy"))
end if%>
<%elseif Request.querystring("whichpage") <> "" then
if session("sql") <> "" then
''Response.Write session("sql")
Call SpaceList(Request.QueryString("search"), "", "", Request.QueryString("extra"))
else
Response.Write("Sorry but the parameters set to display this information have been lost, please browse or search the space information again")
end if
else
session("sql") = ""
dim where, val, tbl, buildwhere, txtCriteria
if Request.Form("ExcaSpaceText") <> "" AND request.form("EXCASPACETEXTSUBMIT") <> "" then
val = Request.Form("ExcaSpaceText")
where = " WHERE [Mound] Like '%" & val & "%' OR [Area] Like '%" & val & "%'"
if isnumeric(val) then where = where & " OR [Building] = " & val
where = where & " OR [Description] Like '%" & val & "%' OR [Level] Like '%" & val & "%'"
where = where & " OR [UncertainLevelStart] Like '%" & val & "%' OR [UncertainLevelEnd] Like '%" & val & "%'"
tbl = "[Exca: Space Sheet]"
txtCriteria = " that contain the text: " & val
elseif Request.Form("ExcaSpaceBuilding") <> "" AND request.form("EXCASPACEBUILDINGSUBMIT") <> "" then
val = Request.Form("ExcaSpaceBuilding")
where = " WHERE [Building] = '" & val & "'"
tbl = "[Exca: Space Sheet]"
txtCriteria = " in the Building: " & val
elseif Request.Form("ExcaUnitLevel") <> "" AND request.form("EXCASPACELEVELSUBMIT") <> "" then
val = Request.Form("ExcaUnitLevel")
where = " WHERE [MellaartLevel] = '" & val & "' OR [MellaartUncertainLevelStart] = '" & val & "' OR [MellaartUncertainLevelEnd] = '" & val & "'"
tbl = "[Exca: Space Sheet]"
txtCriteria = " in the Mellaart Level: " & val
elseif Request.Form("WIDESPACESEARCHSUBMIT") <> "" then
'major search across fields - build up where clause
buildwhere = ""
txtCriteria = ""
if Request.Form("ExcaSpace") <> "" then
if isnumeric(Request.Form("ExcaSpace")) then
if buildwhere <> "" then buildwhere = buildwhere & " AND"
buildwhere = buildwhere & "[Space Number] =" & Request.form("ExcaSpace")
txtCriteria = txtCriteria & " Space = " & val
end if
end if
if Request.Form("ExcaUnitLevel") <> "" AND Request.Form("ExcaUnitLevel") <> "ANY" then
val = Request.Form("ExcaUnitLevel")
if buildwhere <> "" then buildwhere = buildwhere & " AND"
buildwhere = buildwhere & "([Level] = '" & val & "' OR [UncertainLevelStart] = '" & val & "' OR [UncertainLevelEnd] = '" & val & "')"
if txtCriteria <> "" then txtCriteria = txtCriteria & " and "
txtCriteria = txtCriteria & " Level = " & val
end if
if Request.Form("ExcaSpaceBuilding") <> "" AND Request.Form("ExcaSpaceBuilding") <> "ANY" then
if buildwhere <> "" then buildwhere = buildwhere & " AND"
buildwhere = buildwhere & "[Building] = " & Request.form("ExcaSpaceBuilding")
if txtCriteria <> "" then txtCriteria = txtCriteria & " and "
txtCriteria = txtCriteria & " Building = " & val
end if
if Request.form("ExcaSpaceText") <> "" then
val = Request.Form("ExcaSpaceText")
if buildwhere <> "" then buildwhere = buildwhere & " AND"
buildwhere = buildwhere & " ("
if isnumeric(val) then buildwhere = buildwhere & "[Building] LIKE " & val & " OR"
buildwhere = buildwhere & " [MOUND] LIKE '%" & val & "%'" & " OR [AREA] LIKE '%" & val & "%'"
buildwhere = buildwhere & " OR [DESCRIPTION] LIKE '%" & val & "%' OR [LEVEL] LIKE '%" & val & "%'"
buildwhere = buildwhere & " OR [UncertainLevelStart] LIKE '%" & val & "%' OR [UncertainLevelEnd] LIKE '%" & val & "%')"
if txtCriteria <> "" then txtCriteria = txtCriteria & " and "
txtCriteria = txtCriteria & "the record contains the text: " & val
end if
if txtCriteria <> "" then txtCriteria = " where " & txtCriteria
if buildwhere <> "" then where = "WHERE " & buildwhere
tbl = "[Web_SpaceSheetFull]"
'Response.Write Where
elseif Request.Querystring("Listby") <> "" AND request.querystring("id") <> "" then
where = " WHERE [" & Request.querystring("Listby") & "] = '" & Request.QueryString("id") & "'"
tbl = "[Exca: Space Sheet]"
txtCriteria = "List By " & Request.QueryString("ListBy") & " " & Request.QueryString("id")
end if
%>
<%if where <> "" then
Call SpaceList("Space Number", where, tbl, txtCriteria)
else
Response.Write("No criteria entered")
end if%>
<%end if
end if
%>
|
<%
call footer()
%>