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/O Code)
 Easy way to compare IP?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Klingstedt
Starting Member

Sweden
31 Posts

Posted - 25 April 2002 :  09:39:08  Show Profile  Send Klingstedt an ICQ Message
I'm suspecting a member to have more than one profile. Is there a way to check every members IP and compare every IP to the suspected member? I don´t have the time to check every member in a manual way, but is there an MOD for doing it? I have the BAN IP mod installed..

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 25 April 2002 :  10:42:48  Show Profile  Visit Gremlin's Homepage
Sorry to post here, but maybe others may like to use this too. I use CSS so I've taken all the formatting out, you might want to add some colours etc back in yourself.

Just save this as say admin_dupes.asp in your forum directory and then execute it.

<!--#INCLUDE file="config.asp" -->
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<!--#INCLUDE file="inc_functions.asp" -->
<!--#INCLUDE file="inc_top.asp" -->
<%
set rs = Server.CreateObject("ADODB.Recordset")
strSQL ="SELECT M_LAST_IP, Count(*) FROM FORUM_MEMBERS WHERE M_LAST_IP <> '000.000.000.000' GROUP BY M_LAST_IP HAVING COUNT(*) > 1"
set rs1 = my_conn.execute(strSql)
IPArray = "("

while not rs1.eof
IPArray = IPArray & "'" & rs1("M_LAST_IP") & "',"
rs1.movenext
wend

IPArray = left(IPArray,len(IPArray)-1) & ")"

strSQL = "SELECT M_NAME, M_LAST_IP, M_IP FROM FORUM_MEMBERS WHERE M_LAST_IP IN " & IPArray & " ORDER BY M_LAST_IP DESC"
set rs2 = my_conn.execute(strSQL)

%>
<p>The table on the Left displays duplicates based on the IP address logged when the user <b>last</b> visited the forum. On the right duplicates are based on
the users <b>first</b> logged IP address i.e. when they registered at the forums</p>
<table width="100%" align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table width="98%" align="center" cellspacing="0" cellpadding="2" border="0">
<tr>
<td>Name</td>
<td>Last IP</td>
<td>First IP</td>
</tr>
<% while not rs2.eof %>
<tr>
<td><% = rs2("M_NAME")%></span></td>
<td><% = rs2("M_LAST_IP")%></span></td>
<td><% = rs2("M_IP")%></span></td>
</tr>
<%
LastIP = rs2("M_LAST_IP")
rs2.movenext()
wend
%>
</table>
<%
rs1.close
set rs1 = nothing
rs2.close
set rs2 = nothing

set rs = Server.CreateObject("ADODB.Recordset")
strSQL ="SELECT M_IP, Count(*) FROM FORUM_MEMBERS WHERE M_IP <> '000.000.000.000' GROUP BY M_IP HAVING COUNT(*) > 1"
set rs1 = my_conn.execute(strSql)
IPArray = "("

while not rs1.eof
IPArray = IPArray & "'" & rs1("M_IP") & "',"
rs1.movenext
wend

IPArray = left(IPArray,len(IPArray)-1) & ")"

strSQL = "SELECT M_NAME, M_LAST_IP, M_IP FROM FORUM_MEMBERS WHERE M_IP IN " & IPArray & " ORDER BY M_IP DESC"
set rs2 = my_conn.execute(strSQL)
%>
</td>
<td> </td>
<td valign="top">
<table width="98%" align="center" cellspacing="0" cellpadding="2" border="0">
<tr>
<td>Name</td>
<td>First IP</td>
<td>Last IP</td>
</tr>
<% while not rs2.eof %>
<tr>
<td><% = rs2("M_NAME")%></span></td>
<td><% = rs2("M_IP")%></span></td>
<td><% = rs2("M_LAST_IP")%></span></td>
</tr>
<%
LastIP = rs2("M_IP")
rs2.movenext()
wend
%>
</table>
</td>
</tr>
</table>
<br>
<br>
<br>
<!--#include file="inc_footer.asp"-->
<%
rs1.close
set rs1 = nothing
rs2.close
set rs2 = nothing

else
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
%>


www.daoc-halo.com
Go to Top of Page

Klingstedt
Starting Member

Sweden
31 Posts

Posted - 25 April 2002 :  13:11:30  Show Profile  Send Klingstedt an ICQ Message
Gremlin, the script work perfectly. Thank you very much..

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 25 April 2002 :  20:14:42  Show Profile  Visit Gremlin's Homepage
Your very welcome Klingstedt.


www.daoc-halo.com
Go to Top of Page

brujo
Average Member

USA
602 Posts

Posted - 27 April 2002 :  05:20:32  Show Profile  Visit brujo's Homepage
Gremlin,

I get this error .....


ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

/forum/admin_dupes.asp, line 125



after my page footer on admin_dupes.asp





my lines 110 to 133 reads :

</tr>
<%
LastIP = rs2("M_IP")
rs2.movenext()
wend
%>
</table>
</td>
</tr>
</table>
<br>
<br>
<br>
<!--#include file="inc_footer.asp"-->
<%
rs1.close
set rs1 = nothing
rs2.close
set rs2 = nothing
else
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
%>



I have highlighted my Line 125.......


Any ideas on what I have done wrong ????

Go to Top of Page

Klingstedt
Starting Member

Sweden
31 Posts

Posted - 27 April 2002 :  06:44:21  Show Profile  Send Klingstedt an ICQ Message
brujo, maybe you should move the <!--#include file="inc_footer.asp"--> to the very bottom of the file..

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 27 April 2002 :  06:45:15  Show Profile  Visit Gremlin's Homepage
I'm guessing you have a mod or something else installed that is issuing an rs1.close() in it, hence closing my recordsets before my code trys to.

If you do a find and replace in my admin_dupes.asp file and say replace all instances of

rs1 with something else, perhaps myrs1 and do a similar find and replace for rs2 changing it to myrs2

Hope that helps.


www.daoc-halo.com
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 27 April 2002 :  06:47:04  Show Profile  Visit Gremlin's Homepage
quote:

brujo, maybe you should move the <!--#include file="inc_footer.asp"--> to the very bottom of the file..



Thats probably just going to shift the problem I'm guessing its a case of duplicate recordset names being used.

www.daoc-halo.com
Go to Top of Page

brujo
Average Member

USA
602 Posts

Posted - 27 April 2002 :  07:56:01  Show Profile  Visit brujo's Homepage
cheers for the help guys,

but its just throwing up another error now :

ADODB.Recordset error '800a0e78'

Operation is not allowed when the object is closed.

/forum/admin_dupes.asp, line 125




I then put the <!--#include file="inc_footer.asp"--> to the bottom,

and now it works perfect ......


Gremlin, should this not have worked like this ???

Is it ok to have it like this now with the <!--#include file="inc_footer.asp"--> at the bottom ?????


Thanks in advance





Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 27 April 2002 :  08:07:21  Show Profile  Visit Gremlin's Homepage
Theres no harm having that at the bottom, what you could try in fact is take out the <!--include# file="inc_footer.asp" completely, and replace that bottom bit with just

writefooter()

like this

<br>
<%
writefooter()
rs1.closeset rs1 = nothing
rs2.closeset rs2 = nothing
else
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")

Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))end if
%>




www.daoc-halo.com

Edited by - Gremlin on 27 April 2002 08:08:01
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.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07