CEO mindPower 新書推介
<%
if Authenticate(Session("loginid"),Session("loginpassword")) Then JRedirect("download.asp")
%>
<%
if Request.Form("hiddenField") = "Register" Then
Dim isRec
if Request.Form("IsReceiveNews") = "" Then isRec = 0 else isRec = 1
if Validate() Then
SendMail Request.Form("uid"),Request.Form("Password"),Request.Form("Email"),Request.Form("LastName"),Request.Form("Surname"),Request.Form("Sex"),Request.Form("Mobile"),"",Request.Form("Industry"),Request.Form("Title"),isRec
WriteRecord Request.Form("uid"),Request.Form("Password"),Request.Form("Email"),Request.Form("CEOPassword"),Request.Form("LastName"),Request.Form("Surname"),Request.Form("Sex"),Request.Form("Mobile"),"",Request.Form("Industry"),Request.Form("Title"),isRec
JRedirect("Success.asp")
End if
End If
%>
<%
'Validate Form Function
Function getErrMsg()
Dim ArrErrMsg
Dim strDuplicateUid : strDuplicateUid = "本帳號已被選用,請選擇另一個帳號。"
ArrErrMsg = Array("請輸入「用戶名稱」。", _
"請輸入「密碼」。", _
"請輸入「確認密碼」。", _
"請輸入「電郵地址」。", _
"請輸入「CEO密碼」。", _
"請輸入「姓」。", _
"請輸入「名」。", _
"請輸入「聯絡電話」。", _
"請同意並接受私隱政策。")
Dim strErrMsg
strErrMsg = ""
if IsExist(Request.Form("uid")) Then strErrMsg = strDuplicateUid
Dim sep
sep = "\n"
if Trim(Request.Form("uid")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(0) & sep
if Trim(Request.Form("Password")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(1) & sep
if Trim(Request.Form("Password2")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(2) & sep
if Trim(Request.Form("Email")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(3) & sep
if Trim(Request.Form("CEOPassword")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(4) & sep
if Trim(Request.Form("Surname")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(5) & sep
if Trim(Request.Form("LastName")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(6) & sep
' if Trim(Request.Form("Mobile")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(7) & sep
if Trim(Request.Form("AcceptTerm")) = "" Then strErrMsg = strErrMsg & ArrErrMsg(8) & sep
if ValidCEOPassword = false Then strErrMsg = strErrMsg & "CEO 密碼錯誤"
getErrMsg = strErrMsg
End Function
Function Validate()
if getErrMsg = "" Then Validate = true else Validate = False
End Function
Function ValidCEOPassword ()
Dim flag : flag = false
Dim i
For i = 0 to UBound(CeoPass)
if Request.Form("CEOPassword") = CeoPass(i) Then flag = true
Next
ValidCEOPassword = flag
End Function
%>