📄 29.asp
字号:
<%
'看IP
function getIP(from1,to1)
if session("hxf_u_grade")<2 then
Response.Write "<script language=JavaScript>{alert('需要2级以上才能查看IP');}</script>"
Response.End
end if
if to1="大家" then to1=from1
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("hg_connstr")
conn.open connstr
sql="SELECT lastip FROM 用户 WHERE 姓名='" & to1 & "'"
set rs=conn.execute(sql)
ip=rs("lastip")
grade=session("hxf_u_grade")
if grade=2 then p=2
if grade=3 then p=3
if grade>3 then p=4
for i=1 to p
if right(ip,1)="." then
exit for
else
if grade=2 then ip=left(ip,len(ip)-3)+"x"+".x"
if grade=3 then ip=left(ip,len(ip)-1)+"x"
if grade>3 then ip=left(ip,len(ip))
end if
next
getip= "["&from1&"]看到"&to1 &"的IP为" & IP
rs.close
conn.close
set rs=nothing
set conn=nothing
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -