%@LANGUAGE="VBScript"%>
<%
'
'-------------------------------------------------------------------------------------------------*
' アクアシール会
' 問い合わせフォーム
' 株式会社 太洋堂 システム開発G
'-------------------------------------------------------------------------------------------------*
'
Option Explicit
Dim VerNo
VerNo = "Ver.2002/04/04"
'-------------------------------------------------------------------------------------------------*
' [ インクルード ]
%>
<%
'-------------------------------------------------------------------------------------------------*
' [ 変数宣言 ]
Dim Error_Flag, MailStrings
'From取得
Dim From
'資料請求先
Dim ShiryouSeikyuusaki_STR
'申込者情報
Dim NameKana_STR, NameKanji_STR
Dim CompanyName_STR, PostName_STR, OfficialName_STR
Dim ZipCode_STR, Address1_STR, Address2_STR
Dim Tel_STR, Email_STR
Dim Inquiry_STR
'-------------------------------------------------------------------------------------------------*
' [ Form値取得 ]
'From取得
From = CheckQueryString("From")
'資料請求先
ShiryouSeikyuusaki_STR = CheckQueryString("ShiryouSeikyuusaki")
'申込者情報
NameKana_STR = ChangeQStoFORM(CheckQueryString("NameKana"))
NameKanji_STR = ChangeQStoFORM(CheckQueryString("NameKanji"))
CompanyName_STR = ChangeQStoFORM(CheckQueryString("CompanyName"))
PostName_STR = ChangeQStoFORM(CheckQueryString("PostName"))
OfficialName_STR = ChangeQStoFORM(CheckQueryString("OfficialName"))
ZipCode_STR = ChangeQStoFORM(CheckQueryString("ZipCode"))
Address1_STR = ChangeQStoFORM(CheckQueryString("Address1"))
Address2_STR = ChangeQStoFORM(CheckQueryString("Address2"))
Tel_STR = ChangeQStoFORM(CheckQueryString("Tel"))
Email_STR = ChangeQStoFORM(CheckQueryString("Email"))
Inquiry_STR = ChangeQStoFORM(CheckQueryString("Inquiry"))
dim nowTime
NowTime=now
dim server_response
server_response = recaptcha_confirm()
'response.write server_response
if server_response <> "" then
if server_response*1<0.6 then
response.write "ロボットとみなされました"
response.end
end if
end if
%>
<%
'-------------------------------------------------------------------------------------------------*
' [ 分岐 ]
Select Case From
Case "CHECK"
CHECK_FORM_VALUE
If Error_Flag = True Then
response.write "エラーがあります。ブラウザの戻るボタンをクリックしてください"
Else
'メール送信先設定
Select Case ShiryouSeikyuusaki_STR
Case "東京"
ML_To = MailAddress_TOKYO
Case Else
ML_To = MailAddress_OSAKA
End Select
'メール本文生成
MailStrings = MailStrings & "■ 資料請求" & VbNewLine
MailStrings = MailStrings & "" & VbNewLine
MailStrings = MailStrings & "発信日時: " & Now() & VbNewLine
MailStrings = MailStrings & "発信環境: " & Request.ServerVariables("HTTP_USER_AGENT") & VbNewLine
MailStrings = MailStrings & "発信元 : " & Request.ServerVariables("HTTP_REFERER") & VbNewLine
MailStrings = MailStrings & "" & VbNewLine
MailStrings = MailStrings & "********************** 送信情報 **********************" & VbNewLine
MailStrings = MailStrings & "" & VbNewLine
MailStrings = MailStrings & "[ 資料請求先 ] " & ShiryouSeikyuusaki_STR & VbNewLine
MailStrings = MailStrings & "[ フリガナ ] " & CheckQueryString("NameKana") & VbNewLine
MailStrings = MailStrings & "[ 氏 名 ] " & CheckQueryString("NameKanji") & VbNewLine
MailStrings = MailStrings & "[ 会社名 ] " & CheckQueryString("CompanyName") & VbNewLine
MailStrings = MailStrings & "[ 部署名 ] " & CheckQueryString("PostName") & VbNewLine
MailStrings = MailStrings & "[ 役職名 ] " & CheckQueryString("OfficialName") & VbNewLine
MailStrings = MailStrings & "[ 郵便番号 ] " & CheckQueryString("ZipCode") & VbNewLine
MailStrings = MailStrings & "[ 住所1 ] " & CheckQueryString("Address1") & VbNewLine
MailStrings = MailStrings & "[ 住所2 ] " & CheckQueryString("Address2") & VbNewLine
MailStrings = MailStrings & "[ 電話番号 ] " & CheckQueryString("Tel") & VbNewLine
MailStrings = MailStrings & "[ Eメール ] " & CheckQueryString("Email") & VbNewLine
MailStrings = MailStrings & "[ お問い合わせ内容 ]" & VbNewLine
MailStrings = MailStrings & CheckQueryString("Inquiry") & VbNewLine
Dim bobj, Message_STR
Dim logname, svname, mailto, mailfrom, subj, body, files, rc
Set bobj = Server.CreateObject("basp21")
logname = ""
svname = ML_SMTP
mailto = ML_To
mailfrom = ML_From
subj = "お問い合わせ"
body = MailStrings
files = ""
rc = bobj.SendMailEx( logname, svname, mailto, mailfrom, subj, body, files )
If( rc = "" )Then
Message_STR = "下記内容でお問い合わせを受け付けました。" & rc
Else
Message_STR = rc
End If
COMPLETE_PRINT
end if
Case "INPUT"
CHECK_FORM_VALUE
CHECK_PRINT
Case Else
INPUT_PRINT
End Select
Response.End
%>
<%
'-------------------------------------------------------------------------------------------------*
' [ Form値入力チェック ]
Sub CHECK_FORM_VALUE
'資料請求先
If( ShiryouSeikyuusaki_STR = "" OR ShiryouSeikyuusaki_STR = "-----" )Then
ShiryouSeikyuusaki_STR ="資料請求先を選択して下さい"
Error_Flag = True
End If
'申込者情報
'フリガナ
If( NameKana_STR = "" )Then
NameKana_STR ="フリガナを全角カナで入力して下さい"
Error_Flag = True
ElseIf( CheckZenkakuKANA( NameKana_STR ) <> True )Then
NameKana_STR ="全角カナで入力して下さい"
Error_Flag = True
End If
'氏名
If( NameKanji_STR = "" )Then
NameKanji_STR ="氏名を入力して下さい"
Error_Flag = True
End If
'会社名/設計事務所名
If( CompanyName_STR = "" )Then
CompanyName_STR ="(入力なし)"
End If
'部署名
If( PostName_STR = "" )Then
PostName_STR ="(入力なし)"
End If
'役職名
If( OfficialName_STR = "" )Then
OfficialName_STR ="(入力なし)"
End If
'郵便番号
If( ZipCode_STR = "" )Then
ZipCode_STR ="(入力なし)"
ElseIf( CheckTelephoneNo( ZipCode_STR ) <> True )Then
ZipCode_STR ="半角数字で入力して下さい"
Error_Flag = True
End If
'住所1
If( Address1_STR = "" )Then
Address1_STR ="住所を入力して下さい"
Error_Flag = True
End If
'住所2
If( Address2_STR = "" )Then
Address2_STR ="(入力なし)"
End If
'電話番号
If( Tel_STR = "" )Then
Tel_STR ="(入力なし)"
ElseIf( CheckTelephoneNo( Tel_STR ) <> True )Then
Tel_STR ="半角数字で入力して下さい"
Error_Flag = True
End If
'メールアドレス
If( Email_STR = "" )Then
Email_STR ="(入力なし)"
End If
'お問合せ記入欄
If( Inquiry_STR = "" )Then
Inquiry_STR ="(入力なし)"
Else
Inquiry_STR = ChangeCRLFtoBR( Inquiry_STR )
End If
End Sub
%>
<%
'-------------------------------------------------------------------------------------------------*
' [ 入力画面 ]
Sub INPUT_PRINT
%>
アクアシール
<%
End Sub
%>
<%
'-------------------------------------------------------------------------------------------------*
' [ 確認画面 ]
Sub CHECK_PRINT
%>
アクアシール