<%@ Language=VBScript %> <% '************************************************************************************ 'Units Browse '************************************************************************************ %> <%dim metatag, terms metatag = chr(13) & "" metatag = metatag & chr(13) & "" Call Header(": Units",metatag,terms, "") %>

Unit List

On an archaeological excavation every deposit is given a unique number. At Catalhoyuk we call these numbers Unit numbers (similar to Context numbers). The dig has already allocated over 20000 Units numbers!

<% 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 Unit Browse options

    <% if lcase(Request.QueryString("ListBy")) = "area" then call ShowAreaListForUnits() elseif lcase(Request.QueryString("ListBy")) = "building" then call ShowBuildingListForUnits() elseif lcase(Request.QueryString("ListBy")) = "space" then call ShowSpaceListForUnits() elseif lcase(Request.QueryString("ListBy")) = "feature" then call ShowFeatureListForUnits() elseif lcase(Request.QueryString("ListBy")) = "category" then call ShowCategoryListForUnits() elseif lcase(Request.QueryString("ListBy")) = "year" then call ShowYearListForUnits() else Call UnitList(Request.QueryString("ListBy"), "", "", "List By " & Request.QueryString("ListBy") ) end if%>
<% elseif Request.querystring("whichpage") <> "" then if session("sql") <> "" then ''Response.Write session("sql") Call UnitList(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 unit information again") end if else dim where, val, tbl, txtCriteria session("sql") = "" 'new 2007 - simple skeleton search which piggy backs on the main unit search, 'requires category skeleton to be added to criteria without user knowing if Request.Form("ExcaUnitText") <> "" AND request.form("EXCAUNITTEXTSUBMIT") <> "" then val = Request.Form("ExcaUnitText") ''where = " WHERE [Category] LIKE '%" & val & "%' OR [Dimensions] LIKE '%" & val & "%'" ''where = where & " OR [DESCRIPTION] LIKE '%" & val & "%' OR [Interpretation] LIKE '%" & val & "%'" ''tbl = "[Exca: Unit Sheet]" where = " WHERE [Mound] Like '%" & val & "%' OR [Area] Like '%" & val & "%'" if isnumeric(val) then where = where & " OR [Grid X] = " & val & " OR [Grid Y] = " & val & " OR [Year] = " & val where = where & " OR [Dimensions] Like '%" & val & "%' OR [Category] Like '%" & val & "%'" 'where = where & " OR [Description] Like '%" & val & "%' OR [Interpretation] Like '%" & val & "%'" 'field name change post 2007 season where = where & " OR [Description] Like '%" & val & "%' OR [Discussion] Like '%" & val & "%'" txtCriteria = " that contain the text: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[view_UnitSheetForWeb]" elseif Request.Form("ExcaUnitPhase") <> "" AND request.form("EXCAPHASESUBMIT") <> "" then val = Request.Form("ExcaUnitPhase") where = " WHERE [Phase] = '" & val & "'" txtCriteria = " in the Phase: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[Exca: Unit Sheet]" elseif Request.Form("ExcaUnitBuilding") <> "" AND request.form("EXCABUILDINGSUBMIT") <> "" then val = Request.Form("ExcaUnitBuilding") where = " WHERE [In_Building] = '" & val & "'" txtCriteria = " in the Building: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[view_ExcaBuildingsForAUnit]" elseif Request.Form("ExcaUnitSpace") <> "" AND request.form("EXCASPACESUBMIT") <> "" then val = Request.Form("ExcaUnitSpace") where = " WHERE [In_Space] = '" & val & "'" txtCriteria = " in the Space: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[view_ExcaSpacesForAUnit]" elseif Request.Form("ExcaUnitFeature") <> "" AND request.form("EXCAFEATURESUBMIT") <> "" then val = Request.Form("ExcaUnitFeature") where = " WHERE [In_Feature] = '" & val & "'" txtCriteria = " in the Feature: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[view_ExcaFeaturesForAUnit]" elseif Request.Form("ExcaUnitLevel") <> "" AND request.form("EXCALEVELSUBMIT") <> "" then val = Request.Form("ExcaUnitLevel") where = " WHERE [Level] = '" & val & "' OR [UncertainLevelStart] = '" & val & "' OR [UncertainLevelEnd] = '" & val & "'" txtCriteria = " in Mellaart Level: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons " & txtCriteria end if tbl = "[view_UnitLevels]" elseif Request.Form("ExcaUnitYear") <> "" AND request.form("EXCAYEARSUBMIT") <> "" then val = Request.Form("ExcaUnitYear") where = " WHERE [Year] = " & val txtCriteria = " Excavated in Year: " & val 'check if this is a skeleton only search if Request.form("ExcaCategory") = "Skeleton" then where = where & " AND [Category] = 'skeleton'" txtCriteria = "for Skeletons Excavated in Year: " & val end if tbl = "[Exca: Unit Sheet]" elseif Request.Form("ExcaCategory") <> "" AND request.form("EXCAUNITCATSUBMIT") <> "" then val = Request.Form("ExcaCategory") where = " WHERE [Category] = '" & val & "'" txtCriteria = " Category: " & val tbl = "[Exca: Unit Sheet]" elseif Request.Form("WIDEUNITSEARCHSUBMIT") <> "" then 'major search across fields - build up where clause buildwhere = "" txtCriteria = "" if Request.Form("ExcaUnit") <> "" then val = Request.Form("ExcaUnit") if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [Unit Number] =" & Request.form("ExcaUnit") txtCriteria = txtCriteria & " Unit = " & val end if if Request.form("ExcaUnitText") <> "" then val = Request.Form("ExcaUnitText") if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " (" if isnumeric(val) then buildwhere = buildwhere & "[Unit Number] LIKE " & val & " OR" buildwhere = buildwhere & " [Grid X] LIKE " & val & " OR" buildwhere = buildwhere & " [Grid Y] LIKE " & val & " OR" buildwhere = buildwhere & " [YEAR] LIKE " & val & " OR" end if buildwhere = buildwhere & " [MOUND] LIKE '%" & val & "%'" & " OR [AREA] LIKE '%" & val & "%'" buildwhere = buildwhere & " OR [DIMENSIONS] LIKE '%" & val & "%' OR [CATEGORY] LIKE '%" & val & "%'" 'buildwhere = buildwhere & " OR [DESCRIPTION] LIKE '%" & val & "%'" & " OR [INTERPRETATION] LIKE '%" & val & "%')" 'field name change post 2007 season buildwhere = buildwhere & " OR [DESCRIPTION] LIKE '%" & val & "%'" & " OR [DISCUSSION] LIKE '%" & val & "%')" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & "the record contains the text " & val end if if Request.Form("ExcaUnitPhase") <> "" AND Request.Form("ExcaUnitPhase") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [Phase] = '" & Request.form("ExcaUnitPhase") & "'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Phase = " & Request.form("ExcaUnitPhase") end if if Request.Form("ExcaUnitBuilding") <> "" AND Request.Form("ExcaUnitBuilding") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [AssoBuildings] LIKE '%," & Request.form("ExcaUnitBuilding") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Building = " & Request.form("ExcaUnitBuilding") end if if Request.Form("ExcaUnitSpace") <> "" AND Request.Form("ExcaUnitSpace") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [AssoSpaces] LIKE '%," & Request.form("ExcaUnitSpace") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Space = " & Request.form("ExcaUnitSpace") end if if Request.Form("ExcaUnitFeature") <> "" AND Request.Form("ExcaUnitFeature") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [AssoFeatures] LIKE '%," & Request.form("ExcaUnitFeature") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Feature = " & Request.form("ExcaUnitFeature") end if if Request.Form("ExcaUnitYear") <> "" AND Request.Form("ExcaUnitYear") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [Year] = " & Request.form("ExcaUnitYear") if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Year = " & Request.form("ExcaUnitYear") end if if Request.Form("ExcaCategory") <> "" AND request.form("ExcaCategory") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [Category] = '" & Request.form("ExcaCategory") & "'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Category = " & Request.form("ExcaCategory") end if if Request.Form("ExcaUnitLevel") <> "" AND Request.Form("ExcaUnitLevel") <> "ANY" then val = Request.Form("ExcaUnitLevel") if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [AssoLevels] LIKE '%," & val & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Mellaart Level = " & val end if if Request.Form("ExcaFeatureType") <> "" AND Request.Form("ExcaFeatureType") <> "ANY" then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [AssoFeatureTypes] LIKE '%" & Request.form("ExcaFeatureType") & "%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Feature Type = " & Request.form("ExcaFeatureType") end if if Request.Form("UnitPriority") <> "UnitP" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if Request.Form("UnitPriority") = "UnitPON" then buildwhere = buildwhere & " [Priority Unit] = 1" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Priority Unit = Yes" end if if Request.Form("UnitPriority") = "UnitPOFF" then buildwhere = buildwhere & " [Priority Unit] = 0" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Priority Unit = No" end if end if if Request.Form("UnitFast") <> "UnitF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if Request.Form("UnitFast") = "UnitFON" then buildwhere = buildwhere & " [FastTRack] = 1" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Fast Track = Yes" end if if Request.Form("UnitFast") = "UnitFOFF" then buildwhere = buildwhere & " [FastTrack] = 0" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Fast Track = No" end if end if if Request.Form("UnitNotEx") <> "UnitN" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if Request.Form("UnitNotEx") = "UnitNON" then buildwhere = buildwhere & " [NotExcavated] = 1" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Not Excavated = Yes" end if if Request.Form("UnitNotEx") = "UnitNOFF" then buildwhere = buildwhere & " [NotExcavated] = 0" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & " Not Excavated = No" end if end if if Request.Form("UnitArchBot") = "UnitArchBotON" OR request.form("UnitArchBot") = "UnitArchBotOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitArchBot") = "UnitArchBotON" then buildwhere = buildwhere & " [ArchaeoBotsSample] = 1" txtCriteria = txtCriteria & " ArchaeoBots Sample Exists = Yes" elseif Request.Form("UnitArchBot") = "UnitArchBotOFF" then buildwhere = buildwhere & " [ArchaeoBotsSample] = 0" txtCriteria = txtCriteria & " ArchaeoBots Sample Exists = No" end if end if if Request.Form("UnitCer") = "UnitCerON" OR request.form("UnitCer") = "UnitCerOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitCer") = "UnitCerON" then buildwhere = buildwhere & " [CeramicPresent] = 1" txtCriteria = txtCriteria & " Ceramics Present = Yes" 'copy groundstone when add descrip to raw mat if (Request.Form("CeramicElement") <> "" AND Request.Form("CeramicElement") <> "ANY") then 'type if buildwhere <> "" then buildwhere = buildwhere & " AND" dim multi, gettype1, gettype2 'some types are like this base/foot but only base might be in dataset multi = instr(Request.Form("CeramicElement"), "/") if multi <> 0 then gettype1 = left(Request.Form("CeramicElement"), multi - 1) gettype2 = right(Request.Form("CeramicElement"), len(Request.Form("CeramicElement")) - multi) buildwhere = buildwhere & " ([CeramicType] LIKE '%," & gettype1 & ",%' OR [CeramicType] LIKE '%," & gettype2 & ",%')" else buildwhere = buildwhere & " [CeramicType] LIKE '%," & Request.form("CeramicElement") & ",%'" end if if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("CeramicElement") end if elseif Request.Form("UnitCer") = "UnitCerOFF" then buildwhere = buildwhere & " [CeramicPresent] = 0" txtCriteria = txtCriteria & " Ceramics Present = No" end if end if if Request.Form("UnitClyObj") = "UnitClyObjON" OR request.form("UnitClyObj") = "UnitClyObjOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitClyObj") = "UnitClyObjON" then buildwhere = buildwhere & " [ClayObjectPresent] = 1" txtCriteria = txtCriteria & " Clay Objects Present = Yes" if (Request.Form("ClayObjectShapes") <> "" AND Request.Form("ClayObjectShapes") <> "ANY") AND (Request.Form("ClayObjectColors") <> "" AND Request.Form("ClayObjectColors") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [ClayObjectShapeColor] LIKE '%," & Request.form("ClayObjectShapes") & ";" & Request.form("ClayObjectColors") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("ClayObjectShapes") & " " & Request.form("ClayObjectColors") elseif (Request.Form("ClayObjectShapes") <> "" AND Request.Form("ClayObjectShapes") <> "ANY") AND (Request.Form("ClayObjectColors") = "" OR Request.Form("ClayObjectColors") = "ANY") then 'shape only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [ClayObjectShapeColor] LIKE '%," & Request.form("ClayObjectShapes") & ";%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("ClayObjectShapes") elseif (Request.Form("ClayObjectColors") <> "" AND Request.Form("ClayObjectColors") <> "ANY") AND (Request.Form("ClayObjectShapes") = "" OR Request.Form("ClayObjectShapes") = "ANY") then 'color only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [ClayObjectShapeColor] LIKE '%;" & Request.form("ClayObjectColors") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("ClayObjectColors") end if elseif Request.Form("UnitClyObj") = "UnitClyObjOFF" then buildwhere = buildwhere & " [ClayObjectPresent] = 0" txtCriteria = txtCriteria & " Clay Objects Present = No" end if end if if Request.Form("UnitCS") = "UnitCSON" OR request.form("UnitCS") = "UnitCSOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitCS") = "UnitCSON" then buildwhere = buildwhere & " [CSPresent] = 1" txtCriteria = txtCriteria & " Chipped stone Present = Yes" 'copy groundstone when add descrip to raw mat if (Request.Form("CSRawMat") <> "" AND Request.Form("CSRawMat") <> "ANY") then 'raw material only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [CSRawMaterial] LIKE '%," & Request.form("CSRawMat") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("CSRawMat") end if elseif Request.Form("UnitCS") = "UnitCSOFF" then buildwhere = buildwhere & " [CSPresent] = 0" txtCriteria = txtCriteria & " Chipped stone Present = No" end if end if if Request.Form("UnitCons") = "UnitConsON" OR request.form("UnitCons") = "UnitConsOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitCons") = "UnitConsON" then buildwhere = buildwhere & " [ConsPresent] = 1" txtCriteria = txtCriteria & " Conservation Record Exists = Yes" elseif Request.Form("UnitCons") = "UnitConsOFF" then buildwhere = buildwhere & " [ConsPresent] = 0" txtCriteria = txtCriteria & " Conservation Record Exists = No" end if end if if Request.Form("UnitFaunal") = "UnitFaunalON" OR request.form("UnitFaunal") = "UnitFaunalOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitFaunal") = "UnitFaunalON" then buildwhere = buildwhere & " [FaunalPresent] = 1" txtCriteria = txtCriteria & " Faunal Present = Yes" if (Request.Form("FaunalElement") <> "" AND Request.Form("FaunalElement") <> "ANY") AND (Request.Form("FaunalTaxon") <> "" AND Request.Form("FaunalTaxon") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [FaunalElementTaxon] LIKE '%," & Request.form("FaunalElement") & ";" & Request.form("FaunalTaxon") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("FaunalElement") & " " & Request.form("FaunalTaxon") elseif (Request.Form("FaunalElement") <> "" AND Request.Form("FaunalElement") <> "ANY") AND (Request.Form("FaunalTaxon") = "" OR Request.Form("FaunalTaxon") = "ANY") then 'element only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [FaunalElementTaxon] LIKE '%," & Request.form("FaunalElement") & ";%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("FaunalElement") elseif (Request.Form("FaunalTaxon") <> "" AND Request.Form("FaunalTaxon") <> "ANY") AND (Request.Form("FaunalElement") = "" OR Request.Form("FaunalElement") = "ANY") then 'taxon only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [FaunalElementTaxon] LIKE '%;" & Request.form("FaunalTaxon") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("FaunalTaxon") end if elseif Request.Form("UnitFaunal") = "UnitFaunalOFF" then buildwhere = buildwhere & " [FaunalPresent] = 0" txtCriteria = txtCriteria & " Faunal Present = No" end if end if if Request.Form("UnitFig") = "UnitFigON" OR request.form("UnitFig") = "UnitFigOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitFig") = "UnitFigON" then buildwhere = buildwhere & " [FigPresent] = 1" txtCriteria = txtCriteria & " Figurines Present = Yes" if (Request.Form("FigObjectType") <> "" AND Request.Form("FigObjectType") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [FigObjectType] LIKE '%," & Request.form("FigObjectType") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("FigObjectType") end if if (Request.Form("FigPrimaryFabric") <> "" AND Request.Form("FigPrimaryFabric") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [FigPrimFabric] LIKE '%," & Request.form("FigPrimaryFabric") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("FigPrimaryFabric") end if elseif Request.Form("UnitFig") = "UnitFigOFF" then buildwhere = buildwhere & " [FigPresent] = 0" txtCriteria = txtCriteria & " Figurines Present = No" end if end if if Request.Form("UnitGS") = "UnitGSON" OR request.form("UnitGS") = "UnitGSOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitGS") = "UnitGSON" then buildwhere = buildwhere & " [GSPresent] = 1" txtCriteria = txtCriteria & " Groundstone Present = Yes" if (Request.Form("GSRawMat") <> "" AND Request.Form("GSRawMat") <> "ANY") AND (Request.Form("GSArtType") <> "" AND Request.Form("GSArtType") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [GSRawMaterialandDescrip] LIKE '%," & Request.form("GSRawMat") & ";" & Request.form("GSArtType") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("GSRawMat") & " " & Request.form("GSArtType") elseif (Request.Form("GSRawMat") <> "" AND Request.Form("GSRawMat") <> "ANY") AND (Request.Form("GSArtType") = "" OR Request.Form("GSArtType") = "ANY") then 'raw material only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [GSRawMaterialandDescrip] LIKE '%," & Request.form("GSRawMat") & ";%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("GSRawMat") elseif (Request.Form("GSArtType") <> "" AND Request.Form("GSArtType") <> "ANY") AND (Request.Form("GSRawMat") = "" OR Request.Form("GSRawMat") = "ANY") then 'artefact type only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [GSRawMaterialandDescrip] LIKE '%;" & Request.form("GSArtType") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("GSArtType") end if elseif Request.Form("UnitGS") = "UnitGSOFF" then buildwhere = buildwhere & " [GSPresent] = 0" txtCriteria = txtCriteria & " Groundstone Present = No" end if end if if Request.Form("UnitHR") = "UnitHRON" OR request.form("UnitHR") = "UnitHROFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitHR") = "UnitHRON" then buildwhere = buildwhere & " [HRPresent] = 1" txtCriteria = txtCriteria & " Heavy Residue = Yes" 'copy groundstone when add descrip to raw mat if (Request.Form("HRMaterial") <> "" AND Request.Form("HRMaterial") <> "ANY") then 'raw material only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [HRMaterial] LIKE '%," & Request.form("HRMaterial") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("HRMaterial") end if elseif Request.Form("UnitHR") = "UnitHROFF" then buildwhere = buildwhere & " [HRPresent] = 0" txtCriteria = txtCriteria & " Heavy Residue Present = No" end if end if if Request.Form("UnitMF") = "UnitMFON" OR request.form("UnitMF") = "UnitMFOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitMF") = "UnitMFON" then buildwhere = buildwhere & " [MFPresent] = 1" txtCriteria = txtCriteria & " Microfaunal Present = Yes" if (Request.Form("MFElement") <> "" AND Request.Form("MFElement") <> "ANY") AND (Request.Form("FaunalTaxon") <> "" AND Request.Form("FaunalTaxon") <> "ANY") then if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [MFElementTaxon] LIKE '%," & Request.form("MFElement") & ";" & Request.form("MFTaxon") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("MFElement") & " " & Request.form("MFTaxon") elseif (Request.Form("MFElement") <> "" AND Request.Form("MFElement") <> "ANY") AND (Request.Form("MFTaxon") = "" OR Request.Form("MFTaxon") = "ANY") then 'element only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [MFElementTaxon] LIKE '%," & Request.form("MFElement") & ";%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("MFElement") elseif (Request.Form("MFTaxon") <> "" AND Request.Form("MFTaxon") <> "ANY") AND (Request.Form("MFElement") = "" OR Request.Form("MFElement") = "ANY") then 'taxon only if buildwhere <> "" then buildwhere = buildwhere & " AND" buildwhere = buildwhere & " [MFElementTaxon] LIKE '%;" & Request.form("MFTaxon") & ",%'" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " txtCriteria = txtCriteria & Request.form("MFTaxon") end if elseif Request.Form("UnitMF") = "UnitMFOFF" then buildwhere = buildwhere & " [MFPresent] = 0" txtCriteria = txtCriteria & " Microfaunal Present = No" end if end if if Request.Form("UnitPhyto") = "UnitPhytoON" OR request.form("UnitPhyto") = "UnitPhytoOFF" then if buildwhere <> "" then buildwhere = buildwhere & " AND" if txtCriteria <> "" then txtCriteria = txtCriteria & " and " if Request.Form("UnitPhyto") = "UnitPhytoON" then buildwhere = buildwhere & " [PhytoPresent] = 1" txtCriteria = txtCriteria & " Phytolith Sample Exists = Yes" elseif Request.Form("UnitPhyto") = "UnitPhytoOFF" then buildwhere = buildwhere & " [PhytoPresent] = 0" txtCriteria = txtCriteria & " Phytolith Sample Exists = No" end if end if 'NB put in txtCriteria when finalised ' if Request.Form("UnitFig") <> "UnitFg" then ' if buildwhere <> "" then buildwhere = buildwhere & " AND" ' if Request.Form("UnitFig") = "UnitFigON" then buildwhere = buildwhere & " [FigPresent] = 1" ' if Request.Form("UnitFig") = "UnitFigOFF" then buildwhere = buildwhere & " [FigPresent] = 0" ' end if if buildwhere <> "" then where = "WHERE " & buildwhere if txtCriteria <> "" then txtCriteria = " where " & txtCriteria tbl = "[Web_UnitSheetFull]" 'Response.Write Where 'Response.end elseif Request.Querystring("Listby") <> "" AND request.querystring("id") <> "" then val = Request.QueryString("Listby") where = " WHERE [" & val & "] " if val = "AssoFeatures" OR val = "AssoSpaces" OR val = "AssoBuildings" OR val = "AssoFeatureTypes" then where = where & " LIKE '%," & Request.QueryString("id") & ",%'" else where = where & " = '" & Request.QueryString("id") & "'" end if tbl = "[Web_UnitSheetFull]" if Request.QueryString("ListBy") = "AssoSpaces" then txtCriteria = "for Space " & Request.QueryString("id") elseif Request.QueryString("ListBy") = "AssoBuildings" then txtCriteria = "for Building " & Request.QueryString("id") elseif Request.QueryString("ListBy") = "AssoFeatures" then txtCriteria = "for Feature " & Request.QueryString("id") else txtCriteria = "List By " & Request.QueryString("id") end if 'txtCriteria = "List By " & Request.QueryString("ListBy") & " " & Request.QueryString("id") end if %> <%if where <> "" then Call UnitList("Unit Number", where, tbl, txtCriteria) else Response.Write("No criteria entered") end if%> <%end if end if %>
<% call footer() %>