<%@ LANGUAGE="VBSCRIPT" %> <% '******************************************** '* '* Filename: listing.asp '* '* DESCRIPTION '* ----------- '* '* '* INPUT PARAMETERS: '* ---------------- '* I - none '* '* Copyright (c) 1999 Hubbard One. All rights reserved '******************************************** '* '* Author: Amy Sass '* Date Created: 01/29/2001 '* '* REVISION HISTORY '* $Revision: 25 $ '* $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 = "listing" %> <% '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 'response.write "browser: " & strBrowser & "
" 'response.write "version: " & intVersion & "
" 'response.write "os: " & strOS & "
" Dim blnFromPracticePage If Request.Querystring("Practice") = 1 Then blnFromPracticePage = True Else blnFromPracticePage = False End if Dim strNav, strSubNav, strPageTitle If blnFromPracticePage Then strNav = "services" strSubNav = "practice" Else strNav = "people" strSubNav = "attorneys" End If '---------Dynamic Title Tags------------------------------------------------------------- '---------incTitleTags include file will build the title tags---------------------------- '---------Variable name is "strTitle"---------------------------------------------------- %> <% '--------End Dynamic Title Tags---------------------------------------------------------- Dim strName, intGroupID, intOfficeID, intAreaID, blnIsArea strName = Trim(Request.Querystring("txtName")) strName = Replace(strName,"'","%") intOfficeID = Request.Querystring("cmbOffices") intGroupID = Request.Querystring("cmbPractices") 'Check for name If Len(strName) > 0 Then strName = strName & ADOWILD Else strName = ADOWILD End If If Request.Querystring("letter") <> "" Then strName = Request.QueryString("letter") & ADOWILD End If 'response.write "this one " & strName & "
" 'If strName = "All" Then ' strName = ADOWILD 'End If 'Check for Office If intOfficeID = "" Then intOfficeID = ADOWILD End If 'Check for practice group If intGroupID = "" Then intGroupID = ADOWILD Else If Left(intGroupID, 1) = "a" Then intAreaID = Cint(Right(intGroupID, (Len(intGroupID) - 1))) blnIsArea = True intGroupID = "" Else blnIsArea = False End If End If 'response.write "Is Area: " & blnIsArea 'Area and Group Name Dim strPractice, recTemp, strOfficeName If blnIsArea Then If intAreaID <> ADOWILD Then Set recTemp = RunStoredProc("spr_GetArea", intAreaID) If Err.Number <> 0 Then Call HandleError() End If strPractice = recTemp("AreaName") Set recTemp = Nothing Else strPractice = "" End If Else If intGroupID <> ADOWILD Then Set recTemp = RunStoredProc("spr_GetGroup", intGroupID) If Err.Number <> 0 Then Call HandleError() End If strPractice = recTemp("GroupName") Set recTemp = Nothing Else strPractice = "" End If End If 'OfficeName If intOfficeID <> ADOWILD Then 'response.write intOfficeID Set recTemp = RunStoredProc("spr_GetOffice", intOfficeID) If Err.Number <> 0 Then Call HandleError() End If strOfficeName = recTemp("OfficeName") Set recTemp = Nothing Else strOfficeName = ADOWILD End If Sub ShowAttorneys() 'Get the recordset Dim arrParam, recAttorneys, recTemp, recAlias If blnIsArea Then arrParam = Array(strName, strOfficeName, intAreaID) Set recAttorneys = RunStoredProc("spr_GetAttorneysBySearchArea", arrParam) If Err.Number <> 0 Then Call HandleError() End If Set recAlias = RunStoredProc("spr_GetAttorneysByAliasSearchArea", arrParam) If Err.Number <> 0 Then Call HandleError() End If Else 'response.write "another hello" & strName arrParam = Array(strName, strOfficeName, intGroupID) 'response.write "'" & strName & "' " & strOfficeName & " " & intGroupID Set recAttorneys = RunStoredProc("spr_GetAttorneysBySearchGroup", arrParam) If Err.Number <> 0 Then Call HandleError() End If Set recAlias = RunStoredProc("spr_GetAttorneysByAlias", arrParam) If Err.Number <> 0 Then Call HandleError() End If End If Dim strFullName 'response.write recAttorneys.RecordCount If recAttorneys.Recordcount > 0 Then Do while not recAttorneys.EOF strFullName = recAttorneys("FirstName") & " " If Len(recAttorneys("MiddleName")) > 0 Then strFullName = strFullName & recAttorneys("MiddleName") & " " End If strFullName = strFullName & recAttorneys("LastName") %>
" id=grn><%=strFullName%>
<%=recAttorneys("Level1")%>
<%GetAttorneyPractices(recAttorneys("EmployeeID"))%>
<%IF recAttorneys("OfficeName") <> "" Then%> <%End If%> <%IF recAttorneys("OfficeName2") <> "" Then%> <%End If%>
<%=recAttorneys("OfficeName")%>
<%If recAttorneys("OfficePhone") <> "" or recAttorneys("OfficeName") = "Cambridge" Then %> PHONE <% IF recAttorneys("OfficeName") = "Cambridge" Then %>(617) 679-5200<% Else %><%=recAttorneys("OfficePhone")%><% End If %> <%End If%>
<%If recAttorneys("Phone") <> "" Then%> DIRECT <%=recAttorneys("Phone")%> <%End If%>
<%If recAttorneys("Fax") <> "" Then %> FAX<%=recAttorneys("Fax")%> <%End If%>
<%=recAttorneys("OfficeName2")%>
<%If recAttorneys("OfficePhone2") <> "" Then %> PHONE <%=recAttorneys("OfficePhone2")%> <%End If%>
<%If recAttorneys("SecondPhone") <> "" Then%> DIRECT <%=recAttorneys("SecondPhone")%> <%End If%>
<%If recAttorneys("SecondFax") <> "" Then %> FAX<%=recAttorneys("SecondFax")%> <%End If%>
<% recAttorneys.MoveNext Loop Else %> No attorneys found for your search criteria. <% End If If len(strName) > 2 Then If recAlias.Recordcount > 0 Then %>
Perhaps you are looking for: <% Do while not recAlias.EOF strFullName = recAlias("FirstName") & " " If Len(recAlias("MiddleName")) > 0 Then strFullName = strFullName & recAlias("MiddleName") & " " End If strFullName = strFullName & recAlias("LastName") %> " id=grn><%=strFullName%> <% recAlias.MoveNext if not recAlias.eof then response.Write(" or ") end if Loop %> <% End If End If Set recAttorneys = Nothing End Sub 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 strGroups Set recEmpGroups = Nothing End Sub %> <% 'APPLICATION ASP CODE BEFORE HERE %> <% 'APPLICATION SERVER-SIDE FUNCTIONS AFTER HERE %> <% 'APPLICATION SERVER-SIDE FUNCTIONS BEFORE HERE %> <% ' Don't cache Response.Expires=0 Response.AddHeader "cache-control", "private" Response.AddHeader "pragma", "no-cache" %> <%=strTitle%> <% Dim strHeaderString, strName2 strName2 = strName strName2 = Replace(strName2,"%","'") If Request.Querystring("letter") = "" Then strName2 = Left(strName2, Len(strName2)-1) If strName2 <> "" Then strHeaderString = "Last Name " & strName2 & "" End If If strOfficeName <> ADOWILD Then If Len(strHeaderString) > 0 Then strHeaderString = strHeaderString & ", " & "Office " & strOfficeName & "" Else strHeaderString = "Office " & strOfficeName & "" End If End If If strPractice <> "" Then If Len(strHeaderString) > 0 Then strHeaderString = strHeaderString & ", " & "Practice Area " & strPractice & "" Else strHeaderString = "Practice Area " & strPractice & "" End If End If If strHeaderString <> "" Then If blnFromPracticePage = False Then Response.write "Search results for: " Response.write strHeaderString & "." End If End If End If %> <%If blnFromPracticePage Then %> <%Else %> <%End If %> <%Call ShowAttorneys%>
<%=strPractice%> - Attorneys
To refine your search return to attorney search page

<%If Request.Querystring("letter") <> "" Then %> <%=Request.Querystring("letter")%>
<%End If%>


<% 'SERVER-SIDE ARCHITECTURE INCLUDE - DO NOT REMOVE %> <%' Call ServerCleanUp() %>