<% SiteName = Request.Querystring("Site") Set adoCon = Server.CreateObject("ADODB.Connection") adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/cgi-bin/SARGBASE/SARGBASE.mdb") Set RsSargBase = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT * FROM Wall_Lizard_Data WHERE Site_Name = '" & SiteName & "';" 'Open the recordset with the SQL query RsSargBase.Open strSQL, adoCon Do While not RsSargBase.EOF '0=ID '1=Site Name '2=County '3=Access '4=Extant '5=Range '6=Habitat '7=Founding Date '8=Extirpation date '9=IntroductionHistory '10=StockOrigin '11=CarryingCapacity/ha '12=Gross Area '13=%area suitable '14=Relative Population Estimate '15=Morph '16=Comment '17=Ecology '18 RangeFile 'If Replace(RecordLine(1), Chr(34), "") = SiteName Then County = RsSargBase("Shire") Access = RsSargBase("Access") Extant = RsSargBase("Extant") Range = RsSargBase("Geographic_Range") Habitat = RsSargBase("Habitat") Habitat1Caption = RsSargBase("Habitat1Caption") Habitat2Caption = RsSargBase("Habitat2Caption") FoundingDate = RsSargBase("Founding_Year") ExtirpationDate = RsSargBase("Extirpation_Date") Introduction = RsSargBase("Introduction_History") Stock = RsSargBase("Stock_Origin") Capacity = RsSargBase("Carrying_cap") Area = RsSargBase("Gross_area") AreaRatio = RsSargBase("Suitable_Habitat") Morph = RsSargBase("Morph") Morph1Caption = RsSargBase("Morph1Caption") Morph2Caption = RsSargBase("Morph2Caption") Comment = RsSargBase("Further_Comments") PMOSGB = RsSargBase("OSGBLGR") If Is_OSGB(PMOSGB) Then NearestTown = Get_Closest_Town(PMOSGB) Else NearestTown = PMOSGB End If If len(Capacity)=0 Or Len(Area)=0 Or Len(AreaRatio)=0 OR IsNull(Capacity) Or IsNull(Area) Or IsNull(AreaRatio) Then PopulationEstimate = RsSargBase("Relative_Population_Estimate") If IsNUll(RsSargBase("Relative_Population_Estimate")) Then PopulationEstimate = "Unknown" Else PopulationEstimate = FormatNumber(Capacity * Area * AreaRatio/100,0) End If Ecology = RsSargBase("Ecology") RangeFile = RsSargBase("KML_Range_File") 'End If RsSargBase.MoveNext Loop RsSargBase.Close Set RsSargBase = Nothing Set adoCon = Nothing %> <% 'construct polygon CentreEast = GetNationalEasting2(PMOSGB) CentreNorth = GetNationalNorthing2(PMOSGB) OSGB1 = OSGBNGR_2_OSGBLGR(CentreEast-500, CentreNorth-500) OSGB2 = OSGBNGR_2_OSGBLGR(CentreEast-500, CentreNorth+500) OSGB3 = OSGBNGR_2_OSGBLGR(CentreEast+500, CentreNorth+500) OSGB4 = OSGBNGR_2_OSGBLGR(CentreEast+500, CentreNorth-500) Poly1 = GetLat(OSGB1) & "," & GetLon(OSGB1) Poly2 = GetLat(OSGB2) & "," & GetLon(OSGB2) Poly3 = GetLat(OSGB3) & "," & GetLon(OSGB3) Poly4 = GetLat(OSGB4) & "," & GetLon(OSGB4) %> Wall lizard colonies

Wall lizard project - <%=SiteName%> colony

<%=SiteName%>
(<%=County%>)

 

Closest Town:

<%=NearestTown%>

 

Introduction date:

<%=FoundingDate%>

Site Name:

<%=SiteName%>

 

Source of introduction:

<%=Stock%>

Site Access:

<%=Access%>

 

Colony Status:

<%=Extant%>

Relative population estimate:

<%=PopulationEstimate%>

 

Extirpation date:

<%=ExtirpationDate%>

 
History:

<%=Comment%>

 
Ecological impact:

<%=Ecology%>

 
Habitat:

<%=Habitat%>

<% VirtualPath = "/SARG/02000-Activities/SurveyAndMonitoring/WallLizard/PMHabitatImages/" FileName1 = SiteName & " Habitat1.jpg" FileName2 = SiteName & " Habitat2.jpg" ImageString = "" CaptionString = "" ImageCount=0 If IsFile(VirtualPath,FileName1) Then ImageCount=ImageCount+1 ImageString = ImageString & FileName1 CaptionString = CaptionString & "Habitat at " & SiteName If NOT IsNull(Habitat1Caption) Then CaptionString = Habitat1Caption End If If IsFile(VirtualPath,FileName2) Then ImageCount=ImageCount+1 If len(ImageString)>0 Then ImageString = ImageString & "," & FileName2 End If If len(CaptionString)>0 Then If NOT IsNull(Habitat2Caption) Then CaptionString = CaptionString & "," & Habitat2Caption Else CaptionString = CaptionString & ",Habitat at " & SiteName End If End If End If If IsFile(VirtualPath,FileName1) OR IsFile(VirtualPath,FileName2) Then Response.write("
") Call InLineMontage(ImageString, VirtualPath, CaptionString) Response.write("
") End If %>
 
Morphology:

<%=Morph%>

<% VirtualPath = "/SARG/02000-Activities/SurveyAndMonitoring/WallLizard/PMMorphImages/" FileName1 = SiteName & " Morph1.jpg" FileName2 = SiteName & " Morph2.jpg" ImageString = "" CaptionString = "" ImageCount=0 If IsFile(VirtualPath,FileName1) Then ImageCount = ImageCount+1 ImageString = ImageString & FileName1 CaptionString = CaptionString & "Morph at " & SiteName If NOT IsNull(Morph1Caption) Then CaptionString = Morph1Caption End If If IsFile(VirtualPath,FileName2) Then ImageCount = ImageCount+1 If len(ImageString)>0 Then ImageString = ImageString & "," ImageString = ImageString & FileName2 End If If len(CaptionString)>0 Then If NOT IsNull(Morph2Caption) Then CaptionString = CaptionString & "," & Morph2Caption Else CaptionString = CaptionString & ",Morph at " & SiteName End If End If End If If IsFile(VirtualPath,FileName1) OR IsFile(VirtualPath,FileName2) Then Response.write("
") Call InLineMontage(ImageString, VirtualPath, CaptionString) Response.write("
") End If %>
 
Location:
 
 
<% Function IsFile(VirtualPath,FileName) Set fs=Server.CreateObject("Scripting.FileSystemObject") FilePath = Server.MapPath(VirtualPath & FileName) If (fs.FileExists(FilePath))=true Then IsFile = True Else IsFile = False End If End Function Function GetLat(PMOSGBLGR) 'convert grid systems Xcoord = GetNationalEasting2(PMOSGBLGR) Ycoord = GetNationalNorthing2(PMOSGBLGR) LatLonOSGB = OSGB_NGR2LL(Xcoord, Ycoord) LatLonWGS84 = PolarEarthOSGBtoPolarEarthWGS84(LatLonOSGB(0), LatLonOSGB(1),0) GetLat = FormatNumber(LatLonWGS84(0),6) End Function Function GetLon(PMOSGBLGR) 'convert grid systems Xcoord = GetNationalEasting2(PMOSGBLGR) Ycoord = GetNationalNorthing2(PMOSGBLGR) LatLonOSGB = OSGB_NGR2LL(Xcoord, Ycoord) LatLonWGS84 = PolarEarthOSGBtoPolarEarthWGS84(LatLonOSGB(0), LatLonOSGB(1),0) GetLon = FormatNumber(LatLonWGS84(1),6) End Function Function RemoteFileExists(FileName) Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "HEAD", FileName, False xmlhttp.send Select Case Cint(xmlhttp.status) Case 200, 202, 302 Set xmlhttp = Nothing RemoteFileExists = true Case Else Set xmlhttp = Nothing RemoteFileExists = false End Select End Function %>