<%@ 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 = "Submit An Event Form" body = "" _ & "

This Information was submitted from the Yaffe Center Submit an Event Form

" _ & "

" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "
Event Title:" & Server.HtmlEncode(Request.Form("EventTitle")) & "
Start Date:" & Server.HtmlEncode(Request.Form("StartDate")) & "
End Date:" & Server.HtmlEncode(Request.Form("Enddate")) & "
Event Description:" & Server.HtmlEncode(Request.Form("Eventdes")) & "
Type of Event:" & Server.HtmlEncode(Request.Form("typeevent")) & "
Event Location:" & Server.HtmlEncode(Request.Form("eventlocation")) & "
Web Link:" & Server.HtmlEncode(Request.Form("weblink")) & "
Contact First Name:" & Server.HtmlEncode(Request.Form("contactfname")) & "
Contact Phone:" & Server.HtmlEncode(Request.Form("contactphone")) & "
Email:" & Server.HtmlEncode(Request.Form("email")) & "

" Dim jmail : Set jmail = CreateJMailObject() With jmail .Subject = subject .Body = body '.Sender = "michigan-impact@umich.edu" '.SenderName = "Submit Event Form" .AddRecipient "seyram@bus.umich.edu" .AddRecipient "timoday@bus.umich.edu" .AddRecipient "rajeevba@bus.umich.edu" .AddRecipient "gorlitzl@bus.umich.edu" .AddRecipient "haneya@bus.umich.edu" .ContentType = "text/html" .Execute End With end function '''''''''''''''''''''' END FUNCTIONS '''''''''''''''''''''''' %>

Submit An Event

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.

<% '''''''''' FORM REQUEST, PROCESSED ON POSTBACK '''''''''''''' 'Form posts back to this page form_feedback = "" show_form = true if Request.Form("submit") <> "" AND Request.Form("submit") = "Submit!" then show_form = false '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 Event was submitted successfully!

    <% end if end if %>
    <% if show_form = true then 'Display errors to user if form_feedback <> "" then %>
      <%=form_feedback%>
    <% end if %> Submit An Event
    * = required
    Event Title: * ">
    State Date: * "> (mm/dd/yyyy)
    End Date: "> (mm/dd/yyyy)
    Description: *
    Type of Event: *
    Event Location: *
    Web Link: * ">
    Contact Name: * ">
    Contact Phone: ">
    Contact Email: * ">
     
    <% ' 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 %>

    Iconic Levi's Jeans

    These iconic jeans became a cultural touchstone because of their association with non-conformists like James Dean and Marlon Brando.

    Levi's Jean 1873