johngo33
Starting Member
14 Posts |
Posted - 22 May 2002 : 11:50:43
|
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 |
|