<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim MailBody, MailObj Dim MailTo, MailFrom, MailSubject, MailCC, MailBCC %> [an error occurred while processing this directive] <% MM_authorizedUsers="Admin,Manager,Member,Guest" %> <% If (NOT InStr(LCase(Request.ServerVariables("URL")), "login.asp") > 0) and (NOT InStr(LCase(Request.ServerVariables("URL")), "accessdenied.asp") > 0) Then %> <% MM_GM_NotLoggedInURL="/members/Login.asp" MM_authFailedURL="/members/AccessDenied.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (false Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If Else MM_qsChar = "?" If (InStr(1,MM_GM_NotLoggedInURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_GM_NotLoggedInURL = MM_GM_NotLoggedInURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_GM_NotLoggedInURL) End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% ' *** Logout the current user. MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1" If (CStr(Request.QueryString("MM_Logoutnow")) = "1") Then Session.Contents.Remove("MM_Username") Session.Contents.Remove("MM_UserAuthorization") MM_logoutRedirectPage = "login.asp" ' redirect with URL parameters (remove the "MM_Logoutnow" query param). if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL")) If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_newQS = "?" For Each Item In Request.QueryString If (Item <> "MM_Logoutnow") Then If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&" MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item)) End If Next if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS End If Response.Redirect(MM_logoutRedirectPage) End If %> <% End If '(InStr(Request.ServerVariables("URL"), "login.asp") > 0) Then %> <% If NotBlank(CStr(Request.Form("ForgotPassword"))) Then If Not NotBlank(CStr(Request.Form("EmailAddress"))) Then Response.Redirect(CStr(Request.ServerVariables("URL")) & "?error=Please Enter Your Email Address!") set GM_rsUser = Server.CreateObject("ADODB.Recordset") GM_rsUser.ActiveConnection = MM_DB_STRING GM_rsUser.Source = "SELECT EmailAddress, Password, Name, Active" GM_rsUser.Source = GM_rsUser.Source & " FROM dbo.Users WHERE EmailAddress='" & Replace(CStr(Request.Form("EmailAddress")),"'","''") &"'" GM_rsUser.CursorType = 0 GM_rsUser.CursorLocation = 2 GM_rsUser.LockType = 3 GM_rsUser.Open If Not GM_rsUser.EOF Or Not GM_rsUser.BOF Then If GM_rsUser("Active") Then MailBodyStart("") MailTo = GM_rsUser("Name") & "<" & CStr(Request.Form("EmailAddress")) & ">" MailFrom = "Sound of the Bay Chorus " MailSubject = "Your Password" MailBodyAdd(GM_rsUser("Name") & ",

Sorry you forgot your password!

") MailBodyAdd("Your Password is: " & GM_rsUser("Password")) MailBodyStop MailBodySend GM_rsUser.Close Response.Redirect(CStr(Request.ServerVariables("URL")) & "?error=Email has been sent!") Else Response.Redirect(CStr(Request.ServerVariables("URL")) & "?error=Sorry! Your account is NOT active!") End If End If GM_rsUser.Close Response.Redirect(CStr(Request.ServerVariables("URL")) & "?error=Sorry! Email Address NOT On File!") End If %> <% ' *** Logout the current user. MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1" If (CStr(Request("MM_Logoutnow")) = "1") Then Session.Contents.Remove("MM_Username") Session.Contents.Remove("MM_MemberID") Session.Contents.Remove("MM_RealName") Session.Contents.Remove("MM_UserAuthorization") MM_logoutRedirectPage = "index.asp" ' redirect with URL parameters (remove the "MM_Logoutnow" query param). if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL")) If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_newQS = "?" For Each Item In Request.QueryString If (Item <> "MM_Logoutnow") Then If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&" MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item)) End If Next if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS End If Response.Redirect(MM_logoutRedirectPage) End If %> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("EmailAddress")) If MM_valUsername <> "" Then MM_fldUserAuthorization="Status" MM_redirectLoginSuccess="index.asp" MM_redirectLoginFailed="login.asp?error=Invalid Username or Password" MM_redirectLoginNotActive="login.asp?error=Your account is not active. Contact Jennifer if you have any questions." MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_DB_STRING MM_rsUser.Source = "SELECT EmailAddress, Password, Name, Active, ID" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM dbo.Users WHERE EmailAddress='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & Replace(Request.Form("Password"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then If (MM_rsUser.Fields.Item("Active").Value) Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername Session("MM_RealName") = CStr(MM_rsUser.Fields.Item("Name").Value) Session("MM_MemberID") = CStr(MM_rsUser.Fields.Item("ID").Value) If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close If NotBlank(CStr(Request.Form("setcookie"))) Then WriteCookies Else ClearCookies End If Response.Redirect(MM_redirectLoginSuccess) Else Response.Redirect(MM_redirectLoginNotActive) End If End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> Sound of the Bay - Members ONLY
Home   <% If Session("MM_MemberID") <> "" Then %> " class="style1">Update Account <% ELSE %>   <% End If %> <% If Session("MM_Username") <> "" Then %>Logout<% Else %>Log In<% End If %>
<% Dim Menu__MMColParam Menu__MMColParam = "" If (Session("MM_UserAuthorization") <> "") Then Menu__MMColParam = Session("MM_UserAuthorization") End If %> <% Dim Menu Dim Menu_numRows If Menu__MMColParam = "Admin" Then MM_GM_AccessLevel = "" ElseIf Menu__MMColParam = "Manager" Then MM_GM_AccessLevel = "WHERE AccessLevel = 'Manager' or AccessLevel = 'Member' or AccessLevel = 'Guest' or AccessLevel = 'ShowGuest' " ElseIf Menu__MMColParam = "Member" Then MM_GM_AccessLevel = "WHERE AccessLevel = 'Member' or AccessLevel = 'Guest' or AccessLevel = 'ShowGuest' " ElseIf Menu__MMColParam = "ShowGuest" Then MM_GM_AccessLevel = "WHERE AccessLevel = 'ShowGuest' or AccessLevel = 'Guest' " Else MM_GM_AccessLevel = "WHERE AccessLevel = 'Guest' " End If Set Menu = Server.CreateObject("ADODB.Recordset") Menu.ActiveConnection = MM_DB_STRING Menu.Source = "SELECT * FROM dbo.URLs " & MM_GM_AccessLevel & " ORDER BY Category, Description" Menu.CursorType = 0 Menu.CursorLocation = 2 Menu.LockType = 1 Menu.Open() Menu_numRows = 0 %> <% Dim LeftColumnRepeat1__numRows Dim LeftColumnRepeat1__index LeftColumnRepeat1__numRows = -1 LeftColumnRepeat1__index = 0 Menu_numRows = Menu_numRows + LeftColumnRepeat1__numRows %>

<% If Session("MM_Username") <> "" Then %> Hello <%=Session("MM_RealName")%>,
Welcome! <% Else %> Hello Guest/Member,
Welcome! <% End If %>

<% 'If LCase(Session("MM_Username")) <> "thetrekker@net1inc.net" and LCase(Session("MM_Username")) <> "jstewart@n2deepquartet.com" Then %> <% 'If LCase(Session("MM_Username")) <> "thetrekker@net1inc.net" Then %> <% If 1=1 Then %> Home
<% If NOT Session("MM_Username") <> "" Then %> Log In
<% End If %> <% Dim LeftColumnCurrentCategory : LeftColumnCurrentCategory = "" %> <% While ((LeftColumnRepeat1__numRows <> 0) AND (NOT Menu.EOF)) %> <% If LeftColumnCurrentCategory <> (Menu.Fields.Item("Category").Value) Then %>
<%=(Menu.Fields.Item("Category").Value)%>
<% LeftColumnCurrentCategory = (Menu.Fields.Item("Category").Value) %> <% End If %>    " class="LeftMenuFont" target="<%=(Menu.Fields.Item("Target").Value)%>"><%=(Menu.Fields.Item("Description").Value)%>
<% LeftColumnRepeat1__index=LeftColumnRepeat1__index+1 LeftColumnRepeat1__numRows=LeftColumnRepeat1__numRows-1 Menu.MoveNext() Wend %> <% If Session("MM_Username") <> "" Then %>
Log Out
<% End If %> <% Else 'If Session("MM_Username") <> "thetrekker@net1inc.net" Then %> Home
<% If NOT Session("MM_Username") <> "" Then %> Log In
<% End If %> <% LeftColumnCurrentCategory = "" %> <% While ((LeftColumnRepeat1__numRows <> 0) AND (NOT Menu.EOF)) %> <% If LeftColumnCurrentCategory <> (Menu.Fields.Item("Category").Value) Then %>
.gif" alt="<%=(Menu.Fields.Item("Category").Value)%>" border="0">
<% LeftColumnCurrentCategory = (Menu.Fields.Item("Category").Value) %> <% End If %>    " target="<%=(Menu.Fields.Item("Target").Value)%>">.gif" alt="<%=(Menu.Fields.Item("Description").Value)%>" border="0">
<% LeftColumnRepeat1__index=LeftColumnRepeat1__index+1 LeftColumnRepeat1__numRows=LeftColumnRepeat1__numRows-1 Menu.MoveNext() Wend %> <% If Session("MM_Username") <> "" Then %>
Logout
<% End If %> <% End If 'Session("MM_Username") <> "thetrekker@net1inc.net" Then %> <% Menu.Close() Set Menu = Nothing %>

 

<% if CStr(Request.QueryString("error")) <> "" Then %> <% End If %> <% if CStr(Request.QueryString("accessdenied")) <> "" Then %> <% End If %>
Please Login
<%=CStr(Request.QueryString("error"))%>
Please login for access to
<%=CStr(Request.QueryString("accessdenied"))%>
Email Address: ">
Password: ">
> Check here to remember this login
 
  ©<%=Year(now)%> Sound of the Bay Chorus
<% Function sqlEncode(sqlValue) sqlEncode = replace(sqlValue, "'", "''") End function Dim SQLArray(50), SQLACount, i, str Function BuildSQLString Dim i str = "" For i = 0 to SQLACount-1 If Not i = 0 Then str = str & ", " End If If Len(Trim(SQLArray(i))) = 0 Then str = str & "Null" Else str = str & "'" & sqlEncode(SQLArray(i)) & "'" End If Next BuildSQLString = str End Function Function DPFormatDate (strDate, strFormat) '********Formats********* '%m Month as a decimal no. 02 '%b Abbreviated month name Feb '%B Full month name February '%d Day of the month 23 '%j Day of the year 54 '%y Year without century 98 '%Y Year with century 1998 '%w Weekday as integer 5 (0 is Sunday) '%a Abbreviated day name Fri '%A Weekday Name Friday '%I Hour in 12 hour format 12 '%H Hour in 24 hour format 24 '%M Minute as an integer 01 '%S Second as an integer 55 '%P AM/PM Indicator PM '%% Actual Percent sign %% '%m/%d/%y Dim intPosItem Dim intHourPart Dim strHourPart Dim strMinutePart Dim strSecondPart Dim strAMPM If not IsDate(strDate) Then DPFormatDate = strDate Exit Function End If intPosItem = Instr(strFormat, "%m") Do While intPosItem > 0 If DatePart("m",strDate)<10 then LeadingZero = "0" End if strFormat = Left(strFormat, intPosItem-1) &LeadingZero& _ DatePart("m",strDate) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%m") Loop LeadingZero = "" intPosItem = Instr(strFormat, "%b") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ MonthName(DatePart("m",strDate),True) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%b") Loop intPosItem = Instr(strFormat, "%B") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ MonthName(DatePart("m",strDate),False) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%B") Loop intPosItem = Instr(strFormat, "%d") Do While intPosItem > 0 If DatePart("d",strDate)<10 then LeadingZero = "0" End if strFormat = Left(strFormat, intPosItem-1) &LeadingZero& _ DatePart("d",strDate) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%d") Loop LeadingZero = "" intPosItem = Instr(strFormat, "%j") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ DatePart("y",strDate) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%j") Loop intPosItem = Instr(strFormat, "%y") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ Right(DatePart("yyyy",strDate),2) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%y") Loop intPosItem = Instr(strFormat, "%Y") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ DatePart("yyyy",strDate) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%Y") Loop intPosItem = Instr(strFormat, "%w") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ DatePart("w",strDate,1) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%w") Loop intPosItem = Instr(strFormat, "%a") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ WeekDayName(DatePart("w",strDate,1),True) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%a") Loop intPosItem = Instr(strFormat, "%A") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & _ WeekDayName(DatePart("w",strDate,1),False) & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%A") Loop intPosItem = Instr(strFormat, "%I") Do While intPosItem > 0 intHourPart = DatePart("h",strDate) mod 12 if intHourPart = 0 then intHourPart = 12 strFormat = Left(strFormat, intPosItem-1) & _ intHourPart & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%I") Loop intPosItem = Instr(strFormat, "%H") Do While intPosItem > 0 strHourPart = DatePart("h",strDate) if strHourPart < 10 Then strHourPart = "0" & strHourPart strFormat = Left(strFormat, intPosItem-1) &LeadingZero& _ strHourPart & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%H") Loop intPosItem = Instr(strFormat, "%M") Do While intPosItem > 0 strMinutePart = DatePart("n",strDate) if strMinutePart < 10 then strMinutePart = "0" & strMinutePart strFormat = Left(strFormat, intPosItem-1) & _ strMinutePart & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%M") Loop intPosItem = Instr(strFormat, "%S") Do While intPosItem > 0 strSecondPart = DatePart("s",strDate) if strSecondPart < 10 then strSecondPart = "0" & strSecondPart strFormat = Left(strFormat, intPosItem-1) & _ strSecondPart & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%S") Loop intPosItem = Instr(strFormat, "%P") Do While intPosItem > 0 if DatePart("h",strDate) >= 12 then strAMPM = "PM" Else strAMPM = "AM" End If strFormat = Left(strFormat, intPosItem-1) & _ strAMPM & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%P") Loop intPosItem = Instr(strFormat, "%%") Do While intPosItem > 0 strFormat = Left(strFormat, intPosItem-1) & "%" & _ Right(strFormat, Len(strFormat) - (intPosItem + 1)) intPosItem = Instr(strFormat, "%%") Loop DPFormatDate = strFormat End Function Function NotBlank(strText) Dim t t = True If (IsNull(Trim(strText)) or IsEmpty(Trim(strText)) or Trim(strText)="") Then t = False End If ' CheckDebug(strText) NotBlank = t End Function Function RegExpReplace(patrn, replStr, str1) Dim regEx ' Create variables. Set regEx = New RegExp ' Create regular expression. regEx.Pattern = patrn ' Set pattern. regEx.Global = True regEx.IgnoreCase = True ' Make case insensitive. RegExpReplace = regEx.Replace(str1, replStr) ' Make replacement. End Function Function RegExpTest(patrn, strng) Dim regEx, retVal ' Create variable. Set regEx = New RegExp ' Create regular expression. regEx.Pattern = patrn ' Set pattern. regEx.Global = True regEx.IgnoreCase = False ' Set case sensitivity. retVal = regEx.Test(strng) ' Execute the search test. RegExpTest = retVal End Function Function RandomNumber(RNLength) Dim nrn nrn = "" Randomize ' Initialize random-number generator. For i = 1 to (RNLength\6+1) nrn = nrn & LTrim(RTrim(CStr(Int((999999 - 100000 + 1) * Rnd + 100000)))) ' Generate random value between 1 and 6. Next nrn = Left(nrn,RNLength) RandomNumber = nrn End Function 'RandomNumber Function FormatPhone(strng) Dim retVal If NotBlank(strng) Then strng = RegExpReplace("[\D]","",strng) retVal = "(" & Left(strng,3) & ") " & Mid(strng,4,3) & "-"& Right(strng,4) If strng = "" Then retVal = "" End If Else retVal = strng End If FormatPhone = retVal End Function Function PhoneGetAreaCode(strng) Dim retVal If NotBlank(strng) Then strng = RegExpReplace("[\D]","",strng) retVal = Left(strng,3) If strng = "" Then retVal = "" End If Else retVal = strng End If PhoneGetAreaCode = retVal End Function Function PhoneGetNumber(strng) Dim retVal If NotBlank(strng) Then strng = RegExpReplace("[\D]","",strng) retVal = Mid(strng,4,3) & "-"& Right(strng,4) If strng = "" Then retVal = "" End If Else retVal = strng End If PhoneGetNumber = retVal End Function Sub WriteCookies Response.Cookies("MembersLogin").Domain = "soundofthebaychorus.com" Response.Cookies("MembersLogin")("EmailAddress") = Request.Form("EmailAddress") Response.Cookies("MembersLogin")("Password") = Request.Form("Password") Response.Cookies("MembersLogin")("SetCookies") = 1 Response.Cookies("MembersLogin").Expires = Date + 360 End Sub Sub ClearCookies Response.Cookies("MembersLogin").Domain = "soundofthebaychorus.com" Response.Cookies("MembersLogin")("EmailAddress") = "" Response.Cookies("MembersLogin")("Password") = "" Response.Cookies("MembersLogin")("SetCookies") = 0 Response.Cookies("MembersLogin").Expires = Date - 1 End Sub %> <% Sub MailBodyStart(info) MailSubject = "" MailTo = "" MailFrom = "" MailCC = "" MailBCC = "" MailBody = "" & vbCrLf MailBody = MailBody & "" & vbCrLf MailBody = MailBody & "" & vbCrLf MailBody = MailBody & "" & vbCrLf MailBody = MailBody & "" & info & "" & vbCrLf MailBody = MailBody & "" & vbCrLf MailBody = MailBody & "" & vbCrLf MailBody = MailBody & "" & vbCrLf End Sub Sub MailBodyStop MailBody = MailBody & "" & vbCrLf End Sub Function MailBodyAdd(info) MailBody = MailBody & info & vbCrLf End Function Sub MailBodySend Set MailObj = CreateObject("CDONTS.NewMail") MailObj.BodyFormat = 0 MailObj.MailFormat = 0 MailObj.Subject = MailSubject MailObj.To = MailTo MailObj.From = MailFrom MailObj.Body = MailBody If NotBlank(MailCC) Then MailObj.CC = MailCC If NotBlank(MailBCC) Then MailObj.BCC = MailBCC MailObj.Send Set MailObj = Nothing End Sub Sub MailBodySendWithAttachment (mbs1, mbs2) Set MailObj = CreateObject("CDONTS.NewMail") MailObj.BodyFormat = 0 MailObj.MailFormat = 0 MailObj.Subject = MailSubject MailObj.To = MailTo MailObj.From = MailFrom MailObj.Body = MailBody If NotBlank(MailCC) Then MailObj.CC = MailCC If NotBlank(MailBCC) Then MailObj.BCC = MailBCC MailObj.AttachFile mbs1, mbs2 MailObj.Send Set MailObj = Nothing End Sub %>