<%@ Language="VBScript" %> <% Option Explicit 'Define some variables to be used on page dim pubkey, privkey, challenge, form_response, show_form, form_feedback, message, email_from, email_to, subject, test_captcha, myserver, mydestination, url, body, jmail, sURL, sPath sURL = Request.ServerVariables("HTTP_HOST") sPath = Request.ServerVariables("PATH_INFO") If sURL = "www.bus.umich.edu" Then Response.Redirect "http://www.yaffecenter.org" & sPath End If 'Customize your public and private keys and other variables If sURL = "bus-webdev.bus.umich.edu" Then pubkey = "6LfXVwMAAAAAAJqjYY4tGdzUBHEmzVYbGRPY5nw2" privkey = "6LfXVwMAAAAAAJqQH9CQLYAtH_a6MV5Q44lZUE5q" Else pubkey = "6LfDVwMAAAAAAF1qwfPujWo-aLR7A_LpqhpXFOIK" privkey = "6LfDVwMAAAAAAAOZTjKgZ7SWb2pnrBtnRSidl_1c" End If url = "index.html" %> Submit Working Papers
Michigan Ross School of Business
Yaffe Center for Persuasive Communication
<% '''''''''''''''''''''' BEGIN FUNCTIONS '''''''''''''''''''''''' 'Function to Test Captcha Field challenge = Request.Form("recaptcha_challenge_field") form_response = Request.Form("recaptcha_response_field") function recaptcha_confirm(privkey,rechallenge,reresponse) Dim VarString VarString = _ "privatekey=" & privkey & _ "&remoteip=" & Request.ServerVariables("REMOTE_ADDR") & _ "&challenge=" & rechallenge & _ "&response=" & reresponse Dim objXmlHttp Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") objXmlHttp.open "POST", "http://api-verify.recaptcha.net/verify",False objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objXmlHttp.send VarString Dim ResponseString ResponseString = split(objXmlHttp.responseText, vblf) Set objXmlHttp = Nothing if ResponseString(0) = "true" then 'They answered correctly recaptcha_confirm = "" else 'They answered incorrectly recaptcha_confirm = ResponseString(1) end if end function 'Example Function to Send Email Using CDOSYS function sendEmail( subject, body ) 'send email subject = "Contact Us" body = "" _ & "

This Information was submitted from the Yaffe Center Contact Form

" _ & "

" _ & "" _ & "" _ & "" _ & "" _ & "
Name:" & Server.HtmlEncode(Request.Form("Firstname")) & "
Email:" & Server.HtmlEncode(Request.Form("email")) & "
Comments:" & Server.HtmlEncode(Request.Form("Comments")) & "
Join Email List:" & Server.HtmlEncode(Request.Form("emaillist")) & "
" _ & "

" Dim jmail : Set jmail = CreateJMailObject() With jmail .Subject = subject .Body = body '.Sender = "michigan-impact@umich.edu" '.SenderName = "Contact Us" .AddRecipient "yaffecontact@umich.edu" .ContentType = "text/html" .Execute End With end function '''''''''''''''''''''' END FUNCTIONS '''''''''''''''''''''''' %>

Contact Us

Please use the following information to contact Yaffe Center.

Mailing Address Professor Rajeev Batra, Co-Director
Ross School of Business
University of Michigan
701 Tappan St.
Ann Arbor, MI. 48109

<% '''''''''' FORM REQUEST, PROCESSED ON POSTBACK '''''''''''''' 'Form posts back to this page form_feedback = "" show_form = true if Request.Form("submit") <> "" AND Request.Form("submit") = "Send Comment!" then show_form = false 'EXAMPLE OF BASIC ERROR PROCESSING 'Required - Name if Request.Form("Firstname") = "" then form_feedback = form_feedback & "

  • Please enter your name.
  • " show_form = true end if 'Required - Email Address if Request.Form("email") <> "" then email_from = Request.Form("email") else form_feedback = form_feedback & "
  • Please enter your email address.
  • " show_form = true end if 'Required - Name if Request.Form("Comments") = "" then form_feedback = form_feedback & "
  • Please enter your comments.
  • " show_form = true end if 'Required - Correct Captcha Value test_captcha = recaptcha_confirm(privkey, challenge, form_response) 'response.write(test_captcha) if test_captcha <> "" then form_feedback = form_feedback & "
  • The entered CAPTCHA text below does not match, please try again.
  • " show_form = true end if 'No Errors on Page, Send E-mail if show_form = false then call sendEmail( subject, body ) %>

    Your comment was sent successfully!

    <% end if end if %>
    <% if show_form = true then 'Display errors to user if form_feedback <> "" then %>
      <%=form_feedback%>
    <% end if %> Or fill out the following form
    * = required
    Name: * " size="33">
    Email: * " size="34">
    Comments: *
    :
    >Yes
     
    <% ' returns string the can be written where you would like the reCAPTCHA function recaptcha_challenge_writer(publickey) recaptcha_challenge_writer = "" & _ "" & _ "" end function dim myCaptcha myCaptcha = recaptcha_challenge_writer(pubkey) response.write(myCaptcha) %>
     
    <% ''''''''''''''''' END DISPLAY INITIAL FORM ''''''''''''''''''''' end if %>

    Submit Your Links, Working Papers And Events

    The Yaffe Center links area connects you to web-accessible resources in the area of persuasive communications. We invite you to submit your own links for possible consideration in our expanding list. You may also submit your working papers directly to the site--you can attach the working paper directly to our form. If you come across events that would be of interest to site visitors, please submit them for review.

    Dyson's Market Success

    By applying physics concepts and saying "goodbye to the bag,” Dyson's eye-catching, modern, vacuum cleaner design won it market success.

    Dyson vacuum 1983