LOCAL DogAdd,DogBytes,Data
Data = DogRead() *----------------读狗
LOCAL Sn, FirstChar, LastChar
sn = ALLTRIM(ThisForm.Text2.Value)
FirstChar = SUBSTR(sn,2,1)
LastChar = SUBSTR(sn,12,1)
snChar = SUBSTR(sn,1,1) + SUBSTR(sn,3,9) + SUBSTR(sn,LEN(sn),1)
IF NOT BETWEEN(Asc(FirstChar) - 27,48,57)
= MESSAGEBOX('注册失败!请与软件供应商联系,获取正确注册资料!',16,'提示')
RETURN .F.
EndIf
IF NOT BETWEEN(Asc(LastChar) - 32,48,57)
= MESSAGEBOX('注册失败!请与软件供应商联系,获取正确注册资料!',16,'提示')
RETURN .F.
EndIf
LOCAL OldChar,OldDayChar
OldChar = uf_P_Pass(ALLTRIM(abc.Reg_pass))
OldDayChar = uf_P_Pass(ALLTRIM(abc.reg_dy))
OldChar = SUBSTR(OldChar,1,1) + SUBSTR(OldDayChar,1,1) + SUBSTR(OldChar,2,9) + SUBSTR(OldDayChar,2,1) + SUBSTR(OldChar,11,1)
IF OldChar == ALLTRIM(ThisForm.Text2.Value) AND NOT EMPTY(OldChar)
= MESSAGEBOX('注册失败!请与软件供应商联系,获取正确注册资料!',16,'提示')
RETURN .F.
ENDIF
IF !EMPTY(data)
SET PROCEDURE TO MAIN
If Substr(Allt(data),1,6) = "ABSOFT" Or Len(Data) = 11
IF Substr(Allt(data),1,6) = "ABSOFT"
data = Substr(Allt(data),8)
EndIf
sn = Reg_main(ALLTRIM(THISFORM.text1.Value),ALLTRIM(THISFORM.Tag))