Expand|Select|Wrap|Line Numbers
- <%@ Language=VBScript %>
- <!--#include file="../common.asp" -->
- <!--#include file="../commands.asp" -->
- <%
- Dim Country, State, CountryOther, email, PartNumber, TodayIs
- Dim sql
- todayis=Now()
- Country=Request.Form("Country")
- State=Request.Form("state")
- CountryOther=Request.form("other")
- Email=Request.form("email")
- PartNumber=Request.Form("PartNumber")
- ' Determines where the email will be directed
- ' Determines the subject line
- if Country = "USA" then select case true
- case state = "AK"
- Emailto = "JViner@amphenolrf.com"
- case state = "AL"
- emailto = "CPrada@amphenolrf.com"
- case state = "AR"
- emailto = "LLOFRUMENTO@AMPHENOLRF.COM"
- case state = "AZ"
- EMAILTO = "CFinch@amphenolrf.com"
- case state = "CA"
- emailto = "CFinch@amphenolrf.com,JShah@amphenolrf.com,JViner@amphenolrf.com"
- case state = "CO"
- emailto = "JShah@amphenolrf.com"
- case state = "CT"
- Emailto = "MBurke@amphenolrf.com"
- case state = "DE"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "FL"
- Emailto = "CPrada@amphenolrf.com"
- case state = "GA"
- Emailto = "CPrada@amphenolrf.com"
- case state = "HI"
- emailto = "CFinch@amphenolrf.com"
- case state = "ID"
- emailto = "JViner@amphenolrf.com"
- case state = "IL"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "IN"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "IA"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "KS"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "KY"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "LA"
- EMAILTO = "CFinch@amphenolrf.com"
- case state = "MA"
- Emailto = "Mburke@amphenolrf.com"
- case state = "MD"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "ME"
- Emailto = "Mburke@amphenolrf.com"
- case state = "MI"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "MN"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "MS"
- Emailto = "CPrada@amphenolrf.com"
- case state = "MO"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "MT"
- emailto = "JShah@amphenolrf.com"
- case state = "NC"
- EMAILTO = "CMullaly@amphenolrf.com"
- case state = "ND"
- emailto = "GNeidlinger@amphenolrf.com"
- case state = "NH"
- Emailto = "Mburke@amphenolrf.com"
- case state = "NJ"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "NM"
- emailto = "CFinch@amphenolrf.com"
- case state = "NY"
- Emailto = "Mburke@amphenolrf.com"
- case state = "NV"
- Emailto = "CFinch@amphenolrf.com" "JShah@amphenolrf.com" "JViner@amphenolrf.com"
- case state = "ND"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "OH"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "OK"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "OR"
- emailto = "JViner@amphenolrf.com"
- case state = "PA"
- Emailto = "GNeidlinger@amphenolrf.com,CMullaly@amphenolrf.com"
- case state = "RI"
- Emailto = "Mburke@amphenolrf.com"
- case state = "SC"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "SD"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "TN"
- EMAILTO = "CPrada@amphenolrf.com"
- case state = "TX"
- EMAILTO = "CFinch@amphenolrf.com"
- case state = "UT"
- emailto = "JShah@amphenolrf.com"
- case state = "VT"
- Emailto = "mburke@amphenolrf.com"
- case state = "VA"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "WA"
- emailto = "JViner@amphenolrf.com"
- case state = "WV"
- Emailto = "CMullaly@amphenolrf.com"
- case state = "WI"
- EMAILTO = "GNeidlinger@amphenolrf.com"
- case state = "WY"
- emailto = "JShah@amphenolrf.com"
- case else
- EMAILTO = "RCISTO@AMPHENOLRF.COM"
- if Country = "CANADA" then Emailto = "RCISTO@AMPHENOLRF.COM"
- if Country = "INDIA" then Emailto = "RCISTO@AMPHENOLRF.COM"
- if Country = "OTHER" then Emailto = "RCISTO@AMPHENOLRF.COM"
- END SELECT
- end if
- subject = "Customer has requested IGS file"
- message=request("message")
- message=replace(message,"'","''")
- ' Error Checking
- if state = "select" then
- error=1
- s_error=1
- end if
- if Country = "select" then
- error=1
- c_error=1
- end if
- if other = "Country" then
- error = 1
- c_error =1
- end if
- if email="" then
- error=1
- l_error=1
- end if
- if PartNumber="" then
- error=1
- p_error=1
- end if
- set fs = CreateObject("Scripting.FileSystemObject")
- path = Server.MapPath("../IGSFiles/")
- 'set folder = fs.GetFolder(path)
- function SearchFolderContents(path,PartNumber)
- dim fs, fileBool
- set fs = CreateObject("Scripting.FileSystemObject")
- 'Response.Write(path & "\" & PartNumber & ".zip" & vbCrLf)
- if fs.FileExists(path & "\" & PartNumber & ".zip")=true then
- fileBool = true
- else
- fileBool = false
- end if
- set fs=nothing
- SearchFolderContents = fileBool
- end function
- hasFile = SearchFolderContents(path,PartNumber)
- if SearchFolderContents(path,PartNumber) = false then
- error=1
- p2_error=1
- end if
- if error<>0 then
- %>
- <html>
- <head>
- <title>Amphenol RF</title>
- <link href="RFStyle.css" rel="stylesheet" type="text/css">
- <script language="JavaScript1.2" type="text/javascript" src="/includefiles/headeriframe/mm_css_menu.js"></script>
- <script language="JavaScript" src="gen_validatorv31.js" type="text/javascript"></script>
- <style type="text/css" media="screen">
- @import url("/includefiles/headeriframe/menu.css");
- </style>
- <% Response.Buffer = True %>
- <body>
- <!--#include virtual="/includefiles/headeriframe/menu.asp"-->
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="126" align="left" valign="top"><!--#include virtual="../includefiles/nav.asp" --></td>
- <td style="width:7px; background-image:url(../images/dot_border.gif); vertical-align:top"><img src="http://bytes.com/topic/asp-classic/images/arf_colorwhite.gif" width="7" height="2" alt=""></td>
- <td width="100%" align="left" valign="top">
- <img src="http://bytes.com/topic/asp-classic/images/p2titles_contact.gif" width="600" height="39"><br>
- <img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="20" height="8"> <br>
- <br>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td rowspan="3" width="10"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- <td colspan="3"><img src="http://bytes.com/topic/asp-classic/images/stripe1.gif" width="590" height="10" alt=""></td>
- </tr>
- <tr>
- <td style="background:#FFFFFF; background-image:url(../images/white.gif); width:10px"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- <td bgcolor="#FFFFFF" background="../images/white.gif" width="570" align="left" valign="top"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="570" height="1"><br>
- <% if s_error=1 or c_error=1 or l_error=1 or p_error=1 then %>
- <br>
- <b>Please go back and provide the following information:</b>
- <br>
- <br>
- <%end if%>
- <%if s_error=1 then%>
- State
- <br>
- <%end if%>
- <%if c_error=1 then%>
- Country
- <br>
- <%end if%>
- <%if l_error=1 then%>
- E-Mail Address
- <br>
- <%end if%>
- <%if p_error=1 then%>
- Part Number
- <br>
- <%end if%>
- <%if p_error<>1 and s_error<>1 and l_error<>1 and c_error<>1 then%>
- <%if p2_error=1 then%>
- We apologize, there does not seem to be an IGS file for part number <%=PartNumber%>. You will recieve a file to the e-mail provided as soon as possible. The folloing information has been submitted:
- <%end if%>
- <%
- On Error Resume Next
- OpenDatabase()
- if Country ="Other" then
- sql="insert into tblIGS_Requests (Country, State, Email, PartNumber, Date, Avail) values ('" & CountryOther & "', '" & State & "', '" & email & "', '" & PartNumber & "', '" & todayis & "' , 'No')"
- else
- sql="insert into tblIGS_Requests (Country, State, Email, PartNumber, Date, Avail) values ('" & Country & "', '" & State & "', '" & email & "', '" & PartNumber & "', '" & todayis & "' , 'No')"
- end if
- connect.Execute(sql)
- CloseDatabase()
- ' Sends the emails
- ' Sends the emails to Me
- Set Mail = Server.CreateObject("Persits.MailSender")
- Mail.Host = "10.1.2.126"
- Mail.From = email
- Mail.FromName = "Amphenol RF.com Website"
- Mail.AddAddress emailto , "AmphenolRF.com"
- Mail.AddAddress "igsrequest@amphenolrf.com"
- Mail.AddAddress "ogefen@amphenolrf.com"
- Mail.Subject = "Customer has requested IGS File"
- Mail.Body = "Message: " & vbcrlf &_
- "Country: " & Request.Form("Country") & Request.Form("other") & vbcrlf &_
- "State: "& Request.Form("state") & vbcrlf &_
- "E-mail: " & Request.form("email")& vbcrlf &_
- "Part Number: "& Request.Form("PartNumber") & vbcrlf &_
- Request.form("message")
- Mail.Send()
- %>
- <br>
- <%end if%>
- <br>
- <%=font2%><a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true"><img src="http://bytes.com/topic/asp-classic/images/back.gif" border="0"></a></font>
- <br>
- <br>
- </font></td>
- <td style="background:#FFFFFF; background-image:url(../images/white.gif); width:10px"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- </tr>
- <tr>
- <td colspan="3"><img src="http://bytes.com/topic/asp-classic/images/stripe2.gif" width="590" height="10" alt=""></td>
- </tr>
- </table>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- </td>
- </tr>
- </table>
- <!--#include file="../includefiles/copyright.html" -->
- </body>
- </html>
- <%else
- On Error Resume Next
- ' in database if there IS a file
- OpenDatabase()
- if Country ="Other" then
- sql="insert into tblIGS_Requests (Country, State, Email, PartNumber, Date, Avail) values ('" & CountryOther & "', '" & State & "', '" & email & "', '" & PartNumber & "', '" & todayis & "' , 'Yes')"
- else
- sql="insert into tblIGS_Requests (Country, State, Email, PartNumber, Date, Avail) values ('" & Country & "', '" & State & "', '" & email & "', '" & PartNumber & "', '" & todayis & "' , 'Yes')"
- end if
- connect.Execute(sql)
- CloseDatabase()
- ' Sends the emails to Amphenol
- Set Mail = Server.CreateObject("Persits.MailSender")
- Mail.Host = "10.1.2.126"
- Mail.From = email
- Mail.FromName = "Amphenol RF.com Website"
- Mail.AddAddress emailto , "AmphenolRF.com"
- Mail.AddAddress "igsrequest@amphenolrf.com"
- Mail.Subject = "Customer has requested IGS File"
- Mail.Body = "Message: " & vbcrlf &_
- "Country: " & Request.Form("Country") & Request.Form("other") & vbcrlf &_
- "State: "& Request.Form("state") & vbcrlf &_
- "E-mail: " & Request.form("email")& vbcrlf &_
- "Part Number: "& Request.Form("PartNumber") & vbcrlf &_
- Request.form("message")
- Mail.Send()
- ' Sends a comfirmation email to the user
- Set Mail = Server.CreateObject("Persits.MailSender")
- Mail.Host = "10.1.2.126"
- Mail.From = emailto
- Mail.FromName = "Amphenol RF.com Website"
- Mail.AddAddress email
- Mail.Subject = "Thank you for visiting AmphenolRF"
- Mail.Body = "Message: " & vbcrlf &_
- "Thank you for visiting AmphenolRF.com" & vbcrlf & vbcrlf &_
- "You provided the following information:" & vbcrlf & vbcrlf &_
- "E-mail: " & Request.form("email")& vbcrlf &_
- "Part Number: "&Request.Form("PartNumber") & vbcrlf & _
- "Thank you once again for your interest in Amphenol RF." & vbcrlf & vbcrlf &_
- "Please feel free to ask any questions you may have."
- Mail.Send()
- On Error goto 0
- %>
- <html>
- <head>
- <title>Amphenol RF</title>
- <!--#include file="../includefiles/meta.html"-->
- <!--#include file="../includefiles/javascript.html"-->
- </head>
- <body>
- <!--#include virtual="/../includefiles/logo_nav.asp"-->
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="126" align="left" valign="top"><!--#include virtual="/../includefiles/nav.asp" --></td>
- <td style="width:7px; background-image:url(../images/dot_border.gif); vertical-align:top"><img src="http://bytes.com/topic/asp-classic/images/arf_colorwhite.gif" width="7" height="2" alt=""></td>
- <td width="100%" align="left" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><img src="http://bytes.com/topic/asp-classic/images/p2titles_contact.gif" width="600" height="39"><br>
- <img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="20" height="8"> <a href="contactus.asp">Amphenol
- RF</a> | <a href="contactrep.asp">Manufacturer's Representative</a><br>
- <br>
- <img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="15" height="8"><img src="http://bytes.com/topic/asp-classic/images/p2subtitles_contactus.gif" width="300" height="28"><br>
- </font>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td rowspan="3" width="10"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- <td colspan="3"><img src="http://bytes.com/topic/asp-classic/images/stripe1.gif" width="590" height="10"></td>
- </tr>
- <tr>
- <td style="background:#FFFFFF; background-image:url(../images/white.gif); width:10px"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- <td bgcolor="#FFFFFF" background="../images/white.gif" width="570" align="left" valign="top"><%=font2%><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="570" height="1"><br>
- <br>
- Thank you for visiting AmphenolRF.com
- <br>
- <br>
- E-Mail Address:<%=email%>
- <br>
- Part Number: <%=PartNumber%>
- <br><br>
- <a href="/IGSFiles/<%=PartNumber%>.zip">Click here to download your file</a><br><br>
- </td>
- <td style="background:#FFFFFF; background-image:url(../images/white.gif); width:10px"><img src="http://bytes.com/topic/asp-classic/images/invisi.gif" width="10" height="5" alt=""></td>
- </tr>
- <tr>
- <td colspan="3"><img src="http://bytes.com/topic/asp-classic/images/stripe2.gif" width="590" height="10" alt=""></td>
- </tr>
- </table>
- </font></td>
- </tr>
- </table><!--#include file="../includefiles/copyright.html" -->
- </body>
- </html>
- <%end if%>