Welcome, Guest. Please Login or Register.
May 20, 2025, 04:27:41 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Duplicate Search « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Duplicate Search  (Read 495 times)
jenigma
Noobie
*
Posts: 33


crazy is as crazy does

WWW
Duplicate Search
« on: April 04, 2003, 07:34:41 PM »
Reply with quote

Is there a mod for admin to search for duplicate i.p. addresses, and duplicate email addresses, to easily find out those who have multiple identities?

If not, I hope someone will make one soon.

Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Duplicate Search
« Reply #1 on: April 05, 2003, 12:36:28 AM »
Reply with quote

You can't have duplicate emails.

Here: (I wrote this a LONG time ago...)
<?phprequire 'Settings.php';require $sourcedir . '/Subs.php';require $sourcedir . '/Load.php';require $sourcedir . '/Errors.php';$dbcon = mysql_connect ($db_server, $db_user, $db_passwd);mysql_select_db ($db_name);LoadCookie();LoadUserSettings();$modSettings = array();$request = mysql_query("   SELECT variable, value   FROM {$db_prefix}settings   WHERE variable != 'agreement'") or database_error(__FILE__, __LINE__);while ($row = mysql_fetch_assoc($request))   $modSettings[$row['variable']] = $row['value'];$chklngfile = $chklngfile2 = $settings[23];if ($modSettings['userLanguage'] == 1){   if ($chklngfile == Null)      include_once($language);   else      include_once($chklngfile2);}else   include_once($language);Duplicates();function Duplicates(){   global $db_prefix, $scripturl, $color, $yytitle;      $yytitle = 'Duplicates';   template_header();   $q = mysql_query("      SELECT DISTINCT m.memberIP AS ip, m.memberName AS user, m.realName AS name      FROM {$db_prefix}members AS m, {$db_prefix}members AS m2      WHERE m.memberIP = m2.memberIP         AND m.ID_MEMBER != m2.ID_MEMBER      ORDER BY m.memberIP, m.memberName") or database_error(__FILE__, __LINE__);   $q2 = mysql_query("      SELECT posts, memberName AS name      FROM {$db_prefix}members");         $r2 = mysql_fetch_table($q2, 'name', 'posts');      $colors[0] = $color['windowbg'];   $colors[1] = $color['windowbg2'];   $i = 1;      if ($r = mysql_num_rows($q))   {      echo '         <table cellspacing="0" cellpadding="0" width="100%">';      while($r = mysql_fetch_assoc($q))      {         if ($r['ip'] != $lastip) $i = $i ^ 1;         $lastip = $r['ip'];         echo '            <tr bgcolor="' . $colors[$i] . '">               <td><a href="' . $scripturl . '?action=viewprofile&user=' . $r['user'] . '">' . $r['name'] . '</a> (' . $r['user'] . ') with ' . $r2[$r['user']] . ' posts.</td>               <td align="right"><a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . $r['ip'] . '">' . $r['ip'] . '</td>            </tr>';      }      echo '         </table>';   }      footer();   obExit();}function mysql_fetch_table($query = '', $idname = '', $selname = '', $call = ''){   assert_options(ASSERT_ACTIVE, 1);   assert_options(ASSERT_WARNING, 1);   assert($query != '');   while($row = mysql_fetch_assoc($query))   {      if($selname == '')      {         if($idname == '') $rows[] = (($call == '') ? ($row) : ($call($row)));         else $rows[$row[$idname]] = (($call == '') ? ($row) : ($call($row)));      }      else      {         if($idname == '') $rows[] = (($call == '') ? ($row[$selname]) : ($call($row[$selname])));         else $rows[$row[$idname]] = (($call == '') ? ($row[$selname]) : ($call($row[$selname])));      }   }   return $rows;}?>


-[Unknown]
Logged
jenigma
Noobie
*
Posts: 33


crazy is as crazy does

WWW
Re:Duplicate Search
« Reply #2 on: April 06, 2003, 08:17:56 PM »
Reply with quote

Thanks Unknown.

Where do I add this code?
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Duplicate Search
« Reply #3 on: April 06, 2003, 08:23:57 PM »
Reply with quote

It's a completely seperate file.... just save it as "duplicate.php" or something in your YaBB SE folder.

-[Unknown]
Logged
jenigma
Noobie
*
Posts: 33


crazy is as crazy does

WWW
Re:Duplicate Search
« Reply #4 on: April 06, 2003, 08:40:51 PM »
Reply with quote

Ah okay.

Beautiful. Thanks so much. I love that it shows how many posts each person has.
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Duplicate Search « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.109 seconds with 21 queries.