<%
Store_ID = 103
'//填寫資訊
if Request.Form("send")<>"" then
email = RequestValue(Request.Form("email"))
password = RequestValue(Request.Form("password"))
username = RequestValue(Request.Form("username"))
sex = RequestValue(Request.Form("sex"))
myYear = RequestValue(Request.Form("myYear"))
myMonth = RequestValue(Request.Form("myMonth"))
myDay = RequestValue(Request.Form("myDay"))
education = RequestValue(Request.Form("education"))
phone = RequestValue(Request.Form("phone"))
cellphone = RequestValue(Request.Form("cellphone"))
fax = RequestValue(Request.Form("fax"))
region = RequestValue(Request.Form("region"))
address = RequestValue(Request.Form("address"))
company = RequestValue(Request.Form("company"))
degree = RequestValue(Request.Form("degree"))
work_years = RequestValue(Request.Form("work_years"))
payfor = RequestValue(Request.Form("payfor"))
payfornum = RequestValue(Request.Form("payfornum"))
paym1 = RequestValue(Request.Form("paym1"))
pay_title = RequestValue(Request.Form("pay_title"))
pay_num = RequestValue(Request.Form("pay_num"))
mycoupon = RequestValue(Request.Form("mycoupon"))
birthday = myYear&"/"&myMonth&"/"&myDay
Age = myYear-1911
'//職務
SSQL = "SELECT * FROM Store_Items_Defined WHERE Info_type = 4 AND Info_ID = '"°ree&"' "
set rs = Server.CreateObject("ADODB.Recordset")
rs.open SSQL,conn_store,1,1
JobDep = trim(rs("Info_Name"))
rs.close
set rs = nothing
'//資料正常,先判斷是否已經是會員
Set rs_store = Server.CreateObject("ADODB.Recordset")
SSQL = " SELECT cid FROM store_customers WHERE EMail = '"&email&"' "
rs_store.open SSQL,conn_store,1,1
if rs_store.eof then '//未存在,寫入會員資料
INS_SQL = " INSERT INTO Store_Customers (Store_ID, Registration_Date, Password, First_name, Sex, Birthday_M, Phone "&_
", CellPhone, Address1, EMail, Region, Company, degree, Spam, SID, work_years) "&_
" VALUES ("&Store_ID&", '"&Now()&"', '"&password&"', '"&username&"', '"&sex&"', '"&birthday&"', '"&phone&"' "&_
", '"&cellphone&"', '"&address&"', '"&email&"', '"®ion&"', '"&company&"', '"°ree&"', 1, 10002, '"&work_years&"' ) "
'response.write INS_SQL
conn_store.Execute INS_SQL
else '//存在更新會員資料
UPD_SQL = " UPDATE Store_Customers SET "&_
" Store_ID = '"&Store_ID&"', "&_
" Sys_Modified = '"&Now()&"', "&_
" Password = '"&password&"', "&_
" First_name = '"&username&"', "&_
" Sex = '"&sex&"', "&_
" Birthday_M = '"&birthday&"', "&_
" Phone = '"&phone&"', "&_
" CellPhone = '"&cellphone&"', "&_
" Address1 = '"&address&"', "&_
" Region = '"®ion&"', "&_
" Company = '"&company&"', "&_
" degree = '"°ree&"', "&_
" Spam = 1, "&_
" SID = 10002, "&_
" work_years = '"&work_years&"' "&_
" WHERE Email = '"&email&"' "
'response.write UPD_SQL
conn_store.Execute UPD_SQL
end if
rs_store.close
%>
資料處理中請稍候 ...
<%
'//發信通知管理者
Tr_Email = "candy@asia-learning.com;sandy@asia-learning.com"
Tr_name = "[會員獨享!報名用Excel輕鬆做好管理-人事與財務篇現省500!!]活動管理者"
Email_Subject = "[會員獨享!報名用Excel輕鬆做好管理-人事與財務篇現省500!!]報名通知"
Email_Body = "[會員獨享!報名用Excel輕鬆做好管理-人事與財務篇現省500!!]活動管理者您好:"
Email_Body = Email_Body & "這個訊息是發自亞太教育訓練網,告知有人報名[會員獨享!報名用Excel輕鬆做好管理-人事與財務篇現省500!!]
"
Email_Body = Email_Body & ""
Email_Body = Email_Body & ""
Email_Body = Email_Body & ""
Email_Body = Email_Body & ""
Email_Body = Email_Body & ""
Email_Body = Email_Body & ""
Email_Body = Email_Body & "
填寫時間: | " & Now() & " |
姓名: | " & username & " |
手機: | " & cellphone & " |
E - mail: | " & email & " |
服務單位: | " & company & " |
"
Email_Body = Email_Body & "統計報表:http://www.asia-learning.com/img/edm/cyb/reg_report.asp
"
If Instr(Tr_Email,";")>0 then '//多個管理者
ALlBZMail = split(Tr_Email,";")
For I=0 to Ubound(ALlBZMail)
iEMail = ALlBZMail(i)
Tr_name = Tr_name
'//多筆通知
Call SendMail_TO(iEMail,Tr_name,Email_Subject,Email_Body)
Next
Else
iEMail = Tr_Email
'//發送通知
Call SendMail_TO(iEMail,Tr_name,Email_Subject,Email_Body)
End if
response.write ""
end if
function RequestValue(gString)
RequestValue = trim(Replace(gString,"'","''"))
end function
%>