Destro
21.05.2007, 19:39
ich hab, eigendlich mehr aus kontrollier gründen heraus ein kleines modul geschrieben das, nicht wie üblich, die Member mit der Forum Form listet.
Es ging mir darum zu sehen ob der User evtl. ein Spambot ist.
Das Modul ist ziemlich simpel, das man auch weitere Angaben auflisten kann.
Zusätzlich gibt es eine Adminschleife, das nur die Admins sehen welche E-Mail Adresse und welche letzte IP Adresse (incl. Whoisabfrage) der User hatte.
Und sry wenn es ein wenig dreckig programmiert ist :p
<?php
/************************************************** **********************/
/* PHP-NUKE: PHP-Nuke Member Module */
/* =========================== */
/* */
/* Copyright (c) 2007 by Dominik Kempen */
/* http://www.destros-world.de */
/* */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* Enjoy! */
/************************************************** **********************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
global $module_name;
include("header.php");
title("PHP-Nuke Memberliste");
$index = 0;
OpenTable();
$result = $db->sql_query("SELECT * FROM ".$prefix."_users ORDER BY user_id ASC");
if ($db->sql_numrows($result) > 0) {
echo "<table style=\"border-collapse: collapse\" border=\"1\" bordercolor=\"#333333\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\">\n";
echo "<tr><td></td><td width=\"5\"><b>ID</b></td><td><b>Username</b></td><td width=\"5\"><b>Posts</b></td><td><b>Reg. Date</b></td>\n";
if (is_admin($admin)) {
echo "<td><b>Mail</b></td><td><b>Last IP</b></td>\n";
}
echo "</tr>\n";
$lugar=0;
while ($row = $db->sql_fetchrow($result)) {
$userid = intval($row['user_id']);
$username = stripslashes(check_html($row['username'], "nohtml"));
$lastip = stripslashes(check_html($row['last_ip'], "nohtml"));
$regdate = stripslashes(check_html($row['user_regdate'], "nohtml"));
$mail = stripslashes(check_html($row['user_email'], "nohtml"));
$posts = intval($row['user_posts']);
if($userid >= 2) {
echo "<tr><td width=\"5\">$lugar</td><td width=\"5\">$userid</td><td><a href=\"modules.php?name=Your_Account&op=userinfo&username=$username\">$username</a></td><td width=\"5\">$posts</td><td>$regdate</td>\n";
if (is_admin($admin)) {
echo "<td>$mail</td><td>$lastip (<a href=\"http://www.dnsstuff.com/tools/whois.ch?ip=$lastip\" target=\"_blank\">whois</a>)</td>\n";
} else {
echo "";
}
}
$lugar++;
}
echo "</tr></table>\n";
}
CloseTable();
include("footer.php");
?>
Wer sich das Modul anschaun will kann das hier (http://www.destros-world.de/modules.php?name=Member) machen
fehlen allerdings die Adminangaben :rolleyes:
Es ging mir darum zu sehen ob der User evtl. ein Spambot ist.
Das Modul ist ziemlich simpel, das man auch weitere Angaben auflisten kann.
Zusätzlich gibt es eine Adminschleife, das nur die Admins sehen welche E-Mail Adresse und welche letzte IP Adresse (incl. Whoisabfrage) der User hatte.
Und sry wenn es ein wenig dreckig programmiert ist :p
<?php
/************************************************** **********************/
/* PHP-NUKE: PHP-Nuke Member Module */
/* =========================== */
/* */
/* Copyright (c) 2007 by Dominik Kempen */
/* http://www.destros-world.de */
/* */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* Enjoy! */
/************************************************** **********************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
global $module_name;
include("header.php");
title("PHP-Nuke Memberliste");
$index = 0;
OpenTable();
$result = $db->sql_query("SELECT * FROM ".$prefix."_users ORDER BY user_id ASC");
if ($db->sql_numrows($result) > 0) {
echo "<table style=\"border-collapse: collapse\" border=\"1\" bordercolor=\"#333333\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\">\n";
echo "<tr><td></td><td width=\"5\"><b>ID</b></td><td><b>Username</b></td><td width=\"5\"><b>Posts</b></td><td><b>Reg. Date</b></td>\n";
if (is_admin($admin)) {
echo "<td><b>Mail</b></td><td><b>Last IP</b></td>\n";
}
echo "</tr>\n";
$lugar=0;
while ($row = $db->sql_fetchrow($result)) {
$userid = intval($row['user_id']);
$username = stripslashes(check_html($row['username'], "nohtml"));
$lastip = stripslashes(check_html($row['last_ip'], "nohtml"));
$regdate = stripslashes(check_html($row['user_regdate'], "nohtml"));
$mail = stripslashes(check_html($row['user_email'], "nohtml"));
$posts = intval($row['user_posts']);
if($userid >= 2) {
echo "<tr><td width=\"5\">$lugar</td><td width=\"5\">$userid</td><td><a href=\"modules.php?name=Your_Account&op=userinfo&username=$username\">$username</a></td><td width=\"5\">$posts</td><td>$regdate</td>\n";
if (is_admin($admin)) {
echo "<td>$mail</td><td>$lastip (<a href=\"http://www.dnsstuff.com/tools/whois.ch?ip=$lastip\" target=\"_blank\">whois</a>)</td>\n";
} else {
echo "";
}
}
$lugar++;
}
echo "</tr></table>\n";
}
CloseTable();
include("footer.php");
?>
Wer sich das Modul anschaun will kann das hier (http://www.destros-world.de/modules.php?name=Member) machen
fehlen allerdings die Adminangaben :rolleyes: