Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Lock user and trace IP from pop_profile.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

johngo33
Starting Member

14 Posts

Posted - 22 May 2002 :  11:50:43  Show Profile
Sometime it's just easier to be able to lock a user when viewing their profile from any page. I also want to see their IP and want to trace that IP to see where they came from.

You will have to edit the pop_profile.asp page. Add 2 lines in red:

strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_STATUS"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LAST_IP"

strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID=" & cLng(Request.QueryString("id"))

Find:

<% if mLev = 4 then %>
<td valign=top align=left bgcolor="<% =strHeadCellColor %>"> <a href="pop_profile.asp?mode=Modify&ID=<% =rs("MEMBER_ID") %>&name=<% =ChkString(rs("M_NAME"),"urlpath") %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b><% =ChkString(rs("M_NAME"),"display") %></a></b></font></td>
<% else %>

AND replace with

<% if mLev = 4 then %>
<td valign=top align=left bgcolor="<% =strHeadCellColor %>"> <a href="pop_profile.asp?mode=Modify&ID=<% =rs("MEMBER_ID") %>&name=<% =ChkString(rs("M_NAME"),"urlpath") %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b><% =ChkString(rs("M_NAME"),"display") %></a>
<% if rs("M_STATUS") <> 0 then %>
<a href="JavaScript:openWindow('pop_lock.asp?mode=Member&MEMBER_ID=<% =rs("MEMBER_ID") %>')"><img src="<%=strImageURL %>icon_lock.gif" alt="Lock Member" border="0" hspace="0"></a>
<% else %>
<a href="JavaScript:openWindow('pop_open.asp?mode=Member&MEMBER_ID=<% =rs("MEMBER_ID") %>')"><img src="<%=strImageURL %>icon_unlock.gif" alt="Un-Lock Member" border="0" hspace="0"></a>
<% end if%>
<% if mLev = 4 or mLev = 3 then %>
<a href="http://www.geektools.com/cgi-bin/proxy.cgi?query=<%=Trim(rs("M_LAST_IP"))%>&targetnic=whois.arin.net"><% =ChkString(rs("M_LAST_IP"),"display")%></a><%End IF%> </b></font></td>
<% else %>

Now when you want to lock a user just click on their name in the post if you are admin. Moderators can also view and trace user's IPs.

Happy coding.



Edited by - johngo33 on 22 May 2002 11:56:28

milki
Junior Member

Israel
320 Posts

Posted - 27 May 2002 :  20:27:24  Show Profile  Visit milki's Homepage  Send milki an ICQ Message
tanks man nice work !

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07