%@ Language=VBScript%>
<%
dim strpagecode
strpagecode= "4EXIS05"
%>
<%
'Page/form name:adm_Inquiry_Reply.asp
'Purpose:User interface Replying User Inquiries
'Date Modified:25-06-2001
'Author: Ashish Bansal
%>
<%
on error resume next
dim rsExhibInquiry
dim strLoginId,strInquiryNo,EncodedSectionName
dim strCompName, strEMail,strBusinessNature,strInquiry,strReply
dim strUserName
EncodedSectionName=Server.URLEncode("Inquiry")
strLoginId=trim(session("USERID"))
if strLoginId="" then
Response.Redirect "/inc/admin/error.asp?section=" & EncodedSectionName & "&errorno=MF5"
else
end if
strInquiryNo=trim(request("InquiryNo"))
if strInquiryNo="" or not isnumeric(strInquiryNo) then
Response.Redirect "/inc/admin/error.asp?section=" & EncodedSectionName & "&errorno=HL4"
end if
if trim(request("blnReplied"))="Y" then
dim objIMail,strNameofUser,strInquiryText
set objIMail=server.CreateObject("SoftArtisans.SMTPMail")
'Getting User's Name for Body Text of Reply message
objIMail.RemoteHost=Application("smtpserverip")
objIMail.AddRecipient request("txtEmail")
objIMail.FromAddress =Application("adminemail")
objIMail.FromName="ITPO Administrator"
if trim(request("txtUserIdName")) <>"" then
strNameofUser="Dear " & request("txtUserIdName") & "," & chr(13)
else
strNameofUser=""
end if
strInquiryText= chr(13) & "Your Inquiry Was: " & request("txtInquiry") & chr(13)
strReply= chr(13) & "Reply: " & request("txtReplyMsg") & chr(13)
objIMail.BodyText=strNameofUser & strInquiryText & chr(13) & strReply & chr(13) & "Thanks and Regards," & chr(13) & "Site Administrator" & chr(13) & "TradePortalIndia.com"
objIMail.Subject="Re: Your Inquiry"
if objIMail.SendMail then
'Response.Write "update Exhib_Inquiry set Replied='Y' where InquiryNo='" & request("txtInqNo") & "'"
objConn.execute "update Exhib_Inquiry set Replied='Y' where InquiryNo='" & request("txtInqNo") & "'"
Response.Redirect request("txtREfAddress")
Response.End
else
Response.Redirect "/inc/admin/error.asp?section=" & EncodedSectionName & "&errorno=HL5"
end if
end if
set rsExhibInquiry=server.CreateObject("ADODB.RECORDSET")
rsExhibInquiry.Open "select * from exhib_inquiry where InquiryNo='" & strInquiryNo & "'",objConn
if not rsExhibInquiry.EOF then
GetFromExhibMater
else
Response.Redirect "/inc/admin/error.asp?section=" & EncodedSectionName & "&errorno=HL4"
end if
sub GetFromExhibMater()
strCompName=valAfterNullCheck( rsExhibInquiry("Company_Name"))
strEMail=valAfterNullCheck(rsExhibInquiry("email"))
strUserName=valAfterNullCheck(rsExhibInquiry("contact_Executive"))
strInquiry=valAfterNullCheck(rsExhibInquiry("comments"))
end sub
function valAfterNullCheck(strInput)
if not isnull(strInput) then
valAfterNullCheck=trim(server.HTMLEncode(strInput))
else
valAfterNullCheck=""
end if
end function
%>