Am I in the right ballpark?
Expand|Select|Wrap|Line Numbers
- <%
- Set upl = Server.CreateObject("SoftArtisans.FileUp")
- upl.Path = "D:\FTP\cincishop\Database\helpdesk_files"
- 'senderName = upl.form("senderName")
- 'senderEmail = upl.form("senderEmail")
- 'senderSubject = upl.form("senderSubject")
- 'senderText = upl.form("senderText")
- firstname = upl.form("firstname")
- lastname = upl.form("lastname")
- sender = upl.form("sender")
- phone = upl.form("phone")
- rep_firstname = upl.form("rep_firstname")
- rep_lastname = upl.form("rep_lastname")
- rep_sender = upl.form("rep_sender")
- rep_phone = upl.form("rep_phone")
- artist_firstname = upl.form("artist_firstname")
- artist_lastname = upl.form("artist_lastname")
- artist_sender = upl.form("artist_sender")
- advertiser = upl.form("advertiser")
- click_thru = upl.form("click_thru")
- acct_number = upl.form("acct_number")
- proof_needed = upl.form("proof_needed")
- start_date = upl.form("start_date")
- ad_type = upl.form("ad_type")
- creative_regular01 = upl.form("creative_regular01")
- creative_regular02 = upl.form("creative_regular02")
- creative_regular03 = upl.form("creative_regular03")
- creative_regular04 = upl.form("creative_regular04")
- creative_regular05 = upl.form("creative_regular05")
- creative_regular06 = upl.form("creative_regular06")
- creative_regular07 = upl.form("creative_regular07")
- creative_regular08 = upl.form("creative_regular08")
- creative_regular09 = upl.form("creative_regular09")
- creative_regular10 = upl.form("creative_regular10")
- creative_regular11 = upl.form("creative_regular11")
- creative_regular12 = upl.form("creative_regular12")
- creative_regular13 = upl.form("creative_regular13")
- creative_regular14 = upl.form("creative_regular14")
- creative_type = upl.form("creative_type")
- creative_special01 = upl.form("creative_special01")
- creative_special02 = upl.form("creative_special02")
- creative_special03 = upl.form("creative_special03")
- creative_special04 = upl.form("creative_special04")
- creative_special05 = upl.form("creative_special05")
- creative_special06 = upl.form("creative_special06")
- creative_instruction = upl.form("creative_instruction")
- upl.form("attach1").Save
- upl.form("attach2").Save
- upl.form("attach3").Save
- upl.form("attach4").Save
- upl.form("attach5").Save
- senderFile1 = Mid(upl.form("attach1").UserFilename, InstrRev(upl.form("attach1").UserFilename, "\") + 1)
- senderFile2 = Mid(upl.form("attach2").UserFilename, InstrRev(upl.form("attach2").UserFilename, "\") + 1)
- senderFile3 = Mid(upl.form("attach3").UserFilename, InstrRev(upl.form("attach3").UserFilename, "\") + 1)
- senderFile4 = Mid(upl.form("attach4").UserFilename, InstrRev(upl.form("attach4").UserFilename, "\") + 1)
- senderFile5 = Mid(upl.form("attach5").UserFilename, InstrRev(upl.form("attach5").UserFilename, "\") + 1)
- Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
- Mailer.FromName = firstname & " " & lastname
- Mailer.FromAddress = "info@shopatcincinnati.com"
- Mailer.Subject = "Online Advertising: New ad creative - " & advertiser
- Mailer.RemoteHost = "scriptmail.intermedia.net"
- Mailer.ReplyTo = sender
- Mailer.AddAttachment "D:\FTP\cincishop\Database\helpdesk_files\" & senderFile1
- Mailer.AddAttachment "D:\FTP\cincishop\Database\helpdesk_files\" & senderFile2
- Mailer.AddAttachment "D:\FTP\cincishop\Database\helpdesk_files\" & senderFile3
- Mailer.AddAttachment "D:\FTP\cincishop\Database\helpdesk_files\" & senderFile4
- Mailer.AddAttachment "D:\FTP\cincishop\Database\helpdesk_files\" & senderFile5
- ' IF YOU WANT MORE RECIPIENTS, JUST ADD MORE LINES LIKE THIS ONE BELOW.
- Mailer.AddCC firstname & " " & lastname, sender
- Mailer.AddCC rep_firstname & " " & rep_lastname, rep_sender
- Mailer.AddCC artist_firstname & " " & artist_lastname, artist_sender
- 'THIS IS THE TEXT OF THE EMAIL. YOU CAN CHANGE THIS FORMATTING, AND ADD FIELDS AND INFO
- 'IF YOU LIKE. vbCrLf is a carriage return/line feed character.
- EmailText = EmailText & "Submitted by: " & firstname & " " & lastname & vbCrLf
- EmailText = EmailText & "E-mail: " & sender & vbCrLf
- EmailText = EmailText & "Phone: " & phone & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Sales rep: " & rep_firstname & " " & rep_lastname & vbCrLf
- EmailText = EmailText & "E-mail: " & rep_sender & vbCrLf
- EmailText = EmailText & "Phone: " & rep_phone & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Artist: " & artist_firstname & " " & artist_lastname & vbCrLf
- EmailText = EmailText & "E-mail: " & artist_sender & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Advertiser: " & advertiser & vbCrLf
- EmailText = EmailText & "Click Thru: " & click_thru & vbCrLf
- EmailText = EmailText & "Account #: " & acct_number & vbCrLf
- EmailText = EmailText & "Proof Needed: " & proof_needed & vbCrLf
- EmailText = EmailText & "Start Date: " & start_date & vbCrLf
- EmailText = EmailText & "Ad Type: " & ad_type & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular01 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular02 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular03 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular04 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular05 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular06 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular07 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular08 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular09 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular10 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular11 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular12 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular13 & vbCrLf
- EmailText = EmailText & "Regular Creative: " & creative_regular14 & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Creative Type: " & creative_type & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special01 & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special02 & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special03 & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special04 & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special05 & vbCrLf
- EmailText = EmailText & "Special Creative: " & creative_special06 & vbCrLf
- EmailText = EmailText & vbCrLf
- EmailText = EmailText & "Creative Instruction: " & creative_instruction & vbCrLf
- Mailer.BodyText = EmailText
- If Mailer.SendMail then
- Response.redirect("http://www.cincinnati.enq/advertising/online_success.asp") ' CHANGE THIS TO YOUR THANK YOU / FILE SUCCESS PAGE.
- Else
- Response.redirect("http://www.cincinnati.enq/advertising/online_error.asp") ' CHANGE THIS TO YOUR ERROR PAGE.
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
- "DBQ=\\content\main_data\onlineNewCreative.mdb;"
- SQL = "INSERT INTO table1 (senderName, rep_firstname, rep_lastname, artist_firstname, artist_lastname, advertiser, acct_number, proof_needed, start_date, ad_type, senderText) VALUES ('" & strsenderName & "','" & strrep_firstname & "','" & strartist_firstname & "','" & strartist_lastname & "','" & stradvertiser & "','" & stracct_number & "', '" & strproof_needed & "','" & strstart_date & "','" & strad_type & "','" & strsender_text & "')"
- conn.Execute SQL, recaffected
- Response.Write(strsenderName) & "<br>"
- Response.Write(strrep_firstname) & "<br>"
- Response.Write(strrep_lastname) & "<br>"
- Response.Write(strartist_firstname) & "<br>"
- Response.Write(strartist_lastname) & "<br>"
- Response.Write(stradvertiser) & "<BR/><br/>"
- Response.Write(stracct_number) & "<br>"
- Response.Write(strproof_neede) & "<br>"
- Response.Write(strstart_date) & "<br>"
- Response.Write(strad_type) & "<br>"
- Response.Write(strsenderText) & "<br>"
- Response.Write(recAffected)
- End if
- %>