%@ LANGUAGE="VBSCRIPT" %>
<%
'********************************************
'*
'* Filename: bio.asp
'*
'* DESCRIPTION
'* -----------
'* bio page.
'*
'* INPUT PARAMETERS:
'* ----------------
'* I - none
'*
'* Copyright (c) 1999 Hubbard One. All rights reserved
'********************************************
'*
'* Author: Amy Sass
'* Date Created: 01/29/2001
'*
'* REVISION HISTORY
'* $Revision: 33 $
'* $Author: Sgriffin $
'* $Date: 5/07/07 13:10 $
'*
'********************************************
Option Explicit
'If blnOnError Then On Error Resume Next
%>
<% 'APPLICATION SERVER-SIDE INCLUDE FILE(S) AFTER HERE %>
<% '** Enter the page name WITHOUT extension below **
Const PAGE_NAME = "bio"
%>
<% 'ARCHITECTURE SERVER-SIDE INCLUDE - DO NOT REMOVE %>
<% 'APPLICATION SERVER-SIDE INCLUDE FILE(S) BEFORE HERE %>
<% 'APPLICATION ASP CODE AFTER HERE %>
<%
'get browser version, name, and os
Dim strBrowser, intVersion, strOS
strBrowser = GetBrowserName
intVersion = GetBrowserVersion
strOS = GetPlatform
Dim intID, recBio, blnExist, blnIsAtt, blnPublish
Dim strNav, strSubNav, strPageTitle
intID = Request.Querystring("ID")
'if there is no id, redirect page to attorneys.asp
If intID = "" Then
Response.Redirect "attorneys.asp"
End If
Set recBio = RunStoredProc("spr_getBio", intID)
If Err.Number <> 0 Then Call HandleError() End If
blnPublish = True
If recBio.Recordcount = 0 Then
blnExist = False
blnIsAtt = True 'and ID isn't valid, default to attorney
strNav = "people"
strSubNav = "attorneys"
ElseIf recBio("PublishToWeb") = 0 Or recBio("PublishToWeb") = "False" Then
blnExist = False
blnPublish = False
blnIsAtt = True 'and ID isn't valid, default to attorney
strNav = "people"
strSubNav = "attorneys"
Else
blnExist = True
End If
'blnExist checkes to see if the ID passed in actually existed in the table.
'if recBio returns 0 record, we don't do anything on the page.
If blnExist Then
'determine if this is an attorney
If recBio("PositionID") = 1 Then
blnIsAtt = True
Else
blnIsAtt = False
End If
'set bio variables
Dim strFullName, strEmail, strPhone, strDirect, strFax
Dim strLevel, strOffice, strOffice2, strOffice3, strFirstOffice, strSecondOffice, strThirdOffice
Dim strEdu, strMilitary, strExp, strAdmitted, strRepMatters, strActHonors, strTeaching
Dim strCivic, strReligious, strPubPres, strDecisions, strLanguages
Dim strPhone2, strDirect2, strFax2
'set full name
strFullName = recBio("FirstName") & " "
If Len(recBio("MiddleName")) > 0 Then
strFullName = strFullName & recBio("MiddleName") & " "
End If
strFullName = strFullName & recBio("LastName")
'set the page header
strNav = "people"
If blnIsAtt Then
strSubNav = "attorneys"
Else
strSubNav = "staff"
End If
'---------Dynamic Title Tags-------------------------------------------------------------
'---------incTitleTags include file will build the title tags----------------------------
'---------Variable name is "strTitle"----------------------------------------------------
%>
<%
'--------End Dynamic Title Tags----------------------------------------------------------
'set photos
'################################
Dim FSO, strPhotoPath, strPic
strPhotoPath = "img"
Set FSO = CreateObject("Scripting.FileSystemObject")
If Err.Number <> 0 Then Call HandleError() End If
If recBio("PhotoConsent") And FSO.FileExists(Server.MapPath(strPhotoPath) & "\" & intID & ".jpg") then
strPic = "
"
ElseIf recBio("PhotoConsent") And FSO.FileExists(Server.MapPath(strPhotoPath) & "\" & intID & ".gif") then
strPic = "
"
Else
strPic = ""
End If
'################################
Dim strMetaDescription, strMetaString
strEmail = recBio("Email")
' ---------------------------------------------------
' Split email for spam-proofing - KC 3/5/03
' ---------------------------------------------------
Dim strEmailName, strEmailDomain, arrEmailAddress
strEmailName = ""
if strEmail <> "" And InStr(strEmail, "@") Then
arrEmailAddress = Split(strEmail, "@")
strEmailDomain = arrEmailAddress(1)
strEmailName = arrEmailAddress(0)
End If
strPhone = recBio("OfficePhone")
strDirect = recBio("Phone")
strFax = recBio("Fax")
strLevel = recBio("Level1")
strOffice = recBio("OfficeName")
strOffice2 = recBio("OfficeName2")
strPhone2 = recBio("OfficePhone2")
strDirect2 = recBio("SecondPhone")
strFax2 = recBio("SecondFax")
'Meta description content-----------------------
StrMetaString = strFullName & ". "
StrMetaString = strLevel & ". "
strMetaString = strMetaString & strOffice & ". "
strMetaString = strMetaString & strEmail & ". "
strMetaString = strMetaString & strPhone & ". "
strMetaDescription = MakeDescriptionTag(strMetaString,200)
'-----------------------------------------------
strOffice3 = Replace(Trim(recBio("Admissions")),"^"," ")
strOffice3 = FormatOut(strOffice3)
strMilitary = Trim(recBio("ClerkInfo"))
strMilitary = FormatOut(strMilitary)
strExp = Trim(ConvertHTMLCodes(RemoveFontTags(recBio("Experience")))) 'from text editor
'FormatOut the old practice areas text
If Instr(1, strExp, "PRACTICE AREAS") > 0 Then
strExp = Replace(strExp, "PRACTICE AREAS", "
Practice Areas")
Else
strExp = Replace(strExp, "PRACTICE AREA", "Practice Area")
End If
strExp = FormatOut(strExp)
strAdmitted = Trim(recBio("Courts"))
strAdmitted = FormatOut(strAdmitted)
strRepMatters = Trim(recBio("PriorEmployment"))
strRepMatters = FormatOut(strRepMatters)
strActHonors = Trim(recBio("Affiliations"))
strActHonors = FormatOut(strActHonors)
strTeaching = Trim(recBio("Hobbies"))
strTeaching = FormatOut(strTeaching)
strCivic = Trim(recBio("Activities"))
strCivic = FormatOut(strCivic)
strReligious = Trim(recBio("Memberships"))
strReligious = FormatOut(strReligious)
strPubPres = Trim(recBio("Education"))
strPubPres = FormatOut(strPubPres)
strDecisions = Trim(recBio("Seminars"))
strDecisions = FormatOut(strDecisions)
strLanguages = Trim(recBio("Languages"))
strLanguages = FormatOut(strLanguages)
'Set first two office addresses... 3rd office address uses a function call... GetThirdOffice
strFirstOffice = ""
If strOffice <> "" Then
If strOffice2 <> "" OR strOffice3 <> "" Then
strFirstOffice = Trim(strOffice) & " " & Trim(recBio("OfficeAddress1")) & " "
Else
strFirstOffice = Trim(recBio("OfficeAddress1")) & " "
End If
If recBio("OfficeAddress2") <> "" Then
strFirstOffice = strFirstOffice & Trim(recBio("OfficeAddress2")) & " "
End If
If recBio("OfficeAddress3") <> "" Then
strFirstOffice = strFirstOffice & Trim(recBio("OfficeAddress3")) & " "
End If
If strOffice2 <> "" Then
strFirstOffice = strFirstOffice & " " & Trim(strOffice2) & " "
ElseIf strOffice3 <> "" Then
strFirstOffice = strFirstOffice & " " & Trim(strOffice3) & " "
End If
strFirstOffice = RemoveZip(strFirstOffice)
End If
strSecondOffice = ""
If strOffice2 <> "" Then
strSecondOffice = Trim(recBio("OfficeAddress12")) & " "
If recBio("OfficeAddress22") <> "" Then
strSecondOffice = strSecondOffice & Trim(recBio("OfficeAddress22")) & " "
End If
If recBio("OfficeAddress32") <> "" Then
strSecondOffice = strSecondOffice & Trim(recBio("OfficeAddress32")) & " "
End If
If strOffice3 <> "" Then
strSecondOffice = strSecondOffice & " " & Trim(strOffice3) & " "
End If
End If
'Set Education:
'strEdu = "
"
Dim strSchool
strSchool = trim(recBio("LawSchool")) & ""
if strSchool = "" Then
'do nothing
Else
strEdu = strEdu & "
Law School "
strSchool = trim(recBio("LawDegree")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool & ", " & recBio("LawYear") & " " & recBio("LawHonors") & " "
End If
strSchool = trim(recBio("LawSchool")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool
End If
strSchool = trim(recBio("LawMemo")) & ""
If strSchool <> "" then
strEdu = strEdu & " " & FormatOut(strSchool)
End If
End If
strSchool = trim(recBio("DocSchool")) & ""
if strSchool = "" Then
'do nothing
Else
If Len(strEdu) > 4 Then
strEdu = strEdu & "
"
End If
strEdu = strEdu & "
Doctorate School "
strSchool = trim(recBio("DocDegree")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool & ", " & recBio("DocYear") & " " & recBio("DocHonors") & " "
End If
strSchool = trim(recBio("DocSchool")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool
End If
strSchool = trim(recBio("DocMemo")) & ""
If strSchool <> "" then
strEdu = strEdu & " " & FormatOut(strSchool)
End If
End If
strSchool = trim(recBio("GradSchool")) & ""
if strSchool = "" Then
'do nothing
Else
If Len(strEdu) > 4 Then
strEdu = strEdu & "
"
End If
strEdu = strEdu & "
Graduate School "
strSchool = trim(recBio("GradDegree")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool & ", " & recBio("GradYear") & " " & recBio("GradHonors") & " "
End If
strSchool = trim(recBio("GradSchool")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool
End If
strSchool = trim(recBio("GradMemo")) & ""
If strSchool <> "" then
strEdu = strEdu & " " & FormatOut(strSchool)
End If
End If
strSchool = trim(recBio("UnderSchool")) & ""
if strSchool = "" Then
'do nothing
Else
If Len(strEdu) > 4 Then
strEdu = strEdu & "
"
End If
strEdu = strEdu & "
Undergraduate School "
strSchool = trim(recBio("UnderDegree")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool & ", " & recBio("UnderYear") & " " & recBio("UnderHonors") & " "
End If
strSchool = trim(recBio("UnderSchool")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool
End If
strSchool = trim(recBio("UnderMemo")) & ""
If strSchool <> "" then
strEdu = strEdu & " " & FormatOut(strSchool)
End If
End If
strSchool = trim(recBio("OtherSchool")) & ""
if strSchool = "" Then
'do nothing
Else
If Len(strEdu) > 4 Then
strEdu = strEdu & "
"
End If
strEdu = strEdu & "
Other School "
strSchool = trim(recBio("OtherDegree")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool & ", " & recBio("OtherYear") & " " & recBio("OtherHonors") & " "
End If
strSchool = trim(recBio("OtherSchool")) & ""
If strSchool <> "" then
strEdu = strEdu & strSchool
End If
strSchool = trim(recBio("OtherMemo")) & ""
If strSchool <> "" then
strEdu = strEdu & " " & FormatOut(strSchool)
End If
End If
If strEdu <> "" Then
strEdu = "
" & strEdu & "
"
End If
End If 'end if blnExist.
%>
<% 'APPLICATION ASP CODE BEFORE HERE %>
<% 'APPLICATION SERVER-SIDE FUNCTIONS AFTER HERE %>
<%
Sub GetAttorneyPractices(strEmpID)
Dim recEmpGroups, strGroups
Set recEmpGroups = RunStoredProc("spr_GetAttorneyGroups", strEmpID)
If Err.Number <> 0 Then
Call HandleError()
End If
strGroups = ""
Do while not recEmpGroups.EOF
If strGroups = "" Then
strGroups = "" & recEmpGroups("GroupName") & ""
Else
strGroups = strGroups & " " & "" & recEmpGroups("GroupName") & ""
End If
recEmpGroups.MoveNext
Loop
Response.Write FormatOut(strGroups)
Set recEmpGroups = Nothing
End Sub
Sub GetThirdOffice()
'response.write strOffice3
Dim recOffice
Set recOffice = RunStoredProc("spr_GetOfficeByName", Cstr(strOffice3))
If Err.Number <> 0 Then
Call HandleError()
End If
strThirdOffice = ""
If recOffice.RecordCount > 0 Then
strThirdOffice = strThirdOffice & Trim(recOffice("OfficeAddress1")) & " "
If recOffice("OfficeAddress2") <> "" Then
strThirdOffice = strThirdOffice & Trim(recOffice("OfficeAddress2")) & " "
End If
If recOffice("OfficeAddress3") <> "" Then
strThirdOffice = strThirdOffice & Trim(recOffice("OfficeAddress3")) & " "
End If
If recOffice("OfficePhone") <> "" Then
strThirdOffice = strThirdOffice & Trim(recOffice("OfficePhone")) & " "
End If
If strDirect <> "" Then
strThirdOffice = strThirdOffice & strDirect & " - Direct "
End If
If recOffice("OfficeFax") <> "" Then
strThirdOffice = strThirdOffice & strDirect & " - Fax
"
End If
End If
Set recOffice = Nothing
Response.write FormatOut(strThirdOffice)
End Sub
Function FormatOut(strText)
If strText <> "" Then
strText = Replace(strText, "^", " ")
strText = Replace(strText, vbcrlf, " ")
strText = Replace(strText, vbtab , " ")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
strText = Replace(strText, "
" , "")
End If
FormatOut = strText
End Function
Function RemoveZip(strText)
If InStr(strText, "-") Then
Dim intPos
Dim strZip
intPos = InStr(strText,"-")
strZip = mid(strText, intPos,5)
strText = Replace(strText, strZip, "")
'Response.Write(strText)
'Response.End
End If
RemoveZip = strText
End Function
%>
<% 'APPLICATION SERVER-SIDE FUNCTIONS BEFORE HERE %>
<%
' Don't cache
Response.Expires=0
Response.AddHeader "cache-control", "private"
Response.AddHeader "pragma", "no-cache"
%>
<%=strTitle%> | <%=strFullName%>
<%If blnExist Then%>
<%End If%>
<%If strPhone <> "" or recBio("OfficeName") = "Cambridge" Then %>
PHONE
<% If recBio("OfficeName") = "Cambridge" Then %>(617) 679-5200<% Else %><%=FormatOut(strPhone)%><% End If %>
<%End If
If strDirect <> "" Then %>
DIRECT
<%=FormatOut(strDirect)%>
<%End If
If strFax <> "" Then %>
FAX
<%=FormatOut(strFax)%>
<%End If %>
<%If strOffice2 <> "" Then%>
<%=FormatOut(strOffice2)%>
<%If strPhone2 <> "" Then %>
PHONE
<%=FormatOut(strPhone2)%>
<%End If
If strDirect2 <> "" Then %>
DIRECT
<%=FormatOut(strDirect2)%>
<%End If
If strFax2 <> "" Then %>
FAX
<%=FormatOut(strFax2)%>
<%End If%>
<%End If%>
<%=strPic%><%=FormatOut(strFirstOffice)%>
<%= FormatOut(strSecondOffice)%>
<%If Len(strOffice3) > 0 Then Call GetThirdOffice%>
<%If Len(Trim(strEdu)) > 0 Then %>
Educational Background
<%=FormatOut(strEdu) %>
<%End If%>
<%If Len(strMilitary) > 0 Then %>
Military Experience
<%=strMilitary%>
<%End If%>
<%If Len(strExp) > 0 Then %>
Professional Experience
<%=strExp%>
<%End If%>
<%If Len(strAdmitted) > 0 Then %>
Admitted To Practice
<%=strAdmitted%>
<%End If%>
<%If Len(strRepMatters) > 0 Then %>
Representative Matters
<%=strRepMatters%>
<%End If%>
<%If Len(strActHonors) > 0 Then %>
Professional Activities and Honors
<%=strActHonors%>
<%End If%>
<%If Len(strTeaching) > 0 Then %>
Teaching
<%=strTeaching%>
<%End If%>
<%If Len(strCivic) > 0 Then %>
Civic, Cultural, and Social Activities
<%=strCivic%>
<%End If%>
<%If Len(strReligious) > 0 Then %>
Religious Activities
<%=strReligious%>
<%End If%>
<%If Len(strPubPres) > 0 Then %>
Publications and Presentations
<%=strPubPres%>
<%End If%>
<%If Len(strDecisions) > 0 Then %>
Reported and Published Decisions
<%=strDecisions%>
<%End If%>
<%If Len(strLanguages) > 0 Then %>
Foreign Languages
<%=strLanguages%>
<%End If%>
<%End If 'end if blnexist%>
<%If Not blnPublish Then%>
Resume no longer available.
<%End If%>
<%Set recBio = Nothing%>
<% 'SERVER-SIDE ARCHITECTURE INCLUDE - DO NOT REMOVE %>
<% Call ServerCleanUp() %>