<!-- #include file="conn.asp" -->
<HTML><HEAD><TITLE>REG</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<%
set s_simnew1=CreateObject("syunew3A.s_simnew3")
DevicePath = s_simnew1.FindPort(0)
chk=request("chk")
regmas=trim(request("regmas"))

if chk="dxzi" then
if regmas=""  then response.write "<script language=JavaScript>" & "alert('注册码不能为空！');" & "history.back()" & "</script>":response.end
nlen = s_simnew1.YWriteString(regmas, 0, "SUN20ZOM", "BAOSHENG", DevicePath)

sql="update config set regma='"&regmas&"' where id=1"
conn.execute(sql)

If nlen < 1 Then  response.write "<script language=JavaScript>" & "alert('注册失败，请检查您的SUN盾是否插好"&nlen&"！');" & "history.back()" & "</script>"  else  response.write "<script language=JavaScript>" & "alert('注册成功"& + cStr(nlen)&"');window.location.href='/'</script>"
response.end
end if
%>
<BODY>
<%if (sundd>=-30 and sundd<=30) or chk="sunzom" then%>
<form method="POST" action="?chk=dxzi">
			<p align="left">机器码：<b><%=regma%></b><br><%=sundd%>请将机器码复制给软件商重新获取注册码！请输入注册码:</p>
			<p align="left"><textarea rows="4" name="regmas" cols="61"></textarea></p>
			<p align="left">
			<input type="submit" value="提交注册" name="B1" style="font-size: 18pt"></p>
		</form>
<%else%>
<h2>只能在到期的前后30天进行注册！您的软件还可以使用<%=sundd%>天</h2>
<%end if%>
</BODY></HTML>