<% '<@ language = "vbscript" > '< option explicit 'response.expires = 0 'server.scriptTimeOut = 9000 'seconds until timeout (15 minutes) ' //////////////////////////////////////////////////////////////////////////////////////////////////// '// Form to Email Gateway. This script renders a form that posts to itself, validates the data, '// sends an email, and presents a thank you message. The page has two modes: form and processing '// mode. The page defaults to form mode without any querystring info. With '?mod=proc' in the querystring '// the page will be in processing mode. '// '// Most operations concern the hash tables objVal, objPar, objMsg. The objVal hash, holds the name/value '// combinations for the form inputs. The hash keys must be identical to the values of the input tag's name '// attributes. The objPar hash holds the error parameter information. The keys in objPar must exist as keys in objVal. '// Based on the results of the validation routine, error messages are stored in the objMsg hash. Additional '// hashes may be used to generate drop boxes. '// '// In order to maximize this page's flexibility of use, it is not a complete page as it is missing '// , , and tags. '// '// The Berndt Group applications@berndtgroup.net ' //////////////////////////////////////////////////////////////////////////////////////////////////// '// dimension and initialize variables and objects '// dim variables 'dim i '// integer iterator dim strItem '// hash iterator dim strMod '// mode value dim strErrMsg '// error message inside hash iteration dim strBody '// email body dim strResult '// email send result message dim boolErr '// true if form does not pass validation dim boolDebug '// set manually to display contents of hashes dim boolInterestChecked '// true if at least one interest checkbox is checked dim boolEventChecked '// true if at least one interest checkbox is checked dim boolProgramChecked '// true if at least one interest checkbox is checked dim boolPhoneError '// true if at least one phone input field is invalid dim objVal '// hash contains form name/value combinations dim objPar '// hash contains error parameter keywords dim objMsg '// hash contains error messages dim objState '// Holds options for State Dropdown box dim objCDONTS '// alternate mail object dim strEmail '// Recipient/Sender Address dim strEmail_Name '// Recipient Name dim strEmail_Subject '// Subject Line dim strState dim strChecked 'dim objConn 'Set objConn = Application("objConn") 'strEmail = "" strEmail = "investments@mmarealtycapital.com" strEmail_Name = "" strEmail_Subject = "MMA Realty Capital Website Request for Information" '// initialize variables boolErr = FALSE boolDebug = FALSE 'boolInterestChecked = FALSE 'boolPhoneError = FALSE strBody = "" & vbCrLf strBody = strBody & "" strBody = strBody & "" strBody = strBody & "" 'HTML = HTML & "Sample NewMail" strBody = strBody & "" strBody = strBody & "This email has been sent from the MMA Realty Capital
'Request for Information' page:  " '// initialize mode from querystring strMod = request.queryString("mod") '// create new objects set objVal = createObject("Scripting.Dictionary") '// for hashes set objPar = createObject("Scripting.Dictionary") set objMsg = createObject("Scripting.Dictionary") set objState = createObject("Scripting.Dictionary") set objCDONTS = Server.CreateObject("CDONTS.NewMail") '// initialize objects '// form values objVal.Add "Name", "" objVal.Add "Company", "" objVal.Add "Email Address", "" objVal.Add "Mailing Address 1", "" objVal.Add "Mailing Address 2", "" objVal.Add "City", "" objVal.Add "State", "" objVal.Add "Zip", "" objVal.Add "Phone Number", "" objVal.Add "InterestRadio", "" objVal.Add "Financing_Solutions_Type", "" objVal.Add "How did you hear about MMA", "" objVal.Add "Customer Provided Information", "" '//LoadValues for STATE Dropdown call popObjState '// populate hash with form values for each strItem in objVal objVal.item(strItem) = request.form(strItem) next '// State DropDown strState = "" '// error parameters objPar.Add "Name", "is_not_empty" objPar.Add "Company", "is_not_empty" objPar.Add "City", "is_not_empty" objPar.Add "State", "is_not_empty" objPar.Add "Phone Number", "is_not_empty" objPar.Add "Email Address", "is_not_empty,is_email" 'objPar.Add "Zip", "is_not_empty,is_numeric" objPar.Add "InterestRadio", "is_not_empty" '// error message special cases objMsg.Add "Events", "" '// Alt. mail object objCDONTS.Subject = strEmail_Subject '//DEV ADDRESSES 'objCDONTS.to = "Fred Van Dyk " 'objCDONTS.From = "CA Website " '//LIVE ADDRESSES objCDONTS.to = strEmail_Name & " <" & strEmail & ">" 'objCDONTS.bcc = "florian@berndtgroup.net,lesleyh@berndtgroup.net" '"Bonnie Jones ;" & ERR_EMAIL_NAME & " <" & ERR_EMAIL & ">" objCDONTS.From = "MMA Realty Capital Website <" & strEmail & ">" objCDONTS.BodyFormat = 0 objCDONTS.MailFormat = 0 ' //////////////////////////////////////////////////////////////////////////////////////////////////// '// validate form values if in process mode (form has been submitted) if strMod = "proc" then '// process mode, check for errors '// interate through error parameter hash and validate for each strItem in objPar '// is_valid function returns bool true if validation passes or an error message string if fails strErrMsg = is_valid(objPar.item(strItem), request.form(strItem)) if not varType(strErrMsg) = vbBoolean then '// there was an error -- a string, not boolean was returned boolErr = TRUE '// set error flag objMsg.Add strItem, "
" & strErrMsg '// add error message string to error message hash end if next '// special cases for grouped inputs '// Events & Programs for each strItem in objVal if i > 8 then 'Response.Write "
i: " & i & " | item: " & strItem 'Response.Write " | val:" & objVal.item(strItem) if objVal.item(strItem) = "Checked" then boolEventChecked = TRUE end if end if i = i + 1 next 'Response.Write "
boolEC: " & boolEventChecked 'Response.Write "
errMsgPre: " & objMsg.Item("Events") 'if not boolEventChecked then ' boolErr = TRUE ' objMsg.Item("Events") = "[Please Select an Event or Program/Workshop]" 'end if '// debug if boolDebug then response.write "objVal
" for each strItem in objVal response.write strItem & " - |" & objVal.item(strItem) & "|
" next response.write "

" response.write "objPar
" for each strItem in objPar response.write strItem & " - |" & objPar.item(strItem) & "|
" next response.write "

" response.write "objMsg
" for each strItem in objMsg response.write strItem & " - |" & objMsg.item(strItem) & "|
" next response.write "

" end if ' //////////////////////////////////////////////////////////////////////////////////////////////////// '// send email if not boolErr then '// send email and show confirmation html, there was no error '// build the body of the email '// accumulate fields into html rows for each strItem in objVal strBody = strBody & "" & "" next '// enclose the body in table tags strBody = strBody & "
" & strItem & ": " & objVal.item(strItem) & "
" & "" '// assign string to body property objCDONTS.Body = strBody 'Response.Write "

Body: " & Server.HTMLEncode(strBody) '// attempt to send the email If objCDONTS.Send then '// send failed strResult = "Sorry. There was a problem sending the email. Please contact applications@berndtgroup.net." '// response.write "email failed" '//debug '// response.end else '// send succeeded, assign value the message string strResult = "Thank you for your interest in MMA Realty Capital. A representative will contact you shortly." '// response.write "email sent" '// response.end end if end if end if %> MRC: Contact Us

 

If you would like to talk with one of our Investment Advisory, Agency or Commercial Loan and Acquisition Officers, please contact any one of our powerhouse team of professionals who can direct you to the best source for your needs.

List of Investment Advisory Officers, Agency and Commercial Loan and Acquisition Officers-Alphabetical

List of all Office Locations

If you would prefer someone contact you, or for general inquiries, service issues and requests for information about MMA Realty Capital, MMA Financial, or MuniMae – please complete the form below.

<% if strMod="proc" and not boolErr then %>


<%=strResult%>
<% else %>

* Required

Name * " maxlength="100"><%=getErrMsg("Name")%>
Company * " maxlength="100"><%=getErrMsg("Company")%>
Address 1 " maxlength="100"><%=getErrMsg("Mailing Address 1")%>
Address 2 " maxlength="100"><%=getErrMsg("Mailing Address 2")%>
City * " maxlength="50"><%=getErrMsg("City")%>
State * <%=strState%><%=getErrMsg("State")%>
Zip " maxlength="10"><%=getErrMsg("Zip")%>
Phone * " maxlength="16"><%=getErrMsg("Phone Number")%>
Email address* " maxlength="100"><%=getErrMsg("Email Address")%>
value="Financing Solutions"> I am interested in financing solutions for:
   value="Commerical Properties"> Commerical properties
   value="Multifamily housing"> Multifamily housing
   value="Seniors housing"> Seniors housing
   value="Student housing"> Student housing
value="Tax Credit Equity investing opportunities" ID="Radio1"> I am interested in Tax Credit Equity investing opportunities<%=getErrMsg("InterestRadio")%>
How did you hear about MMA Realty Capital?
" maxlength="200"><%=getErrMsg("How did you hear about MMA")%>
To help us respond to your inquiry quickly, please give us as much information as possible.
<%=getErrMsg("Customer Provided Information")%>
 
<% end if %>

 

 

 

<% ' //////////////////////////////////////////////////////////////////////////////////////////////////// '// functions '// compares parameter against string and returns bool true if pass (no error) or the appropriate error message function is_valid (strPar, strVal) '// valid parameters are is_not_empty, is_numeric, is_email dim strReturn dim aryPar dim i dim strErrMsg dim regEx '// create regular expression object for email test set regEx = New RegExp regEx.IgnoreCase = False regEx.Pattern = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" '// initialize variables strVal = trim(strVal) strReturn = TRUE aryPar = split(strPar, ",") for i = 0 to ubound(aryPar) select case aryPar(i) case "is_not_empty" if strVal = EMPTY then strReturn = FALSE strErrMsg = strErrMsg & "[Field Required]" end if case "is_numeric" if not strVal = EMPTY then if not isNumeric(strVal) then strReturn = FALSE strErrMsg = strErrMsg & "[Must be Numeric]" end if end if case "is_email" if not strVal = EMPTY then if not regEx.Test(strVal) then strReturn = FALSE strErrMsg = strErrMsg & "[Invalid Email]" end if end if end select next ' Response.Write "
VAl:" & strVal & " | par:" & strPar & " | Mess:" & strErrMsg & " | REturn:" & strReturn if not strReturn then strReturn = strErrMsg end if is_valid = strReturn end function '// return error message if one exists function getErrMsg(strKey) dim strReturn if objMsg.Exists(strKey) then strReturn = "" & objMsg.item(strKey) & "" end if getErrMsg = strReturn end function Function makeOptions(strErrRep, strTable, boolZeroOption) 'this Function dependent on naming convention of: '------Table "xxx{Name}" (xxx="tbl" or "def" or 3 chars) '------ID "{Name}ID" '------Field "{Name}Name" Dim strReturn Dim strSelected Dim strIDField Dim strNameField Dim objRsOpt Dim strWhere strWhere = EMPTY '// special cases '// for Categories, ingnore unapproved products If strTable="defEventCat" Then strWhere = " WHERE eventtypeID = " & intEventType End If strNameField = Lcase(mid(strTable, 4)) & "Name" strIDField = Lcase(mid(strTable, 4)) & "ID" strSql = "SELECT " & strNameField & ", " & strIDField & " FROM " & strTable & " " & strWhere & " ORDER BY " & strNameField & " ASC;" 'response.write(strSql) 'response.End Set objRsOpt = objConn.execute(strSql) If boolZeroOption Then strReturn = "" & vblf End If while Not objRsOpt.eof If trim(strErrRep) = trim(objRsOpt(strIDField)) Then strSelected = " SELECTED " Else strSelected = empty End If ' strReturn = strReturn & "" & vblf strReturn = strReturn & "objState.Add """ & objRsOpt(strNameField) & """, """"" & vblf objRsOpt.movenext Wend makeOptions = strReturn End Function Sub popObjState objState.Add "", "" objState.Add "Alabama", "" objState.Add "Alaska", "" objState.Add "Alberta", "" objState.Add "American Samoa", "" objState.Add "Arizona", "" objState.Add "Arkansas", "" objState.Add "British Columbia", "" objState.Add "California", "" objState.Add "Colorado", "" objState.Add "Connecticut", "" objState.Add "Delaware", "" objState.Add "District of Columbia", "" objState.Add "Fed. States of Micronesia", "" objState.Add "Florida", "" objState.Add "Georgia", "" objState.Add "Guam", "" objState.Add "Hawaii", "" objState.Add "Idaho", "" objState.Add "Illinois", "" objState.Add "Indiana", "" objState.Add "Iowa", "" objState.Add "Kansas", "" objState.Add "Kentucky", "" objState.Add "Louisiana", "" objState.Add "Maine", "" objState.Add "Manitoba", "" objState.Add "Marshall Islands", "" objState.Add "Maryland", "" objState.Add "Massachusetts", "" objState.Add "Michigan", "" objState.Add "Minnesota", "" objState.Add "Mississippi", "" objState.Add "Missouri", "" objState.Add "Montana", "" objState.Add "Nebraska", "" objState.Add "Nevada", "" objState.Add "New Brunswick", "" objState.Add "New Hampshire", "" objState.Add "New Jersey", "" objState.Add "New Mexico", "" objState.Add "New York", "" objState.Add "Newfoundland", "" objState.Add "North Carolina", "" objState.Add "North Dakota", "" objState.Add "Northern Mariana Is.", "" objState.Add "Northwest Territories", "" objState.Add "Nova Scotia", "" objState.Add "Ohio", "" objState.Add "Oklahoma", "" objState.Add "Ontario", "" objState.Add "Oregon", "" objState.Add "Palau", "" objState.Add "Pennsylvania", "" objState.Add "Prince Edward Island", "" objState.Add "Puerto Rico", "" objState.Add "Quebec", "" objState.Add "Rhode Island", "" objState.Add "Saskatchewan", "" objState.Add "South Carolina", "" objState.Add "South Dakota", "" objState.Add "Tennessee", "" objState.Add "Texas", "" objState.Add "Utah", "" objState.Add "Vermont", "" objState.Add "Virgin Islands", "" objState.Add "Virginia", "" objState.Add "Washington", "" objState.Add "West Virginia", "" objState.Add "Wisconsin", "" objState.Add "Wyoming", "" objState.Add "Yukon", "" End Sub sub pbreak(strMessage) response.Write "[" & strMessage & "]
" response.End end sub Function isRadioCheckboxChecked(strRadioName, strValue) Dim strChecked If instr(objVal.item(strRadioName), strValue)>0 Then strChecked="CHECKED" Else strChecked="" End If isRadioCheckboxChecked=strChecked End Function ' //////////////////////////////////////////////////////////////////////////////////////////////////// ' // end of scripting, anything added after the closing script tag will be included in both 'form view' '// and 'confirmation view' %>