Parašė Kelmas· 2008 Geg. 1 19:05:40
#14
Še šiandien geras kaško..
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";
if (!checkrights("IP")) fallback("../../index.php");
if (isset($_GET['delete']) && is_numeric($_GET['delete'])){
$query = dbquery("DELETE FROM ".$db_prefix."bad_login WHERE login_id='".$_GET['delete']."'");
redirect(FUSION_SELF);
}
if (isset($_GET['ban'])){
$result = dbquery("INSERT INTO ".$db_prefix."blacklist (blacklist_ip,blacklist_email,blacklist_reason) VALUES ('".$_GET['ban']."','','Pakliuvo iš logo į juodąjį sąrašą');");
redirect(FUSION_SELF);
} elseif(isset($_GET['lookup']) && is_numeric($_GET['lookup'])){
$query = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_ip='".$_GET['lookup']."'");
if(dbrows($query) != 0) {
opentable(dbrows($query)." Members Found");
$counter = 0;
while ($data = dbarray($query)){
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a>";
echo "<br />".$data['user_ip'];
$counter++;
if(dbrows($query) >= 2 && $counter <= dbrows($query)) echo "<br /><br />";
}
} else {
opentable("Brak b³źdnych logowań");
echo "Wskazany adres IP nie naleæy do æadnego uæytkownika.";
}
closetable();
} else {
$result = dbquery("SELECT * FROM ".$db_prefix."bad_login");
opentable("Portalo klaidos");
if(dbrows($result) != 0){
echo "<center><table width='500px'><tr><td>";
echo "<span style='font-weight:bold'>IP Adresas</span></td><td><span style='font-weight:bold'>Laikas</span></td><td><span style='font-weight:bold'>Nick</span></td><td><span style='font-weight:bold'>Nustatymai</span></td></tr>";
while($data = dbarray($result)){
echo "<tr><td><a href='http://www.ripe.net/fcgi-bin/whois?".$data['login_ip']."'target='_blank'>";
echo $data['login_ip']."</a></td>";
echo "<td>".ucwords(showdate("%d.%m.%Y %H:%M:%S", $data['login_time']))."</td>";
echo "<td>".$data['login_user']."</td>";
echo "<td><a href='".FUSION_SELF."?delete=".$data['login_id']."'>Trinti logą</a><td></tr>";
echo "<a href='?ban=".$data['login_ip']."'>Užbaninti vartotoją</a>";
}
echo "</table></center>";
} else {
echo "<center>Nie odnotowano æadnego b³źdnego logowania.</center>";
}
closetable();
}
echo "</td>\n";
require_once BASEDIR."footer.php";
?>
Redagavo Kelmas· 2008 Geg. 1 19:05:06