asp+ajax序列号发放程序(三)
下面是获取序列号的程序gsn.asp
<!-- #include file = "gl/conn.inc" -->
<%
if Session("GetSN") <> "" then
response.write "EORROR"
else
Ip_address=Request.ServerVariables ("HTTP_X_FORWARDED_FOR")
If Ip_address="" Then
Ip_address= Request.ServerVariables ("REMOTE_ADDR")
end if
sql="select top 1 * from sn_list where sta=0"
set rs=conn.execute(sql)
if rs.eof then
response.write "EMPTY"
else
response.write rs("sn")
squ="Update sn_list SET sta = '-1',out_time=now(),ip='" & Ip_address & "'Where (((id)=" & rs("id")& "))"
Session("GetSN") = 1
conn.execute(squ)
end if
end if
conn.Close
Set conn = Nothing
%>
暂无评论