banner literature about projects tools meetings search links BBS GAP home GAP home
home
<% ProjectID = GetVariable("ProjectID") ViewType = GetVariable("ViewType") If ProjectID = "" Then Response.Redirect("/") End If Select Case ViewType Case "Contact" Call ViewContact(ProjectID) Case Else Call ViewProject(ProjectID) End Select Private Sub ViewProject(ProjectID) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open Application("DSN_International") Set RSProject = Conn.Execute("EXEC spGetProject " & ProjectID) WebSiteURL = Trim(RSProject("WebSiteURL")) Title = Trim(RSProject("Title")) FirstName = Trim(RSProject("FirstName")) LastName = Trim(RSProject("LastName")) Response.Write("

" & Title & "

") Set RSCountries = Conn.Execute("EXEC spGetCountries " & ProjectID) While Not RSCountries.EOF If Len(Location) <> 0 Then Location = Location & "; " End If Location = Location & RSCountries("Country") Set RSProvinces = Conn.Execute("EXEC spGetProvinces " & ProjectID & ",'" & RSCountries("Country") & "'") If Not RSProvinces.EOF Then Location = Location & "(" End If While Not RSProvinces.EOF Location = Location & RSProvinces("Province") RSProvinces.MoveNext If RSProvinces.EOF Then Location = Location & ")" Else Location = Location & ", " End If WEnd RSCountries.MoveNext WEnd Response.Write("
") Response.Write("Location: " & Location & "
") Response.Write("Contact: " & LastName & ", " & FirstName & " details...") Response.Write("
") Set RSProjectDescription = Conn.Execute("EXEC spGetProjectDescription " & ProjectID) Response.Write("

Description

") Description = RSProjectDescription("Description") Response.Write("
") For Each Paragraph In Split(Description, CHR(13) & CHR(10)) If Trim(Paragraph) <> "" Then Response.Write(Paragraph) End If Next Response.Write("
") Set RSProjectStatus = Conn.Execute("EXEC spGetProjectStatus " & ProjectID) Response.Write("

Status

") Status = RSProjectStatus("Status") Response.Write("
") For Each Paragraph In Split(Status, CHR(13) & CHR(10)) If Trim(Paragraph) <> "" Then Response.Write(Paragraph) End If Next Response.Write("
") Set RSProjectProducts = Conn.Execute("EXEC spGetProjectProducts " & ProjectID) Products = Trim(RSProjectProducts("Products")) If Products <> "" Then Response.Write("

Products

") Response.Write("
") For Each Paragraph In Split(Products, CHR(13) & CHR(10)) If Trim(Paragraph) <> "" Then Response.Write("

" & Paragraph & "

") End If Next Response.Write("
") End If If Not IsEmpty(WebSiteURL) Then Response.Write("

Web Site

") Response.Write("
" & WebSiteURL & "
") End If Set RSProjectKeywords = Conn.Execute("EXEC spGetProjectKeywords " & ProjectID) Response.Write("

Keywords

") Response.Write("") Set RSProjectRequest = Conn.Execute("EXEC spGetProjectRequest " & ProjectID) RequestAss = RSProjectRequest("Request") If RequestAss <> "" Then Response.Write("

Request for Assistance

") Response.Write("
") For Each Paragraph In Split(RequestAss, CHR(13) & CHR(10)) If Trim(Paragraph) <> "" Then Response.Write("

" & Paragraph & "

") End If Next Response.Write("
") End If Set RSProjectNotes = Conn.Execute("EXEC spGetProjectNotes " & ProjectID) Notes = RSProjectNotes("Notes") If Notes <> "" Then Response.Write("

Notes

") Response.Write("
") For Each Paragraph In Split(Notes, CHR(13) & CHR(10)) If Trim(Paragraph) <> "" Then Response.Write("

" & Paragraph & "

") End If Next Response.Write("
") End If End Sub Private Sub ViewContact(ProjectID) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open Application("DSN_International") Set RSProject = Conn.Execute("EXEC spGetProject " & ProjectID) FirstName = Trim(RSProject("FirstName")) LastName = Trim(RSProject("LastName")) Phone = Trim(RSProject("Phone")) PhoneExtension = Trim(RSProject("PhoneExtension")) Fax = Trim(RSProject("Fax")) EMail = Trim(RSProject("EMail")) If PhoneExtension <> "" Then Phone = Phone & " x" & PhoneExtension End If Title = Trim(RSProject("Title")) Response.Write("

Contact Information: " & Title & "

") Response.Write("Name: " & LastName & ", " & FirstName & "
") Response.Write("Phone: " & Phone & "
") If Fax <> "" Then Response.Write("Fax: " & Fax & "
") End If If EMail <> "" Then Response.Write("E-mail: " & EMail & "
") End If Set RSProjectAddress = Conn.Execute("EXEC spGetProjectAddress " & ProjectID) Response.Write("Address: ") Address = RSProjectAddress("Address") Response.Write("
") Response.Write(Replace(Address, CHR(13) & CHR(10), "
")) Response.Write("
") End Sub Private Function GetVariable(Variable) If IsEmpty(Request.Form(Variable)) Then If IsEmpty(Request.QueryString(Variable)) Then GetVariable = Null Else GetVariable = Trim(Request.QueryString(Variable)) End If Else GetVariable = Trim(Request.Form(Variable)) End If End Function %>

 

Literature  | About GAP | Projects and Products | Tools | Meetings | SearchLinks | Bulletin Boards  |  Site Map

 

USGS  ||Gap Analysis Program || NBII ||
Disclaimer
|| Privacy || Accessibility||
GAP Webmaster ||