Announcements

Spam Blaster Implemented
by NetriX - 4 months ago
The New PHP-Fusion USA
by NetriX - 7 months ago

Latest Posts

Fusion 9.0 Theme with Nebula
by jmonroe - 2 days ago
[PANEL] Top 5 Downloads
by alvin - 4 days ago
Facebook Connect 3.0.0
by FreedomIOPList - 3 weeks ago
Help With Userfield Generator In...
by FreedomIOPList - 3 weeks ago
Video Infusion 3.2.0
by songiuno - 1 month ago
Shoutbox refresh
by MarjorieMcCabe - 2 months ago
ArrowChat Details
by FreedomIOPList - 2 months ago
Need help
by penehoff - 2 months ago
Thank you
by KasteR - 3 months ago
Hello from newbie
by ginny - 3 months ago

View Thread

Who is here? 1 guest(s)
 Print Thread
Blacklist Page
skpacman
Want to show a page of blacklisted IP addresses or email addresses or domains to your administration staff, moderators, users, or even to the public?

Just make a new custom page, enter the code below, set the appropriate options (view restrictions, link locations, comments, ratings, etc.) and save it! The page does the rest.

IP addresses link to their report on ProjectHoneypot with a title tooltip showing the blacklist reason, and email addresses only show the tooltip, I may link that to something else later. Please leave the copyright in the bottom!

Edit the $num_cols variable to change how many columns the table has to fit your theme.

Download source  Code
<?php
$query = "SELECT * FROM " . DB_BLACKLIST . " ORDER BY blacklist_id";
   $result = dbquery($query);
   if (!$result) {
      die('Could not get table data: ' . mysql_error());
   }
echo "<center>The below table shows all IP addresses, email addresses, or email domains that have been banned from this website.<BR>
<table border='1' cellspacing='0' cellpadding='2'>";
$col_count = 0;
$num_cols = 6;
while($row = dbarray( $result )) {
   if ($col_count==0) { echo "<tr>";}
   if ($row['blacklist_ip']){
   echo "<TD><a href='http://projecthoneypot.org/ip_" . $row['blacklist_ip'] . "' title='".$row['blacklist_reason']."'>" . $row['blacklist_ip'] . "</a></td>";
   } elseif ($row['blacklist_email']){
   echo "<TD><span title='".$row['blacklist_reason']."'>" . $row['blacklist_email'] . "</span></td>";
   }
   $col_count++;
   if ($col_count >= $num_cols){
   echo "</tr>";
   $col_count=0;
   }
}
   echo "</TR></table><br /><br /><br />Blacklist Custom Page v1.54 &copy; skpacman 2013</center>";
?>



Edited by skpacman on 02-22-2013 08:33


There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
KasteR
Awesome, thank you! I'm going to use this. Clap
 
madison

>KasteR wrote:


Awesome, thank you! I'm going to use this. Clap


me too Good One
 
Lenoox
Very good Thank you Smile
 
Craig
just Some constructive input.

<TD> <TR> <BR> UPPERCASE IS NOT XHTML VALID.

<center></center> Is Deprecated. Use style='text-align: center;' or style='margin-left: auto; margin-right: auto;'. Even better put them in the style and use it as a class for span, p, div or whatever. just use add_to_head to add the styles.

<BR> or <br> is Depreciated, again UPPERCASE is also Not XHTML Compatible. Use <br /> instead.

And don't use this just do an else if no data.

Download source  Code
if (!$result) {
      die('Could not get table data: ' . mysql_error());
   }




Download source  Code
if ($result) {
// GO GO GO
}else{
echo"no blacklisted things";
}




Actually probably better to use...

Download source  Code
if (dbrows($result) > 0) {


 
skpacman

>Craig wrote:


just Some constructive input.

<TD> <TR> <BR> UPPERCASE IS NOT XHTML VALID.

<center></center> Is Deprecated. Use style='text-align: center;' or style='margin-left: auto; margin-right: auto;'. Even better put them in the style and use it as a class for span, p, div or whatever. just use add_to_head to add the styles.

<BR> or <br> is Depreciated, again UPPERCASE is also Not XHTML Compatible. Use <br /> instead.


Thanks for your input Good One

Keep in mind, I wrote this custom page several years ago, back when I knew little-to-nothing about xhtml and best php practices.

I'll rewrite it when I get some time, for now you can make the corrections (as you've stated) in your own use.

There are 10 kinds of people in this world.
Those who understand binary,
and those who don't...
 
PolarFox
Tip: maybe it's better to see the emails separated from IPs?
Hadoken!It Happens...JawDrop
 
KasteR
I've started to assemble an improved version of this. Few more things to add/improve on, and plan on making it available here. Thumb Up
http://fusion.kaster.us/infusions/bla..._panel.php
 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
External Page Wrapper General Chat 5 01-13-2018 07:45
Blank Page When Opening Site Errors and Bugs 2 10-17-2017 18:15
PHPF 9 - Page into page w/o iframe [7.02.XX] Code Snippets 1 07-28-2017 11:16
Page keeps breaking Themes Support 3 09-11-2015 23:04
Front Page Scroller Help Infusions Support 26 07-07-2015 06:15