%@ LANGUAGE="VBSCRIPT" %>
<%
Option Explicit
%>
<%
'Requestオブジェクト参照用
Dim strField
'個人情報変数
Dim strMemberType '会員種類
Dim strMemberID '会員番号
Dim strEMail
Dim strCellularEMail
Dim strName1 '氏名
Dim strName2 '氏名
Dim strName
Dim strKana1 'フリガナ
Dim strKana2 'フリガナ
Dim strKana
Dim intSex '性別
Dim intBirthNengo '生年月日
Dim strNengo
Dim strBirthYear '生年月日
Dim strBirthMonth '生年月日
Dim strBirthDay '生年月日
Dim datBirth 'データベース用西暦
Dim strBirth 'メール送信用和暦
Dim strPost1 '郵便番号1
Dim strPost2 '郵便番号2
Dim strPost
Dim strState
Dim intState '都道府県
Dim strAddress '住所(県名以降)
Dim strAddress2 '住所(丁目・番地)
Dim strAddressAll '住所
Dim strPhone1 '電話番号1
Dim strPhone2 '電話番号2
Dim strPhone3 '電話番号3
Dim strPhone
Dim strFax1 'FAX番号1
Dim strFax2 'FAX番号2
Dim strFax3 'FAX番号3
Dim strFax
Dim strCellular1 '携帯電話番号1
Dim strCellular2 '携帯電話番号2
Dim strCellular3 '携帯電話番号3
Dim strCellular
Dim strCompanyName '勤務先名
Dim intCategory '業種
Dim strCategory
Dim intOccupation '職種
Dim strOccupation
Dim strCompanyPost1 '勤務先郵便番号1
Dim strCompanyPost2 '勤務先郵便番号2
Dim strCompanyPost
Dim intCompanyState '勤務先都道府県
Dim strCompanyState
Dim strCompanyAddress '勤務先住所(県名以降)
Dim strCompanyAddress2 '勤務先住所(丁目・番地)
Dim strCompanyAddressAll '勤務先住所
Dim strCompanyPhone1 '勤務先電話番号1
Dim strCompanyPhone2 '勤務先電話番号2
Dim strCompanyPhone3 '勤務先電話番号3
Dim strCompanyPhone
Dim strFaxSend 'FAX送り先
Dim intFaxSend
Dim strMailSend '郵便送り先
Dim intMailSend
Dim strPlayWeek 'よくプレーする曜日
Dim intPlayWeek
'表示用
Dim strStateList
Dim strCompanyStateList
Dim strSexSelect(1)
Dim strNengoList '年号リスト
Dim strCategoryList '業種リスト
Dim strOccupationList '職種リスト
Dim strErrorMessage
Dim strFaxSendList 'FAX送り先
Dim strMailSendList '郵便送り先
Dim strPlayWeekList 'よくプレーする曜日
Dim ret '関数戻り値
Dim strArgTemp 'テンポラリ配列
Dim I
Dim strCommand
'メール用
Dim strTo
Dim strFrom
Dim strSubject
Dim strBody
Dim strFileName
Dim objBASP21 'メール送信用オブジェクト
Dim PageType
With Request
PageType = CInt(.QueryString("type"))
For Each strField In .Form
Select Case strField
Case "email" 'E-Mail
strEMail = .Form(strField)
Case "cellular_email" 'E-Mail
strCellularEMail = .Form(strField)
Case "name1" '姓
strName1 = .Form(strField)
Case "name2" '名
strName2 = .Form(strField)
Case "kana1" '姓カナ
strKana1 = .Form(strField)
Case "kana2" '名カナ
strKana2 = .Form(strField)
Case "sex" '性別
intSex = CInt(.Form(strField))
Case "nengo" '年号
intBirthNengo = CInt(.Form(strField))
Case "birth_year" '年
strBirthYear = .Form(strField)
Case "birth_month" '月
strBirthMonth = .Form(strField)
Case "birth_day" '日
strBirthDay = .Form(strField)
Case "post1" '郵便番号1
strPost1 = .Form(strField)
Case "post2" '郵便番号2
strPost2 = .Form(strField)
Case "state" '都道府県
intState = CInt(.Form(strField))
Case "address" '住所
strAddress = .Form(strField)
Case "address2" '住所
strAddress2 = .Form(strField)
Case "phone1" '電話番号1
strPhone1 = .Form(strField)
Case "phone2" '電話番号2
strPhone2 = .Form(strField)
Case "phone3" '電話番号3
strPhone3 = .Form(strField)
Case "fax1" 'FAX番号1
strFax1 = .Form(strField)
Case "fax2" 'FAX番号2
strFax2 = .Form(strField)
Case "fax3" 'FAX番号3
strFax3 = .Form(strField)
Case "cellular1" '携帯電話番号1
strCellular1 = .Form(strField)
Case "cellular2" '携帯電話番号2
strCellular2 = .Form(strField)
Case "cellular3" '携帯電話番号3
strCellular3 = .Form(strField)
Case "c_name" '勤務先名
strCompanyName = .Form(strField)
Case "category" '業種
intCategory = CInt(.Form(strField))
Case "occupation" '職種
intOccupation = CInt(.Form(strField))
Case "c_post1" '勤務先郵便番号1
strCompanyPost1 = .Form(strField)
Case "c_post2" '勤務先郵便番号2
strCompanyPost2 = .Form(strField)
Case "c_state" '勤務先都道府県名
If Not .Form(strField) = "" Then
intCompanyState = CInt(.Form(strField))
End If
Case "c_address" '勤務先住所
strCompanyAddress = .Form(strField)
Case "c_address2" '勤務先住所
strCompanyAddress2 = .Form(strField)
Case "c_phone1" '勤務先電話番号1
strCompanyPhone1 = .Form(strField)
Case "c_phone2" '勤務先電話番号2
strCompanyPhone2 = .Form(strField)
Case "c_phone3" '勤務先電話番号3
strCompanyPhone3 = .Form(strField)
Case "notes"
strNotes = .Form(strField)
Case "fax_send"
intFaxSend = CInt(.Form(strField))
Case "mail_send"
intMailSend = CInt(.Form(strField))
Case "play_week"
intPlayWeek = CInt(.Form(strField))
Case "command"
strCommand = .Form(strField)
Case "change"
strCommand = strField
End Select
Next
End With
If strCommand = "confirm" Then
If intSex = 1 Then
strSexSelect(0) = "男性"
ElseIf intSex = 2 Then
strSexSelect(0) = "女性"
End If
For I = 0 To 46
If intState = StateList(I, 0) Then
strAddressAll = StateList(I, 1)
End If
Next
strAddressAll = strAddressAll & strAddress & strAddress2
For I = 0 To 46
If intCompanyState = StateList(I, 0) Then
strCompanyAddressAll = StateList(I, 1)
End If
Next
For I = 0 To UBound(NengoList, 1)
If intBirthNengo = NengoList(I, 0) Then
strNengo = NengoList(I, 1)
End If
Next
For I = 0 To UBound(CategoryList, 1)
If intCategory = CategoryList(I, 0) Then
strCategory = CategoryList(I, 1)
End If
Next
For I = 0 To UBound(OccupationList, 1)
If intOccupation = OccupationList(I, 0) Then
strOccupation = OccupationList(I, 1)
End If
Next
'FAX送信先
For I = 0 To UBound(FaxSendList, 1)
If intFaxSend = FaxSendList(I, 0) Then
strFaxSend = FaxSendList(I, 1)
End If
Next
'郵便物送信先
For I = 0 To UBound(MailSendList, 1)
If intMailSend = MailSendList(I, 0) Then
strMailSend = MailSendList(I, 1)
End If
Next
'プレー日
For I = 0 To UBound(PlayWeekList, 1)
If intPlayWeek = PlayWeekList(I, 0) Then
strPlayWeek = PlayWeekList(I, 1)
End If
Next
strCompanyAddressAll = strCompanyAddressAll & strCompanyAddress & strCompanyAddress2
%>
<%
Response.End
ElseIf strCommand = "change" Then
datBirth = CDate(strBirthYear & "/" & strBirthMonth & "/" & strBirthDay)
strName = strName1 & " " & strName2
strKana = strKana1 & " " & strKana2
strPost = strPost1 & "-" & strPost2
strPhone = strPhone1 & "-" & strPhone2 & "-" & strPhone3
strFax = strFax1 & "-" & strFax2 & "-" & strFax3
strCellular = strCellular1 & "-" & strCellular2 & "-" & strCellular3
For I = 0 To 46
If intState = StateList(I, 0) Then
strAddressAll = StateList(I, 1)
strState = StateList(I, 1)
End If
Next
strAddressAll = strAddressAll & strAddress & strAddress2
strCompanyPost = strCompanyPost1 & "-" & strCompanyPost2
strCompanyPhone = strCompanyPhone1 & "-" & strCompanyPhone2 & "-" & strCompanyPhone3
For I = 0 To 46
If intCompanyState = StateList(I, 0) Then
strCompanyAddressAll = StateList(I, 1)
strCompanyState = StateList(I, 1)
End If
Next
strCompanyAddressAll = strCompanyAddressAll & strCompanyAddress & strCompanyAddress2
For I = 0 To UBound(NengoList, 1)
If intBirthNengo = NengoList(I, 0) Then
strNengo = NengoList(I, 1)
End If
Next
For I = 0 To UBound(CategoryList, 1)
If intCategory = CategoryList(I, 0) Then
strCategory = CategoryList(I, 1)
End If
Next
For I = 0 To UBound(OccupationList, 1)
If intOccupation = OccupationList(I, 0) Then
strOccupation = OccupationList(I, 1)
End If
Next
'FAX送信先
For I = 0 To UBound(FaxSendList, 1)
If intFaxSend = FaxSendList(I, 0) Then
strFaxSend = FaxSendList(I, 1)
End If
Next
'郵便物送信先
For I = 0 To UBound(MailSendList, 1)
If intMailSend = MailSendList(I, 0) Then
strMailSend = MailSendList(I, 1)
End If
Next
'プレー日
For I = 0 To UBound(PlayWeekList, 1)
If intPlayWeek = PlayWeekList(I, 0) Then
strPlayWeek = PlayWeekList(I, 1)
End If
Next
' ret = AddSirsMember(strMemberID, _
' strName, _
' strKana, _
' strEMail, _
' strPassword, _
' intSex, _
' datBirth, _
' strPost, _
' strAddressAll, _
' strPhone, _
' strFax, _
' strCellular, _
' strCompanyName, _
' strCompanyKana, _
' strCompanyPost, _
' strCompanyAddressAll, _
' strCompanyPhone, _
' strCompanyFax, _
' strNotes)
'メール送信
Set objBASP21 = Server.CreateObject("basp21")
strFrom = MAIL_FROM
strTo = "<" & strEMail & ">" & vbTab & "bcc" & vbTab & LINKS_MAIL_ADDRESS
strSubject = "Web会員登録お申し込みありがとうございました。"
strBody = "この度は、Web会員登録お申し込みして頂きありがとうございました。" & vbCrLf
strBody = strBody & "お申し込み結果に関して、折り返しご連絡させて頂きます。" & vbCrLf
strBody = strBody & "ただし、資料請求の場合は、資料を発送させて頂きます。" & vbCrLf & vbCrLf
strBody = strBody & "お申し込み内容" & vbCrLf & vbCrLf
strBody = strBody & "■会員の種類:" & MemberTypeList(PageType - 1, 1) & vbCrLf
strBody = strBody & "■お名前:" & strName & vbCrLf
strBody = strBody & "■フリガナ:" & strKana & vbCrLf
strBody = strBody & "■生年月日:" & strNengo & strBirthYear & "年" & strBirthMonth & "月" & strBirthDay & "日" & vbCrLf
strBody = strBody & "■性別:"
If intSex = 1 Then
strBody = strBody & "男性"
ElseIf intSex = 2 Then
strBody = strBody & "女性"
End If
strBody = strBody & vbCrLf
strBody = strBody & "■自宅郵便番号:" & strPost & vbCrLf
' strBody = strBody & "■自宅住所:" & strAddressAll & vbCrLf
strBody = strBody & "■自宅住所1:" & strState & strAddress & vbCrLf
strBody = strBody & "■自宅住所2:" & strAddress2 & vbCrLf
strBody = strBody & "■自宅電話番号:" & strPhone & vbCrLf
strBody = strBody & "■勤務先名:" & strCompanyName & vbCrLf
strBody = strBody & "■業種:" & strCategory & vbCrLf
strBody = strBody & "■役職:" & strOccupation & vbCrLf
strBody = strBody & "■勤務先郵便番号:" & strCompanyPost & vbCrLf
' strBody = strBody & "■勤務先住所:" & strCompanyAddressAll & vbCrLf
strBody = strBody & "■勤務先住所1:" & strCompanyState & strCompanyAddress & vbCrLf
strBody = strBody & "■勤務先住所2:" & strCompanyAddress2 & vbCrLf
strBody = strBody & "■勤務先電話番号:" & strCompanyPhone & vbCrLf
strBody = strBody & "■FAX送り先:" & strFaxSend & vbCrLf
strBody = strBody & "■FAX電話番号:" & strFax & vbCrLf
strBody = strBody & "■郵便物送り先:" & strMailSend & vbCrLf
strBody = strBody & "■携帯電話番号:" & strCellular & vbCrLf
strBody = strBody & "■メールアドレス:" & strEMail & vbCrLf
strBody = strBody & "■携帯アドレス:" & strCellularEMail & vbCrLf
strBody = strBody & "■良くプレーする曜日:" & strPlayWeek & vbCrLf
strFileName = "" '添付ファイル無し
ret = objBASP21.SendMail(MAIL_SERVER_NAME, strTo, strFrom, strSubject, strBody, strFileName)
If Len(ret) > 0 Then
Response.Write "メール送信エラー:" & ret
End If
%>
<%
Response.End
End If
'性別チェック
For I = 1 To 2
If intSex = I Then
strSexSelect(I - 1) = "checked"
End If
Next
'年号リスト作成
For I = 0 To UBound(NengoList, 1)
strNengoList = strNengoList & " " & vbCrLf
Next
'都道府県リスト作成
For I = 0 To 46
strStateList = strStateList & " " & vbCrLf
Next
'勤務先都道府県リスト作成
For I = 0 To 46
strCompanyStateList = strCompanyStateList & " " & vbCrLf
Next
'業種
For I = 0 To UBound(CategoryList, 1)
strCategoryList = strCategoryList & " " & vbCrLf
Next
'職種
For I = 0 To UBound(OccupationList, 1)
strOccupationList = strOccupationList & " " & vbCrLf
Next
'FAX送信先
For I = 0 To UBound(FaxSendList, 1)
strFaxSendList = strFaxSendList & " " & vbCrLf
Next
'郵便物送信先
For I = 0 To UBound(MailSendList, 1)
strMailSendList = strMailSendList & " " & vbCrLf
Next
'プレー日
For I = 0 To UBound(PlayWeekList, 1)
strPlayWeekList = strPlayWeekList & " " & vbCrLf
Next
%>