<%
'*************************************************
'Obtenha endereço IP
'*************************************************
FunctionUserip ()
DimgetClientip
'Se o cliente usar um servidor proxy, ele deve usar o método ServerVariables ("http_x_forwarded_for")
GetClientip = request.servervariables ("http_x_forwarded_for")
IfgetClientip = "" ORISNULL (getClientip) orisEmpty (getClientip) então
'Se o cliente não usar um proxy, o método Request.ServerVariats ("Remote_addr") deve ser usado
GetClientip = request.servervariables ("remote_addr")
Endif
Userip = getClientip
Função final
'*************************************************
'Converta o endereço IP
'*************************************************
FunctionCip (SIP)
TIP = CSTR (SIP)
sip1 = esquerda (dica, cint (instrum (tip, ".")-1)))
TIP = MID (TIP, CINT (Instr (Tip, ".")+1)))
sip2 = esquerda (dica, cint (instrum (tip, ".")-1)))
TIP = MID (TIP, CINT (Instr (Tip, ".")+1)))
sip3 = esquerda (dica, cint (instrum (tip, ".")-1)))
SIP4 = MID (TIP, CINT (Instr (Tip, ".")+1)))
cip = cint (sip1)*256*256*256+cint (sip2)*256*256+cint (sip3)*256+cint (sip4)
Função final
'*************************************************
'A caixa de diálogo aparece
'*************************************************
Subalert (mensagem)
mensagem = substituir (mensagem, "'", "/'")
Response.Write ("<Script> alert ('" & Message & "') </sCript>")
Endsub
'*************************************************
'Retornar à página anterior, geralmente usado após julgar se as informações são enviadas completamente
'*************************************************
Subgoback ()
Response.Write ("<Script> history.go (-1) </sCript>")
Endsub
'*************************************************
Redirecionar outra conexão
'*************************************************
Subgo (URL)