<%
'*********************************************************************************
'Get IP address
'*********************************************************************************
FunctionUserip()
DimGetClientIP
'If the client uses a proxy server, it should use the ServerVariables("HTTP_X_FORWARDED_FOR") method
GetClientIP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
IfGetClientIP=""orIsNull(GetClientIP) orIsEmpty(GetClientIP)Then
'If the client does not use a proxy, the Request.ServerVariables("REMOTE_ADDR") method should be used
GetClientIP=Request.ServerVariables("REMOTE_ADDR")
EndIf
Userip=GetClientIP
EndFunction
'*********************************************************************************
'Convert IP address
'*********************************************************************************
Functioncip(sip)
tip=CStr(sip)
sip1=Left(tip,CInt(InStr(tip,".")-1))
tip=Mid(tip,CInt(InStr(tip,".")+1))
sip2=Left(tip,CInt(InStr(tip,".")-1))
tip=Mid(tip,CInt(InStr(tip,".")+1))
sip3=Left(tip,CInt(InStr(tip,".")-1))
sip4=Mid(tip,CInt(InStr(tip,".")+1))
cip=CInt(sip1)*256*256*256+CInt(sip2)*256*256+CInt(sip3)*256+CInt(sip4)
EndFunction
'*********************************************************************************
'The dialog box pops up
'*********************************************************************************
Subalert(message)
message=Replace(message,"'","/'")
Response.Write("<script>alert('"&message&"')</script>")
EndSub
'*********************************************************************************
'Return to the previous page, usually used after judging whether the information is submitted completely
'*********************************************************************************
SubGoBack()
Response.Write("<script>history.go(-1)</script>")
EndSub
'*********************************************************************************
'Redirect another connection
'*********************************************************************************
SubGo(url)