<%@ LANGUAGE="VBSCRIPT" %> <% '******************************************** '* '* Filename: listing.asp '* '* DESCRIPTION '* ----------- '* Home page. '* '* INPUT PARAMETERS: '* ---------------- '* I - none '* '* Copyright (c) 1999 Hubbard One. All rights reserved '******************************************** '* '* Author: Amy Sass '* Date Created: 01/29/2001 '* '* REVISION HISTORY '* $Revision: 15 $ '* $Author: Ahoffman $ '* $Date: 7/12/05 5:05p $ '* '******************************************** 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 strNav, strSubNav strNav = "people" strSubNav = "staff" '---------Dynamic Title Tags------------------------------------------------------------- '---------incTitleTags include file will build the title tags---------------------------- '---------Variable name is "strTitle"---------------------------------------------------- %> <% '--------End Dynamic Title Tags---------------------------------------------------------- Dim strName, intGroupID, intOfficeID strName = Trim(Request.Querystring("txtName")) strName = Replace(strName,"'","%") intOfficeID = Request.Querystring("cmbOffices") 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 If intOfficeID = "" Then intOfficeID = ADOWILD End If Dim strOfficeName If intOfficeID <> ADOWILD Then 'response.write intOfficeID Dim recTemp 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 ShowStaff Dim arrParam, recStaff, recAlias arrParam = Array(strName, strOfficeName) Set recStaff = RunStoredProc("spr_GetStaffBySearch", arrParam) If Err.Number <> 0 Then Call HandleError() End If Set recAlias = RunStoredProc("spr_GetStaffByAlias", arrParam) If Err.Number <> 0 Then Call HandleError() End If Dim strFullName 'response.write recStaff.RecordCount If recStaff.Recordcount > 0 Then If Request.Querystring("letter") <> "" Then %> <%=Request.Querystring("letter")%>
<%End If%> <% Do while not recStaff.EOF strFullName = recStaff("FirstName") & " " If Len(recStaff("MiddleName")) > 0 Then strFullName = strFullName & recStaff("MiddleName") & " " End If strFullName = strFullName & recStaff("LastName") %>
" id=grn><%=strFullName%>
<%=recStaff("Level1")%>
PHONE <%=recStaff("OfficePhone")%>
DIRECT <%=recStaff("Phone")%>
FAX<%=recStaff("Fax")%>
<% recStaff.MoveNext Loop Else %> No staff 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 recStaff = 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 <> "%" Then If Len(strHeaderString) > 0 Then strHeaderString = strHeaderString & ", " & "Office " & strOfficeName & "" Else strHeaderString = "Office " & strOfficeName & "" End If End If If strHeaderString <> "" Then Response.write "Search results for: " Response.write strHeaderString & ".
" End If End If %> To refine your search return to staff search page.

<%Call ShowStaff %>

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